applying-gates-to-zero-state
Applying gates to $\lvert 0\rangle$ (Zero state)
Table of Contents
Applying gates to ∣0⟩ (Zero state)
| Gate |
Matrix form |
Derivation |
| I gate |
I=(1001) |
I∣0⟩=(1001)(10)=(10)=∣0⟩ |
| X gate |
X=(0110) |
X∣0⟩=(0110)(10)=(01)=∣1⟩ |
| Y gate |
Y=(0i−i0) |
Y∣0⟩=(0i−i0)(10)=(0i)=i∣1⟩ |
| Z gate |
Z=(100−1) |
Z∣0⟩=(100−1)(10)=(10)=∣0⟩ |
| Hadamard gate |
H=21(111−1) |
H∣0⟩=21(111−1)(10)=21(11)=∣+⟩ |
| S gate |
S=(100i) |
S∣0⟩=(100i)(10)=(10)=∣0⟩ |
| T gate |
T=(100eiπ/4) |
T∣0⟩=(100eiπ/4)(10)=(10)=∣0⟩ |
| Rx(θ) |
Rx(θ)=(cos2θ−isin2θ−isin2θcos2θ) |
Rx(θ)∣0⟩=(cos2θ−isin2θ−isin2θcos2θ)(10)=(cos2θ−isin2θ) |
| Ry(θ) |
Ry(θ)=(cos2θsin2θ−sin2θcos2θ) |
Ry(θ)∣0⟩=(cos2θsin2θ−sin2θcos2θ)(10)=(cos2θsin2θ) |
| Rz(θ) |
Rz(θ)=(e−iθ/200eiθ/2) |
Rz(θ)∣0⟩=(e−iθ/200eiθ/2)(10)=e−iθ/2(10) |
| U(θ,ϕ,λ) |
U=(cos2θeiϕsin2θ−eiλsin2θei(ϕ+λ)cos2θ) |
U∣0⟩=(cos2θeiϕsin2θ−eiλsin2θei(ϕ+λ)cos2θ)(10)=(cos2θeiϕsin2θ) |
Gates
1-qubit
| Gate |
Result |
Comment |
| I gate |
I∣0⟩=∣0⟩ |
The identity gate leaves ∣0⟩ unchanged. |
| X gate |
X∣0⟩=∣1⟩ |
Flips ∣0⟩ to ∣1⟩; quantum analogue of classical NOT. |
| Y gate |
Y∣0⟩=i∣1⟩ |
Bit flip with an imaginary phase factor. |
| Z gate |
Z∣0⟩=∣0⟩ |
∣0⟩ is an eigenstate of Z with eigenvalue +1. |
| Hadamard gate |
H∣0⟩=∣+⟩ |
Rotates the north pole to the +x equatorial point of the Bloch sphere. |
| S gate |
S∣0⟩=∣0⟩ |
Phase only affects the ∣1⟩ component; ∣0⟩ is unchanged. |
| T gate |
T∣0⟩=∣0⟩ |
Phase only affects the ∣1⟩ component; ∣0⟩ is unchanged. |
| Rx(θ) |
Rx(θ)∣0⟩=cos2θ∣0⟩−isin2θ∣1⟩ |
Tilts the state from ∣0⟩ toward ∣1⟩ with an imaginary phase on the ∣1⟩ component. |
| Ry(θ) |
Ry(θ)∣0⟩=cos2θ∣0⟩+sin2θ∣1⟩ |
Real amplitudes; at θ=π/2 gives ∣+⟩, the same result as the Hadamard gate up to global phase. |
| Rz(θ) |
Rz(θ)∣0⟩=e−iθ/2∣0⟩ |
Global phase only; ∣0⟩ is on the z-axis so a z-rotation has no observable effect. |
| U(θ,ϕ,λ) |
U∣0⟩=cos2θ∣0⟩+eiϕsin2θ∣1⟩ |
λ drops out; every single-qubit state is reachable from ∣0⟩ with appropriate (θ,ϕ). |
2-qubits
| Gate |
Result |
Comment |
| CX (as control) |
CX∣0⟩∣t⟩=∣0⟩∣t⟩ |
Control is off; target qubit ∣t⟩ is always left unchanged. |
| CX (as target) |
CX∣c⟩∣0⟩=∣c⟩∣c⟩ |
Flipped to ∣1⟩ only when the control qubit is ∣1⟩. |
| SWAP |
SWAP∣0⟩∣ψ⟩=∣ψ⟩∣0⟩ |
Exchanges the two qubit states; the ∣0⟩ moves to the second register. |
| iSWAP |
iSWAP∣00⟩=∣00⟩; iSWAP∣01⟩=i∣10⟩ |
Adds a phase of i when states are exchanged; trivial when both qubits are ∣0⟩. |
3-qubits
| Gate |
Result |
Comment |
| Toffoli (as control) |
CCX∣0⟩∣c2⟩∣t⟩=∣0⟩∣c2⟩∣t⟩ |
Control is off; target is always unchanged regardless of the second control. |
| Toffoli (as target) |
CCX∣1⟩∣1⟩∣0⟩=∣1⟩∣1⟩∣1⟩ |
Flipped to ∣1⟩ only when both controls are ∣1⟩. |
Reaching other states
1-qubit
| State |
Gates |
Comment |
| ∣0⟩ |
I∣0⟩=∣0⟩ |
The identity gate leaves ∣0⟩ unchanged. |
| ∣1⟩ |
X∣0⟩=∣1⟩ |
X flips the qubit; the quantum analogue of classical NOT. X is its own inverse: X2=I. |
| ∣+⟩ |
H∣0⟩=∣+⟩ |
Hadamard rotates the north pole to the +x equatorial point, creating the equal superposition 21(∣0⟩+∣1⟩). |
| ∣−⟩ |
ZH∣0⟩=∣−⟩ |
H first produces ∣+⟩, then Z flips its relative phase to give 21(∣0⟩−∣1⟩). |
| ∣+i⟩ |
SH∣0⟩=∣+i⟩ |
H rotates to the +x equatorial point, then S rotates 90° around z to land on the +y pole. |
| ∣−i⟩ |
S†H∣0⟩=∣−i⟩ |
Same as ∣+i⟩ but with the inverse phase rotation, landing on the −y pole instead. |
2-qubits
| State |
Gates |
Comment |
| ∣Φ+⟩ |
CX(H⊗I)∣00⟩=∣Φ+⟩ |
H puts qubit 1 into superposition; CX entangles qubit 2 conditionally. The simplest Bell state circuit, starting from two ∣0⟩ qubits. |
| ∣Φ−⟩ |
(Z⊗I)CX(H⊗I)∣00⟩=∣Φ−⟩ |
Same as ∣Φ+⟩ with a final Z on qubit 1 to flip the relative sign between ∣00⟩ and ∣11⟩. |
| ∣Ψ+⟩ |
CX(H⊗X)∣00⟩=∣Ψ+⟩ |
X first flips qubit 2 to ∣1⟩; H and CX then entangle in the anti-correlated subspace 21(∣01⟩+∣10⟩). |
| ∣Ψ−⟩ |
(Z⊗I)CX(H⊗X)∣00⟩=∣Ψ−⟩ |
Same as ∣Ψ+⟩ with a final Z to introduce the minus sign. The singlet state, antisymmetric under qubit exchange. |
applying-gates-to-zero-state.md · Last modified: