Skip to content

Commit

Permalink
Update API ref
Browse files Browse the repository at this point in the history
  • Loading branch information
WrathfulSpatula committed Dec 4, 2021
1 parent 2207959 commit c22b7e6
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 10 deletions.
12 changes: 12 additions & 0 deletions docs/api/qbinarydecisiontree.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
:orphan:

.. Copyright (c) 2017-2021
QBinaryDecisionTree
========================

Defined in `qbinary_decision_tree.hpp <https://github.com/vm6502q/qrack/blob/main/include/qbinary_decision_tree.hpp>`_ and `qbinary_decision_node.hpp <https://github.com/vm6502q/qrack/blob/main/include/qbinary_decision_node.hpp>`_.

The API is provided by Qrack::QInterface. Qrack::QBinaryDecisionTree is an attempt at an alternative representation of quantum pure states, in terms of binary decision trees, inspired by `other open source work <https://iic.jku.at/eda/research/quantum_dd/>`_.

.. doxygenfunction:: Qrack::QBinaryDecisionTree::QBinaryDecisionTree(bitLenInt, bitCapInt, qrack_rand_gen_ptr, complex, bool, bool, bool, int, bool, bool, real1, std::vector<int>, bitLenInt)
3 changes: 2 additions & 1 deletion docs/api/qenginecpu.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:orphan:

.. Copyright (c) 2017-2020
.. Copyright (c) 2017-2021
QEngineCPU
========================
Expand All @@ -9,3 +9,4 @@ Defined in `qengine_cpu.hpp <https://github.com/vm6502q/qrack/blob/master/includ

The API is provided by Qrack::QInterface. This is a general purpose implementation of Qrack::QInterface, without OpenCL.

.. doxygenfunction:: Qrack::QEngineOCL::QEngineCPU(bitLenInt, bitCapInt, qrack_rand_gen_ptr, complex, bool, bool, bool, int, bool, bool, real1, std::vector<int>, bitLenInt)
4 changes: 2 additions & 2 deletions docs/api/qengineocl.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:orphan:

.. Copyright (c) 2017-2020
.. Copyright (c) 2017-2021
QEngineOCL
========================
Expand All @@ -9,4 +9,4 @@ Defined in `qengine_opencl.hpp <https://github.com/vm6502q/qrack/blob/master/inc

The API is provided by Qrack::QInterface. However, QEngineOCL has a custom constructor:

.. doxygenfunction:: Qrack::QEngineOCL::QEngineOCL(bitLenInt, bitCapInt, std::shared_ptr<std::default_random_engine>, complex, bool, bool, bool, int)
.. doxygenfunction:: Qrack::QEngineOCL::QEngineOCL(bitLenInt, bitCapInt, qrack_rand_gen_ptr, complex, bool, bool, bool, int, bool, bool, real1, std::vector<int>, bitLenInt)
4 changes: 2 additions & 2 deletions docs/api/qhybrid.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:orphan:

.. Copyright (c) 2017-2020
.. Copyright (c) 2017-2021
QHybrid
========================
Expand All @@ -11,6 +11,6 @@ Qrack::QHybrid switches between QEngineCPU and QEngineOCL as optimal. It may be

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 qBitCount, bitCapInt initState = 0, qrack_rand_gen_ptr rgp = nullptr, complex phaseFac = CMPLX_DEFAULT_ARG, bool doNorm = true, bool randomGlobalPhase = true, bool useHostMem = false, int deviceId = -1, bool useHardwareRNG = true, bool useSparseStateVec = false, real1 norm_thresh = REAL1_DEFAULT_ARG, std::vector<int> ignored = {}, bitLenInt qubitThreshold = 0)
.. doxygenfunction:: Qrack::QHybrid::QHybrid(bitLenInt, bitCapInt, qrack_rand_gen_ptr, complex, bool, bool, bool, int, bool, bool, real1, std::vector<int>, bitLenInt)

.. doxygenfunction:: Qrack::QHybrid::SwitchModes
6 changes: 3 additions & 3 deletions docs/api/qinterface.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:orphan:

.. Copyright (c) 2017-2020
.. Copyright (c) 2017-2021
QInterface
========================
Expand All @@ -15,13 +15,13 @@ This provides a basic interface with a wide-ranging set of functionality
Creating a QInterface
-----------------------

There are five primary implementations of a ``QInterface``:
These are the primary implementations of a ``QInterface``:

.. doxygenenum:: QInterfaceEngine

These enums can be passed to an allocator to create a ``QInterface`` of that specified implementation type:

.. doxygenfunction:: Qrack::CreateQuantumInterface(QInterfaceEngine, QInterfaceEngine, QInterfaceEngine, Ts...)
.. doxygenfunction:: Qrack::CreateQuantumInterface(std::vector<QInterfaceEngine>, Ts...)

Constructors
------------
Expand Down
12 changes: 12 additions & 0 deletions docs/api/qmaskfusion.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
:orphan:

.. Copyright (c) 2017-2021
QMaskFusion
========================

Defined in `qmaskfusion.hpp <https://github.com/vm6502q/qrack/blob/main/include/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<int>, bitLenInt)
12 changes: 12 additions & 0 deletions docs/api/qstabilizerhybrid.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
:orphan:

.. Copyright (c) 2017-2021
QStabilizerHybrid
========================

Defined in `qstabilizerhybrid.hpp <https://github.com/vm6502q/qrack/blob/main/include/qstabilizerhybrid.hpp>`_.

The API is provided by Qrack::QInterface. This is an extended "stabilizer" or "Clifford" simulation. If a Qrack::QInterface method call cannot be carried out by this simulator via "stabilizer" simulation methods, it will automatically convert to traditional state vector representation, (while keep its Qrack::QStabilizerHybrid class type).

.. doxygenfunction:: Qrack::QStabilizerHybrid::QStabilizerHybrid(bitLenInt, bitCapInt, qrack_rand_gen_ptr, complex, bool, bool, bool, int, bool, bool, real1, std::vector<int>, bitLenInt)
2 changes: 1 addition & 1 deletion docs/api/qunit.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:orphan:

.. Copyright (c) 2017-2020
.. Copyright (c) 2017-2021
QUnit
========================
Expand Down
3 changes: 2 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ Daniel Strano would like to specifically note that Benn Bollay is almost entirel
api/qenginecpu
api/qengineocl
api/qhybrid
api/qstabilizerhybrid
api/qunit
api/qbinarydecisiontree
api/6502

.. The #http:// is a hack to get around Sphinx's re parser for links,
Expand All @@ -56,7 +58,6 @@ Daniel Strano would like to specifically note that Benn Bollay is almost entirel
:maxdepth: 2

QInterface </en/latest/_static/doxygen/classQrack_1_1QInterface.html#http://>
QUnit </en/latest/_static/doxygen/classQrack_1_1QUnit.html#http://>
QEngineCPU </en/latest/_static/doxygen/classQrack_1_1QEngineCPU.html#http://>
QEngineOCL </en/latest/_static/doxygen/classQrack_1_1QEngineOCL.html#http://>
QUnit </en/latest/_static/doxygen/classQrack_1_1QUnit.html#http://>
Expand Down

0 comments on commit c22b7e6

Please sign in to comment.