![]() |
The Quantum Exact Simulation Toolkit v4.2.0
|
Functions for applying general many-target dense matrices, as CompMatr. More...
Functions | |
void | applyCompMatr (Qureg qureg, int *targets, int numTargets, CompMatr matr) |
void | applyControlledCompMatr (Qureg qureg, int control, int *targets, int numTargets, CompMatr matr) |
void | applyMultiControlledCompMatr (Qureg qureg, int *controls, int numControls, int *targets, int numTargets, CompMatr matr) |
void | applyMultiStateControlledCompMatr (Qureg qureg, int *controls, int *states, int numControls, int *targets, int numTargets, CompMatr matr) |
Functions for applying general many-target dense matrices, as CompMatr.
Let \( M = \) matrix
. The qubits within targets
are treated to be ordered least to most significant with respect to \( M \). That is, if \( M \) was hypothetically separable single-qubit matrices
\[ M \equiv \dots \otimes C \otimes B \otimes A \]
then this function would effect
\[ \hat{M}_{\text{targets}} \equiv A_{\text{targets}[0]} \cdot B_{\text{targets}[1]} \cdot C_{\text{targets}[2]} \cdot \dots \]
Definition at line 161 of file operations.cpp.
Referenced by applyCompMatr().
void applyControlledCompMatr | ( | Qureg | qureg, |
int | control, | ||
int * | targets, | ||
int | numTargets, | ||
CompMatr | matr ) |
Definition at line 166 of file operations.cpp.
Referenced by applyControlledCompMatr().
void applyMultiControlledCompMatr | ( | Qureg | qureg, |
int * | controls, | ||
int | numControls, | ||
int * | targets, | ||
int | numTargets, | ||
CompMatr | matr ) |
Definition at line 171 of file operations.cpp.
Referenced by applyMultiControlledCompMatr().
void applyMultiStateControlledCompMatr | ( | Qureg | qureg, |
int * | controls, | ||
int * | states, | ||
int | numControls, | ||
int * | targets, | ||
int | numTargets, | ||
CompMatr | matr ) |
Definition at line 176 of file operations.cpp.
Referenced by applyMultiStateControlledCompMatr().