Sign in
← Atlas
Exact & formalGatesControlled 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.

controlled gatephasetwo qubitqft

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

CP(λ) is what a controlled-P gate looks like once the target's phase gate is promoted to a genuine two-qubit operation — the workhorse of QFT-based algorithms.

Circuit & simulation
|11⟩ phase-shifted by π/2100%
|00⟩, |01⟩, |10⟩ unchanged100%
What this takes and returns
Takes2 qubitsWhat joins here

Takes a 2-qubit register and states no assumption about what is on it. That is the whole condition: anything returning 2 qubits can feed it.

16 entries meet this end. Named below.

Returns2 qubitsWhat joins here

Returns a 2-qubit register a next stage can take. This is the end that joins.

11 entries meet this end. Named below.

A unitary. The same register goes in and comes out, and this entry states no assumption about what is on it — which is what lets anything of the same width feed it. See all 29 →

How it works

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

Classical baseline

Use a classical state-vector or matrix simulation at the same width, precision, and measurement objective.

Quantum claim

The quantum record demonstrates a state or operator behavior; it does not make classical simulation or communication costs disappear.

How to compare

Compare fidelity, samples, gate depth, noise, memory, and the cost of preparing and reading the state.

Declared gaps

Nobody has reviewed this record for gaps yet.

Literature & references
Elementary gates for quantum computation1995 · Adriano Barenco, Charles H. Bennett, Richard Cleve, David P. DiVincenzo, Norman Margolus, Peter Shor, Tycho Sleator, John A. Smolin, Harald Weinfurter

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

arxiv.org/abs/quant-ph/9503016
Quantum Computation and Quantum Information: 10th Anniversary Edition2010 · Michael A. Nielsen and Isaac L. Chuang

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

doi.org/10.1017/cbo9780511976667