Function quest_sys::phaseShift
source · pub unsafe extern "C" fn phaseShift(
qureg: Qureg,
targetQubit: c_int,
angle: f64
)Expand description
Shift the phase between \f$ |0\rangle \f$ and \f$ |1\rangle \f$ of a single qubit by a given angle.
This is equivalent to a Z-axis rotation of the Bloch-sphere up to a global phase factor. For angle \f$\theta\f$, this effects single-qubit unitary \f[ \begin{pmatrix} 1 & 0 \ 0 & \exp(i \theta) \end{pmatrix} \f] with circuit diagram \f[ \begin{tikzpicture}[scale=.5] \node[draw=none] at (-4, 0) {targetQubit};
\draw (-2,0) – (-1, 0); \draw (1, 0) – (2, 0); \draw (-1,-1)–(-1,1)–(1,1)–(1,-1)–cycle; \node[draw=none] at (0, 0) {$R_\theta$}; \end{tikzpicture} \f]
@see
- controlledPhaseShift()
- multiControlledPhaseShift()
@ingroup unitary @param[in,out] qureg object representing the set of all qubits @param[in] targetQubit qubit to undergo a phase shift @param[in] angle amount by which to shift the phase in radians @throws invalidQuESTInputError()
- \p targetQubit is outside [0, \p qureg.numQubitsRepresented). @author Tyson Jones