Concept

Phase Kickback

A controlled gate can move a target eigenvalue onto the control. This is the engine inside DJ, Grover, and QPE.

Qubits 2 Cost O(1) Default CX demo

If the target is an eigenstate of the target unitary, a controlled-U writes that eigenvalue as a relative phase on the control. For CX, put a Z phase on the target, then CX with the other wire as control: the phase shows up on the control after returning to Z.

The CZ variant is symmetric: |1⟩ on one wire flips |+⟩ to |-⟩ on the other.

How it works

  1. 1
    Superpose both

    H (0,1).

  2. 2
    Phase on target

    Z 0. q0 is the CX target in the next step.

  3. 3
    Kickback CX

    CX [1,0]: control q1, target q0. The Z eigenvalue kicks onto q1.

  4. 4
    Read

    H (0,1) maps the kicked phase to a computational |1⟩ on q1.

Default Qubi (static)
H (0,1)
Z 0
CX [1,0]
H (0,1)

Function form: PhaseKickback("CX")

Circuit
q0q1HHZHH
Expected result

State. |11⟩

P(11) = 1. Without the Z, the same skeleton returns |00⟩. The extra phase on q0 is read out as |1⟩ on both wires after the final Hadamards.

BasisAmplitudeProbability
|11⟩ 1
100%

Notes

  • CZ demo (simulator option): X 0; H 1; CZ [1,0]; H 1. q1 reads |1⟩.
  • QPE is the same idea with controlled-U^{2^j} instead of a single CX.

Change parameters

The write-up above is for the default circuit. Use this control to generate other variants and load them in the simulator.