Paulis & basics 1 qubit
Hadamard
Maps computational basis states to equal superpositions and swaps the $X$ and $Z$ bases.
The Hadamard gate creates and removes superposition by mapping $|0\rangle \mapsto |+\rangle$ and $|1\rangle \mapsto |-\rangle$.
$$ H = \frac{1}{\sqrt{2}}\begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix} $$
Properties
- Self-inverse and Hermitian: $H^\dagger = H$.
- Conjugates Pauli operators: $H X H = Z$ and $H Z H = X$.
- Real and symmetric.
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.
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.HGate |
| PennyLane | pennylane.Hadamard |
| Cirq | cirq.H |
| Q# | Std.Intrinsic.H |
| PyQuil | pyquil.gates.H |
| Braket | braket.circuits.gates.H |
| BQSKit | bqskit.ir.gates.HGate |
| Qibo | qibo.gates.H |
| pytket | pytket.circuit.OpType.H |
| Stim | H |
| OpenQASM | stdgates.inc: h |