![]() |
The Quantum Exact Simulation Toolkit v4.3.0
|
Functions for applying general many-target dense matrices, as CompMatr. More...
Functions | |
| void | applyCompMatr (Qureg qureg, int *targets, int numTargets, CompMatr matrix) |
| void | applyControlledCompMatr (Qureg qureg, int control, int *targets, int numTargets, CompMatr matrix) |
| void | applyMultiControlledCompMatr (Qureg qureg, int *controls, int numControls, int *targets, int numTargets, CompMatr matrix) |
| void | applyMultiStateControlledCompMatr (Qureg qureg, int *controls, int *states, int numControls, int *targets, int numTargets, CompMatr matrix) |
Functions for applying general many-target dense matrices, as CompMatr.
Applies an arbitrarily-sized dense unitary matrix to the targets (treated as increasing significance) of qureg.
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 \]
targets are specified in increasing order.Definition at line 161 of file operations.cpp.
Referenced by applyCompMatr().
| void applyControlledCompMatr | ( | Qureg | qureg, |
| int | control, | ||
| int * | targets, | ||
| int | numTargets, | ||
| CompMatr | matrix ) |
Applies a singly-controlled arbitrarily-sized dense unitary matrix to the targets (treated as increasing significance) of qureg.
- See applyCompMatr() for information about
targetsandmatrix.
- See applyControlledCompMatr1() for information about the
controlqubit.
Definition at line 166 of file operations.cpp.
Referenced by applyControlledCompMatr().
| void applyMultiControlledCompMatr | ( | Qureg | qureg, |
| int * | controls, | ||
| int | numControls, | ||
| int * | targets, | ||
| int | numTargets, | ||
| CompMatr | matrix ) |
Applies a multiply-controlled arbitrarily-sized dense unitary matrix upon the targets of qureg.
- See applyCompMatr() for information about
targetsandmatrix.
- See applyMultiControlledCompMatr1() for information about
controls.
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 | matrix ) |
Applies an arbitrarily-controlled arbitrarily-sized dense unitary matrix upon the targets of qureg, conditioned upon the controls being in the corresponding states.
- See applyCompMatr() for information about
targetsandmatrix.
- See applyMultiStateControlledCompMatr1() for information about
controlsandstates.
Definition at line 176 of file operations.cpp.
Referenced by applyMultiStateControlledCompMatr().