Function rotateX

Source
pub unsafe extern "C" fn rotateX(
    qureg: Qureg,
    rotQubit: c_int,
    angle: f64,
)
Expand description

Rotate a single qubit by a given angle around the X-axis of the Bloch-sphere. For angle \f$\theta\f$, applies \f[ \begin{pmatrix} \cos\theta/2 & -i \sin \theta/2\ -i \sin \theta/2 & \cos \theta/2 \end{pmatrix} \f] with circuit diagram: @htmlonly

@endhtmlonly

@see

  • controlledRotateX()
  • rotateY()
  • rotateZ()
  • rotateAroundAxis()
  • multiRotateZ()
  • multiRotatePauli()

@ingroup unitary @param[in,out] qureg object representing the set of all qubits @param[in] rotQubit qubit to rotate @param[in] angle angle by which to rotate in radians @throws invalidQuESTInputError()

  • if \p rotQubit is outside [0, \p qureg.numQubitsRepresented) @author Ania Brown (state-vector) @author Tyson Jones (density matrix, doc)