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

Functions for applying the individual one-qubit Pauli operators. More...

Functions

void applyControlledPauliX (Qureg qureg, int control, int target)
 
void applyControlledPauliY (Qureg qureg, int control, int target)
 
void applyControlledPauliZ (Qureg qureg, int control, int target)
 
void applyMultiControlledPauliX (Qureg qureg, int *controls, int numControls, int target)
 
void applyMultiControlledPauliY (Qureg qureg, int *controls, int numControls, int target)
 
void applyMultiControlledPauliZ (Qureg qureg, int *controls, int numControls, int target)
 
void applyMultiStateControlledPauliX (Qureg qureg, int *controls, int *states, int numControls, int target)
 
void applyMultiStateControlledPauliY (Qureg qureg, int *controls, int *states, int numControls, int target)
 
void applyMultiStateControlledPauliZ (Qureg qureg, int *controls, int *states, int numControls, int target)
 
void applyPauliX (Qureg qureg, int target)
 
void applyPauliY (Qureg qureg, int target)
 
void applyPauliZ (Qureg qureg, int target)
 
void multiplyPauliX (Qureg qureg, int target)
 
void multiplyPauliY (Qureg qureg, int target)
 
void multiplyPauliZ (Qureg qureg, int target)
 

Detailed Description

Functions for applying the individual one-qubit Pauli operators.

Function Documentation

◆ applyControlledPauliX()

void applyControlledPauliX ( Qureg qureg,
int control,
int target )
Note
Documentation for this function or struct is under construction!

Definition at line 687 of file operations.cpp.

687 {
688 validate_quregFields(qureg, __func__);
689 validate_controlAndTarget(qureg, control, target, __func__);
690
691 // harmlessly re-validates
692 applyMultiStateControlledPauliX(qureg, &control, nullptr, 1, target);
693}
void applyMultiStateControlledPauliX(Qureg qureg, int *controls, int *states, int numControls, int target)

◆ applyControlledPauliY()

void applyControlledPauliY ( Qureg qureg,
int control,
int target )
Note
Documentation for this function or struct is under construction!

Definition at line 695 of file operations.cpp.

695 {
696 validate_quregFields(qureg, __func__);
697 validate_controlAndTarget(qureg, control, target, __func__);
698
699 // harmlessly re-validates
700 applyMultiStateControlledPauliY(qureg, &control, nullptr, 1, target);
701}
void applyMultiStateControlledPauliY(Qureg qureg, int *controls, int *states, int numControls, int target)

◆ applyControlledPauliZ()

void applyControlledPauliZ ( Qureg qureg,
int control,
int target )
Note
Documentation for this function or struct is under construction!

Definition at line 703 of file operations.cpp.

703 {
704 validate_quregFields(qureg, __func__);
705 validate_controlAndTarget(qureg, control, target, __func__);
706
707 // harmlessly re-validates
708 applyMultiStateControlledPauliZ(qureg, &control, nullptr, 1, target);
709}
void applyMultiStateControlledPauliZ(Qureg qureg, int *controls, int *states, int numControls, int target)

◆ applyMultiControlledPauliX()

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

Definition at line 711 of file operations.cpp.

711 {
712 validate_quregFields(qureg, __func__);
713 validate_controlsAndTarget(qureg, controls, numControls, target, __func__);
714
715 // harmlessly re-validates
716 applyMultiStateControlledPauliX(qureg, controls, nullptr, numControls, target);
717}

◆ applyMultiControlledPauliY()

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

Definition at line 719 of file operations.cpp.

719 {
720 validate_quregFields(qureg, __func__);
721 validate_controlsAndTarget(qureg, controls, numControls, target, __func__);
722
723 // harmlessly re-validates
724 applyMultiStateControlledPauliY(qureg, controls, nullptr, numControls, target);
725}

◆ applyMultiControlledPauliZ()

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

Definition at line 727 of file operations.cpp.

