← Atlas

Gates · Controlled gate

Controlled-phase gate (CP)

A parametrized entangling gate that applies e^{iλ} exactly when both qubits are |1⟩, generalizing CZ and forming the entangling primitive of the quantum Fourier transform.

Exact & formalUpdated

View frozen graph

A small worked example, computed in your browser. It is not a result from this record's papers.

CP(θ), the gate the Fourier transform is built from

Two qubits, both put into |+⟩, then a controlled phase of π/2 — a quarter turn, applied only where both qubits are 1.

q0q1Step 1 of 3 · HHStep 2 of 3 · HHStep 3 of 3 · CP(π/2)CP(π/2)

Step 1 of 3 · H

Probability of each outcome after this step

  • 0050%
  • 0150%
  1. Qubit 0 into an equal superposition.

    Probability spreads from 1 outcome to 2. All 2 are equally likely.

  2. Qubit 1 as well.

    Probability spreads from 2 outcomes to 4. All 4 are equally likely.

  3. Turns the phase of the |11⟩ branch by π/2 and leaves the other three where they are. CZ is this gate at θ = π; the QFT is a ladder of these at halving angles, which is where its phases come from.

    The outcome probabilities do not move at all. What this step changes is phase — 2 distinct relative phases across the state now — which no measurement can see until a later step turns it back into probability. This is the step that entangles the qubits: from here on no single qubit has a state of its own, only the register as a whole does.

Readout Every outcome keeps the probability it had. The whole content of this gate is the angle it puts on one branch out of four, and that angle is what the inverse QFT later reads back out as a number.

Open in Studio
  • Steps1
  • Wires2
  • Qubits2
  • Depth1 gate
  • Parameterλ (radians)
  • Papers2

Definition

CP(λ)=(100001000010000eiλ)\mathrm{CP}(\lambda) = \begin{pmatrix} 1&0&0&0\\0&1&0&0\\0&0&1&0\\0&0&0&e^{i\lambda} \end{pmatrix}

Like CZ\mathrm{CZ}, this matrix is symmetric under exchanging the two qubits, so "control" and "target" are interchangeable labels rather than a physical asymmetry.

Action on basis states

CP(λ)∣c,t⟩=eiλ c⋅t∣c,t⟩\mathrm{CP}(\lambda)|c,t\rangle = e^{i\lambda\, c\cdot t}|c,t\rangle

Only the ∣11⟩|11\rangle amplitude picks up a phase of eiλe^{i\lambda}; every other computational-basis input is unaffected.

Key identities

  • CP(π)=CZ\mathrm{CP}(\pi) = \mathrm{CZ}: the controlled-ZZ gate is the λ=π\lambda=\pi special case of the controlled-phase family.
  • CP(λ1) CP(λ2)=CP(λ1+λ2)\mathrm{CP}(\lambda_1)\,\mathrm{CP}(\lambda_2) = \mathrm{CP}(\lambda_1+\lambda_2): controlled phases with the same qubit pair compose additively.
  • General controlled-UU construction (Barenco et al. 1995): any single-qubit controlled-UU can be built from two CNOTs and three single-qubit gates A,B,CA,B,C satisfying ABC=IABC = I and AXBXC=UAXBXC = U up to phase; CP(λ)\mathrm{CP}(\lambda) is the special case where U=P(λ)U = P(\lambda) is already diagonal, so no CNOTs are needed at all — it is native.
  • The quantum Fourier transform on nn qubits applies CP(π/2k)\mathrm{CP}(\pi/2^{k}) between qubit pairs at increasing separation kk, making CP\mathrm{CP} the single most-used two-qubit gate in QFT-based algorithms (phase estimation, Shor's algorithm, HHL).

References

  • Elementary gates for quantum computation

    Adriano Barenco, Charles H. Bennett, Richard Cleve, David P. DiVincenzo, Norman Margolus, Peter Shor, Tycho Sleator, John A. Smolin, Harald Weinfurter · 1995

    Shows that single-qubit U(2) gates plus CNOT are universal and gives explicit decompositions for controlled-U, Toffoli, and Fredkin gates.

  • Quantum Computation and Quantum Information: 10th Anniversary Edition

    Michael A. Nielsen and Isaac L. Chuang · 2010

    Standard reference for single- and multi-qubit gate matrices, Euler-angle decomposition, and universal gate sets.

Exact & formal
  • Basis-state truth table
  • Unitary / matrix equivalence
  • Textbook / standard citation
Method
Apply CP(λ) to all four computational-basis inputs and evaluate the general matrix at λ=π against the CZ reference matrix.
Result
Pass · CP(λ)|11⟩ = e^{iλ}|11⟩ for all λ tested, and CP(π) = CZ exactly.
OpenQASM 3 standard gate set ↗
Kind
curated reference
Reviewed by
Leona Quantum curation pass
License
CC BY 4.0-compatible reference metadata
controlled gatephasetwo qubitqft

Atlas stars stay in the public catalog. Saving this entry to your workspace starts an unstarred private copy.