pub unsafe extern "C" fn controlledRotateAroundAxis(
qureg: Qureg,
controlQubit: c_int,
targetQubit: c_int,
angle: f64,
axis: Vector,
)Expand description
Applies a controlled rotation by a given angle around a given vector on the Bloch-sphere. The vector must not be zero (else an error is thrown), but needn’t be unit magnitude.
For angle \f$\theta\f$ and axis vector \f$\vec{n}\f$, applies \f$R_{\hat{n}} = \exp \left(- i \frac{\theta}{2} \hat{n} \cdot \vec{\sigma} \right) \f$ to states where the target qubit is 1 (\f$\vec{\sigma}\f$ is the vector of Pauli matrices).
@htmlonly
@see
- rotateAroundAxis()
- multiRotatePauli()
@ingroup unitary @param[in,out] qureg object representing the set of all qubits @param[in] controlQubit qubit with value 1 in the rotated states @param[in] targetQubit qubit to rotate @param[in] angle angle by which to rotate in radians @param[in] axis vector around which to rotate (can be non-unit; will be normalised) @throws invalidQuESTInputError()
- if either \p controlQubit or \p targetQubit are outside [0, \p qureg.numQubitsRepresented)
- if \p controlQubit and \p targetQubit are equal
- if \p axis is the zero vector @author Tyson Jones