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 ↗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.
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
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
fixes the amplitude at exactly and rotates only the amplitude by — a convention choice, since any diagonal unitary is determined by its two phases up to an overall factor.
Action on basis states
Applied to a superposition , only the relative phase between the two amplitudes changes, by exactly .
Key identities and special cases
so is the continuous parent of the entire discrete phase-gate ladder built from repeated steps.
- : and implement the same rotation up to a global phase; is the more convenient convention when composing controlled-phase gates, since a controlled- needs no extra correction for the global phase (a controlled- does).
- : phases add, so repeated gates telescope into one gate at synthesis time.
- Controlled- is the entangling phase primitive used at every stage of the quantum Fourier transform, where the angles are .
Implementation
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
Standard reference for single- and multi-qubit gate matrices, Euler-angle decomposition, and universal gate sets.
doi.org/10.1017/cbo9780511976667 ↗