uniqc.qasm.exceptions module#
QASM parser exceptions module.
This module defines custom exceptions for OpenQASM 2.0 parsing, including errors for unsupported gates and register-related issues.
- Key exports:
NotSupportedGateError: Exception for unsupported quantum gates. RegisterNotFoundError: Exception for missing quantum/classical registers. RegisterOutOfRangeError: Exception for register index out of bounds. RegisterDefinitionError: Exception for invalid register definitions.
- exception uniqc.qasm.exceptions.NotSupportedGateError[source]#
Bases:
ExceptionRaised when an unsupported gate is encountered in OpenQASM 2.
- exception uniqc.qasm.exceptions.RegisterDefinitionError[source]#
Bases:
ExceptionRaised when a register definition is invalid (e.g., duplicate name, empty).