common.h¶
Common types and functions used by the debugger.
This file contains declarations for several common types required for quantum computation, such as complex numbers, state vectors, etc.
Defines
-
LOAD_RESULT_MESSAGE_MAX¶
Maximum length of a load error message (including null terminator).
Enums
-
enum Result¶
The result of an operation.
Can be either
OKorERROR.Values:
-
enumerator OK¶
Indicates that the operation was successful.
-
enumerator ERROR¶
Indicates that an error occurred during the operation.
-
enumerator OK¶
-
enum LoadResultStatus¶
The result of a code loading operation.
Values:
-
enumerator LOAD_OK¶
Indicates that the code was loaded successfully.
-
enumerator LOAD_PARSE_ERROR¶
Indicates that the code could not be parsed.
-
enumerator LOAD_INTERNAL_ERROR¶
Indicates that an internal error occurred while loading the code.
-
enumerator LOAD_OK¶
-
struct LoadResult¶
- #include <common.h>
The result of a code loading operation.
Public Members
-
LoadResultStatus status¶
Indicates whether the load was successful and why it failed.
-
size_t line¶
The line number of the error location, or 0 if unknown.
-
size_t column¶
The column number of the error location, or 0 if unknown.
-
char message[LOAD_RESULT_MESSAGE_MAX]¶
A human-readable error message, or empty string if none is available.
-
LoadResultStatus status¶
-
union VariableValue¶
- #include <common.h>
@biref Represents the value of a classical variable.
-
struct Variable¶
- #include <common.h>
Represents a classical variable.
-
struct Complex¶
- #include <common.h>
Represents a complex number.
-
struct Statevector¶
- #include <common.h>
Represents a quantum statevector.
The number of qubits is fixed and the number of states is 2^
numQubits.
-
struct CompilationSettings¶
- #include <common.h>
The settings that should be used to compile an assertion program.