|
Qrack
10.0
General classical-emulating-quantum development framework
|

Functions | |
| real1_f | Qrack::QEngineCPU::Prob (bitLenInt qubitIndex) |
| PSEUDO-QUANTUM Direct measure of bit probability to be in |1> state. More... | |
| real1_f | Qrack::QEngineCPU::CtrlOrAntiProb (bool controlState, bitLenInt control, bitLenInt target) |
| PSEUDO-QUANTUM Direct measure of bit probability to be in |1> state, if control is in |0>/|1>, false/true, "controlState". More... | |
| real1_f | Qrack::QEngineCPU::ProbReg (bitLenInt start, bitLenInt length, const bitCapInt &permutation) |
| Direct measure of register permutation probability. More... | |
| real1_f | Qrack::QEngineCPU::ProbMask (const bitCapInt &mask, const bitCapInt &permutation) |
| Direct measure of masked permutation probability. More... | |
| real1_f | Qrack::QEngineCPU::ProbParity (const bitCapInt &mask) |
| Overall probability of any odd permutation of the masked set of bits. More... | |
| bitCapInt | Qrack::QEngineCPU::HighestProbAll () |
| Get highest probability permutation. More... | |
| bitCapInt | Qrack::QEngineCPU::MAll () |
| Measure permutation state of all coherent bits. More... | |
| bool | Qrack::QEngineCPU::ForceMParity (const bitCapInt &mask, bool result, bool doForce=true) |
| Act as if is a measurement of parity of the masked set of qubits was applied, except force the (usually random) result. More... | |
| void | Qrack::QEngineCPU::NormalizeState (real1_f nrm=REAL1_DEFAULT_ARG, real1_f norm_thresh=REAL1_DEFAULT_ARG, real1_f phaseArg=ZERO_R1_F) |
| Apply the normalization factor found by UpdateRunningNorm() or on the fly by a single bit gate. More... | |
| real1_f | Qrack::QEngineCPU::SumSqrDiff (QInterfacePtr toCompare) |
| Calculates (1 - <\psi_e|\psi_c>) between states |\psi_c> and |\psi_e>. More... | |
| real1_f | Qrack::QEngineCPU::SumSqrDiff (QEngineCPUPtr toCompare) |
| QInterfacePtr | Qrack::QEngineCPU::Clone () |
| Clone this QInterface. More... | |
| QInterfacePtr | Qrack::QEngineCPU::Copy () |
| Copy this QInterface. More... | |
| virtual real1_f | Qrack::QInterface::Prob (bitLenInt qubit)=0 |
| Direct measure of bit probability to be in |1> state. More... | |
| virtual real1_f | Qrack::QInterface::CProb (bitLenInt control, bitLenInt target) |
| Direct measure of bit probability to be in |1> state, if control bit is |1>. More... | |
| virtual real1_f | Qrack::QInterface::ACProb (bitLenInt control, bitLenInt target) |
| Direct measure of bit probability to be in |1> state, if control bit is |0>. More... | |
| virtual bitCapInt | Qrack::QInterface::HighestProbAll () |
| Get highest probability permutation. More... | |
| virtual std::vector< bitCapInt > | Qrack::QInterface::HighestProbAll (size_t n) |
| Get top-n highest probability permutations. More... | |
| virtual real1_f | Qrack::QInterface::ProbAll (const bitCapInt &fullRegister) |
| Direct measure of full permutation probability. More... | |
| virtual real1_f | Qrack::QInterface::ProbReg (bitLenInt start, bitLenInt length, const bitCapInt &permutation) |
| Direct measure of register permutation probability. More... | |
| virtual real1_f | Qrack::QInterface::ProbMask (const bitCapInt &mask, const bitCapInt &permutation) |
| Direct measure of masked permutation probability. More... | |
| virtual void | Qrack::QInterface::ProbMaskAll (const bitCapInt &mask, real1 *probsArray) |
| Direct measure of masked permutation probability. More... | |
| virtual void | Qrack::QInterface::ProbBitsAll (const std::vector< bitLenInt > &bits, real1 *probsArray) |
| Direct measure of listed permutation probability. More... | |
| virtual real1_f | Qrack::QInterface::VarianceBitsAll (const std::vector< bitLenInt > &bits, const bitCapInt &offset=ZERO_BCI) |
| Direct measure of variance of listed permutation probability. More... | |
| virtual real1_f | Qrack::QInterface::VarianceBitsAllRdm (bool roundRz, const std::vector< bitLenInt > &bits, const bitCapInt &offset=ZERO_BCI) |
| Direct measure of (reduced density matrix) variance of listed permutation probability. More... | |
| virtual real1_f | Qrack::QInterface::VariancePauliAll (std::vector< bitLenInt > bits, std::vector< Pauli > paulis) |
| Direct measure of variance of listed Pauli tensor product probability. More... | |
| virtual real1_f | Qrack::QInterface::VarianceUnitaryAll (const std::vector< bitLenInt > &bits, const std::vector< real1_f > &basisOps, std::vector< real1_f > eigenVals={}) |
| Direct measure of variance of listed (3-parameter) single-qubit tensor product probability. More... | |
| virtual real1_f | Qrack::QInterface::VarianceUnitaryAll (const std::vector< bitLenInt > &bits, const std::vector< std::shared_ptr< complex >> &basisOps, std::vector< real1_f > eigenVals={}) |
| Direct measure of variance of listed (2x2 operator) single-qubit tensor product probability. More... | |
| virtual real1_f | Qrack::QInterface::VarianceFloatsFactorized (const std::vector< bitLenInt > &bits, const std::vector< real1_f > &weights) |
| Direct measure of variance of listed bit string probability. More... | |
| virtual real1_f | Qrack::QInterface::VarianceFloatsFactorizedRdm (bool roundRz, const std::vector< bitLenInt > &bits, const std::vector< real1_f > &weights) |
| Direct measure of (reduced density matrix) variance of bits, given an array of qubit weights. More... | |
| virtual real1_f | Qrack::QInterface::VarianceBitsFactorized (const std::vector< bitLenInt > &bits, const std::vector< bitCapInt > &perms, const bitCapInt &offset=ZERO_BCI) |
| Get expectation value of bits, given an array of qubit weights. More... | |
| virtual real1_f | Qrack::QInterface::VarianceBitsFactorizedRdm (bool roundRz, const std::vector< bitLenInt > &bits, const std::vector< bitCapInt > &perms, const bitCapInt &offset=ZERO_BCI) |
| Get (reduced density matrix) expectation value of bits, given an array of qubit weights. More... | |
| virtual real1_f | Qrack::QInterface::ExpectationBitsAll (const std::vector< bitLenInt > &bits, const bitCapInt &offset=ZERO_BCI) |
| Get permutation expectation value of bits. More... | |
| virtual real1_f | Qrack::QInterface::ExpectationPauliAll (std::vector< bitLenInt > bits, std::vector< Pauli > paulis) |
| Get Pauli tensor product observable. More... | |
| virtual real1_f | Qrack::QInterface::ExpectationUnitaryAll (const std::vector< bitLenInt > &bits, const std::vector< std::shared_ptr< complex >> &basisOps, std::vector< real1_f > eigenVals={}) |
| Get single-qubit tensor product (arbitrary real) observable. More... | |
| virtual real1_f | Qrack::QInterface::ExpectationUnitaryAll (const std::vector< bitLenInt > &bits, const std::vector< real1_f > &basisOps, std::vector< real1_f > eigenVals={}) |
| Get single-qubit (3-parameter) tensor product (arbitrary real) observable. More... | |
| virtual real1_f | Qrack::QInterface::ExpectationBitsFactorized (const std::vector< bitLenInt > &bits, const std::vector< bitCapInt > &perms, const bitCapInt &offset=ZERO_BCI) |
| Get expectation value of bits, given an array of qubit weights. More... | |
| virtual real1_f | Qrack::QInterface::ExpectationBitsFactorizedRdm (bool roundRz, const std::vector< bitLenInt > &bits, const std::vector< bitCapInt > &perms, const bitCapInt &offset=ZERO_BCI) |
| Get (reduced density matrix) expectation value of bits, given an array of qubit weights. More... | |
| virtual real1_f | Qrack::QInterface::ExpectationFloatsFactorized (const std::vector< bitLenInt > &bits, const std::vector< real1_f > &weights) |
| Get expectation value of bits, given a (floating-point) array of qubit weights. More... | |
| virtual real1_f | Qrack::QInterface::ExpectationFloatsFactorizedRdm (bool roundRz, const std::vector< bitLenInt > &bits, const std::vector< real1_f > &weights) |
| Get (reduced density matrix) expectation value of bits, given a (floating-point) array of qubit weights. More... | |
| virtual real1_f | Qrack::QInterface::ProbRdm (bitLenInt qubit) |
| Direct measure of bit probability to be in |1> state, treating all ancillary qubits as post-selected T gate gadgets. More... | |
| virtual real1_f | Qrack::QInterface::ProbAllRdm (bool roundRz, const bitCapInt &fullRegister) |
| Direct measure of full permutation probability, treating all ancillary qubits as post-selected T gate gadgets. More... | |
| virtual real1_f | Qrack::QInterface::ProbMaskRdm (bool roundRz, const bitCapInt &mask, const bitCapInt &permutation) |
| Direct measure of masked permutation probability, treating all ancillary qubits as post-selected T gate gadgets. More... | |
| virtual real1_f | Qrack::QInterface::ExpectationBitsAllRdm (bool roundRz, const std::vector< bitLenInt > &bits, const bitCapInt &offset=ZERO_BCI) |
| Get permutation expectation value of bits, treating all ancillary qubits as post-selected T gate gadgets. More... | |
| virtual std::map< bitCapInt, int > | Qrack::QInterface::MultiShotMeasureMask (const std::vector< bitCapInt > &qPowers, unsigned shots) |
| Statistical measure of masked permutation probability. More... | |
| virtual void | Qrack::QInterface::MultiShotMeasureMask (const std::vector< bitCapInt > &qPowers, unsigned shots, unsigned long long *shotsArray) |
| Statistical measure of masked permutation probability (returned as array) More... | |
| virtual void | Qrack::QInterface::SetBit (bitLenInt qubit, bool value) |
| Set individual bit to pure |0> (false) or |1> (true) state. More... | |
| virtual bool | Qrack::QInterface::ApproxCompare (QInterfacePtr toCompare, real1_f error_tol=TRYDECOMPOSE_EPSILON) |
| Compare state vectors approximately, to determine whether this state vector is the same as the target. More... | |
| virtual real1_f | Qrack::QInterface::SumSqrDiff (QInterfacePtr toCompare)=0 |
| Calculates (1 - <\psi_e|\psi_c>) between states |\psi_c> and |\psi_e>. More... | |
| virtual bool | Qrack::QInterface::TryDecompose (bitLenInt start, QInterfacePtr dest, real1_f error_tol=TRYDECOMPOSE_EPSILON) |
Attempt to Decompose() a bit range. More... | |
| virtual void | Qrack::QInterface::UpdateRunningNorm (real1_f norm_thresh=REAL1_DEFAULT_ARG)=0 |
| Force a calculation of the norm of the state vector, in order to make it unit length before the next probability or measurement operation. More... | |
| virtual void | Qrack::QInterface::NormalizeState (real1_f nrm=REAL1_DEFAULT_ARG, real1_f norm_thresh=REAL1_DEFAULT_ARG, real1_f phaseArg=ZERO_R1_F)=0 |
| Apply the normalization factor found by UpdateRunningNorm() or on the fly by a single bit gate. More... | |
| virtual void | Qrack::QInterface::Finish () |
| If asynchronous work is still running, block until it finishes. More... | |
| virtual bool | Qrack::QInterface::isFinished () |
| Returns "false" if asynchronous work is still running, and "true" if all previously dispatched asynchronous work is done. More... | |
| virtual void | Qrack::QInterface::Dump () |
| If asynchronous work is still running, let the simulator know that it can be aborted. More... | |
| virtual bool | Qrack::QInterface::isBinaryDecisionTree () |
| Returns "true" if current state representation is definitely a binary decision tree, "false" if it is definitely not, or "true" if it cannot be determined. More... | |
| virtual bool | Qrack::QInterface::isClifford () |
| Returns "true" if current state is identifiably within the Clifford set, or "false" if it is not or cannot be determined. More... | |
| virtual bool | Qrack::QInterface::isClifford (bitLenInt qubit) |
| Returns "true" if current qubit state is identifiably within the Clifford set, or "false" if it is not or cannot be determined. More... | |
| virtual bool | Qrack::QInterface::isOpenCL () |
| Returns "true" if current simulation is OpenCL-based. More... | |
| virtual bool | Qrack::QInterface::TrySeparate (const std::vector< bitLenInt > &qubits, real1_f error_tol) |
| Qrack::QUnit types maintain explicit separation of representations of qubits, which reduces memory usage and increases gate speed. More... | |
| virtual bool | Qrack::QInterface::TrySeparate (bitLenInt qubit) |
| Single-qubit TrySeparate() More... | |
| virtual bool | Qrack::QInterface::TrySeparate (bitLenInt qubit1, bitLenInt qubit2) |
| Two-qubit TrySeparate() More... | |
| virtual double | Qrack::QInterface::GetUnitaryFidelity () |
| When "Schmidt-decomposition rounding parameter" ("SDRP") is being used, starting from initial 1.0 fidelity, we compound the "unitary fidelity" by successive multiplication by one minus two times the true unitary probability discarded in each single rounding event. More... | |
| virtual void | Qrack::QInterface::ResetUnitaryFidelity () |
| Reset the internal fidelity calculation tracker to 1.0. More... | |
| virtual void | Qrack::QInterface::SetSdrp (real1_f sdrp) |
| Set the "Schmidt decomposition rounding parameter" value, (between 0 and 1) More... | |
| virtual void | Qrack::QInterface::SetNcrp (real1_f ncrp) |
| Set the "Near-clifford rounding parameter" value, (between 0 and 1) More... | |
| virtual void | Qrack::QInterface::SetReactiveSeparate (bool isAggSep) |
| Set reactive separation option (on by default if available) More... | |
| virtual bool | Qrack::QInterface::GetReactiveSeparate () |
| Get reactive separation option. More... | |
| virtual void | Qrack::QInterface::SetTInjection (bool useGadget) |
| Set the option to use T-injection gadgets (off by default) More... | |
| virtual bool | Qrack::QInterface::GetTInjection () |
| Get the option to use T-injection gadgets. More... | |
| virtual void | Qrack::QInterface::SetNoiseParameter (real1_f lambda) |
| Set the noise level option (only for a noisy interface) More... | |
| virtual real1_f | Qrack::QInterface::GetNoiseParameter () |
| Get the noise level option (only for a noisy interface) More... | |
| virtual void | Qrack::QInterface::SetAceMaxQubits (bitLenInt qb) |
| Set the "automatic circuit elision" (ACE) maximum entangled subsystem qubit count. More... | |
| virtual void | Qrack::QInterface::SetSparseAceMaxMb (size_t mb) |
| Set the (sparse-simulation) "automatic circuit elision" (ACE) maximum memory megabytes. More... | |
| virtual QInterfacePtr | Qrack::QInterface::Clone ()=0 |
| Clone this QInterface. More... | |
| virtual QInterfacePtr | Qrack::QInterface::Copy () |
| Copy this QInterface. More... | |
| virtual void | Qrack::QInterface::SetDevice (int64_t dID) |
| Set the device index, if more than one device is available. More... | |
| virtual int64_t | Qrack::QInterface::GetDevice () |
| Get the device index. More... | |
| virtual void | Qrack::QInterface::SetDeviceList (std::vector< int64_t > dIDs) |
| Set the device index list, if more than one device is available. More... | |
| virtual std::vector< int64_t > | Qrack::QInterface::GetDeviceList () |
| Get the device index. More... | |
| bitCapIntOcl | Qrack::QInterface::GetMaxSize () |
| Get maximum number of amplitudes that can be allocated on current device. More... | |
| virtual real1_f | Qrack::QInterface::FirstNonzeroPhase () |
| Get phase of lowest permutation nonzero amplitude. More... | |
| virtual void | Qrack::QInterface::DepolarizingChannelWeak1Qb (bitLenInt qubit, real1_f lambda) |
| Simulate a local qubit depolarizing noise channel, under a stochastic "weak simulation condition." Under "weak" condition, sampling and exact state queries are not accurate, but sampling can be achieved via repeated full execution of a noisy circuit, for each hardware-realistic measurement sample. More... | |
| virtual real1_f | Qrack::QUnit::Prob (bitLenInt qubit) |
| Direct measure of bit probability to be in |1> state. More... | |
| virtual real1_f | Qrack::QUnit::ProbAll (const bitCapInt &perm) |
| Direct measure of full permutation probability. More... | |
| virtual real1_f | Qrack::QUnit::ProbAllRdm (bool roundRz, const bitCapInt &perm) |
| Direct measure of full permutation probability, treating all ancillary qubits as post-selected T gate gadgets. More... | |
| virtual real1_f | Qrack::QUnit::ProbParity (const bitCapInt &mask) |
| Overall probability of any odd permutation of the masked set of bits. More... | |
| virtual bool | Qrack::QUnit::ForceMParity (const bitCapInt &mask, bool result, bool doForce=true) |
| Act as if is a measurement of parity of the masked set of qubits was applied, except force the (usually random) result. More... | |
| virtual real1_f | Qrack::QUnit::SumSqrDiff (QInterfacePtr toCompare) |
| Calculates (1 - <\psi_e|\psi_c>) between states |\psi_c> and |\psi_e>. More... | |
| virtual real1_f | Qrack::QUnit::SumSqrDiff (QUnitPtr toCompare) |
| virtual real1_f | Qrack::QUnit::ExpectationBitsFactorized (const std::vector< bitLenInt > &bits, const std::vector< bitCapInt > &perms, const bitCapInt &offset=ZERO_BCI) |
| Get expectation value of bits, given an array of qubit weights. More... | |
| virtual real1_f | Qrack::QUnit::ExpectationBitsFactorizedRdm (bool roundRz, const std::vector< bitLenInt > &bits, const std::vector< bitCapInt > &perms, const bitCapInt &offset=ZERO_BCI) |
| Get (reduced density matrix) expectation value of bits, given an array of qubit weights. More... | |
| virtual real1_f | Qrack::QUnit::VarianceBitsFactorized (const std::vector< bitLenInt > &bits, const std::vector< bitCapInt > &perms, const bitCapInt &offset=ZERO_BCI) |
| Get expectation value of bits, given an array of qubit weights. More... | |
| virtual real1_f | Qrack::QUnit::VarianceBitsFactorizedRdm (bool roundRz, const std::vector< bitLenInt > &bits, const std::vector< bitCapInt > &perms, const bitCapInt &offset=ZERO_BCI) |
| Get (reduced density matrix) expectation value of bits, given an array of qubit weights. More... | |
| virtual void | Qrack::QUnit::UpdateRunningNorm (real1_f norm_thresh=REAL1_DEFAULT_ARG) |
| Force a calculation of the norm of the state vector, in order to make it unit length before the next probability or measurement operation. More... | |
| virtual void | Qrack::QUnit::NormalizeState (real1_f nrm=REAL1_DEFAULT_ARG, real1_f norm_thresh=REAL1_DEFAULT_ARG, real1_f phaseArg=ZERO_R1_F) |
| Apply the normalization factor found by UpdateRunningNorm() or on the fly by a single bit gate. More... | |
| virtual void | Qrack::QUnit::Finish () |
| If asynchronous work is still running, block until it finishes. More... | |
| virtual bool | Qrack::QUnit::isFinished () |
| Returns "false" if asynchronous work is still running, and "true" if all previously dispatched asynchronous work is done. More... | |
| virtual void | Qrack::QUnit::Dump () |
| If asynchronous work is still running, let the simulator know that it can be aborted. More... | |
| virtual bool | Qrack::QUnit::isClifford (bitLenInt qubit) |
| Returns "true" if current qubit state is identifiably within the Clifford set, or "false" if it is not or cannot be determined. More... | |
| virtual bool | Qrack::QUnit::TrySeparate (bitLenInt qubit) |
| Single-qubit TrySeparate() More... | |
| virtual bool | Qrack::QUnit::TrySeparate (bitLenInt qubit1, bitLenInt qubit2) |
| Two-qubit TrySeparate() More... | |
| virtual bool | Qrack::QUnit::TrySeparate (const std::vector< bitLenInt > &qubits, real1_f error_tol) |
| Qrack::QUnit types maintain explicit separation of representations of qubits, which reduces memory usage and increases gate speed. More... | |
| virtual double | Qrack::QUnit::GetUnitaryFidelity () |
| When "Schmidt-decomposition rounding parameter" ("SDRP") is being used, starting from initial 1.0 fidelity, we compound the "unitary fidelity" by successive multiplication by one minus two times the true unitary probability discarded in each single rounding event. More... | |
| virtual void | Qrack::QUnit::ResetUnitaryFidelity () |
| Reset the internal fidelity calculation tracker to 1.0. More... | |
| virtual void | Qrack::QUnit::SetSdrp (real1_f sdrp) |
| Set the "Schmidt decomposition rounding parameter" value, (between 0 and 1) More... | |
| virtual void | Qrack::QUnit::SetNcrp (real1_f ncrp) |
| Set the "Near-clifford rounding parameter" value, (between 0 and 1) More... | |
| virtual void | Qrack::QUnit::SetAceMaxQubits (bitLenInt qb) |
| Set the "automatic circuit elision" (ACE) maximum entangled subsystem qubit count. More... | |
| virtual void | Qrack::QUnit::SetSparseAceMaxMb (size_t mb) |
| Set the (sparse-simulation) "automatic circuit elision" (ACE) maximum memory megabytes. More... | |
| virtual QInterfacePtr | Qrack::QUnit::Clone () |
| Clone this QInterface. More... | |
| virtual QInterfacePtr | Qrack::QUnit::Copy () |
| Copy this QInterface. More... | |
Direct measure of bit probability to be in |1> state, if control bit is |0>.
Reimplemented in Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QEngine, and Qrack::QBdtHybrid.
|
inlinevirtual |
Compare state vectors approximately, to determine whether this state vector is the same as the target.
(If (1 - <\psi_e|\psi_c>) <= error_tol between states |\psi_c> and |\psi_e>, they are "the same.")
Reimplemented in Qrack::QUnitClifford, Qrack::QStabilizerHybrid, and Qrack::QStabilizer.
|
virtual |
Clone this QInterface.
Implements Qrack::QInterface.
|
virtual |
|
pure virtual |
Clone this QInterface.
Implemented in Qrack::QUnitMulti, Qrack::QUnitClifford, Qrack::QUnit, Qrack::QTensorNetwork, Qrack::QStabilizerHybrid, Qrack::QStabilizer, Qrack::QPager, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QEngineOCL, Qrack::QEngineCUDA, Qrack::QEngineCPU, Qrack::QBdtHybrid, and Qrack::QBdt.
|
virtual |
Copy this QInterface.
Reimplemented from Qrack::QInterface.
|
inlinevirtual |
Copy this QInterface.
Reimplemented in Qrack::QUnitMulti, Qrack::QUnitMulti, Qrack::QUnitClifford, Qrack::QStabilizerHybrid, Qrack::QStabilizer, Qrack::QPager, Qrack::QPager, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QHybrid, Qrack::QEngineOCL, Qrack::QEngineOCL, Qrack::QEngineCUDA, Qrack::QEngineCUDA, Qrack::QEngineCPU, Qrack::QEngineCPU, Qrack::QEngine, Qrack::QBdt, Qrack::QPager, Qrack::QHybrid, Qrack::QEngineOCL, Qrack::QEngineCUDA, Qrack::QEngineCPU, Qrack::QUnitMulti, Qrack::QUnitMulti, Qrack::QUnitClifford, Qrack::QUnit, Qrack::QStabilizerHybrid, Qrack::QStabilizerHybrid, Qrack::QStabilizer, Qrack::QPager, Qrack::QPager, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QHybrid, Qrack::QEngineOCL, Qrack::QEngineOCL, Qrack::QEngineCUDA, Qrack::QEngineCUDA, Qrack::QEngineCPU, Qrack::QEngineCPU, Qrack::QEngine, and Qrack::QBdt.
|
virtual |
Copy this QInterface.
Reimplemented from Qrack::QInterface.
Reimplemented in Qrack::QUnitMulti, Qrack::QUnitMulti, Qrack::QUnitMulti, and Qrack::QUnitMulti.
Direct measure of bit probability to be in |1> state, if control bit is |1>.
Reimplemented in Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QEngine, and Qrack::QBdtHybrid.
|
virtual |
PSEUDO-QUANTUM Direct measure of bit probability to be in |1> state, if control is in |0>/|1>, false/true, "controlState".
Reimplemented from Qrack::QEngine.
Simulate a local qubit depolarizing noise channel, under a stochastic "weak simulation condition." Under "weak" condition, sampling and exact state queries are not accurate, but sampling can be achieved via repeated full execution of a noisy circuit, for each hardware-realistic measurement sample.
|
inlinevirtual |
If asynchronous work is still running, let the simulator know that it can be aborted.
Note that this method is typically used internally where appropriate, such that user code typically does not call Dump().
Reimplemented in Qrack::QUnit, Qrack::QTensorNetwork, Qrack::QStabilizerHybrid, Qrack::QPager, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QEngineCPU, and Qrack::QBdtHybrid.
|
inlinevirtual |
If asynchronous work is still running, let the simulator know that it can be aborted.
Note that this method is typically used internally where appropriate, such that user code typically does not call Dump().
Reimplemented from Qrack::QInterface.
|
inlinevirtual |
Get permutation expectation value of bits.
The permutation expectation value of all included bits is returned, with bits valued from low to high as the order of the "bits" array parameter argument.
Reimplemented in Qrack::QStabilizerHybrid, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QEngineOCL, Qrack::QEngineCUDA, and Qrack::QBdtHybrid.
|
inlinevirtual |
Get permutation expectation value of bits, treating all ancillary qubits as post-selected T gate gadgets.
The permutation expectation value of all included bits is returned, with bits valued from low to high as the order of the "bits" array parameter argument.
Reimplemented in Qrack::QStabilizerHybrid.
|
virtual |
Get expectation value of bits, given an array of qubit weights.
The weighter-per-qubit expectation value of is returned, with each "bits" entry corresponding to a "perms" weight entry.
Reimplemented in Qrack::QUnitClifford, Qrack::QUnit, Qrack::QStabilizerHybrid, and Qrack::QStabilizer.
|
inlinevirtual |
Get expectation value of bits, given an array of qubit weights.
The weighter-per-qubit expectation value of is returned, with each "bits" entry corresponding to a "perms" weight entry.
Reimplemented from Qrack::QInterface.
|
inlinevirtual |
Get (reduced density matrix) expectation value of bits, given an array of qubit weights.
The weighter-per-qubit expectation value of is returned, with each "bits" entry corresponding to a "perms" weight entry. If there are stabilizer ancillae, they are traced out of the reduced density matrix, giving an approximate result.
Reimplemented in Qrack::QUnit, and Qrack::QStabilizerHybrid.
|
inlinevirtual |
Get (reduced density matrix) expectation value of bits, given an array of qubit weights.
The weighter-per-qubit expectation value of is returned, with each "bits" entry corresponding to a "perms" weight entry. If there are stabilizer ancillae, they are traced out of the reduced density matrix, giving an approximate result.
Reimplemented from Qrack::QInterface.
|
virtual |
Get expectation value of bits, given a (floating-point) array of qubit weights.
The weighter-per-qubit expectation value of is returned, with each "bits" entry corresponding to a "weights" entry.
Reimplemented in Qrack::QUnitClifford, Qrack::QStabilizerHybrid, and Qrack::QStabilizer.
|
inlinevirtual |
Get (reduced density matrix) expectation value of bits, given a (floating-point) array of qubit weights.
The weighter-per-qubit expectation value of is returned, with each "bits" entry corresponding to a "weights" entry. If there are stabilizer ancillae, they are traced out of the reduced density matrix, giving an approximate result.
Reimplemented in Qrack::QStabilizerHybrid.
|
virtual |
Get Pauli tensor product observable.
The Pauli tensor basis expectation value of all included bits is returned, with bits valued from low to high as the order of the "bits" array parameter argument.
|
inlinevirtual |
Get single-qubit (3-parameter) tensor product (arbitrary real) observable.
The single-qubit (3-parameter) tensor basis (arbitrary real) expectation value of all included bits is returned, with bits valued from low to high as the order of the "bits" array parameter argument.
|
inlinevirtual |
Get single-qubit tensor product (arbitrary real) observable.
The single-qubit tensor basis (arbitrary real) expectation value of all included bits is returned, with bits valued from low to high as the order of the "bits" array parameter argument.
|
inlinevirtual |
If asynchronous work is still running, block until it finishes.
Note that this is never necessary to get correct, timely return values. QEngines and other layers will always internally "Finish" when necessary for correct return values. This is primarily for debugging and benchmarking.
Reimplemented in Qrack::QUnit, Qrack::QTensorNetwork, Qrack::QStabilizerHybrid, Qrack::QPager, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QEngineOCL, Qrack::QEngineCUDA, Qrack::QEngineCPU, and Qrack::QBdtHybrid.
|
virtual |
If asynchronous work is still running, block until it finishes.
Note that this is never necessary to get correct, timely return values. QEngines and other layers will always internally "Finish" when necessary for correct return values. This is primarily for debugging and benchmarking.
Reimplemented from Qrack::QInterface.
|
inlinevirtual |
Get phase of lowest permutation nonzero amplitude.
Reimplemented in Qrack::QPager, Qrack::QHybrid, Qrack::QEngineOCL, Qrack::QEngineCUDA, and Qrack::QEngineCPU.
|
virtual |
Act as if is a measurement of parity of the masked set of qubits was applied, except force the (usually random) result.
Implements Qrack::QParity.
|
virtual |
Act as if is a measurement of parity of the masked set of qubits was applied, except force the (usually random) result.
Implements Qrack::QParity.
|
inlinevirtual |
Get the device index.
("-1" is default).
Reimplemented in Qrack::QUnit, Qrack::QTensorNetwork, Qrack::QStabilizerHybrid, Qrack::QPager, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QEngineOCL, Qrack::QEngineCUDA, Qrack::QEngine, Qrack::QBdtHybrid, and Qrack::QBdt.
|
inlinevirtual |
Get the device index.
Reimplemented in Qrack::QUnit, Qrack::QTensorNetwork, Qrack::QStabilizerHybrid, Qrack::QPager, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QEngineOCL, Qrack::QBdtHybrid, and Qrack::QBdt.
|
inline |
Get maximum number of amplitudes that can be allocated on current device.
|
inlinevirtual |
Get the noise level option (only for a noisy interface)
If this is a QInterfaceNoisy, return the noise level per gate.
Reimplemented in Qrack::QInterfaceNoisy.
|
inlinevirtual |
Get reactive separation option.
If reactive separation is available, as in Qrack::QUnit, then turning this option on attempts to more-aggresively recover separability of subsystems. It can either hurt or help performance, though it commonly helps.
Reimplemented in Qrack::QUnitClifford, and Qrack::QUnit.
|
inlinevirtual |
Get the option to use T-injection gadgets.
If T-injection gadgets are available, as in Qrack::QStabilizerHybrid, then turning this option on attempts to simulate Clifford+T with polynomial resource gadgets. It can either hurt or help performance, though it commonly helps.
Reimplemented in Qrack::QStabilizerHybrid, and Qrack::QPager.
|
inlinevirtual |
When "Schmidt-decomposition rounding parameter" ("SDRP") is being used, starting from initial 1.0 fidelity, we compound the "unitary fidelity" by successive multiplication by one minus two times the true unitary probability discarded in each single rounding event.
Then, an overall square-root is applied to the final fidelity estimate. This is a useful metric on fidelity that requires no heavy calculational overhead to compute, and it tends to be usually only slightly pessimistic compared to random circuit sampling fidelity calculated via the inner product. This calculation is automatically reset to 1.0 by SetPermutation() or MAll() or can be manually reset by "QInterface::ResetUnitaryFidelity()".
Reimplemented in Qrack::QUnit, Qrack::QTensorNetwork, Qrack::QStabilizerHybrid, Qrack::QInterfaceNoisy, and Qrack::QEngineCPU.
|
virtual |
When "Schmidt-decomposition rounding parameter" ("SDRP") is being used, starting from initial 1.0 fidelity, we compound the "unitary fidelity" by successive multiplication by one minus two times the true unitary probability discarded in each single rounding event.
Then, an overall square-root is applied to the final fidelity estimate. This is a useful metric on fidelity that requires no heavy calculational overhead to compute, and it tends to be usually only slightly pessimistic compared to random circuit sampling fidelity calculated via the inner product. This calculation is automatically reset to 1.0 by SetPermutation() or MAll() or can be manually reset by "QInterface::ResetUnitaryFidelity()".
Reimplemented from Qrack::QInterface.
|
virtual |
Get highest probability permutation.
Reimplemented from Qrack::QInterface.
|
inlinevirtual |
Get highest probability permutation.
Reimplemented in Qrack::QUnit, Qrack::QTensorNetwork, Qrack::QStabilizerHybrid, Qrack::QStabilizer, Qrack::QPager, Qrack::QEngineOCL, Qrack::QEngineCUDA, and Qrack::QEngineCPU.
|
virtual |
Get top-n highest probability permutations.
|
inlinevirtual |
Returns "true" if current state representation is definitely a binary decision tree, "false" if it is definitely not, or "true" if it cannot be determined.
Reimplemented in Qrack::QStabilizerHybrid, and Qrack::QBdt.
|
inlinevirtual |
Returns "true" if current state is identifiably within the Clifford set, or "false" if it is not or cannot be determined.
Reimplemented in Qrack::QUnit, Qrack::QUnitClifford, Qrack::QUnit, Qrack::QStabilizerHybrid, and Qrack::QStabilizer.
|
inlinevirtual |
Returns "true" if current qubit state is identifiably within the Clifford set, or "false" if it is not or cannot be determined.
Reimplemented in Qrack::QUnitClifford, Qrack::QUnit, Qrack::QStabilizerHybrid, and Qrack::QStabilizer.
|
inlinevirtual |
Returns "true" if current qubit state is identifiably within the Clifford set, or "false" if it is not or cannot be determined.
Reimplemented from Qrack::QInterface.
|
inlinevirtual |
Returns "false" if asynchronous work is still running, and "true" if all previously dispatched asynchronous work is done.
Reimplemented in Qrack::QUnit, Qrack::QTensorNetwork, Qrack::QStabilizerHybrid, Qrack::QPager, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QEngineOCL, Qrack::QEngineCUDA, Qrack::QEngineCPU, and Qrack::QBdtHybrid.
|
virtual |
Returns "false" if asynchronous work is still running, and "true" if all previously dispatched asynchronous work is done.
Reimplemented from Qrack::QInterface.
|
inlinevirtual |
Returns "true" if current simulation is OpenCL-based.
Reimplemented in Qrack::QPager, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QEngineOCL, and Qrack::QEngineCUDA.
|
virtual |
Measure permutation state of all coherent bits.
Reimplemented from Qrack::QInterface.
|
virtual |
Statistical measure of masked permutation probability.
"qPowers" contains powers of 2^n, each representing QInterface bit "n." The order of these values defines a mask for the result bitCapInt, of 2^0 ~ qPowers[0U] to 2^(qPowerCount - 1) ~ qPowers[qPowerCount - 1], in contiguous ascending order. "shots" specifies the number of samples to take as if totally re-preparing the pre-measurement state. This method returns a dictionary with keys, which are the (masked-order) measurement results, and values, which are the number of "shots" that produced that particular measurement result. This method does not "collapse" the state of this QInterface. (The idea is to efficiently simulate a potentially statistically random sample of multiple re-preparations of the state right before measurement, and to collect random measurement resutls, without forcing the user to re-prepare or "clone" the state.)
Reimplemented in Qrack::QUnitClifford, Qrack::QUnit, Qrack::QTensorNetwork, Qrack::QStabilizerHybrid, and Qrack::QEngine.
|
virtual |
Statistical measure of masked permutation probability (returned as array)
Same Qrack::MultiShotMeasureMask(), except the shots are returned as an array.
Reimplemented in Qrack::QUnitClifford, Qrack::QUnit, Qrack::QTensorNetwork, Qrack::QStabilizerHybrid, and Qrack::QEngine.
|
virtual |
Apply the normalization factor found by UpdateRunningNorm() or on the fly by a single bit gate.
(On an actual quantum computer, the state should never require manual normalization.)
Implements Qrack::QInterface.
|
virtual |
Apply the normalization factor found by UpdateRunningNorm() or on the fly by a single bit gate.
(On an actual quantum computer, the state should never require manual normalization.)
Implements Qrack::QInterface.
|
pure virtual |
Apply the normalization factor found by UpdateRunningNorm() or on the fly by a single bit gate.
(On an actual quantum computer, the state should never require manual normalization.)
Implemented in Qrack::QUnitClifford, Qrack::QUnit, Qrack::QTensorNetwork, Qrack::QStabilizerHybrid, Qrack::QStabilizer, Qrack::QPager, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QEngineOCL, Qrack::QEngineCUDA, Qrack::QEngineCPU, Qrack::QBdtHybrid, and Qrack::QBdt.
Direct measure of bit probability to be in |1> state.
Implements Qrack::QInterface.
Direct measure of bit probability to be in |1> state.
Implemented in Qrack::QPager, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QEngineCPU, Qrack::QBdtHybrid, Qrack::QBdt, Qrack::QUnitClifford, Qrack::QUnit, Qrack::QTensorNetwork, Qrack::QStabilizerHybrid, Qrack::QStabilizer, Qrack::QEngineOCL, and Qrack::QEngineCUDA.
PSEUDO-QUANTUM Direct measure of bit probability to be in |1> state.
Implements Qrack::QInterface.
Direct measure of full permutation probability.
Reimplemented in Qrack::QUnit, Qrack::QStabilizerHybrid, Qrack::QPager, Qrack::QTensorNetwork, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QEngine, Qrack::QBdtHybrid, and Qrack::QBdt.
Direct measure of full permutation probability.
Reimplemented from Qrack::QInterface.
|
inlinevirtual |
Direct measure of full permutation probability, treating all ancillary qubits as post-selected T gate gadgets.
Reimplemented in Qrack::QUnit, and Qrack::QStabilizerHybrid.
|
inlinevirtual |
Direct measure of full permutation probability, treating all ancillary qubits as post-selected T gate gadgets.
Reimplemented from Qrack::QInterface.
|
virtual |
Direct measure of listed permutation probability.
The probabilities of all included permutations of bits, with bits valued from low to high as the order of the "bits" array parameter argument, are returned in the "probsArray" parameter.
|
virtual |
Direct measure of masked permutation probability.
Returns probability of permutation of the mask.
"mask" masks the bits to check the probability of. "permutation" sets the 0 or 1 value for each bit in the mask. Bits which are set in the mask can be set to 0 or 1 in the permutation, while reset bits in the mask should be 0 in the permutation.
Implements Qrack::QEngine.
|
virtual |
Direct measure of masked permutation probability.
Returns probability of permutation of the mask.
"mask" masks the bits to check the probability of. "permutation" sets the 0 or 1 value for each bit in the mask. Bits which are set in the mask can be set to 0 or 1 in the permutation, while reset bits in the mask should be 0 in the permutation.
Reimplemented in Qrack::QEngine, Qrack::QUnitClifford, Qrack::QStabilizerHybrid, Qrack::QStabilizer, Qrack::QPager, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QEngineOCL, Qrack::QEngineCUDA, Qrack::QEngineCPU, and Qrack::QBdtHybrid.
Direct measure of masked permutation probability.
"mask" masks the bits to check the probability of. The probabilities of all permutations of the masked bits, from left/low to right/high are returned in the "probsArray" argument.
Reimplemented in Qrack::QEngineOCL, and Qrack::QEngineCUDA.
|
inlinevirtual |
Direct measure of masked permutation probability, treating all ancillary qubits as post-selected T gate gadgets.
"mask" masks the bits to check the probability of. "permutation" sets the 0 or 1 value for each bit in the mask. Bits which are set in the mask can be set to 0 or 1 in the permutation, while reset bits in the mask should be 0 in the permutation.
Reimplemented in Qrack::QStabilizerHybrid.
Overall probability of any odd permutation of the masked set of bits.
Implements Qrack::QParity.
Overall probability of any odd permutation of the masked set of bits.
Implements Qrack::QParity.
Direct measure of bit probability to be in |1> state, treating all ancillary qubits as post-selected T gate gadgets.
Reimplemented in Qrack::QUnit, and Qrack::QStabilizerHybrid.
|
virtual |
Direct measure of register permutation probability.
Returns probability of permutation of the register.
Implements Qrack::QEngine.
|
virtual |
Direct measure of register permutation probability.
Returns probability of permutation of the register.
Reimplemented in Qrack::QEngine, Qrack::QPager, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QEngineOCL, Qrack::QEngineCUDA, Qrack::QEngineCPU, and Qrack::QBdtHybrid.
|
inlinevirtual |
Reset the internal fidelity calculation tracker to 1.0.
Reimplemented in Qrack::QUnit, Qrack::QStabilizerHybrid, Qrack::QInterfaceNoisy, and Qrack::QEngineCPU.
|
inlinevirtual |
Reset the internal fidelity calculation tracker to 1.0.
Reimplemented from Qrack::QInterface.
|
inlinevirtual |
Set the "automatic circuit elision" (ACE) maximum entangled subsystem qubit count.
Reimplemented in Qrack::QUnit, and Qrack::QTensorNetwork.
|
inlinevirtual |
Set the "automatic circuit elision" (ACE) maximum entangled subsystem qubit count.
Reimplemented from Qrack::QInterface.
|
inlinevirtual |
Set individual bit to pure |0> (false) or |1> (true) state.
To set a bit, the bit is first measured. If the result of measurement matches "value," the bit is considered set. If the result of measurement is the opposite of "value," an X gate is applied to the bit. The state ends up entirely in the "value" state, with a random phase factor.
|
inlinevirtual |
Set the device index, if more than one device is available.
Reimplemented in Qrack::QUnit, Qrack::QTensorNetwork, Qrack::QStabilizerHybrid, Qrack::QPager, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QEngineOCL, Qrack::QEngineCUDA, Qrack::QEngine, Qrack::QBdtHybrid, and Qrack::QBdt.
|
inlinevirtual |
Set the device index list, if more than one device is available.
Reimplemented in Qrack::QUnit, Qrack::QTensorNetwork, Qrack::QStabilizerHybrid, Qrack::QPager, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QEngineOCL, Qrack::QBdtHybrid, and Qrack::QBdt.
|
inlinevirtual |
Set the "Near-clifford rounding parameter" value, (between 0 and 1)
Reimplemented in Qrack::QTensorNetwork, Qrack::QUnit, and Qrack::QStabilizerHybrid.
|
inlinevirtual |
Set the "Near-clifford rounding parameter" value, (between 0 and 1)
Reimplemented from Qrack::QInterface.
|
inlinevirtual |
Set the noise level option (only for a noisy interface)
If this is a QInterfaceNoisy, adjust the noise level per gate.
Reimplemented in Qrack::QInterfaceNoisy.
|
inlinevirtual |
Set reactive separation option (on by default if available)
If reactive separation is available, as in Qrack::QUnit, then turning this option on attempts to more-aggresively recover separability of subsystems. It can either hurt or help performance, though it commonly helps.
Reimplemented in Qrack::QUnitClifford, Qrack::QUnit, Qrack::QTensorNetwork, and Qrack::QInterfaceNoisy.
|
inlinevirtual |
Set the "Schmidt decomposition rounding parameter" value, (between 0 and 1)
Reimplemented in Qrack::QUnit, Qrack::QTensorNetwork, and Qrack::QInterfaceNoisy.
|
inlinevirtual |
Set the "Schmidt decomposition rounding parameter" value, (between 0 and 1)
Reimplemented from Qrack::QInterface.
|
inlinevirtual |
Set the (sparse-simulation) "automatic circuit elision" (ACE) maximum memory megabytes.
Reimplemented in Qrack::QUnit, and Qrack::QTensorNetwork.
|
inlinevirtual |
Set the (sparse-simulation) "automatic circuit elision" (ACE) maximum memory megabytes.
Reimplemented from Qrack::QInterface.
|
inlinevirtual |
Set the option to use T-injection gadgets (off by default)
If T-injection gadgets are available, as in Qrack::QStabilizerHybrid, then turning this option on attempts to simulate Clifford+T with polynomial resource gadgets. It can either hurt or help performance, though it commonly helps.
Reimplemented in Qrack::QUnit, Qrack::QTensorNetwork, Qrack::QStabilizerHybrid, and Qrack::QPager.
| real1_f Qrack::QEngineCPU::SumSqrDiff | ( | QEngineCPUPtr | toCompare | ) |
|
inlinevirtual |
Calculates (1 - <\psi_e|\psi_c>) between states |\psi_c> and |\psi_e>.
Implements Qrack::QInterface.
|
inlinevirtual |
Calculates (1 - <\psi_e|\psi_c>) between states |\psi_c> and |\psi_e>.
Implements Qrack::QInterface.
|
pure virtual |
Calculates (1 - <\psi_e|\psi_c>) between states |\psi_c> and |\psi_e>.
Implemented in Qrack::QUnitClifford, Qrack::QUnit, Qrack::QTensorNetwork, Qrack::QStabilizerHybrid, Qrack::QStabilizer, Qrack::QPager, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QEngineOCL, Qrack::QEngineCUDA, Qrack::QEngineCPU, Qrack::QBdtHybrid, and Qrack::QBdt.
|
virtual |
Attempt to Decompose() a bit range.
If the result can Compose() again to the original state vector with (1 - <\psi_e|\psi_c>) <= error_tol, return "true" and complete Decompose(); otherwise, restore the original state and return "false."
Reimplemented in Qrack::QUnit, Qrack::QTensorNetwork, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QBdtHybrid, and Qrack::QBdt.
|
inlinevirtual |
Single-qubit TrySeparate()
Reimplemented in Qrack::QUnitClifford, Qrack::QUnit, Qrack::QTensorNetwork, Qrack::QStabilizerHybrid, Qrack::QStabilizer, and Qrack::QBdt.
|
virtual |
Single-qubit TrySeparate()
Reimplemented from Qrack::QInterface.
Two-qubit TrySeparate()
Reimplemented in Qrack::QUnitClifford, Qrack::QUnit, Qrack::QTensorNetwork, Qrack::QStabilizerHybrid, Qrack::QStabilizer, and Qrack::QBdt.
Two-qubit TrySeparate()
Reimplemented from Qrack::QInterface.
|
inlinevirtual |
Qrack::QUnit types maintain explicit separation of representations of qubits, which reduces memory usage and increases gate speed.
This method is used to manually attempt internal separation of a QUnit subsytem. We attempt a Decompose() operation, on a state which might not be separable. If the state is not separable, we abort and return false. Otherwise, we complete the operation, add the separated subsystem back in place into the QUnit "shards," and return true.
This should never change the logical/physical state of the QInterface, only possibly its internal representation, for simulation optimization purposes. This is not a truly quantum computational operation, but it also does not lead to nonphysical effects.
Reimplemented in Qrack::QUnitClifford, Qrack::QStabilizer, Qrack::QUnitMulti, Qrack::QUnit, Qrack::QTensorNetwork, Qrack::QStabilizerHybrid, and Qrack::QBdt.
|
inlinevirtual |
Qrack::QUnit types maintain explicit separation of representations of qubits, which reduces memory usage and increases gate speed.
This method is used to manually attempt internal separation of a QUnit subsytem. We attempt a Decompose() operation, on a state which might not be separable. If the state is not separable, we abort and return false. Otherwise, we complete the operation, add the separated subsystem back in place into the QUnit "shards," and return true.
This should never change the logical/physical state of the QInterface, only possibly its internal representation, for simulation optimization purposes. This is not a truly quantum computational operation, but it also does not lead to nonphysical effects.
Reimplemented from Qrack::QInterface.
Reimplemented in Qrack::QUnitMulti.
|
virtual |
Force a calculation of the norm of the state vector, in order to make it unit length before the next probability or measurement operation.
(On an actual quantum computer, the state should never require manual normalization.)
Implements Qrack::QInterface.
|
pure virtual |
Force a calculation of the norm of the state vector, in order to make it unit length before the next probability or measurement operation.
(On an actual quantum computer, the state should never require manual normalization.)
Implemented in Qrack::QUnitClifford, Qrack::QUnit, Qrack::QTensorNetwork, Qrack::QStabilizerHybrid, Qrack::QStabilizer, Qrack::QPager, Qrack::QInterfaceNoisy, Qrack::QHybrid, Qrack::QEngineOCL, Qrack::QEngineCUDA, Qrack::QEngineCPU, Qrack::QBdtHybrid, and Qrack::QBdt.
|
inlinevirtual |
Direct measure of variance of listed permutation probability.
The (bit string) variance of all included permutations of bits, with bits valued from low to high as the order of the "bits" array parameter argument, is returned.
Reimplemented in Qrack::QStabilizerHybrid, and Qrack::QBdtHybrid.
|
inlinevirtual |
Direct measure of (reduced density matrix) variance of listed permutation probability.
The (bit string, reduced density matrix) variance of all included permutations of bits, with bits valued from low to high as the order of the "bits" array parameter argument, is returned.
Reimplemented in Qrack::QStabilizerHybrid.
|
virtual |
Get expectation value of bits, given an array of qubit weights.
The weighter-per-qubit expectation value of is returned, with each "bits" entry corresponding to a "perms" weight entry.
Reimplemented in Qrack::QUnitClifford, Qrack::QUnit, Qrack::QStabilizerHybrid, and Qrack::QStabilizer.
|
inlinevirtual |
Get expectation value of bits, given an array of qubit weights.
The weighter-per-qubit expectation value of is returned, with each "bits" entry corresponding to a "perms" weight entry.
Reimplemented from Qrack::QInterface.
|
inlinevirtual |
Get (reduced density matrix) expectation value of bits, given an array of qubit weights.
The weighter-per-qubit expectation value of is returned, with each "bits" entry corresponding to a "perms" weight entry. If there are stabilizer ancillae, they are traced out of the reduced density matrix, giving an approximate result.
Reimplemented in Qrack::QUnit, and Qrack::QStabilizerHybrid.
|
inlinevirtual |
Get (reduced density matrix) expectation value of bits, given an array of qubit weights.
The weighter-per-qubit expectation value of is returned, with each "bits" entry corresponding to a "perms" weight entry. If there are stabilizer ancillae, they are traced out of the reduced density matrix, giving an approximate result.
Reimplemented from Qrack::QInterface.
|
virtual |
Direct measure of variance of listed bit string probability.
The (bit string) variance of all included permutations of bits, with bits valued from low to high as the order of the "bits" array parameter argument, is returned.
Reimplemented in Qrack::QUnitClifford, Qrack::QStabilizerHybrid, and Qrack::QStabilizer.
|
inlinevirtual |
Direct measure of (reduced density matrix) variance of bits, given an array of qubit weights.
The weight-per-qubit expectation value of is returned, with each "bits" entry corresponding to a "perms" weight entry. If there are stabilizer ancillae, they are traced out of the reduced density matrix, giving an approximate result.
Reimplemented in Qrack::QStabilizerHybrid.
|
virtual |
Direct measure of variance of listed Pauli tensor product probability.
The (bit string) variance of all included permutations of bits, with bits valued from low to high as the order of the "bits" array parameter argument, is returned.
|
inlinevirtual |
Direct measure of variance of listed (3-parameter) single-qubit tensor product probability.
The (bit string) variance of all included permutations of bits, with bits valued from low to high as the order of the "bits" array parameter argument, is returned.
|
inlinevirtual |
Direct measure of variance of listed (2x2 operator) single-qubit tensor product probability.
The (bit string) variance of all included permutations of bits, with bits valued from low to high as the order of the "bits" array parameter argument, is returned.