DeepPractise
DeepPractise

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 UU to a target qubit only if a control qubit is 1|1\rangle.”

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 UU be any single-qubit unitary acting on the target. The controlled-UU operation (CU) is defined by its basis action:

  • If the control is 0|0\rangle, do nothing to the target.
  • If the control is 1|1\rangle, apply UU to the target.

Formally, for any target state ψ|\psi\rangle:

CU(0ψ)=0ψ,\text{CU}(|0\rangle\otimes|\psi\rangle) = |0\rangle\otimes|\psi\rangle, CU(1ψ)=1(Uψ).\text{CU}(|1\rangle\otimes|\psi\rangle) = |1\rangle\otimes(U|\psi\rangle).

This completely defines CU by linearity.

Controlled-Z (CZ)

CZ is the special case where U=ZU=Z. So:

CZ(0ψ)=0ψ,\text{CZ}(|0\rangle\otimes|\psi\rangle) = |0\rangle\otimes|\psi\rangle, CZ(1ψ)=1(Zψ).\text{CZ}(|1\rangle\otimes|\psi\rangle) = |1\rangle\otimes(Z|\psi\rangle).

It’s often most concrete to list the computational basis action:

CZ00=00,\text{CZ}|00\rangle = |00\rangle, CZ01=01,\text{CZ}|01\rangle = |01\rangle, CZ10=10,\text{CZ}|10\rangle = |10\rangle, CZ11=11.\text{CZ}|11\rangle = -|11\rangle.

So CZ applies a minus sign only to the 11|11\rangle component.

What happens to amplitudes (phase-based entanglement)

If

ψ=α00+β01+γ10+δ11,|\psi\rangle = \alpha|00\rangle + \beta|01\rangle + \gamma|10\rangle + \delta|11\rangle,

then

CZψ=α00+β01+γ10δ11.\text{CZ}|\psi\rangle = \alpha|00\rangle + \beta|01\rangle + \gamma|10\rangle - \delta|11\rangle.

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

++=12(00+01+10+11).|+\rangle\otimes|+\rangle = \tfrac{1}{2}(|00\rangle + |01\rangle + |10\rangle + |11\rangle).

Apply CZ. Only the 11|11\rangle term gets a minus sign:

CZ(++)=12(00+01+1011).\text{CZ}(|+\rangle\otimes|+\rangle) = \tfrac{1}{2}(|00\rangle + |01\rangle + |10\rangle - |11\rangle).

Interpretation:

  • Computational-basis probabilities are still all 1/41/4.
  • 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

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

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

Quick Check
  1. What does CZ do to 11|11\rangle?
  2. In one sentence, what is a controlled-UU 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.