Guided examples

Each example uses input |0…0⟩. Load it to inspect the complete transformation table and unitary.

Pauli-X: deterministic flip

Input: |0⟩

Sequence: X(q0)

Intermediate/final: |0⟩ → |1⟩

Probabilities: P(1)=100%

Hadamard: superposition

Input: |0⟩

Sequence: H(q0)

Intermediate/final: |0⟩ → (|0⟩+|1⟩)/√2

Probabilities: P(0)=P(1)=50%

CNOT: conditional flip

Input: |10⟩ in top-wire order |q0 q1⟩

Sequence: X(q0), CNOT(q0→q1)

Intermediate: |00⟩ → |10⟩

Final/probability: |11⟩, 100%

Bell-state creation

Input: |00⟩

Sequence: H(q0), CNOT(q0→q1)

Intermediate: (|00⟩+|10⟩)/√2 in top-wire order

Final: (|00⟩+|11⟩)/√2; 50% each

SWAP: exchange qubit states

Input: |10⟩ in top-wire order

Sequence: X(q0), SWAP(q0,q1)

Intermediate: |00⟩ → |10⟩

Final/probability: |01⟩, 100%

Phase-only change

Input: |0⟩

Sequence: H(q0), Z(q0)

Intermediate: (|0⟩+|1⟩)/√2

Final: (|0⟩−|1⟩)/√2; still 50% each

H–Z–H interference

Input: |0⟩

Sequence: H, Z, H

Intermediate: |0⟩ → |+⟩ → |−⟩

Final: |1⟩, because HZH=X—not phase kickback