727 {
728 validate_quregFields(qureg, __func__);
729 validate_controlsAndTarget(qureg, controls, numControls, target, __func__);
730
731 // harmlessly re-validates
732 applyMultiStateControlledPauliZ(qureg, controls, nullptr, numControls, target);
733}

◆ applyMultiStateControlledPauliX()

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

Definition at line 735 of file operations.cpp.

735 {
736 validate_quregFields(qureg, __func__);
737 validate_controlsAndTarget(qureg, controls, numControls, target, __func__);
738 validate_controlStates(states, numControls, __func__); // permits states==nullptr
739
740 // harmlessly re-validates
741 applyMultiStateControlledPauliStr(qureg, controls, states, numControls, getPauliStr("X", {target}));
742}
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 applyControlledPauliX(), applyMultiControlledPauliX(), and applyPauliX().

◆ applyMultiStateControlledPauliY()

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

Definition at line 744 of file operations.cpp.

744 {
745 validate_quregFields(qureg, __func__);
746 validate_controlsAndTarget(qureg, controls, numControls, target, __func__);
747 validate_controlStates(states, numControls, __func__); // permits states==nullptr
748
749 // harmlessly re-validates
750 applyMultiStateControlledPauliStr(qureg, controls, states, numControls, getPauliStr("Y", {target}));
751}

Referenced by applyControlledPauliY(), applyMultiControlledPauliY(), and applyPauliY().

◆ applyMultiStateControlledPauliZ()

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

Definition at line 753 of file operations.cpp.

753 {
754 validate_quregFields(qureg, __func__);
755 validate_controlsAndTarget(qureg, controls, numControls, target, __func__);
756 validate_controlStates(states, numControls, __func__); // permits states==nullptr
757
758 // harmlessly re-validates
759 DiagMatr1 matr = getDiagMatr1({1, -1});
760 applyMultiStateControlledDiagMatr1(qureg, controls, states, numControls, target, matr);
761}
static DiagMatr1 getDiagMatr1(qcomp *in)
Definition matrices.h:338
void applyMultiStateControlledDiagMatr1(Qureg qureg, int *controls, int *states, int numControls, int target, DiagMatr1 matrix)

Referenced by applyControlledPauliZ(), applyMultiControlledPauliZ(), and applyPauliZ().

◆ applyPauliX()

void applyPauliX ( Qureg qureg,
int target )
Note
Documentation for this function or struct is under construction!

Definition at line 663 of file operations.cpp.

663 {
664 validate_quregFields(qureg, __func__);
665 validate_target(qureg, target, __func__);
666
667 // harmlessly re-validates
668 applyMultiStateControlledPauliX(qureg, nullptr, nullptr, 0, target);
669}

◆ applyPauliY()

void applyPauliY ( Qureg qureg,
int target )
Note
Documentation for this function or struct is under construction!

Definition at line 671 of file operations.cpp.

671 {
672 validate_quregFields(qureg, __func__);
673 validate_target(qureg, target, __func__);
674
675 // harmlessly re-validates
676 applyMultiStateControlledPauliY(qureg, nullptr, nullptr, 0, target);
677}

◆ applyPauliZ()

void applyPauliZ ( Qureg qureg,
int target )
Note
Documentation for this function or struct is under construction!

Definition at line 679 of file operations.cpp.

679 {
680 validate_quregFields(qureg, __func__);
681 validate_target(qureg, target, __func__);
682
683 // harmlessly re-validates
684 applyMultiStateControlledPauliZ(qureg, nullptr, nullptr, 0, target);
685}

◆ multiplyPauliX()

void multiplyPauliX ( Qureg qureg,
int target )
Note
Documentation for this function or struct is under construction!

◆ multiplyPauliY()

void multiplyPauliY ( Qureg qureg,
int target )
Note
Documentation for this function or struct is under construction!

◆ multiplyPauliZ()

void multiplyPauliZ ( Qureg qureg,
int target )
Note
Documentation for this function or struct is under construction!