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

Functions for applying general many-target dense matrices, as CompMatr. More...

Functions

void applyCompMatr (Qureg qureg, int *targets, int numTargets, CompMatr matr)
 
void applyControlledCompMatr (Qureg qureg, int control, int *targets, int numTargets, CompMatr matr)
 
void applyMultiControlledCompMatr (Qureg qureg, int *controls, int numControls, int *targets, int numTargets, CompMatr matr)
 
void applyMultiStateControlledCompMatr (Qureg qureg, int *controls, int *states, int numControls, int *targets, int numTargets, CompMatr matr)
 
void multiplyCompMatr (Qureg qureg, int *targets, int numTargets, CompMatr matr)
 

Detailed Description

Functions for applying general many-target dense matrices, as CompMatr.

Function Documentation

◆ applyCompMatr()

void applyCompMatr ( Qureg qureg,
int * targets,
int numTargets,
CompMatr matr )
Note
Documentation for this function or struct is under construction!

Definition at line 162 of file operations.cpp.

162 {
163
164 validateAndApplyAnyCtrlAnyTargUnitaryMatrix(qureg, nullptr, nullptr, 0, targets, numTargets, matrix, __func__);
165}

◆ applyControlledCompMatr()

void applyControlledCompMatr ( Qureg qureg,
int control,
int * targets,
int numTargets,
CompMatr matr )
Note
Documentation for this function or struct is under construction!

Definition at line 167 of file operations.cpp.

167 {
168
169 validateAndApplyAnyCtrlAnyTargUnitaryMatrix(qureg, &control, nullptr, 1, targets, numTargets, matrix, __func__);
170}

◆ applyMultiControlledCompMatr()

void applyMultiControlledCompMatr ( Qureg qureg,
int * controls,
int numControls,
int * targets,
int numTargets,
CompMatr matr )
Note
Documentation for this function or struct is under construction!

Definition at line 172 of file operations.cpp.

172 {
173
174 validateAndApplyAnyCtrlAnyTargUnitaryMatrix(qureg, controls, nullptr, numControls, targets, numTargets, matrix, __func__);
175}

◆ applyMultiStateControlledCompMatr()

void applyMultiStateControlledCompMatr ( Qureg qureg,
int * controls,
int * states,
int numControls,
int * targets,
int numTargets,
CompMatr matr )
Note
Documentation for this function or struct is under construction!

Definition at line 177 of file operations.cpp.

177 {
178
179 validateAndApplyAnyCtrlAnyTargUnitaryMatrix(qureg, controls, states, numControls, targets, numTargets, matrix, __func__);
180}

◆ multiplyCompMatr()

void multiplyCompMatr ( Qureg qureg,
int * targets,
int numTargets,
CompMatr matr )
Note
Documentation for this function or struct is under construction!

Definition at line 152 of file operations.cpp.

152 {
153 validate_quregFields(qureg, __func__);
154 validate_targets(qureg, targets, numTargets, __func__);
155 validate_matrixDimMatchesTargets(matrix, numTargets, __func__); // also validates fields and is-sync, but not unitarity
156 validate_mixedAmpsFitInNode(qureg, numTargets, __func__);
157
158 bool conj = false;
159 localiser_statevec_anyCtrlAnyTargDenseMatr(qureg, {}, {}, util_getVector(targets, numTargets), matrix, conj);
160}