![]() |
The Quantum Exact Simulation Toolkit v4.2.0
|
Functions for applying general two-qubit dense matrices, as CompMatr2. More...
Functions | |
| void | applyCompMatr2 (Qureg qureg, int target1, int target2, CompMatr2 matrix) |
| void | applyControlledCompMatr2 (Qureg qureg, int control, int target1, int target2, CompMatr2 matr) |
| void | applyMultiControlledCompMatr2 (Qureg qureg, int *controls, int numControls, int target1, int target2, CompMatr2 matr) |
| void | applyMultiStateControlledCompMatr2 (Qureg qureg, int *controls, int *states, int numControls, int target1, int target2, CompMatr2 matr) |
Functions for applying general two-qubit dense matrices, as CompMatr2.
Applies a general two-qubit dense unitary matrix to qubits target1 and target2 (treated as increasing significance) of qureg.
Definition at line 116 of file operations.cpp.
| void applyControlledCompMatr2 | ( | Qureg | qureg, |
| int | control, | ||
| int | target1, | ||
| int | target2, | ||
| CompMatr2 | matr ) |
Applies a singly-controlled two-qubit dense unitary matrix to qubits target1 and target2 (treated as increasing significance) of qureg.
Definition at line 122 of file operations.cpp.
| void applyMultiControlledCompMatr2 | ( | Qureg | qureg, |
| int * | controls, | ||
| int | numControls, | ||
| int | target1, | ||
| int | target2, | ||
| CompMatr2 | matr ) |
Applies a multiply-controlled two-qubit dense unitary matrix to qubits target1 and target2 (treated as increasing significance) of qureg.
Definition at line 128 of file operations.cpp.
Referenced by applyMultiControlledCompMatr2().
| void applyMultiStateControlledCompMatr2 | ( | Qureg | qureg, |
| int * | controls, | ||
| int * | states, | ||
| int | numControls, | ||
| int | target1, | ||
| int | target2, | ||
| CompMatr2 | matr ) |
Applies an arbitrarily-controlled two-qubit dense unitary matrix to qubits target1 and target2 (treated as increasing significance) of qureg, conditioned upon the controls being in the given states.
Definition at line 134 of file operations.cpp.
Referenced by applyMultiStateControlledCompMatr2(), and applyMultiStateControlledSqrtSwap().