|
QNLP
v1.0
|
#include <GateWriter.hpp>

Public Member Functions | |
| GateWriter () | |
| Construct a new Gate Writer object. More... | |
| GateWriter (std::string latexCSVFilename, std::string matrixFilename) | |
| Construct a new Gate Writer object. More... | |
| ~GateWriter () | |
| Destroy the Gate Writer object. More... | |
| void | gateOut (std::string gateLabel, std::string matrixVals) |
| Writes the given matrix to matrix_val_out. Assumes matrix type is printable. More... | |
| void | segmentMarkerOut (std::string segmentString) |
| Marks the output file with a string pattern to allow easy of parsing for gates to algorithm operations. More... | |
| void | oneQubitGateCall (const std::string &gateLabel, const std::string &matrixVals, std::size_t gate_idx) |
| Writes the single qubit gate to disk. -1 used to denote lack of control line. More... | |
| void | twoQubitGateCall (const std::string gateLabel, const std::string matrixVals, std::size_t gate_ctrl_idx, std::size_t gate_tgt_idx) |
| Writes the controlled gate to disk. More... | |
| std::unordered_set< std::string > & | getAppliedGates () |
| Return the map of all applied gates so far. More... | |
Private Attributes | |
| std::ofstream | latex_csv_out |
| std::ofstream | matrix_val_out |
| std::unordered_set< std::string > | gates |
Definition at line 9 of file GateWriter.hpp.
|
inline |
Construct a new Gate Writer object.
Definition at line 19 of file GateWriter.hpp.
|
inline |
Construct a new Gate Writer object.
| latexCSVFilename | Filename for Latex CSV |
| matrixFilename | Filename for matrix |
Definition at line 28 of file GateWriter.hpp.
References latex_csv_out, and matrix_val_out.
|
inline |
Destroy the Gate Writer object.
Definition at line 43 of file GateWriter.hpp.
References latex_csv_out, and matrix_val_out.
|
inline |
Writes the given matrix to matrix_val_out. Assumes matrix type is printable.
| matrix |
Definition at line 56 of file GateWriter.hpp.
References gates, and matrix_val_out.
Referenced by twoQubitGateCall().

|
inline |
Return the map of all applied gates so far.
Definition at line 101 of file GateWriter.hpp.
References gates.
|
inline |
Writes the single qubit gate to disk. -1 used to denote lack of control line.
| gateLabel | std::string used to label gate name. |
| matrixVal | The matrix representing the gate. |
| gate_idx | The qubit index to apply gate. |
Definition at line 79 of file GateWriter.hpp.
References twoQubitGateCall().
Referenced by TEST_CASE().


|
inline |
Marks the output file with a string pattern to allow easy of parsing for gates to algorithm operations.
| segmentString | The name of the segment to print into the file. |
Definition at line 68 of file GateWriter.hpp.
References latex_csv_out.
|
inline |
Writes the controlled gate to disk.
| gateLabel | std::string used to label gate name. |
| matrixVal | The matrix representing the gate. |
| gate_ctrl_idx | The qubit index for the gate control line |
| gate_tgt_idx | The qubit index for the gate target line |
Definition at line 91 of file GateWriter.hpp.
References gateOut(), and latex_csv_out.
Referenced by oneQubitGateCall().


|
private |
Definition at line 12 of file GateWriter.hpp.
Referenced by gateOut(), and getAppliedGates().
|
private |
Definition at line 11 of file GateWriter.hpp.
Referenced by GateWriter(), segmentMarkerOut(), twoQubitGateCall(), and ~GateWriter().
|
private |
Definition at line 11 of file GateWriter.hpp.
Referenced by gateOut(), GateWriter(), and ~GateWriter().