pub unsafe extern "C" fn controlledPhaseShift(
qureg: Qureg,
idQubit1: c_int,
idQubit2: c_int,
angle: f64,
)Expand description
Introduce a phase factor \f$ \exp(i \theta) \f$ on state \f$ |11\rangle \f$ of qubits \p idQubit1 and \p idQubit2. For angle \f$\theta\f$, this effects the unitary \f[ \begin{pmatrix} 1 & & & \ & 1 & & \ & & 1 & \ & & & \exp(i \theta) \end{pmatrix} \f] on \p idQubit1 and \p idQubit2.
@htmlonly
@see
- phaseShift()
- multiControlledPhaseShift()
@ingroup unitary @param[in,out] qureg object representing the set of all qubits @param[in] idQubit1 first qubit in the state to phase shift @param[in] idQubit2 second qubit in the state to phase shift @param[in] angle amount by which to shift the phase in radians @throws invalidQuESTInputError()
- if \p idQubit1 or \p idQubit2 are outside [0, \p qureg.numQubitsRepresented)
- if \p idQubit1 and \p idQubit2 are equal @author Tyson Jones