![]() |
The Quantum Exact Simulation Toolkit v4.2.0
|
Functions for applying one-qubit rotations around Pauli and arbitrary axis. More...
Functions | |
| void | applyControlledRotateAroundAxis (Qureg qureg, int ctrl, int targ, qreal angle, qreal axisX, qreal axisY, qreal axisZ) |
| void | applyControlledRotateX (Qureg qureg, int control, int target, qreal angle) |
| void | applyControlledRotateY (Qureg qureg, int control, int target, qreal angle) |
| void | applyControlledRotateZ (Qureg qureg, int control, int target, qreal angle) |
| void | applyMultiControlledRotateAroundAxis (Qureg qureg, int *ctrls, int numCtrls, int targ, qreal angle, qreal axisX, qreal axisY, qreal axisZ) |
| void | applyMultiControlledRotateX (Qureg qureg, int *controls, int numControls, int target, qreal angle) |
| void | applyMultiControlledRotateY (Qureg qureg, int *controls, int numControls, int target, qreal angle) |
| void | applyMultiControlledRotateZ (Qureg qureg, int *controls, int numControls, int target, qreal angle) |
| void | applyMultiStateControlledRotateAroundAxis (Qureg qureg, int *ctrls, int *states, int numCtrls, int targ, qreal angle, qreal axisX, qreal axisY, qreal axisZ) |
| void | applyMultiStateControlledRotateX (Qureg qureg, int *controls, int *states, int numControls, int target, qreal angle) |
| void | applyMultiStateControlledRotateY (Qureg qureg, int *controls, int *states, int numControls, int target, qreal angle) |
| void | applyMultiStateControlledRotateZ (Qureg qureg, int *controls, int *states, int numControls, int target, qreal angle) |
| void | applyRotateAroundAxis (Qureg qureg, int target, qreal angle, qreal axisX, qreal axisY, qreal axisZ) |
| void | applyRotateX (Qureg qureg, int target, qreal angle) |
| void | applyRotateY (Qureg qureg, int target, qreal angle) |
| void | applyRotateZ (Qureg qureg, int target, qreal angle) |
Functions for applying one-qubit rotations around Pauli and arbitrary axis.
| void applyControlledRotateAroundAxis | ( | Qureg | qureg, |
| int | ctrl, | ||
| int | targ, | ||
| qreal | angle, | ||
| qreal | axisX, | ||
| qreal | axisY, | ||
| qreal | axisZ ) |
Definition at line 1182 of file operations.cpp.
| void applyControlledRotateX | ( | Qureg | qureg, |
| int | control, | ||
| int | target, | ||
| qreal | angle ) |
Definition at line 1038 of file operations.cpp.
| void applyControlledRotateY | ( | Qureg | qureg, |
| int | control, | ||
| int | target, | ||
| qreal | angle ) |
Definition at line 1046 of file operations.cpp.
| void applyControlledRotateZ | ( | Qureg | qureg, |
| int | control, | ||
| int | target, | ||
| qreal | angle ) |
Definition at line 1054 of file operations.cpp.
| void applyMultiControlledRotateAroundAxis | ( | Qureg | qureg, |
| int * | ctrls, | ||
| int | numCtrls, | ||
| int | targ, | ||
| qreal | angle, | ||
| qreal | axisX, | ||
| qreal | axisY, | ||
| qreal | axisZ ) |
Definition at line 1190 of file operations.cpp.
Referenced by applyMultiControlledRotateAroundAxis().
| void applyMultiControlledRotateX | ( | Qureg | qureg, |
| int * | controls, | ||
| int | numControls, | ||
| int | target, | ||
| qreal | angle ) |
Definition at line 1062 of file operations.cpp.
Referenced by applyMultiControlledRotateX().
| void applyMultiControlledRotateY | ( | Qureg | qureg, |
| int * | controls, | ||
| int | numControls, | ||
| int | target, | ||
| qreal | angle ) |
Definition at line 1070 of file operations.cpp.
Referenced by applyMultiControlledRotateY().
| void applyMultiControlledRotateZ | ( | Qureg | qureg, |
| int * | controls, | ||
| int | numControls, | ||
| int | target, | ||
| qreal | angle ) |
Definition at line 1078 of file operations.cpp.
Referenced by applyMultiControlledRotateZ().
| void applyMultiStateControlledRotateAroundAxis | ( | Qureg | qureg, |
| int * | ctrls, | ||
| int * | states, | ||
| int | numCtrls, | ||
| int | targ, | ||
| qreal | angle, | ||
| qreal | axisX, | ||
| qreal | axisY, | ||
| qreal | axisZ ) |
Definition at line 1198 of file operations.cpp.
Referenced by applyControlledRotateAroundAxis(), applyMultiControlledRotateAroundAxis(), applyMultiStateControlledRotateAroundAxis(), and applyRotateAroundAxis().
| void applyMultiStateControlledRotateX | ( | Qureg | qureg, |
| int * | controls, | ||
| int * | states, | ||
| int | numControls, | ||
| int | target, | ||
| qreal | angle ) |
Definition at line 1086 of file operations.cpp.
Referenced by applyControlledRotateX(), applyMultiControlledRotateX(), applyMultiStateControlledRotateX(), and applyRotateX().
| void applyMultiStateControlledRotateY | ( | Qureg | qureg, |
| int * | controls, | ||
| int * | states, | ||
| int | numControls, | ||
| int | target, | ||
| qreal | angle ) |
Definition at line 1101 of file operations.cpp.
Referenced by applyControlledRotateY(), applyMultiControlledRotateY(), applyMultiStateControlledRotateY(), and applyRotateY().
| void applyMultiStateControlledRotateZ | ( | Qureg | qureg, |
| int * | controls, | ||
| int * | states, | ||
| int | numControls, | ||
| int | target, | ||
| qreal | angle ) |
Definition at line 1116 of file operations.cpp.
Referenced by applyControlledRotateZ(), applyMultiControlledRotateZ(), applyMultiStateControlledRotateZ(), and applyRotateZ().
| void applyRotateAroundAxis | ( | Qureg | qureg, |
| int | target, | ||
| qreal | angle, | ||
| qreal | axisX, | ||
| qreal | axisY, | ||
| qreal | axisZ ) |
Let \( \theta = \) angle and \( \vec{n} = ( \) axisX, axisY, axisZ \( ) \), with corresponding unit vector \( \bar{n} \). Further, let \( \vec{\sigma} = (\hat{\sigma}_x, \hat{\sigma}_y, \hat{\sigma}_z) \) denote a vector of the Pauli matrices.
This function effects unitary
\[ \hat{R}_{\bar{n}}(\theta) = \exp \left( - \iu \frac{\theta}{2} \bar{n} \cdot \vec{\sigma} \right) \]
upon the target qubit. Explicitly,
\[ \hat{R}_{\bar{n}}(\theta) \equiv \begin{pmatrix} \cos\left( \frac{\theta}{2} \right) - \iu \, \bar{n}_z \sin\left( \frac{\theta}{2} \right) & - \, (\bar{n}_y + \bar{n}_x \, \iu ) \sin\left( \frac{\theta}{2} \right) \\ (\bar{n}_y - \bar{n}_x \, \iu ) \sin\left( \frac{\theta}{2} \right) & \cos\left( \frac{\theta}{2} \right) + \iu \, \bar{n}_z \sin\left( \frac{\theta}{2} \right) \end{pmatrix} \]
where
\[ \bar{n}_i = \frac{\vec{n}_i}{\| \vec{n} \|_2} = \frac{\vec{n}_i}{ \sqrt{ {\vec{n}_x}^2 + {\vec{n}_y}^2 + {\vec{n}_z}^2 } }. \]
angle=0 is equivalent to effecting the identity, leaving the state unchanged. Definition at line 1174 of file operations.cpp.
| void applyRotateX | ( | Qureg | qureg, |
| int | target, | ||
| qreal | angle ) |
Let \( \theta = \) angle. This function effects unitary
\[ \hat{R}_{x}(\theta) = \exp \left( - \iu \frac{\theta}{2} \hat{\sigma}_x \right) \]
upon the target qubit, where \( \hat{\sigma}_x \) is the Pauli X matrix.
angle=0 is equivalent to effecting the identity, leaving the state unchanged. Definition at line 1014 of file operations.cpp.
| void applyRotateY | ( | Qureg | qureg, |
| int | target, | ||
| qreal | angle ) |
Let \( \theta = \) angle. This function effects unitary
\[ \hat{R}_{y}(\theta) = \exp \left( - \iu \frac{\theta}{2} \hat{\sigma}_y \right) \]
upon the target qubit, where \( \hat{\sigma}_y \) is the Pauli Y matrix.
angle=0 is equivalent to effecting the identity, leaving the state unchanged. Definition at line 1022 of file operations.cpp.
| void applyRotateZ | ( | Qureg | qureg, |
| int | target, | ||
| qreal | angle ) |
Let \( \theta = \) angle. This function effects unitary
\[ \hat{R}_{z}(\theta) = \exp \left( - \iu \frac{\theta}{2} \hat{\sigma}_z \right) \]
upon the target qubit, where \( \hat{\sigma}_z \) is the Pauli Z matrix.
angle=0 is equivalent to effecting the identity, leaving the state unchanged. Definition at line 1030 of file operations.cpp.