controlled 2 qubits
Controlled-Hadamard
Applies a Hadamard to the target qubit when the control qubit is in the $|1\rangle$ state.
The controlled-Hadamard gate performs a conditional change of basis, moving the target between the computational basis and the Hadamard basis only when the control is $|1\rangle$.
$$ \mathrm{C}H = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & \tfrac{1}{\sqrt{2}} & \tfrac{1}{\sqrt{2}} \\ 0 & 0 & \tfrac{1}{\sqrt{2}} & -\tfrac{1}{\sqrt{2}} \end{bmatrix} $$
Properties
- Hermitian and self-inverse, like the Hadamard itself.
- Real, so it lies in the orthogonal group.
- Although $H$ is Clifford, $\mathrm{C}H$ is not. Adding a control to a Clifford gate does not preserve Clifford-ness in general (compare CNOT, which stays Clifford, versus $\mathrm{C}H$ and $\mathrm{C}S$, which do not).
Decompositions
- A single entangling gate suffices: $\mathrm{C}H = (I \otimes R_y(\pi/4)) \, \mathrm{C}Z \, (I \otimes R_y(-\pi/4))$, which works because $R_y(\pi/4) \, Z \, R_y(-\pi/4) = H$.
The unitary, drawn
Every entry of the matrix as a disc. The area is the transition probability $|U_{jk}|^2$; the colour and the hand are the phase. Rows are outputs $\langle j|$, columns inputs $|k\rangle$, in the computational basis.
Phase
Disc area $= |U_{jk}|^2$. Hover an entry for its value, or take the JSON.
Weyl chamber
Where this gate sits among all two-qubit gates, up to single-qubit rotations before and after.
Coordinates:
not entangling entangling perfect entangler
$(a, b, c)$ means the gate equals $e^{i(a\,XX + b\,YY + c\,ZZ)}$ up to single-qubit gates, reduced to the chamber $\pi/4 \ge a \ge b \ge |c|$ (the convention of the canonical gate, Qiskit and Cirq). The $a = \pi/4$ face is a mirror: $(\pi/4, b, c)$ and $(\pi/4, b, -c)$ are the same gate. Drag the figure to rotate it, double-click to reset.
SDK support
How to call this gate in each framework. Hover a ⓘ for a note; the support matrix compares every gate at once.
| SDK | Name |
|---|---|
| Qiskit | qiskit.circuit.library.CHGate |
| PennyLane | pennylane.CH |
| Cirq | — ⓘ |
| Q# | — ⓘ |
| PyQuil | — ⓘ |
| Braket | — ⓘ |
| BQSKit | bqskit.ir.gates.CHGate |
| Qibo | qibo.gates.CH |
| pytket | pytket.circuit.OpType.CH |
| Stim | — |
| OpenQASM | stdgates.inc: ch |