Question 6: Clifford Gates (Step-by-Step Tracing of Quantum States)
Source: Chapter 03, slides 3, 7-12, 28, 30-34, 38-39, 43-44
Task type for every problem below: you are given a circuit diagram, and you must find the quantum state after every single gate, one step at a time, ending at the final state.
Problem 1
Circuit:
q0: |0> --H--*--
|
q1: |0> -----X--
Step 1 (start). .
Step 2 (after on q0).
Step 3 (after controlled-NOT, control q0, target q1). The term has control , so its target flips , giving ; the term has control and is untouched.
Final state.
Problem 2
Circuit:
q0: |0> --H--Z--*--
|
q1: |0> --------X--
Step 1 (start). .
Step 2 (after on q0). .
Step 3 (after on q0). multiplies the amplitude by whenever q0 is ; the term picks up , the term is untouched.
Step 4 (after controlled-NOT, control q0, target q1). The term (carrying coefficient ) has control , so its target flips: ; the term is untouched.
Final state.
Problem 3
Circuit:
q0: |0> --H--S--*--
|
q1: |0> --------X--
Step 1 (start). .
Step 2 (after on q0). .
Step 3 (after on q0). multiplies the amplitude by whenever q0 is ; the term picks up , the term is untouched.
Step 4 (after controlled-NOT, control q0, target q1). The term (coefficient ) has control , so its target flips: ; the term is untouched.
Final state.
This shows a relative phase picked up before entangling survives inside the entangled state.
Problem 4
Circuit:
q0: |0> -----H--*--x--
| |
q1: |0> --X------Z--x--
(here the x--x column denotes swap between q0 and q1, and the *--Z column is controlled-Z between q0 and q1)
Step 1 (start). .
Step 2 (after on q1). .
Step 3 (after on q0). q0 goes from to , q1 stays .
Step 4 (after , between q0 and q1). multiplies the amplitude by only when both qubits are ; the term qualifies and picks up , the term (q0 ) is untouched.
Step 5 (after swap on q0,q1). Swap exchanges the two digits in each term: , (symmetric, unchanged).
an unentangled product state.
Final state.
Problem 5
Circuit:
q0: |0> --H--*--------
|
q1: |0> -----X--*-----
|
q2: |0> --------X-----
Step 1 (start). .
Step 2 (after on q0). .
Step 3 (after controlled-NOT, control q0, target q1). The term has control (q0) equal to , so q1 flips: .
Step 4 (after controlled-NOT, control q1, target q2). The term now has control (q1) equal to , so q2 flips: . The term has , untouched.
Final state.
the GHZ state, built here by a chain of controlled-NOT gates (q0 controls q1, q1 controls q2) rather than fanning out directly from q0.
Problem 6
Circuit:
q0: |0> --H--*-----
|
q1: |0> -----X--Z--
Step 1 (start). .
Step 2 (after on q0). .
Step 3 (after controlled-NOT, control q0, target q1). .
Step 4 (after on q1). multiplies the amplitude by whenever q1 is ; the term picks up , is untouched.
Final state.
Comparison to Problem 2. Both circuits ( on q0 before entangling, versus on q1 after entangling) reach the exact same final state, because after the controlled-NOT the only term with a on either wire is , so a on either wire lands on the same term.
Problem 7
Circuit:
q0: |0> --H--S--S--
Step 1 (start). .
Step 2 (after ). .
Step 3 (after first ). multiplies the amplitude by .
Step 4 (after second ). multiplies the amplitude by again: .
Final state.
This confirms applied twice equals (i.e. , since directly), but only becomes visible once the qubit already has a nonzero amplitude to act on. Applying to a bare would leave it at with no visible effect at all, since never touches the amplitude.
Problem 8
Circuit:
q0: |0> --*--H--*--
| |
q1: |0> --X-----X--
Step 1 (start). .
Step 2 (after first controlled-NOT, control q0, target q1). Control q0 is , so nothing changes.
Step 3 (after on q0). .
Step 4 (after second controlled-NOT, control q0, target q1). The term has control , so q1 flips:
Final state.
Lesson. The first controlled-NOT in this circuit was a no-op (its control qubit was still at that point in the trace), so only the last two gates actually determined the outcome. Always check the control’s actual value at each step rather than assuming a gate has an effect just because it is drawn on the circuit.