← 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
Native
controlled-phase.qasm
OPENQASM 3.0;
include "stdgates.inc";
qubit[2] q;
cp(pi/2) q[0], q[1];

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.