diff --git a/docs/api/qbdt.rst b/docs/api/qbdt.rst index 9308bd8..a904afa 100644 --- a/docs/api/qbdt.rst +++ b/docs/api/qbdt.rst @@ -9,5 +9,5 @@ Defined in `QBdt.hpp `_. -.. doxygenfunction:: Qrack::QBdt::QBdt(bitLenInt, bitCapInt, qrack_rand_gen_ptr, complex, bool, bool, bool, int64_t, bool, bool, real1_f, std::vector, bitLenInt, real1_f) -.. doxygenfunction:: Qrack::QBdt::QBdt(std::vector, bitLenInt, bitCapInt, qrack_rand_gen_ptr, complex, bool, bool, bool, int64_t, bool, bool, real1_f, std::vector, bitLenInt, real1_f) +.. doxygenfunction:: Qrack::QBdt::QBdt(bitLenInt, const bitCapInt&, qrack_rand_gen_ptr, const complex&, bool, bool, bool, int64_t, bool, bool, real1_f, std::vector, bitLenInt, real1_f) +.. doxygenfunction:: Qrack::QBdt::QBdt(std::vector, bitLenInt, const bitCapInt&, qrack_rand_gen_ptr, const complex&, bool, bool, bool, int64_t, bool, bool, real1_f, std::vector, bitLenInt, real1_f) diff --git a/docs/api/qengine.rst b/docs/api/qengine.rst index 026ba98..9fa2786 100644 --- a/docs/api/qengine.rst +++ b/docs/api/qengine.rst @@ -21,7 +21,7 @@ This is an (abstract) intermediate specialization that inherits from Qrack::QInt .. doxygenfunction:: Qrack::QEngine::GetAmplitudePage -.. doxygenfunction:: Qrack::QEngine::SetAmplitudePage(complex const *, bitCapIntOcl, bitCapIntOcl) +.. doxygenfunction:: Qrack::QEngine::SetAmplitudePage(const complex*, bitCapIntOcl, bitCapIntOcl) .. doxygenfunction:: Qrack::QEngine::SetAmplitudePage(QEnginePtr, bitCapIntOcl, bitCapIntOcl, bitCapIntOcl) diff --git a/docs/api/qenginecpu.rst b/docs/api/qenginecpu.rst index d5f9ae6..7002784 100644 --- a/docs/api/qenginecpu.rst +++ b/docs/api/qenginecpu.rst @@ -9,4 +9,4 @@ Defined in `qengine_cpu.hpp , bitLenInt) +.. doxygenfunction:: Qrack::QEngineCPU::QEngineCPU(bitLenInt, const bitCapInt&, qrack_rand_gen_ptr, const complex&, bool, bool, bool, int, bool, bool, real1_f, std::vector, bitLenInt) diff --git a/docs/api/qengineocl.rst b/docs/api/qengineocl.rst index 7688b51..a917846 100644 --- a/docs/api/qengineocl.rst +++ b/docs/api/qengineocl.rst @@ -9,4 +9,4 @@ Defined in `qengine_opencl.hpp , bitLenInt) +.. doxygenfunction:: Qrack::QEngineOCL::QEngineOCL(bitLenInt, const bitCapInt&, qrack_rand_gen_ptr, const complex&, bool, bool, bool, int, bool, bool, real1_f, std::vector, bitLenInt) diff --git a/docs/api/qhybrid.rst b/docs/api/qhybrid.rst index 9dc2468..b125520 100644 --- a/docs/api/qhybrid.rst +++ b/docs/api/qhybrid.rst @@ -11,6 +11,6 @@ Qrack::QHybrid is a Qrack::Engine that switches between QEngineCPU and QEngineOC The parameter "qubitThreshold" is the number of qubits at which QHybrid will automatically switch to GPU operation. A value of "0" will automatically pick this threshold based on best estimates of efficiency. -.. doxygenfunction:: Qrack::QHybrid::QHybrid(bitLenInt, bitCapInt, qrack_rand_gen_ptr, complex, bool, bool, bool, int, bool, bool, real1, std::vector, bitLenInt) +.. doxygenfunction:: Qrack::QHybrid::QHybrid(bitLenInt, const bitCapInt&, qrack_rand_gen_ptr, const complex&, bool, bool, bool, int, bool, bool, real1_f, std::vector, bitLenInt) .. doxygenfunction:: Qrack::QHybrid::SwitchModes diff --git a/docs/api/qinterface_noisy.rst b/docs/api/qinterface_noisy.rst new file mode 100644 index 0000000..fd96799 --- /dev/null +++ b/docs/api/qinterface_noisy.rst @@ -0,0 +1,12 @@ +:orphan: + +.. Copyright (c) 2017-2023 + +QInterfaceNoisy +======================== + +Defined in `qinterface_noisy.hpp `_. + +The API is provided by Qrack::QInterface. Qrack::QInterfaceNoisy adds depolarizing noise to every gate executed on the simulator instance. Noise level can be controlled with `SetNoiseParameter(real1_f)` or the environment variable `QRACK_GATE_DEPOLARIZATION`. + +.. doxygenfunction:: Qrack::QInterfaceNoisy::SetNoiseParameter(real1_f) diff --git a/docs/api/qmaskfusion.rst b/docs/api/qmaskfusion.rst deleted file mode 100644 index 4935a1c..0000000 --- a/docs/api/qmaskfusion.rst +++ /dev/null @@ -1,12 +0,0 @@ -:orphan: - -.. Copyright (c) 2017-2021 - -QMaskFusion -======================== - -Defined in `qmaskfusion.hpp `_. - -The API is provided by Qrack::QInterface. This is intermediate optimization "layer" inteface that coalesces X, Y, and Z gates in parallel across qubit width, in order to make them less expensive to simulate. - -.. doxygenfunction:: Qrack::QMaskFusion::QMaskFusion(bitLenInt, bitCapInt, qrack_rand_gen_ptr, complex, bool, bool, bool, int, bool, bool, real1, std::vector, bitLenInt) diff --git a/docs/api/qstabilizerhybrid.rst b/docs/api/qstabilizerhybrid.rst index 5a11ea0..a5189e9 100644 --- a/docs/api/qstabilizerhybrid.rst +++ b/docs/api/qstabilizerhybrid.rst @@ -9,5 +9,5 @@ Defined in `qstabilizerhybrid.hpp , bitLenInt, real1_f) -.. doxygenfunction:: Qrack::QStabilizerHybrid::QStabilizerHybrid(std::vector, bitLenInt, bitCapInt, qrack_rand_gen_ptr, complex, bool, bool, bool, int64_t, bool, bool, real1_f, std::vector, bitLenInt, real1_f) +.. doxygenfunction:: Qrack::QStabilizerHybrid::QStabilizerHybrid(bitLenInt, const bitCapInt&, qrack_rand_gen_ptr, const complex&, bool, bool, bool, int64_t, bool, bool, real1_f, std::vector, bitLenInt, real1_f) +.. doxygenfunction:: Qrack::QStabilizerHybrid::QStabilizerHybrid(std::vector, bitLenInt, const bitCapInt&, qrack_rand_gen_ptr, const complex&, bool, bool, bool, int64_t, bool, bool, real1_f, std::vector, bitLenInt, real1_f) diff --git a/docs/index.rst b/docs/index.rst index 0817709..54bd5f3 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -30,7 +30,6 @@ Daniel Strano would like to specifically note that Benn Bollay is almost entirel opencl examples implementation - noisy performance hardware @@ -52,6 +51,7 @@ Daniel Strano would like to specifically note that Benn Bollay is almost entirel api/qunitmulti api/qbdt api/qtensornetwork + api/qinterface_noisy api/qcircuit api/6502 @@ -80,5 +80,6 @@ Daniel Strano would like to specifically note that Benn Bollay is almost entirel QUnitMulti QBdt QTensorNetwork + QInterfaceNoisy QCircuit diff --git a/docs/noisy.rst b/docs/noisy.rst deleted file mode 100644 index f06002f..0000000 --- a/docs/noisy.rst +++ /dev/null @@ -1,18 +0,0 @@ -Noisy Simulation ----------------- - -Qrack's primary modes of operation are intended to simulate ideal, noiseless, pure quantum states. However, Qrack can achieve imperfect fidelity on larger circuits, with the aid of the `QRACK_QUNIT_SEPARABILITY_THRESHOLD` environment variable and `a calibration table that has been provided by the authors of Qrack. `_ - -The calibration table can estimate "heavy output generation" ("HOG") rate as a function of circuit width, depth, and separability rounding parameter, modeled based upon "square circuits" up to 20 qubits. The correction for excess width, compared to a square circuit, is - -.. math:: - - \frac{\ln \left( \left[ Infidelity \, of \, square \, depth \, circuit \right] \right)}{\ln \left( \left[ Infidelity \, of \, your \, circuit \right] \right)} = \frac{\ln \left( \left[ width \right] \right)}{\ln \left( \left[ depth \right] \right)}. - -A pessimistic estimate for fidelity, based upon HOG rate, is provided as - -.. math:: - - sqrt([Noisy \, HOG \, rate] / [Ideal \, noiseless \, HOG \, rate]). - -"Infidelity" is defined as 1 minus "fidelity." Note that the calibration table and included models directly model and predict HOG rate; we only provide a safely pessimistic lower bound on average "fidelity." The rounding parameter values in the table, which correspond to noise quantity, imply values of `QRACK_QUNIT_SEPARABILITY_THRESHOLD` from 0/default (least severe noise, ideal simulation) to 0.5 (most severe noise, all entanglement effectively destroyed). Following the examples of the included analysis for Google's 2019 "quantum supremacy" class of circuits and other random circuits, it's possible to make a problem-specific resource projection for attainable fidelity. If a user only wants to estimate the fidelity of a single circuit simulated with a nonzero rounding parameter value, then we use the excess width correction model and (pessimistic) fidelity estimate.