Sign in
← Atlas
Exact & formalGatesSingle-qubit gate

P phase gate

The generalized phase gate that fixes the |0⟩ amplitude at 1 and applies e^{iλ} to |1⟩, unifying S, T, and Z as special cases of one continuous parameter.

phaseparametrizedsingle qubit

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

P(λ) is the OpenQASM 3 standard-library phase gate and the natural way to express a whole family of fixed phase gates with a single parametrized definition.

Circuit & simulation
P(|0⟩) unchanged100%
P(|1⟩) unchanged0%
What this takes and returns
Takes1 qubitWhat joins here

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

15 entries meet this end. Named below.

Returns1 qubitWhat joins here

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

13 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

P(λ)=(100eiλ)P(\lambda) = \begin{pmatrix} 1 & 0 \\ 0 & e^{i\lambda} \end{pmatrix}

PP fixes the 0|0\rangle amplitude at exactly 11 and rotates only the 1|1\rangle amplitude by λ\lambda — a convention choice, since any diagonal unitary is determined by its two phases up to an overall factor.

Action on basis states

P(λ)0=0,P(λ)1=eiλ1P(\lambda)|0\rangle = |0\rangle, \qquad P(\lambda)|1\rangle = e^{i\lambda}|1\rangle

Applied to a superposition α0+β1\alpha|0\rangle+\beta|1\rangle, only the relative phase between the two amplitudes changes, by exactly λ\lambda.

Key identities and special cases

P(π/2)=S,P(π/4)=T,P(π)=Z,P(2π)=IP(\pi/2) = S, \qquad P(\pi/4) = T, \qquad P(\pi) = Z, \qquad P(2\pi) = I

so PP is the continuous parent of the entire discrete phase-gate ladder {I,T,S,Z}\{I, T, S, Z\} built from repeated π/4\pi/4 steps.

  • P(λ)=eiλ/2RZ(λ)P(\lambda) = e^{i\lambda/2}R_Z(\lambda): PP and RZR_Z implement the same rotation up to a global phase; PP is the more convenient convention when composing controlled-phase gates, since a controlled-PP needs no extra correction for the global phase (a controlled-RZR_Z does).
  • P(λ1)P(λ2)=P(λ1+λ2)P(\lambda_1)P(\lambda_2) = P(\lambda_1+\lambda_2): phases add, so repeated PP gates telescope into one gate at synthesis time.
  • Controlled-P(λ)P(\lambda) is the entangling phase primitive used at every stage of the quantum Fourier transform, where the angles are π/2,π/4,π/8,\pi/2, \pi/4, \pi/8, \dots.
Implementation
Native
phase-p.qasm
OPENQASM 3.0;
include "stdgates.inc";
qubit q;
p(pi/4) q;
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
OpenQASM 3: A broader and deeper quantum assembly language2021 · Andrew W. Cross, Ali Javadi-Abhari, Thomas Alexander, Niel de Beaudrap, Lev S. Bishop, Steven Heidel, Colm A. Ryan, Prasahnt Sivarajah, John Smolin, Jay M. Gambetta, Blake R. Johnson

Defines the standard gate library (rx, ry, rz, p, u3-equivalent U, sx) used natively by the code snippets on this record.

arxiv.org/abs/2104.14722
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