Function controlledRotateX

Source
pub unsafe extern "C" fn controlledRotateX(
    qureg: Qureg,
    controlQubit: c_int,
    targetQubit: c_int,
    angle: f64,
)
Expand description

Applies a controlled rotation by a given angle around the X-axis of the Bloch-sphere. The target qubit is rotated in states where the control qubit has value 1.

@htmlonly

@endhtmlonly

@see

  • rotateX()
  • controlledRotateY()
  • controlledRotateZ()
  • controlledRotateAroundAxis()
  • controlledPhaseShift()
  • multiRotateZ()
  • multiRotatePauli()

@ingroup unitary @param[in,out] qureg object representing the set of all qubits @param[in] controlQubit qubit which has value 1 in the rotated states @param[in] targetQubit qubit to rotate @param[in] angle angle by which to rotate the target qubit in radians @throws invalidQuESTInputError()

  • if either \p controlQubit or \p targetQubit are outside [0, \p qureg.numQubitsRepresented)
  • if \p controlQubit and \p targetQubit are equal @author Tyson Jones