![]() |
The Quantum Exact Simulation Toolkit v4.3.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 matrix) |
| void | applyMultiControlledCompMatr2 (Qureg qureg, int *controls, int numControls, int target1, int target2, CompMatr2 matrix) |
| void | applyMultiStateControlledCompMatr2 (Qureg qureg, int *controls, int *states, int numControls, int target1, int target2, CompMatr2 matrix) |
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 | matrix ) |
Applies a singly-controlled two-qubit dense unitary matrix to qubits target1 and target2 (treated as increasing significance) of qureg.
- See applyCompMatr2() for information about the base operation.
- See applyControlledCompMatr1() for information about the
controlqubit.
Definition at line 122 of file operations.cpp.
| void applyMultiControlledCompMatr2 | ( | Qureg | qureg, |
| int * | controls, | ||
| int | numControls, | ||
| int | target1, | ||
| int | target2, | ||
| CompMatr2 | matrix ) |
Applies a multiply-controlled two-qubit dense unitary matrix to qubits target1 and target2 (treated as increasing significance) of qureg.
- See applyCompMatr2() for information about
target1,target2andmatrix.
- See applyMultiControlledCompMatr1() for information about
controls.
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 | matrix ) |
Applies an arbitrarily-controlled two-qubit dense unitary matrix to qubits target1 and target2 of qureg, conditioned upon the controls being in the corresponding states.
- See applyCompMatr2() for information about
target1,target2andmatrix.
- See applyMultiStateControlledCompMatr1() for information about
controlsandstates.
Definition at line 134 of file operations.cpp.
Referenced by applyMultiStateControlledCompMatr2(), and applyMultiStateControlledSqrtSwap().