Function quest_sys::multiControlledPhaseShift
source · pub unsafe extern "C" fn multiControlledPhaseShift(
qureg: Qureg,
controlQubits: *mut c_int,
numControlQubits: c_int,
angle: f64
)Expand description
Introduce a phase factor \f$ \exp(i \theta) \f$ on state \f$ |1 \dots 1 \rangle \f$ of the passed qubits.
\f[ \begin{tikzpicture}[scale=.5] \node[draw=none] at (-3.5, 2) {controls}; \node[draw=none] at (1, .7) {$\theta$};
\node[draw=none] at (0, 6) {$\vdots$}; \draw (0, 5) – (0, 4);
\draw (-2, 4) – (2, 4); \draw[fill=black] (0, 4) circle (.2); \draw (0, 4) – (0, 2);
\draw (-2, 2) – (2, 2); \draw[fill=black] (0, 2) circle (.2); \draw (0, 2) – (0, 0);
\draw (-2,0) – (2, 0); \draw[fill=black] (0, 0) circle (.2); \end{tikzpicture} \f]
@see
- phaseShift()
- controlledPhaseShift()
- controlledPhaseFlip()
- multiControlledPhaseFlip()
@ingroup unitary @param[in,out] qureg object representing the set of all qubits @param[in] controlQubits array of qubits to phase shift @param[in] numControlQubits the length of array \p controlQubits @param[in] angle amount by which to shift the phase in radians @throws invalidQuESTInputError()
- if \p numControlQubits is outside [1, \p qureg.numQubitsRepresented])
- if any qubit index in \p controlQubits is outside [0, \p qureg.numQubitsRepresented])
- if the qubits in \p controlQubits are not unique @author Tyson Jones