pub fn PGate(radix: usize) -> UnitaryExpressionExpand description
The single-qudit phase gate.
The common qubit phase gate is given by the following matrix:
$$ \begin{pmatrix} 1 & 0 \\ 0 & \exp({i\theta}) \\ \end{pmatrix} $$
The qutrit phase gate has two parameterized relative phases:
$$ \begin{pmatrix} 1 & 0 & 0 \\ 0 & \exp({i\theta_0}) & 0 \\ 0 & 0 & \exp({i\theta_1}) \\ \end{pmatrix} $$
The d-level phase gate has d-1 parameterized relative phases. This gate is Clifford iff all of the relative phases are powers of roots of unity.
References: