![]() |
The Quantum Exact Simulation Toolkit v4.0.0
|
Functions for applying many-qubit rotations around arbitrary PauliStr. More...
Functions | |
void | applyControlledPauliGadget (Qureg qureg, int control, PauliStr str, qreal angle) |
void | applyMultiControlledPauliGadget (Qureg qureg, int *controls, int numControls, PauliStr str, qreal angle) |
void | applyMultiStateControlledPauliGadget (Qureg qureg, int *controls, int *states, int numControls, PauliStr str, qreal angle) |
void | applyPauliGadget (Qureg qureg, PauliStr str, qreal angle) |
void | multiplyPauliGadget (Qureg qureg, PauliStr str, qreal angle) |
Functions for applying many-qubit rotations around arbitrary PauliStr.
Definition at line 1423 of file operations.cpp.
void applyMultiControlledPauliGadget | ( | Qureg | qureg, |
int * | controls, | ||
int | numControls, | ||
PauliStr | str, | ||
qreal | angle ) |
Definition at line 1430 of file operations.cpp.
Referenced by applyMultiControlledPauliGadget().
void applyMultiStateControlledPauliGadget | ( | Qureg | qureg, |
int * | controls, | ||
int * | states, | ||
int | numControls, | ||
PauliStr | str, | ||
qreal | angle ) |
Definition at line 1437 of file operations.cpp.
Referenced by applyControlledPauliGadget(), applyMultiControlledPauliGadget(), applyMultiStateControlledPauliGadget(), applyMultiStateControlledRotateX(), applyMultiStateControlledRotateY(), applyMultiStateControlledRotateZ(), and applyPauliGadget().
str
and \( \theta = \) angle
.This function effects unitary
\[ R_{\hat{\sigma}}(\theta) = \exp \left( - \iu \, \frac{\theta}{2} \, \hat{\sigma} \right), \]
which affects only the qubits for which \( \hat{\sigma} \) is not the identity Pauli. As such, this effects a multi-qubit rotation around an arbitrary Pauli string.
\[ R_{\hat{\sigma}}(\theta) \equiv \cos\left( \frac{\theta}{2} \right) \, \id - \iu \sin\left( \frac{\theta}{2} \right) \, \hat{\sigma}, \]
this function is equivalent to (but much faster than) effecting \( \hat{\sigma} \) upon a clone which is subsequently superposed.str
contains only \( \hat{Z} \) or \( \id \) Paulis, this function will automatically invoke applyPhaseGadget() which leverages an optimised implementation.str
contains only \( \id \) Paulis, this function merely effects a change of global phase upon statevectors of \( -\theta/2 \), leaving density matrices unchanged. angle=0
is equivalent to effecting the identity, leaving the state unchanged. Definition at line 1416 of file operations.cpp.
Definition at line 1408 of file operations.cpp.