#include "QuEST_precision.h"Go to the source code of this file.
Functions | |
| int | compareStates (Qureg mq1, Qureg mq2, qreal precision) | 
| Return whether two given wavefunctions are equivalent within a given precision Global phase included in equivalence check.  More... | |
| void | initStateDebug (Qureg qureg) | 
| Initialise the state vector of probability amplitudes to an (unphysical) state with each component of each probability amplitude a unique floating point value.  More... | |
| void | initStateFromSingleFile (Qureg *qureg, char filename[200], QuESTEnv env) | 
| Initialises the wavefunction amplitudes according to those specified in a file.  More... | |
| void | initStateOfSingleQubit (Qureg *qureg, int qubitId, int outcome) | 
| Initialise the state vector of probability amplitudes such that one qubit is set to 'outcome' and all other qubits are in an equal superposition of zero and one.  More... | |
| int | QuESTPrecision (void) | 
| Return the precision of qreal for use in testing.  More... | |
| void | setDensityAmps (Qureg qureg, qreal *reals, qreal *imags) | 
| Set elements in the underlying state vector represenation of a density matrix.  More... | |
Detailed Description
Developer functions used for unit testing and debugging, which are not part of the public API. May contain functions that are incomplete or untested.
Definition in file QuEST_debug.h.
Function Documentation
◆ compareStates()
Return whether two given wavefunctions are equivalent within a given precision Global phase included in equivalence check.
For debugging purposes.
Definition at line 1573 of file QuEST.c.
References statevec_compareStates(), and validateMatchingQuregDims().
◆ initStateDebug()
| void initStateDebug | ( | Qureg | qureg | ) | 
Initialise the state vector of probability amplitudes to an (unphysical) state with each component of each probability amplitude a unique floating point value.
For debugging processes
- Parameters
 - 
  
[in,out] qureg object representing the set of qubits to be initialised  
◆ initStateFromSingleFile()
Initialises the wavefunction amplitudes according to those specified in a file.
For debugging purpsoses
Definition at line 1582 of file QuEST.c.
References statevec_initStateFromSingleFile(), and validateFileOpened().
◆ initStateOfSingleQubit()
| void initStateOfSingleQubit | ( | Qureg * | qureg, | 
| int | qubitId, | ||
| int | outcome | ||
| ) | 
Initialise the state vector of probability amplitudes such that one qubit is set to 'outcome' and all other qubits are in an equal superposition of zero and one.
- Parameters
 - 
  
[in,out] qureg object representing the set of qubits to be initialised [in] qubitId id of qubit to set to state 'outcome' [in] outcome value of qubit 'qubitId' to set  
Definition at line 1587 of file QuEST.c.
References statevec_initStateOfSingleQubit(), validateOutcome(), validateStateVecQureg(), and validateTarget().
◆ QuESTPrecision()
| int QuESTPrecision | ( | void | ) | 
Return the precision of qreal for use in testing.
◆ setDensityAmps()
Set elements in the underlying state vector represenation of a density matrix.
Not exposed in the public API as this requires an understanding of how the state vector is used to represent a density matrix. Currently can only be used to set all amps.
Definition at line 1030 of file QuEST.c.
References Qureg::numAmpsTotal, qasm_recordComment(), and statevec_setAmps().