The Quantum Exact Simulation Toolkit v4.0.0
Loading...
Searching...
No Matches
Many-not gates

Functions for effecting many-qubit NOT gates. More...

Functions

void applyControlledMultiQubitNot (Qureg, int control, int *targets, int numTargets)
 
void applyMultiControlledMultiQubitNot (Qureg, int *controls, int numControls, int *targets, int numTargets)
 
void applyMultiQubitNot (Qureg, int *targets, int numTargets)
 
void applyMultiStateControlledMultiQubitNot (Qureg, int *controls, int *states, int numControls, int *targets, int numTargets)
 
void multiplyMultiQubitNot (Qureg qureg, int *targets, int numTargets)
 

Detailed Description

Functions for effecting many-qubit NOT gates.

Function Documentation

◆ applyControlledMultiQubitNot()

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

Definition at line 1280 of file operations.cpp.

1280 {
1281 validate_quregFields(qureg, __func__);
1282 validate_controlAndTargets(qureg, control, targets, numTargets, __func__);
1283
1284 // harmlessly re-validates
1285 applyMultiStateControlledMultiQubitNot(qureg, &control, nullptr, 1, targets, numTargets);
1286}
void applyMultiStateControlledMultiQubitNot(Qureg qureg, int *controls, int *states, int numControls, int *targets, int numTargets)

◆ applyMultiControlledMultiQubitNot()

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

Definition at line 1288 of file operations.cpp.

1288 {
1289 validate_quregFields(qureg, __func__);
1290 validate_controlsAndTargets(qureg, controls, numControls, targets, numTargets, __func__);
1291
1292 // harmlessly re-validates
1293 applyMultiStateControlledMultiQubitNot(qureg, controls, nullptr, numControls, targets, numTargets);
1294}

◆ applyMultiQubitNot()

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

Definition at line 1272 of file operations.cpp.

1272 {
1273 validate_quregFields(qureg, __func__);
1274 validate_targets(qureg, targets, numTargets, __func__);
1275
1276 // harmlessly re-validates
1277 applyMultiStateControlledMultiQubitNot(qureg, nullptr, nullptr, 0, targets, numTargets);
1278}

◆ applyMultiStateControlledMultiQubitNot()

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

Definition at line 1296 of file operations.cpp.

1296 {
1297 validate_quregFields(qureg, __func__);
1298 validate_controlsAndTargets(qureg, controls, numControls, targets, numTargets, __func__);
1299 validate_controlStates(states, numControls, __func__);
1300
1301 // treat as an all-X PauliStr
1302 PauliStr str = getPauliStr(std::string(numTargets, 'X'), targets, numTargets);
1303
1304 // harmlessly re-validates
1305 applyMultiStateControlledPauliStr(qureg, controls, states, numControls, str);
1306}
void applyMultiStateControlledPauliStr(Qureg qureg, int *controls, int *states, int numControls, PauliStr str)
PauliStr getPauliStr(const char *paulis, int *indices, int numPaulis)
Definition paulis.cpp:296

Referenced by applyControlledMultiQubitNot(), applyMultiControlledMultiQubitNot(), and applyMultiQubitNot().

◆ multiplyMultiQubitNot()

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

Definition at line 1264 of file operations.cpp.

1264 {
1265 validate_quregFields(qureg, __func__);
1266 validate_targets(qureg, targets, numTargets, __func__);
1267
1268 // harmlessly re-validates
1269 multiplyPauliStr(qureg, getPauliStr(std::string(numTargets, 'X'), targets, numTargets));
1270}
void multiplyPauliStr(Qureg qureg, PauliStr str)