mimiqcircuits.qasm.exceptions¶
Exceptions
Raised when the OpenQASM source declares the same register name twice. |
|
|
Raised when the OpenQASM source is not valid syntax, uses an unsupported version, or includes a file that cannot be found. |
Raised when the parsed input is not a program or declares an unsupported opaque gate. |
|
Base class for the errors raised when reading or writing OpenQASM. |
|
Raised when a circuit cannot be written as OpenQASM 2.0. |
|
Raised when an OpenQASM statement is well formed but cannot be interpreted, for example an unknown operation, an invalid target, or an |
|
Raised when the OpenQASM version is not 2.0. |
|
|
Raised when the OpenQASM source contains text that is not a valid token. |
Raised when the OpenQASM source calls a gate that is not declared. |
|
Raised when the OpenQASM source uses a register that is not declared. |
- exception QASMError[source]¶
Bases:
ExceptionBase class for the errors raised when reading or writing OpenQASM.
- exception TokenError(message, token=None, position=None)[source]¶
Bases:
QASMErrorRaised when the OpenQASM source contains text that is not a valid token.
- exception ParseError(message, token=None, parser_state=None)[source]¶
Bases:
QASMErrorRaised when the OpenQASM source is not valid syntax, uses an unsupported version, or includes a file that cannot be found.
- exception QASMSerializationError[source]¶
Bases:
QASMErrorRaised when a circuit cannot be written as OpenQASM 2.0.
- exception QASMArgumentError[source]¶
Bases:
QASMErrorRaised when the parsed input is not a program or declares an unsupported opaque gate.
- exception UndefinedGateError[source]¶
Bases:
QASMErrorRaised when the OpenQASM source calls a gate that is not declared.
- exception DuplicateRegisterError[source]¶
Bases:
QASMErrorRaised when the OpenQASM source declares the same register name twice.
- exception UndefinedRegisterError[source]¶
Bases:
QASMErrorRaised when the OpenQASM source uses a register that is not declared.