![]() |
The Quantum Exact Simulation Toolkit v4.3.0
|
Functions for creating channel data structures. More...
Functions | |
| KrausMap | createInlineKrausMap (int numQb, int numOps, {{{ matrices }}}) |
| SuperOp | createInlineSuperOp (int numQb, {{ matrix }}) |
| KrausMap | createKrausMap (int numQubits, int numOperators) |
| SuperOp | createSuperOp (int numQubits) |
Functions for creating channel data structures.
| KrausMap createInlineKrausMap | ( | int | numQb, |
| int | numOps, | ||
| {{{ matrices }}} | ) |
Creates and initialises a KrausMap from an inline literal.
This is a convenience macro which combines createKausMap() and setInlineKrausMap().
The {{{matrices}}} argument is a 3D array literal, of dimensions numOps by 1<<numQb by 1<<numQb.
C, this is a macro, where numQb and numOps must be compile-time literals, and turn {{{matrices}}} into a compound literal.C++, this is a function which accepts {{{matrices}}} as a nested std::vector literal.The returned KrausMap should be later destroyed with destroyKrausMap().
| [in] | numQb | the number of qubits acted upon by the Kraus map. |
| [in] | numOps | the number of Kraus operators. |
matrices. | error |
|
| SuperOp createInlineSuperOp | ( | int | numQb, |
| {{ matrix }} | ) |
Creates and initialises a SuperOp from an inline literal.
This is a convenience macro which combines createSuperOp() and setInlineSuperOp().
The {{matrix}} argument is a 2D array literal, of dimensions 1<<(2*numQb) by 1<<(2*numQb).
C, this is a macro, where numQb must be a compile-time literal, amd turns {{matrix}} into a compound literal.C++, this is a function which accepts {{matrix}} as a nested std::vector literal.The returned SuperOp should be later destroyed with destroySuperOp().
| [in] | numQb | the number of qubits acted upon by the superoperator. |
matrix. | error |
|
| KrausMap createKrausMap | ( | int | numQubits, |
| int | numOperators ) |
Creates an uninitialised Kraus map.
The returned KrausMap contains numOperators Kraus operators, each of which spans numQubits many qubits. Before being passed to functions like reportKrausMap() and mixKrausMap(), its elements must be populated with setKrausMap() or setInlineKrausMap(), or directly modified through KrausMap::matrices, though any direct modification must be followed by a call to syncKrausMap().
The returned KrausMap should be later destroyed with destroyKrausMap().
| [in] | numQubits | the number of qubits acted upon by the Kraus map. |
| [in] | numOperators | the number of Kraus operators in the map. |
| error |
|
Definition at line 176 of file channels.cpp.
Referenced by TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), and TEST_CASE().
| SuperOp createSuperOp | ( | int | numQubits | ) |
Creates an uninitialised superoperator.
The returned SuperOp represents an arbitrary linear map on vectorised density matrices, spanning numQubits many ket-qubits and an equal number of bra-qubits. Before being passed to functions like reportSuperOp() and mixSuperOp(), its elements must be populated with setSuperOp() or setInlineSuperOp(), or directly modified through SuperOp::cpuElems, though direct modification must be followed by a call to syncSuperOp().
The returned SuperOp should be later destroyed with destroySuperOp().
| [in] | numQubits | the number of qubits acted upon by the superoperator. |
| error |
|
Definition at line 162 of file channels.cpp.
Referenced by TEST_CASE(), TEST_CASE(), TEST_CASE(), and TEST_CASE().