Qrack
9.13
General classical-emulating-quantum development framework
|
Functions | |
void | Qrack::QEngineCPU::SetPermutation (const bitCapInt &perm, const complex &phaseFac=CMPLX_DEFAULT_ARG) |
Set to a specific permutation of all qubits. More... | |
void | Qrack::QEngineCPU::UniformlyControlledSingleBit (const std::vector< bitLenInt > &controls, bitLenInt qubitIndex, const complex *mtrxs, const std::vector< bitCapInt > &mtrxSkipPowers, const bitCapInt &mtrxSkipValueMask) |
void | Qrack::QEngineCPU::UniformParityRZ (const bitCapInt &mask, real1_f angle) |
If the target qubit set parity is odd, this applies a phase factor of \(e^{i angle}\). More... | |
void | Qrack::QEngineCPU::CUniformParityRZ (const std::vector< bitLenInt > &controls, const 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 std::vector< bitLenInt > &qubits, 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 std::vector< bitLenInt > &qubits, 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, const 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, const 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 std::vector< bitLenInt > &bits) |
Measure bits with indices in array, and return a mask of the results. More... | |
virtual bitCapInt | Qrack::QInterface::ForceM (const std::vector< bitLenInt > &bits, const std::vector< 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 qubit1, bitLenInt qubit2) |
Swap values of two bits in register. More... | |
virtual void | Qrack::QInterface::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::QInterface::IISwap (bitLenInt qubit1, bitLenInt qubit2) |
Inverse ISwap - Swap values of two bits in register, and apply phase factor of -i if bits are different. More... | |
virtual void | Qrack::QInterface::SqrtSwap (bitLenInt qubit1, bitLenInt qubit2) |
Square root of Swap gate. More... | |
virtual void | Qrack::QInterface::ISqrtSwap (bitLenInt qubit1, bitLenInt qubit2) |
Inverse square root of Swap gate. More... | |
virtual void | Qrack::QInterface::FSim (real1_f theta, real1_f phi, bitLenInt qubit1, bitLenInt qubit2)=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, const 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::IISwap (bitLenInt qubit1, bitLenInt qubit2) |
Inverse ISwap - 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, Qrack::QPager, and Qrack::QEngine.
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::QPager, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QEngine, Qrack::QBdtHybrid, Qrack::QBdt, Qrack::QUnit, Qrack::QTensorNetwork, Qrack::QStabilizerHybrid, Qrack::QStabilizer, and Qrack::QUnitClifford.
Inverse ISwap - Swap values of two bits in register, and apply phase factor of -i if bits are different.
Reimplemented in Qrack::QStabilizer, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QBdtHybrid, Qrack::QUnit, Qrack::QStabilizerHybrid, Qrack::QPager, Qrack::QEngine, Qrack::QBdt, and Qrack::QUnitClifford.
Inverse ISwap - Swap values of two bits in register, and apply phase factor of -i if bits are different.
Reimplemented from Qrack::QInterface.
|
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 in Qrack::QStabilizerHybrid, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QBdtHybrid, Qrack::QUnit, Qrack::QEngine, and Qrack::QBdt.
Inverse square root of Swap gate.
Reimplemented from Qrack::QInterface.
Swap values of two bits in register, and apply phase factor of i if bits are different.
Reimplemented in Qrack::QStabilizer, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QBdtHybrid, Qrack::QUnit, Qrack::QStabilizerHybrid, Qrack::QPager, Qrack::QEngine, Qrack::QBdt, and Qrack::QUnitClifford.
Swap values of two bits in register, and apply phase factor of i if bits are different.
Reimplemented from Qrack::QInterface.
Measure bits with indices in array, and return a mask of the results.
|
inlinevirtual |
Measure permutation state of all coherent bits.
Reimplemented in Qrack::QUnitClifford, Qrack::QUnit, Qrack::QTensorNetwork, Qrack::QStabilizerHybrid, Qrack::QHybrid, Qrack::QEngineOCL, Qrack::QEngineCUDA, Qrack::QEngineCPU, Qrack::QBdtHybrid, and Qrack::QBdt.
Measure permutation state of a register.
|
inlinevirtual |
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.
|
virtual |
Set register bits to given permutation.
Reimplemented in Qrack::QUnit.
Set register bits to given permutation.
Reimplemented from Qrack::QInterface.
Square root of Swap gate.
Reimplemented in Qrack::QStabilizerHybrid, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QBdtHybrid, Qrack::QUnit, Qrack::QEngine, and Qrack::QBdt.
Square root of Swap gate.
Reimplemented from Qrack::QInterface.
Swap values of two bits in register.
Reimplemented in Qrack::QStabilizer, Qrack::QPager, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QBdtHybrid, Qrack::QUnitClifford, Qrack::QUnit, Qrack::QStabilizerHybrid, Qrack::QEngine, and Qrack::QBdt.
Swap values of two bits in register.
Reimplemented from Qrack::QInterface.
|
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.