Functions for recording performed gates to QASM More...
Functions | |
void | clearRecordedQASM (Qureg qureg) |
Clear all QASM so far recorded. More... | |
void | printRecordedQASM (Qureg qureg) |
Print recorded QASM to stdout. More... | |
void | startRecordingQASM (Qureg qureg) |
Enable QASM recording. More... | |
void | stopRecordingQASM (Qureg qureg) |
Disable QASM recording. More... | |
void | writeRecordedQASMToFile (Qureg qureg, char *filename) |
Writes recorded QASM to a file, throwing an error if inaccessible. More... | |
Detailed Description
Functions for recording performed gates to QASM
Function Documentation
◆ clearRecordedQASM()
void clearRecordedQASM | ( | Qureg | qureg | ) |
Clear all QASM so far recorded.
This does not start or stop recording.
- Parameters
-
[in,out] qureg The qureg of which to clear the QASM log
◆ printRecordedQASM()
void printRecordedQASM | ( | Qureg | qureg | ) |
Print recorded QASM to stdout.
This does not clear the QASM log, nor does it start or stop QASM recording.
- Parameters
-
[in] qureg Prints the QASM recorded for this qureg.
◆ startRecordingQASM()
void startRecordingQASM | ( | Qureg | qureg | ) |
Enable QASM recording.
Gates applied to qureg will here-after be added to a growing log of QASM instructions, progressively consuming more memory until disabled with stopRecordingQASM(). The QASM log is bound to this qureg instance.
- Parameters
-
[in,out] qureg The qureg to begin recording subsequent operations upon
◆ stopRecordingQASM()
void stopRecordingQASM | ( | Qureg | qureg | ) |
Disable QASM recording.
The recorded QASM will be maintained in qureg and continue to be appended to if startRecordingQASM is recalled.
Has no effect if qureg
was not already recording operations.
- Parameters
-
[in,out] qureg The qureg to halt recording subsequent operations upon
◆ writeRecordedQASMToFile()
void writeRecordedQASMToFile | ( | Qureg | qureg, |
char * | filename | ||
) |
Writes recorded QASM to a file, throwing an error if inaccessible.
- Parameters
-
[in] qureg Writes the QASM recorded for this qureg to file [in] filename The filename of the file to contain the recorded QASM
- Exceptions
-
invalidQuESTInputError() - if
filename
cannot be written to
- if