Qrack
7.0
General classical-emulating-quantum development framework
|
![]() |
Functions | |
virtual void | Qrack::QEngineCPU::SetPermutation (bitCapInt perm, complex phaseFac=CMPLX_DEFAULT_ARG) |
Set to a specific permutation of all qubits. More... | |
virtual void | Qrack::QEngineCPU::UniformlyControlledSingleBit (const bitLenInt *controls, bitLenInt controlLen, bitLenInt qubitIndex, const complex *mtrxs, const bitCapInt *mtrxSkipPowers, bitLenInt mtrxSkipLen, bitCapInt mtrxSkipValueMask) |
virtual void | Qrack::QEngineCPU::UniformParityRZ (bitCapInt mask, real1_f angle) |
If the target qubit set parity is odd, this applies a phase factor of \(e^{i angle}\). More... | |
virtual void | Qrack::QEngineCPU::CUniformParityRZ (const bitLenInt *controls, bitLenInt controlLen, bitCapInt mask, real1_f angle) |
If the controls are set and the target qubit set parity is odd, this applies a phase factor of \(e^{i angle}\). More... | |
virtual void | Qrack::QInterface::QFT (bitLenInt start, bitLenInt length, bool trySeparate=false) |
Quantum Fourier Transform - Apply the quantum Fourier transform to the register. More... | |
virtual void | Qrack::QInterface::QFTR (const bitLenInt *qubits, bitLenInt length, bool trySeparate=false) |
Quantum Fourier Transform (random access) - Apply the quantum Fourier transform to the register. More... | |
virtual void | Qrack::QInterface::IQFT (bitLenInt start, bitLenInt length, bool trySeparate=false) |
Inverse Quantum Fourier Transform - Apply the inverse quantum Fourier transform to the register. More... | |
virtual void | Qrack::QInterface::IQFTR (const bitLenInt *qubits, bitLenInt length, bool trySeparate=false) |
Inverse Quantum Fourier Transform (random access) - Apply the inverse quantum Fourier transform to the register. More... | |
virtual void | Qrack::QInterface::ZeroPhaseFlip (bitLenInt start, bitLenInt length) |
Reverse the phase of the state where the register equals zero. More... | |
virtual void | Qrack::QInterface::PhaseFlip () |
Phase flip always - equivalent to Z X Z X on any bit in the QInterface. More... | |
virtual void | Qrack::QInterface::SetReg (bitLenInt start, bitLenInt length, bitCapInt value) |
Set register bits to given permutation. More... | |
virtual bitCapInt | Qrack::QInterface::MReg (bitLenInt start, bitLenInt length) |
Measure permutation state of a register. More... | |
virtual bitCapInt | Qrack::QInterface::MAll () |
Measure permutation state of all coherent bits. More... | |
virtual bitCapInt | Qrack::QInterface::ForceMReg (bitLenInt start, bitLenInt length, bitCapInt result, bool doForce=true, bool doApply=true) |
Act as if is a measurement was applied, except force the (usually random) result. More... | |
virtual bitCapInt | Qrack::QInterface::M (const bitLenInt *bits, bitLenInt length) |
Measure bits with indices in array, and return a mask of the results. More... | |
virtual bitCapInt | Qrack::QInterface::ForceM (const bitLenInt *bits, bitLenInt length, const bool *values, bool doApply=true) |
Measure bits with indices in array, and return a mask of the results. More... | |
virtual void | Qrack::QInterface::Swap (bitLenInt qubitIndex1, bitLenInt qubitIndex2) |
Swap values of two bits in register. More... | |
virtual void | Qrack::QInterface::ISwap (bitLenInt qubitIndex1, bitLenInt qubitIndex2) |
Swap values of two bits in register, and apply phase factor of i if bits are different. More... | |
virtual void | Qrack::QInterface::SqrtSwap (bitLenInt qubitIndex1, bitLenInt qubitIndex2) |
Square root of Swap gate. More... | |
virtual void | Qrack::QInterface::ISqrtSwap (bitLenInt qubitIndex1, bitLenInt qubitIndex2) |
Inverse square root of Swap gate. More... | |
virtual void | Qrack::QInterface::FSim (real1_f theta, real1_f phi, bitLenInt qubitIndex1, bitLenInt qubitIndex2)=0 |
The 2-qubit "fSim" gate, (useful in the simulation of particles with fermionic statistics) More... | |
virtual void | Qrack::QInterface::Reverse (bitLenInt first, bitLenInt last) |
Reverse all of the bits in a sequence. More... | |
virtual void | Qrack::QUnit::SetReg (bitLenInt start, bitLenInt length, bitCapInt value) |
Set register bits to given permutation. More... | |
virtual void | Qrack::QUnit::Swap (bitLenInt qubit1, bitLenInt qubit2) |
Swap values of two bits in register. More... | |
virtual void | Qrack::QUnit::ISwap (bitLenInt qubit1, bitLenInt qubit2) |
Swap values of two bits in register, and apply phase factor of i if bits are different. More... | |
virtual void | Qrack::QUnit::SqrtSwap (bitLenInt qubit1, bitLenInt qubit2) |
Square root of Swap gate. More... | |
virtual void | Qrack::QUnit::ISqrtSwap (bitLenInt qubit1, bitLenInt qubit2) |
Inverse square root of Swap gate. More... | |
virtual void | Qrack::QUnit::FSim (real1_f theta, real1_f phi, bitLenInt qubit1, bitLenInt qubit2) |
The 2-qubit "fSim" gate, (useful in the simulation of particles with fermionic statistics) More... | |
|
virtual |
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.
Implements Qrack::QParity.
|
virtual |
Measure bits with indices in array, and return a mask of the results.
Bit-wise apply measurement gate to a register.
Reimplemented in Qrack::QEngine.
|
virtual |
Act as if is a measurement was applied, except force the (usually random) result.
Bit-wise apply measurement gate to a register.
Reimplemented in Qrack::QUnit, and Qrack::QEngine.
|
virtual |
The 2-qubit "fSim" gate, (useful in the simulation of particles with fermionic statistics)
Implements Qrack::QInterface.
|
pure virtual |
The 2-qubit "fSim" gate, (useful in the simulation of particles with fermionic statistics)
Implemented in Qrack::QStabilizerHybrid, Qrack::QMaskFusion, Qrack::QHybrid, Qrack::QStabilizer, Qrack::QPager, Qrack::QBdt, Qrack::QUnit, and Qrack::QEngine.
|
virtual |
Inverse Quantum Fourier Transform - Apply the inverse quantum Fourier transform to the register.
Inverse Quantum Fourier Transform - Quantum Fourier transform optimized for going from |+>/|-> to |0>/|1> basis.
"trySeparate" is an optional hit-or-miss optimization, specifically for QUnit types. Our suggestion is, turn it on for speed and memory effciency if you expect the result of the QFT to be in a permutation basis eigenstate. Otherwise, turning it on will probably take longer.
|
virtual |
Inverse Quantum Fourier Transform (random access) - Apply the inverse quantum Fourier transform to the register.
Inverse Quantum Fourier Transform - Quantum Fourier transform optimized for going from |+>/|-> to |0>/|1> basis.
"trySeparate" is an optional hit-or-miss optimization, specifically for QUnit types. Our suggestion is, turn it on for speed and memory effciency if you expect the result of the QFT to be in a permutation basis eigenstate. Otherwise, turning it on will probably take longer.
Inverse square root of Swap gate.
Reimplemented from Qrack::QInterface.
Inverse square root of Swap gate.
Reimplemented in Qrack::QStabilizerHybrid, Qrack::QMaskFusion, Qrack::QHybrid, Qrack::QPager, Qrack::QUnit, and Qrack::QEngine.
Swap values of two bits in register, and apply phase factor of i if bits are different.
Reimplemented from Qrack::QInterface.
Swap values of two bits in register, and apply phase factor of i if bits are different.
Reimplemented in Qrack::QMaskFusion, Qrack::QStabilizerHybrid, Qrack::QHybrid, Qrack::QPager, Qrack::QUnit, and Qrack::QEngine.
Measure bits with indices in array, and return a mask of the results.
|
inlinevirtual |
Measure permutation state of all coherent bits.
Reimplemented in Qrack::QStabilizerHybrid, Qrack::QBdt, and Qrack::QUnit.
Measure permutation state of a register.
|
virtual |
Phase flip always - equivalent to Z X Z X on any bit in the QInterface.
Reimplemented in Qrack::QStabilizerHybrid.
Quantum Fourier Transform - Apply the quantum Fourier transform to the register.
Quantum Fourier Transform - Optimized for going from |0>/|1> to |+>/|-> basis.
"trySeparate" is an optional hit-or-miss optimization, specifically for QUnit types. Our suggestion is, turn it on for speed and memory effciency if you expect the result of the QFT to be in a permutation basis eigenstate. Otherwise, turning it on will probably take longer.
|
virtual |
Quantum Fourier Transform (random access) - Apply the quantum Fourier transform to the register.
Quantum Fourier Transform - Optimized for going from |0>/|1> to |+>/|-> basis.
"trySeparate" is an optional hit-or-miss optimization, specifically for QUnit types. Our suggestion is, turn it on for speed and memory effciency if you expect the result of the QFT to be in a permutation basis eigenstate. Otherwise, turning it on will probably take longer.
Reverse all of the bits in a sequence.
|
virtual |
Set to a specific permutation of all qubits.
Reimplemented from Qrack::QInterface.
Set register bits to given permutation.
Reimplemented from Qrack::QInterface.
Set register bits to given permutation.
Reimplemented in Qrack::QUnit.
Square root of Swap gate.
Reimplemented from Qrack::QInterface.
Square root of Swap gate.
Reimplemented in Qrack::QStabilizerHybrid, Qrack::QMaskFusion, Qrack::QHybrid, Qrack::QPager, Qrack::QUnit, and Qrack::QEngine.
Swap values of two bits in register.
Reimplemented from Qrack::QInterface.
Swap values of two bits in register.
Reimplemented in Qrack::QMaskFusion, Qrack::QStabilizerHybrid, Qrack::QHybrid, Qrack::QStabilizer, Qrack::QPager, Qrack::QUnit, and Qrack::QEngine.
|
virtual |
Reimplemented from Qrack::QInterface.
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}.
Reimplemented from Qrack::QParity.
Reverse the phase of the state where the register equals zero.
Reimplemented in Qrack::QStabilizerHybrid.