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

Functions for pre- or post-multiplying a tensor product of Pauli operators (as a PauliStr) upon density matrices. More...

Functions

void leftapplyPauliStr (Qureg qureg, PauliStr str)
 
void rightapplyPauliStr (Qureg qureg, PauliStr str)
 

Detailed Description

Functions for pre- or post-multiplying a tensor product of Pauli operators (as a PauliStr) upon density matrices.

Function Documentation

◆ leftapplyPauliStr()

void leftapplyPauliStr ( Qureg qureg,
PauliStr str )
Note
Documentation for this function or struct is under construction!
See also

Definition at line 450 of file multiplication.cpp.

450 {
451 validate_quregFields(qureg, __func__);
452 validate_pauliStrTargets(qureg, str, __func__);
453
454 localiser_statevec_anyCtrlPauliTensor(qureg, none, none, str);
455}

Referenced by leftapplyMultiQubitNot().

◆ rightapplyPauliStr()

void rightapplyPauliStr ( Qureg qureg,
PauliStr str )
Note
Documentation for this function or struct is under construction!
See also

Definition at line 457 of file multiplication.cpp.

457 {
458 validate_quregFields(qureg, __func__);
459 validate_quregIsDensityMatrix(qureg, __func__);
460 validate_pauliStrTargets(qureg, str, __func__);
461
462 qcomp factor = paulis_getSignOfPauliStrConj(str); // undo transpose
463 str = paulis_getShiftedPauliStr(str, qureg.numQubits);
464 localiser_statevec_anyCtrlPauliTensor(qureg, none, none, str, factor);
465}

Referenced by rightapplyMultiQubitNot().