![]() |
The Quantum Exact Simulation Toolkit v4.0.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 | applyMultiControlledCompMatr2 (Qureg qureg, std::vector< int > controls, int target1, int target2, CompMatr2 matr) |
void | applyMultiStateControlledCompMatr2 (Qureg qureg, int *controls, int *states, int numControls, int target1, int target2, CompMatr2 matr) |
void | applyMultiStateControlledCompMatr2 (Qureg qureg, std::vector< int > controls, std::vector< int > states, int numControls, int target1, int target2, CompMatr2 matr) |
void | multiplyCompMatr2 (Qureg qureg, 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 131 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 137 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 143 of file operations.cpp.
Referenced by applyMultiControlledCompMatr2().
void applyMultiControlledCompMatr2 | ( | Qureg | qureg, |
std::vector< int > | controls, | ||
int | target1, | ||
int | target2, | ||
CompMatr2 | matr ) |
Definition at line 157 of file operations.cpp.
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 149 of file operations.cpp.
Referenced by applyMultiStateControlledCompMatr2(), and applyMultiStateControlledSqrtSwap().
void applyMultiStateControlledCompMatr2 | ( | Qureg | qureg, |
std::vector< int > | controls, | ||
std::vector< int > | states, | ||
int | numControls, | ||
int | target1, | ||
int | target2, | ||
CompMatr2 | matr ) |
Definition at line 162 of file operations.cpp.
Definition at line 121 of file operations.cpp.