Singapore-based practical guides, tutorials and experiments in AI, computing, modelling, simulation, optimisation and quantum computing, with research notes and hands-on workflows.
QUANTUM SERIES 2026 • CORE ALGORITHMIC MECHANISMS Understanding Phase Kickback: How Target Eigenstates Shift Control Phases and Encode (−1)f(x)
In classical Boolean logic, the flow of control is strictly one-directional: a control bit dictates whether an operation executes on a target bit, while the target bit never exerts any reciprocal influence back onto the control. In quantum mechanics, however, quantum gates are unitary operators that act bilaterally on the joint Hilbert state space. When a target qubit is placed in an eigenstate of a controlled gate, the target remains completely invariant, while its eigenvalue is kicked back as a relative phase directly onto the control qubit.
This counter-intuitive phenomenon—Phase Kickback—is the primary computational engine behind almost every quantum speedup in literature. In this guide, we derive phase kickback from first principles using tensor product expansions, establish the general oracle theorem where the first qubit acquires a phase factor of (−1)f(x), demonstrate how Hadamard interference decodes this phase into deterministic measurements, examine its role across famous algorithms (Deutsch, Deutsch-Jozsa, Bernstein-Vazirani, Grover, and Shor), and verify the entire formulation using Qiskit 2.x.
1 · Classical Asymmetry vs. Quantum Symmetry: The Eigenstate Condition
Consider a classical reversible CNOT gate with control bit c and target bit t. The output is (c, t ⊕ c). If c = 0, t is unchanged; if c = 1, t flips. At no point can t alter the state of c. The control bit is strictly immune to the target.
Now consider a general quantum controlled unitary gate, denoted as C–U, acting on a control qubit and a target register. The unitary operator U acts on the target if and only if the control qubit is |1〉:
C-U |0〉 |ψ〉 = |0〉 |ψ〉
C-U |1〉 |ψ〉 = |1〉 (U |ψ〉)
What happens if the target state |u〉 is an eigenstate of U with eigenvalue λ = eiθ (so that U |u〉 = eiθ |u〉)?
If the control is |0〉: C–U |0〉 |u〉 = |0〉 |u〉.
If the control is |1〉: C–U |1〉 |u〉 = |1〉 (U |u〉) = |1〉 (eiθ |u〉) = eiθ |1〉 |u〉.
Now, place the control qubit in an arbitrary superposition |φ〉 = α |0〉 + β |1〉. By the linearity of quantum mechanics:
The Fundamental Kickback Rule: The target qubit emerges completely factorized and unmodified in state |u〉. The eigenvalue phase eiθ from the target operator has been kicked back into the control qubit’s superposition, altering the relative phase between |0〉 and |1〉.
2 · First-Principles Mathematical Derivation: CNOT on |+〉 ⊗ |−〉
The cleanest and most famous physical illustration of phase kickback occurs with a Controlled-NOT (CNOT) gate. The target operator for a CNOT is the Pauli X gate (bit-flip):
X |0〉 = |1〉, X |1〉 = |0〉
The eigenstates of X are the Hadamard basis states:
State |+〉 = ( |0〉 + |1〉 ) / √2 with eigenvalue +1 (X |+〉 = +|+〉).
State |−〉 = ( |0〉 − |1〉 ) / √2 with eigenvalue −1 (X |−〉 = −|−〉).
Let us set the control qubit to q0 = |+〉 and the target qubit to q1 = |−〉. We trace the two-qubit joint statevector through four explicit algebraic steps:
Figure 1: Two-qubit CNOT Phase Kickback circuit. The control qubit q0 flips from |+〉 to |−〉 while target q1 remains invariant in |−〉.
The Symmetry Inversion: Looking at the circuit, you applied a CNOT from control q0 to target q1. Yet measuring in the Hadamard basis reveals that q0 was the qubit that changed (flipping from |+〉 to |−〉), while q1 did not change at all. In the Hadamard basis, the target acts as the control and the control acts as the target!
3 · The General Oracle Theorem: The (−1)f(x) Phase Acquired by the First Qubit
While CNOT illustrates phase kickback for an elementary bit-flip, quantum algorithms require evaluating general mathematical functions. In standard quantum oracle formulations, a black-box function f: {0, 1} → {0, 1} (or f: {0, 1}n → {0, 1}) is implemented as a unitary transformation Uf:
Uf |x〉 |y〉 = |x〉 |y ⊕ f(x)〉
Here, |x〉 is the first qubit (the input/control register) and |y〉 is the auxiliary target qubit. If we prepare the auxiliary target qubit in |−〉 = ( |0〉 − |1〉 ) / √2, watch the action of Uf on any computational basis state |x〉:
The Target Qubit Is Invariant: The auxiliary qubit remains entirely in state |−〉, unentangled with the first qubit, and carries no function data.
The First Qubit Acquires the Phase: The value of f(0) appears as a phase factor on the |0〉 branch, and f(1) appears as a phase factor on the |1〉 branch. The first qubit has directly acquired the (−1)f(x) phase factor!
Information Transformation: The oracle did not write f(x) into an auxiliary bit register to be read classically. Instead, it encoded the function values directly into the relative quantum phase of the first qubit.
Figure 2: The canonical Phase Kickback Oracle circuit. Ancilla target q1 is prepared in |−〉; after oracle evaluation, the (−1)f(x) phase is acquired by input qubit q0 and decoded via Hadamard H.
4 · Decoding the Phase: Why We Need Hadamard Interference
Now that the first qubit holds the state [ (−1)f(0) |0〉 + (−1)f(1) |1〉 ] / √2, can we simply measure it in the standard computational basis?
No. In the standard Z-basis, the measurement probability for state |0〉 is |(−1)f(0) / √2|2 = 1/2, and for |1〉 is |(−1)f(1) / √2|2 = 1/2. Measuring immediately would yield a completely random coin toss, obliterating the phase information!
To observe the acquired phase, we factor out (−1)f(0) as an unobservable global phase:
|ψ〉 = (−1)f(0) [ |0〉 + (−1)f(0) ⊕ f(1) |1〉 ] / √2
Notice that the state of the first qubit depends strictly on whether f(0) = f(1) (Constant) or f(0) ≠ f(1) (Balanced):
Function Type
Condition
Relative Phase
First Qubit State
After Hadamard H
Measurement
Constant
f(0) = f(1)
(−1)0 = +1
(±1) |+〉
H |+〉 = |0〉
0 (100%)
Balanced
f(0) ≠ f(1)
(−1)1 = −1
(±1) |−〉
H |−〉 = |1〉
1 (100%)
By applying a final Hadamard gate H to the first qubit, constructive and destructive interference rotates the relative phase back into amplitude. If the function is constant, the amplitudes for |1〉 destructively cancel to 0; if the function is balanced, the amplitudes for |0〉 destructively cancel to 0. A single deterministic measurement extracts a global property of f(x) that classically requires two queries.
5 · The Universal Engine: Phase Kickback Across Quantum Algorithms
Phase kickback is not a one-off trick for the Deutsch algorithm. It is the core mathematical mechanism that connects almost all known quantum speedups:
Algorithm
Target State
Acquired Phase on Input Register
Interference Mechanism & Speedup
Deutsch (1985)
|−〉
(−1)f(x) on 1 control qubit
Single Hadamard gate distinguishes constant vs balanced in 1 query vs 2.
The Python script below implements and verifies Phase Kickback using Qiskit 2.5+. First, it demonstrates the CNOT kickback by tracking exact statevectors; second, it implements the general oracle circuit and demonstrates how the (−1)f(x) phase acquired by the first qubit enables deterministic function classification:
from qiskit import QuantumCircuit
from qiskit.quantum_info import Statevector
from qiskit.primitives import StatevectorSampler
# ----------------------------------------------------------------------
# 1. VERIFY CNOT PHASE KICKBACK VIA STATEVECTORS
# ----------------------------------------------------------------------
print("=" * 60)
print("1. CNOT PHASE KICKBACK: |+> (x) |-> ---> |-> (x) |->")
print("=" * 60)
# In Qiskit, qubit ordering in statevector notation is |q1 q0>
qc_cnot = QuantumCircuit(2)
qc_cnot.h(0) # q0 (control) = |+>
qc_cnot.x(1) # q1 (target) = |1>
qc_cnot.h(1) # q1 (target) = |->
sv_before = Statevector(qc_cnot)
print("State BEFORE CNOT (|q1 q0> = |-> ⊗ |+>):")
print(sv_before.data.round(3))
# Apply CNOT: q0 controls q1
qc_cnot.cx(0, 1)
sv_after = Statevector(qc_cnot)
print("\nState AFTER CNOT (|q1 q0> = |-> ⊗ |->):")
print(sv_after.data.round(3))
print("Notice: Control qubit q0 acquired the -1 phase and flipped to |->!")
# ----------------------------------------------------------------------
# 2. VERIFY (-1)^f(x) ORACLE PHASE KICKBACK
# ----------------------------------------------------------------------
print("\n" + "=" * 60)
print("2. ORACLE PHASE KICKBACK: ENCODING (-1)^f(x) INTO FIRST QUBIT")
print("=" * 60)
def build_oracle(f_type: str) -> QuantumCircuit:
"""Constructs the unitary oracle U_f: |x>|y> -> |x>|y ^ f(x)>."""
oracle = QuantumCircuit(2, name=f_type)
if f_type == "constant_0":
pass # f(x) = 0 (Identity)
elif f_type == "constant_1":
oracle.x(1) # f(x) = 1 (Unconditional flip on target)
elif f_type == "balanced_identity":
oracle.cx(0, 1) # f(x) = x (CNOT)
elif f_type == "balanced_not":
oracle.x(0)
oracle.cx(0, 1) # f(x) = NOT x
oracle.x(0)
return oracle
def run_kickback_experiment(f_type: str):
qc = QuantumCircuit(2, 1)
# State preparation: q0 (input) in |+>, q1 (auxiliary) in |->
qc.h(0)
qc.x(1)
qc.h(1)
qc.barrier()
# Oracle: applies (-1)^f(x) directly to q0
oracle = build_oracle(f_type)
qc.compose(oracle, inplace=True)
qc.barrier()
# Interference: decode relative phase on first qubit via H
qc.h(0)
qc.measure(0, 0)
sampler = StatevectorSampler()
res = sampler.run([qc], shots=100).result()
counts = res[0].data.c.get_counts()
decision = "CONSTANT" if "0" in counts and counts["0"] == 100 else "BALANCED"
return counts, decision
oracles = ["constant_0", "constant_1", "balanced_identity", "balanced_not"]
print(f"{'Oracle Function':<22} | {'Measurement (q0)':<18} | {'Verdict':<10}")
print("-" * 56)
for name in oracles:
counts, verdict = run_kickback_experiment(name)
print(f"{name:<22} | {str(counts):<18} | {verdict:<10}")
Terminal Execution Output:
============================================================
1. CNOT PHASE KICKBACK: |+> (x) |-> ---> |-> (x) |->
============================================================
State BEFORE CNOT (|q1 q0> = |-> ⊗ |+>):
[ 0.5+0.j 0.5+0.j -0.5+0.j -0.5+0.j]
State AFTER CNOT (|q1 q0> = |-> ⊗ |->):
[ 0.5+0.j -0.5+0.j -0.5+0.j 0.5+0.j]
Notice: Control qubit q0 acquired the -1 phase and flipped to |->!
============================================================
2. ORACLE PHASE KICKBACK: ENCODING (-1)^f(x) INTO FIRST QUBIT
============================================================
Oracle Function | Measurement (q0) | Verdict
--------------------------------------------------------
constant_0 | {'0': 100} | CONSTANT
constant_1 | {'0': 100} | CONSTANT
balanced_identity | {'1': 100} | BALANCED
balanced_not | {'1': 100} | BALANCED
Key Insights & Takeaways:
The Target Never Changes: Whenever a target qubit is set to an eigenstate of a controlled unitary (such as |−〉 for X or CNOT), the target state remains completely invariant throughout the operation.
The First Qubit Acquires (−1)f(x): In oracle evaluation, the auxiliary target |−〉 forces the bitwise XOR operation y ⊕ f(x) to be kicked back as an eigenvalue phase factor (−1)f(x) directly onto the first qubit’s superposition states.
Interference Transforms Phase to Reality: Because global and relative phases cannot be read directly in the computational basis, a Hadamard gate (H) is applied to rotate phase differences into amplitude differences, allowing exact deterministic readout.
Universal Algorithmic Engine: Phase kickback is not an isolated trick—it is the exact mechanism that enables the exponential speedup of Deutsch-Jozsa, the hidden bit extraction of Bernstein-Vazirani, the quadratic speedup of Grover’s search, and the polynomial factoring of Shor’s algorithm.
About the author
Malcolm Low is an Associate Professor at the Singapore Institute of Technology, writing on quantum computing, programming, and applied computing from Singapore.
Quantum Series 2026 · Tested with Qiskit 2.5 · Debian ARM64 PRoot / Termux · malcolmlow.com
✦ This tutorial, mathematical derivations, circuit renderings, and Qiskit 2.x scripts were prepared with the assistance of Antigravity by Google DeepMind. ✦
Frequently Asked Questions
What is phase kickback in quantum computing?
Phase kickback is a quantum phenomenon where a controlled unitary operation applied to a target qubit in an eigenstate leaves the target qubit unchanged while transferring the eigenvalue phase factor directly back onto the control qubit.
Why does the first qubit acquire a (-1)^f(x) phase factor in quantum oracles?
In a standard oracle Uf |x〉 |y〉 = |x〉 |y ⊕ f(x)〉, preparing the auxiliary target qubit in |−〉 = ( |0〉 − |1〉 ) / √2 causes Uf to evaluate as [ |x〉 |0 ⊕ f(x)〉 − |x〉 |1 ⊕ f(x)〉 ] / √2. When f(x)=0, this equals (+1)|x〉 |−〉; when f(x)=1, it equals (−1)|x〉 |−〉. Factoring out the invariant |−〉 leaves the first qubit multiplied by (−1)f(x).
Why can’t we measure the (-1)^f(x) phase directly?
In quantum mechanics, measurement in the computational Z-basis measures state probabilities proportional to |α|2 and |β|2. Because |(−1)f(x)|2 = 1, the sign disappears upon immediate measurement. Applying a Hadamard gate rotates the phase difference into amplitude interference, making the phase deterministically readable.
How does phase kickback differ from quantum entanglement?
In phase kickback, the joint state remains completely separable before and after the controlled operation (|ψ〉 = |−〉 ⊗ |−〉). No entanglement is created because the target qubit is an eigenstate of the gate operator. In contrast, entanglement occurs when a controlled gate couples non-eigenstates into an inseparable statevector.
[…] phase flip is transferred directly back onto the control qubit. This fundamental mechanism—Phase Kickback—is the computational engine powering the Deutsch-Jozsa, Grover search, and Shor […]
[…] sign: |ω〉 → −|ω〉. This phase marking is achieved entirely through Phase Kickback, where an auxiliary qubit in state |−〉 kicks the (−1)f(x) factor directly back […]
Leave a comment