Functions for applying general two-qubit diagonal matrices, as DiagMatr2.
More...
|
void | applyControlledDiagMatr2 (Qureg qureg, int control, int target1, int target2, DiagMatr2 matr) |
|
void | applyDiagMatr2 (Qureg qureg, int target1, int target2, DiagMatr2 matr) |
|
void | applyMultiControlledDiagMatr2 (Qureg qureg, int *controls, int numControls, int target1, int target2, DiagMatr2 matr) |
|
void | applyMultiStateControlledDiagMatr2 (Qureg qureg, int *controls, int *states, int numControls, int target1, int target2, DiagMatr2 matr) |
|
void | multiplyDiagMatr2 (Qureg qureg, int target1, int target2, DiagMatr2 matr) |
|
Functions for applying general two-qubit diagonal matrices, as DiagMatr2.
◆ applyControlledDiagMatr2()
void applyControlledDiagMatr2 |
( |
Qureg | qureg, |
|
|
int | control, |
|
|
int | target1, |
|
|
int | target2, |
|
|
DiagMatr2 | matr ) |
- Note
- Documentation for this function or struct is under construction!
Definition at line 238 of file operations.cpp.
238 {
239
240 int targs[] = {target1, target2};
241 validateAndApplyAnyCtrlAnyTargUnitaryMatrix(qureg, &control, nullptr, 1, targs, 2, matrix, __func__);
242}
◆ applyDiagMatr2()
void applyDiagMatr2 |
( |
Qureg | qureg, |
|
|
int | target1, |
|
|
int | target2, |
|
|
DiagMatr2 | matr ) |
- Note
- Documentation for this function or struct is under construction!
Definition at line 232 of file operations.cpp.
232 {
233
234 int targs[] = {target1, target2};
235 validateAndApplyAnyCtrlAnyTargUnitaryMatrix(qureg, nullptr, nullptr, 0, targs, 2, matrix, __func__);
236}
◆ applyMultiControlledDiagMatr2()
void applyMultiControlledDiagMatr2 |
( |
Qureg | qureg, |
|
|
int * | controls, |
|
|
int | numControls, |
|
|
int | target1, |
|
|
int | target2, |
|
|
DiagMatr2 | matr ) |
- Note
- Documentation for this function or struct is under construction!
Definition at line 244 of file operations.cpp.
244 {
245
246 int targs[] = {target1, target2};
247 validateAndApplyAnyCtrlAnyTargUnitaryMatrix(qureg, controls, nullptr, numControls, targs, 2, matrix, __func__);
248}
◆ applyMultiStateControlledDiagMatr2()
void applyMultiStateControlledDiagMatr2 |
( |
Qureg | qureg, |
|
|
int * | controls, |
|
|
int * | states, |
|
|
int | numControls, |
|
|
int | target1, |
|
|
int | target2, |
|
|
DiagMatr2 | matr ) |
- Note
- Documentation for this function or struct is under construction!
Definition at line 250 of file operations.cpp.
250 {
251
252 int targs[] = {target1, target2};
253 validateAndApplyAnyCtrlAnyTargUnitaryMatrix(qureg, controls, states, numControls, targs, 2, matrix, __func__);
254}
◆ multiplyDiagMatr2()
void multiplyDiagMatr2 |
( |
Qureg | qureg, |
|
|
int | target1, |
|
|
int | target2, |
|
|
DiagMatr2 | matr ) |
- Note
- Documentation for this function or struct is under construction!
Definition at line 223 of file operations.cpp.
223 {
224 validate_quregFields(qureg, __func__);
225 validate_twoTargets(qureg, target1, target2, __func__);
226 validate_matrixFields(matrix, __func__);
227
228 bool conj = false;
229 localiser_statevec_anyCtrlTwoTargDiagMatr(qureg, {}, {}, target1, target2, matrix, conj);
230}