Two of the most useful states in quantum computing are the X-basis states∣+⟩ and ∣−⟩. Both are equal superpositions of ∣0⟩ and ∣1⟩, differing
only in the relative sign between the two amplitudes:
∣+⟩=21(∣0⟩+∣1⟩),∣−⟩=21(∣0⟩−∣1⟩).
On the Bloch sphere, ∣+⟩ sits on the +x axis and ∣−⟩ on the −x axis — both
halfway between the two poles.
Producing them with H
The Hadamard gate H is defined by its action on the computational-basis states:
H∣0⟩=21(∣0⟩+∣1⟩)=∣+⟩,H∣1⟩=21(∣0⟩−∣1⟩)=∣−⟩.
You can verify this directly from the matrix:
H=21(111−1).
Multiply H by the column vector for ∣0⟩=(01):
H∣0⟩=21(11)=21∣0⟩+21∣1⟩=∣+⟩.✓
Multiply by ∣1⟩=(10):
H∣1⟩=21(1−1)=21∣0⟩−21∣1⟩=∣−⟩.✓
Both results are normalized: each amplitude has magnitude 21, so the squared
magnitudes sum to (21)2+(21)2=1.
Why these states matter
The states ∣+⟩ and ∣−⟩ appear throughout quantum algorithms. Interference is most
powerful when a qubit is in a superposition, and H is the standard way to create one from a
definite input. Grover's algorithm, quantum Fourier transforms, and many error-correction gadgets all
start by producing ∣+⟩ with a Hadamard on ∣0⟩.
Try it
The circuit starts in ∣0⟩. Apply H to produce ∣+⟩ and return the circuit. The
grader compares the full state vector, so the amplitudes must match
21≈0.707 for both ∣0⟩ and ∣1⟩ with no relative phase
difference.
Run your code to see the quantum state.
After running, check the State vector panel: you should see two equal real amplitudes of
+21 and the Bloch vector pointing along +x.
Sign in on the full site to ask questions and join the discussion.