Controlled Gates (CZ, CU)
Track: Quantum Gates & Circuits · Difficulty: Beginner · Est: 15 min
Controlled Gates (CZ, CU)
Overview
CNOT introduced a new capability: conditional evolution.
Controlled gates generalize that idea:
- “Apply some gate to a target qubit only if a control qubit is .”
This matters because controlled gates are how we:
- create correlations on purpose,
- create entanglement in more than one way (not only by flipping bits), and
- build complex multi-qubit transformations from simpler ones.
In this lesson we focus on two examples:
- CZ (Controlled-Z), a phase-based entangling gate.
- CU, the general “controlled-unitary” idea.
Intuition
Controlled gates implement a quantum version of an “if statement,” but without measuring:
- The control qubit is not read out.
- The gate is still a unitary evolution.
This is crucial: you can have the control qubit in a superposition, and the operation happens “in superposition” as well. That’s where entanglement comes from.
Why CZ is interesting
CNOT entangles by flipping the target’s computational value when control is 1. CZ entangles in a subtler way:
- it flips the phase of exactly one basis component.
So CZ often does not change computational-basis probabilities at all, but it changes the state’s phase structure in a way that becomes visible under basis changes (like applying H on one qubit).
This connects back to Foundations:
- relative phase is physically meaningful because it controls interference.
A multi-qubit gate can use phase to create correlations.
Formal Description
General controlled-unitary (CU)
Let be any single-qubit unitary acting on the target. The controlled- operation (CU) is defined by its basis action:
- If the control is , do nothing to the target.
- If the control is , apply to the target.
Formally, for any target state :
This completely defines CU by linearity.
Controlled-Z (CZ)
CZ is the special case where . So:
It’s often most concrete to list the computational basis action:
So CZ applies a minus sign only to the component.
What happens to amplitudes (phase-based entanglement)
If
then
Only one amplitude changes sign. But that is enough to change interference patterns after further single-qubit gates.
Worked Example
Start from the product state
Apply CZ. Only the term gets a minus sign:
Interpretation:
- Computational-basis probabilities are still all .
- But the joint state now has a pattern of relative phases across basis components.
- That phase pattern cannot be reproduced by independent single-qubit phase changes alone; CZ can create entanglement.
Operationally, phase-based entanglement shows up when you later change basis on one or both qubits.
Turtle Tip
Controlled gates don’t “look at” the control qubit. They condition evolution on it without measuring, which is why superposition in the control can turn into entanglement.
Common Pitfalls
- Don’t assume “no probability change” means “no effect.” CZ can change only a sign and still drastically change later outcomes.
- Don’t confuse a controlled gate with classical control flow. Classical control requires knowing a bit value; controlled gates preserve coherence and act linearly on superpositions.
Quick Check
- What does CZ do to ?
- In one sentence, what is a controlled- gate?
What’s Next
We’ve seen gates that correlate qubits by conditional flips (CNOT) and conditional phase (CZ). Next we study a different kind of two-qubit operation: SWAP, which exchanges the roles of two qubits and prepares us for thinking about how multi-qubit operations compose.
