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

Functions for applying general one-qubit diagonal matrices, as DiagMatr1. More...

Functions

void applyControlledDiagMatr1 (Qureg qureg, int control, int target, DiagMatr1 matr)
 
void applyDiagMatr1 (Qureg qureg, int target, DiagMatr1 matr)
 
void applyMultiControlledDiagMatr1 (Qureg qureg, int *controls, int numControls, int target, DiagMatr1 matr)
 
void applyMultiStateControlledDiagMatr1 (Qureg qureg, int *controls, int *states, int numControls, int target, DiagMatr1 matr)
 

Detailed Description

Functions for applying general one-qubit diagonal matrices, as DiagMatr1.

Function Documentation

◆ applyControlledDiagMatr1()

void applyControlledDiagMatr1 ( Qureg qureg,
int control,
int target,
DiagMatr1 matr )
Note
Documentation for this function or struct is under construction!
See also
applyControlledCompMatr1()

Definition at line 217 of file operations.cpp.

217 {
218
219 validateAndApplyAnyCtrlAnyTargUnitaryMatrix(qureg, &control, nullptr, 1, &target, 1, matrix, __func__);
220}

◆ applyDiagMatr1()

void applyDiagMatr1 ( Qureg qureg,
int target,
DiagMatr1 matr )
Note
Documentation for this function or struct is under construction!
See also

Definition at line 212 of file operations.cpp.

212 {
213
214 validateAndApplyAnyCtrlAnyTargUnitaryMatrix(qureg, nullptr, nullptr, 0, &target, 1, matrix, __func__);
215}

◆ applyMultiControlledDiagMatr1()

void applyMultiControlledDiagMatr1 ( Qureg qureg,
int * controls,
int numControls,
int target,
DiagMatr1 matr )
Note
Documentation for this function or struct is under construction!
See also
applyMultiControlledCompMatr1()

Definition at line 222 of file operations.cpp.

222 {
223
224 validateAndApplyAnyCtrlAnyTargUnitaryMatrix(qureg, controls, nullptr, numControls, &target, 1, matrix, __func__);
225}

Referenced by applyMultiControlledDiagMatr1().

◆ applyMultiStateControlledDiagMatr1()

void applyMultiStateControlledDiagMatr1 ( Qureg qureg,
int * controls,
int * states,
int numControls,
int target,
DiagMatr1 matr )
Note
Documentation for this function or struct is under construction!
See also
applyMultiStateControlledCompMatr1()

Definition at line 227 of file operations.cpp.

227 {
228
229 validateAndApplyAnyCtrlAnyTargUnitaryMatrix(qureg, controls, states, numControls, &target, 1, matrix, __func__);
230}

Referenced by applyMultiQubitPhaseFlip(), applyMultiQubitPhaseShift(), and applyMultiStateControlledDiagMatr1().