The Quantum Exact Simulation Toolkit v4.2.0
Loading...
Searching...
No Matches

Functions for applying general two-qubit diagonal matrices, as DiagMatr2. More...

Functions

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)
 

Detailed Description

Functions for applying general two-qubit diagonal matrices, as DiagMatr2.

Function Documentation

◆ applyControlledDiagMatr2()

void applyControlledDiagMatr2 ( Qureg qureg,
int control,
int target1,
int target2,
DiagMatr2 matr )
Note
Documentation for this function or struct is under construction!
See also
applyControlledCompMatr1()

Definition at line 259 of file operations.cpp.

259 {
260
261 int targs[] = {target1, target2};
262 validateAndApplyAnyCtrlAnyTargUnitaryMatrix(qureg, &control, nullptr, 1, targs, 2, matrix, __func__);
263}

◆ applyDiagMatr2()

void applyDiagMatr2 ( Qureg qureg,
int target1,
int target2,
DiagMatr2 matr )
Note
Documentation for this function or struct is under construction!
See also
applyCompMatr1()

Definition at line 253 of file operations.cpp.

253 {
254
255 int targs[] = {target1, target2};
256 validateAndApplyAnyCtrlAnyTargUnitaryMatrix(qureg, nullptr, nullptr, 0, targs, 2, matrix, __func__);
257}

◆ 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!
See also
applyMultiControlledCompMatr1()

Definition at line 265 of file operations.cpp.

265 {
266
267 int targs[] = {target1, target2};
268 validateAndApplyAnyCtrlAnyTargUnitaryMatrix(qureg, controls, nullptr, numControls, targs, 2, matrix, __func__);
269}

Referenced by applyMultiControlledDiagMatr2().

◆ 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!
See also
applyMultiStateControlledCompMatr1()

Definition at line 271 of file operations.cpp.

271 {
272
273 int targs[] = {target1, target2};
274 validateAndApplyAnyCtrlAnyTargUnitaryMatrix(qureg, controls, states, numControls, targs, 2, matrix, __func__);
275}

Referenced by applyMultiStateControlledDiagMatr2().