QParity¶
Defined in qparity.hpp.
This is an interface layer, separate from and in addition to Qrack::QInterface, meant to isolate less-used functionality as optional.
-
class QParity¶
Subclassed by Qrack::QBdt, Qrack::QBdtHybrid, Qrack::QEngine, Qrack::QStabilizerHybrid, Qrack::QUnit
Methods¶
-
inline virtual void Qrack::QParity::UniformParityRZ(const bitCapInt &mask, real1_f angle)¶
If the target qubit set parity is odd, this applies a phase factor of \(e^{i angle}\).
If the target qubit set parity is even, this applies the conjugate, e^{-i angle}.
-
virtual void Qrack::QParity::CUniformParityRZ(const std::vector<bitLenInt> &controls, const bitCapInt &mask, real1_f angle) = 0¶
If the controls are set and the target qubit set parity is odd, this applies a phase factor of \(e^{i angle}\).
If the controls are set and the target qubit set parity is even, this applies the conjugate, \(e^{-i angle}\). Otherwise, do nothing if any control is not set.
-
virtual real1_f Qrack::QParity::ProbParity(const bitCapInt &mask) = 0¶
Overall probability of any odd permutation of the masked set of bits.