rotations 1 qubit 1 parameter
Phase Shift
Applies a relative phase $e^{i\phi}$ to the $|1\rangle$ component.
The phase shift gate is diagonal and leaves $|0\rangle$ unchanged while multiplying $|1\rangle$ by $e^{i\phi}$.
$$ P(\phi) = \begin{bmatrix} 1 & 0 \\ 0 & \mathrm{e}^{i\phi} \end{bmatrix} $$
Properties
- Equivalent to $R_z(\phi)$ up to a global phase.
- Clifford when $\phi$ is an integer multiple of $\pi/2$.
Special Cases
| $\phi$ | Equivalent Gate | Matrix |
|---|---|---|
| $0$ | Identity | $\begin{bmatrix}1 & 0 \\ 0 & 1\end{bmatrix}$ |
| $\pi / 4$ | $T$ | $\begin{bmatrix}1 & 0 \\ 0 & \mathrm{e}^{i\pi/8}\end{bmatrix}$ |
| $\pi/2$ | $S$ | $\begin{bmatrix}1 & 0 \\ 0 & i\end{bmatrix}$ |
| $\pi$ | $Z$ | $\begin{bmatrix}1 & 0 \\ 0 & -1\end{bmatrix}$ |
| $3\pi/2$ | $S^\dagger$ | $\begin{bmatrix}1 & 0 \\ 0 & -i\end{bmatrix}$ |
The unitary, drawn
Every entry of the matrix as a disc. The area is the transition probability $|U_{jk}|^2$; the colour and the hand are the phase. Rows are outputs $\langle j|$, columns inputs $|k\rangle$, in the computational basis. Each parameter has a slider; play runs through the family along the path of the Quirk link ($\phi = 2\pi t$).
Phase
Disc area $= |U_{jk}|^2$. Hover an entry for its value, or take the JSON.
SDK support
How to call this gate in each framework. Hover a ⓘ for a note; the support matrix compares every gate at once.
| SDK | Name |
|---|---|
| Qiskit | qiskit.circuit.library.PhaseGate |
| PennyLane | pennylane.PhaseShift |
| Cirq | cirq.ZPowGate ⓘ |
| Q# | Std.Intrinsic.R1 ⓘ |
| PyQuil | pyquil.gates.PHASE |
| Braket | braket.circuits.gates.PhaseShift |
| BQSKit | bqskit.ir.gates.U1Gate ⓘ |
| Qibo | qibo.gates.U1 ⓘ |
| pytket | pytket.circuit.OpType.U1 ⓘ |
| Stim | — |
| OpenQASM | stdgates.inc: p |