qrunch.common.errors
Module that contains all non native errors that the core module can raise.
Exceptions
Error that is raised when an error occurs while accessing abstract indices. |
|
Error that is raised when an error occurs while assigning an abstract index. |
|
Error that a backend raises when the backend fails. |
|
Error that a backend raises when the backend set-up fails. |
|
The bounds were not accepted. |
|
An error occurred when trying to handle checkpoint data. |
|
Error that a circuit raises. |
|
An error occurred when trying to load or save data. |
|
Error that an Estimator raises. |
|
Error that a Gate raises. |
|
Error that a gate pool or gate pool operator raises. |
|
Error during gate selection. |
|
Error that a Grouper raises. |
|
An error occurred when running a hybrid job. |
|
QrunchError raised when unexpected behavior happens. |
|
Error raised when an error occurs unexpectedly within pyscf. |
|
Error raised when the index input for the operators in the Jordan-Wigner map are not integers. |
|
An error occurred in the Kraus operation. |
|
Error that a layout synthesizer raises. |
|
Raised when the XYZ file is malformed or cannot be read. |
|
An error raised when calculating metadata hashes. |
|
Error raised when a molecular solver does not converge. |
|
The optimization was not successful. |
|
Raised when errors were found during options validation. |
|
An error occurred when trying to interact with a provider. |
|
An error occurred in the public API handling. |
|
Error issued from the Qrunch code. |
|
An error occurred when trying to rotate a hermitian operator. |
|
Error that a Sampler raises. |
|
An error occurred when trying to serialize/deserialize data. |
|
Error thrown by a transpiler. |
|
A Circuit was not fully specified before transpilation. |
|
Raised when an optimization method does not support callback functions. |
|
Error thrown by the VQE. |
|
The circuit and operator did not pass validation. |
|
Raised when errors were found during validation. |
- exception AbstractIndexError
Bases:
QrunchErrorError that is raised when an error occurs while accessing abstract indices.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception AssignAbstractIndexError
Bases:
QrunchErrorError that is raised when an error occurs while assigning an abstract index.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception BackendError
Bases:
QrunchErrorError that a backend raises when the backend fails.
This error automatically saves the error log to current working directory if not overwritten.
- __init__(message: str, error_log: str | None = None) None
Initialize the BackendError.
- Parameters:
message (str)
error_log (str | None)
- Return type:
None
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception BackendSetupError
Bases:
BackendErrorError that a backend raises when the backend set-up fails.
- __init__(message: str, error_log: str | None = None) None
Initialize the BackendError.
- Parameters:
message (str)
error_log (str | None)
- Return type:
None
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception BoundsError
Bases:
QrunchErrorThe bounds were not accepted.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception CheckpointError
Bases:
QrunchErrorAn error occurred when trying to handle checkpoint data.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception CircuitError
Bases:
QrunchErrorError that a circuit raises.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception DataPersisterError
Bases:
QrunchErrorAn error occurred when trying to load or save data.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception EstimatorError
Bases:
QrunchErrorError that an Estimator raises.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception GateError
Bases:
QrunchErrorError that a Gate raises.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception GatePoolError
Bases:
QrunchErrorError that a gate pool or gate pool operator raises.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception GateSelectionError
Bases:
QrunchErrorError during gate selection.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception GrouperError
Bases:
QrunchErrorError that a Grouper raises.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception HybridJobError
Bases:
QrunchErrorAn error occurred when running a hybrid job.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception InternalError
Bases:
QrunchErrorQrunchError raised when unexpected behavior happens.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception InternalPySCFError
Bases:
QrunchErrorError raised when an error occurs unexpectedly within pyscf.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception JordanWignerIndexError
Bases:
QrunchErrorError raised when the index input for the operators in the Jordan-Wigner map are not integers.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception KrausError
Bases:
QrunchErrorAn error occurred in the Kraus operation.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception LayoutSynthesizerError
Bases:
QrunchErrorError that a layout synthesizer raises.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception MalformedXyzFileError
Bases:
QrunchErrorRaised when the XYZ file is malformed or cannot be read.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception MetadataHashError
Bases:
QrunchErrorAn error raised when calculating metadata hashes.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception NotConvergedError
Bases:
QrunchErrorError raised when a molecular solver does not converge.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception OptimizationError
Bases:
QrunchErrorThe optimization was not successful.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception OptionsValidationError
Bases:
ValidationErrorRaised when errors were found during options validation.
- __init__(message: str = 'Errors found during validation.', errors: list[str] | None = None) None
Initialize error.
- Parameters:
message (str) – Basic error message. Defaults to “Errors found during validation.”.
errors (list[str] | None) – The list of error messages for the errors found. Defaults to None.
- Return type:
None
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception ProviderError
Bases:
QrunchErrorAn error occurred when trying to interact with a provider.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception PublicAPIError
Bases:
QrunchErrorAn error occurred in the public API handling.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception QrunchError
Bases:
ExceptionError issued from the Qrunch code.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception RotationError
Bases:
QrunchErrorAn error occurred when trying to rotate a hermitian operator.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception SamplerError
Bases:
QrunchErrorError that a Sampler raises.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception SerializerError
Bases:
QrunchErrorAn error occurred when trying to serialize/deserialize data.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception TranspilerError
Bases:
QrunchErrorError thrown by a transpiler.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception UnspecifiedParametersError
Bases:
TranspilerErrorA Circuit was not fully specified before transpilation.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception UnsupportedCallbackError
Bases:
QrunchErrorRaised when an optimization method does not support callback functions.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception VQEError
Bases:
QrunchErrorError thrown by the VQE.
- __init__(*args, **kwargs)
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception VQEValidationError
Bases:
ValidationErrorThe circuit and operator did not pass validation.
- __init__(message: str = 'Errors found during validation.', errors: list[str] | None = None) None
Initialize error.
- Parameters:
message (str) – Basic error message. Defaults to “Errors found during validation.”.
errors (list[str] | None) – The list of error messages for the errors found. Defaults to None.
- Return type:
None
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception ValidationError
Bases:
QrunchErrorRaised when errors were found during validation.
- __init__(message: str = 'Errors found during validation.', errors: list[str] | None = None) None
Initialize error.
- Parameters:
message (str) – Basic error message. Defaults to “Errors found during validation.”.
errors (list[str] | None) – The list of error messages for the errors found. Defaults to None.
- Return type:
None
- classmethod __new__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
Modules
Module for handling error logs. |