The Quantum Exact Simulation Toolkit v4.1.0
Loading...
Searching...
No Matches
Reporting

Functions to control how QuEST's reporters display and truncate information. More...

Functions

void setMaxNumReportedItems (qindex numRows, qindex numCols)
 
void setMaxNumReportedSigFigs (int numSigFigs)
 
void setNumReportedNewlines (int numNewlines)
 
void setReportedPauliChars (const char *paulis)
 
void setReportedPauliStrStyle (int style)
 

Detailed Description

Functions to control how QuEST's reporters display and truncate information.

Function Documentation

◆ setMaxNumReportedItems()

void setMaxNumReportedItems ( qindex numRows,
qindex numCols )
Note
Documentation for this function or struct is under construction!
Warning
This function has not yet been unit tested and may contain bugs. Please use with caution!

Definition at line 128 of file debug.cpp.

128 {
129 validate_envIsInit(__func__);
130 validate_newMaxNumReportedScalars(numRows, numCols, __func__);
131
132 // replace 0 values (indicating no truncation) with max-val,
133 // since there can never be max(qindex)-many amps
134 qindex max = std::numeric_limits<qindex>::max();
135 numRows = (numRows == 0)? max : numRows;
136 numCols = (numCols == 0)? max : numCols;
137
138 printer_setMaxNumPrintedScalars(numRows, numCols);
139}

◆ setMaxNumReportedSigFigs()

void setMaxNumReportedSigFigs ( int numSigFigs)
Note
Documentation for this function or struct is under construction!

‍This function does not affect the significant figures in printed memory sizes (e.g. 5.32 KiB) which is always shown with three significant figures (or four when in bytes, e.g. 1023 bytes).

Definition at line 142 of file debug.cpp.

142 {
143 validate_envIsInit(__func__);
144 validate_newMaxNumReportedSigFigs(numSigFigs, __func__);
145
146 printer_setMaxNumPrintedSigFig(numSigFigs);
147}

◆ setNumReportedNewlines()

void setNumReportedNewlines ( int numNewlines)
Note
Documentation for this function or struct is under construction!

Definition at line 150 of file debug.cpp.

150 {
151 validate_envIsInit(__func__);
152 validate_newNumReportedNewlines(numNewlines, __func__);
153
154 printer_setNumTrailingNewlines(numNewlines);
155}

◆ setReportedPauliChars()

void setReportedPauliChars ( const char * paulis)
Note
Documentation for this function or struct is under construction!
Warning
This function has not yet been unit tested and may contain bugs. Please use with caution!
Example
PauliStr str = getInlinePauliStr("XYZ", {0,10,20});
void setReportedPauliChars(const char *paulis)
Definition debug.cpp:158
PauliStr getInlinePauliStr(const char *paulis, { list })
void reportPauliStr(PauliStr str)
Definition paulis.cpp:494

Definition at line 158 of file debug.cpp.

158 {
159 validate_envIsInit(__func__);
160 validate_numPauliChars(paulis, __func__);
161
162 printer_setPauliChars(paulis);
163}

◆ setReportedPauliStrStyle()

void setReportedPauliStrStyle ( int style)
Note
Documentation for this function or struct is under construction!
Warning
This function has not yet been unit tested and may contain bugs. Please use with caution!
Example
PauliStr str = getInlinePauliStr("XYZ", {0,10,20});
void setReportedPauliStrStyle(int style)
Definition debug.cpp:166

Definition at line 166 of file debug.cpp.

166 {
167 validate_envIsInit(__func__);
168 validate_reportedPauliStrStyleFlag(flag, __func__);
169
170 printer_setPauliStrFormat(flag);
171}