-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add API-specific documentation for a CoherentUnit
- Loading branch information
Benn Bollay
committed
Mar 27, 2018
1 parent
0d64604
commit b8b5baa
Showing
1 changed file
with
133 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
:orphan: | ||
|
||
.. Copyright (c) 2018 | ||
.. _coherent-unit-reference: | ||
|
||
|
||
``CoherentUnit`` | ||
================ | ||
|
||
Defined in `qregister.hpp <https://github.com/vm6502q/qrack/blob/master/qregister.hpp>`_. | ||
|
||
.. doxygenclass:: Qrack::CoherentUnit | ||
:project: qrack | ||
|
||
Creating a CoherentUnit | ||
----------------------- | ||
|
||
There's two primary implementations of a ``CoherentUnit``: | ||
|
||
.. doxygenenum:: Qrack::CoherentUnitEngine | ||
|
||
These enums can be passed to an allocator to create a ``CoherentUnit`` of that specified implementation type: | ||
|
||
.. doxygenfunction:: Qrack::CreateCoherentUnit | ||
|
||
Constructors | ||
------------ | ||
|
||
.. doxygenfunction:: CoherentUnit(bitLenInt) | ||
|
||
.. doxygenfunction:: CoherentUnit(bitLenInt, bitCapInt) | ||
|
||
.. doxygenfunction:: CoherentUnit(const CoherentUnit&) | ||
|
||
Utility and Configuration Methods | ||
--------------------------------- | ||
|
||
.. doxygenfunction:: SetRandomSeed | ||
|
||
.. doxygenfunction:: GetQubitCount | ||
|
||
.. doxygenfunction:: GetMaxQPower | ||
|
||
State Manipulation Methods | ||
-------------------------- | ||
|
||
.. doxygenfunction:: CloneRawState | ||
|
||
.. doxygenfunction:: SetPermutation | ||
|
||
.. doxygenfunction:: SetQuantumState | ||
|
||
.. doxygenfunction:: Cohere | ||
|
||
.. doxygenfunction:: Decohere | ||
|
||
.. doxygenfunction:: Dispose | ||
|
||
.. doxygenfunction:: Prob | ||
|
||
.. doxygenfunction:: ProbAll | ||
|
||
.. doxygenfunction:: ProbArray | ||
|
||
Quantum Gates | ||
------------- | ||
|
||
.. note:: Most gates offer both a single-bit version taking just the index to the qubit, as well as a register-spanning variant for convienence and performance that performs the gate across a sequence of bits. Only the latter is documented here. | ||
|
||
.. doxygenfunction:: AND(bitLenInt, bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: CLAND(bitLenInt, bitCapInt, bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: OR(bitLenInt, bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: CLOR(bitLenInt, bitCapInt, bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: XOR(bitLenInt, bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: CLXOR(bitLenInt, bitCapInt, bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: CCNOT | ||
|
||
.. doxygenfunction:: AntiCCNOT | ||
|
||
.. doxygenfunction:: CNOT(bitLenInt, bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: AntiCNOT | ||
|
||
.. doxygenfunction:: H(bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: M(bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: X(bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: Y(bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: Z(bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: CY(bitLenInt, bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: CZ(bitLenInt, bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: R1(double, bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: R1Dyad(int, int, bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: RX(double, bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: RXDyad(int, int, bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: CRX(double, bitLenInt, bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: CRXDyad(int, int, bitLenInt, bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: RY(double, bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: RYDyad(int, int, bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: CRY(double, bitLenInt, bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: CRYDyad(int, int, bitLenInt, bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: RZ(double, bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: RZDyad(int, int, bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: CRZ(double, bitLenInt, bitLenInt, bitLenInt) | ||
|
||
.. doxygenfunction:: CRZDyad(int, int, bitLenInt, bitLenInt, bitLenInt) | ||
|
||
|