Error package
Module contents
Many of the functions in ths library apply some kind of validation on the input parameters. If the inputs are not valid, they may raise an exception.
To make as clear as possible what went wrong, this package includes a number of custom exceptions that try to be as explicit as possible.
- exception qclight.error.BinaryStringError(invalid_string)[source]
Bases:
ValueErrorRaised when the string received is not the string representation of a number in binary.
- exception qclight.error.BitValueError(invalid_number)[source]
Bases:
ValueErrorRaised when the value received is not a single bit. The value expected was either 0 or 1.
- exception qclight.error.OutOfRangeError(max_range, min_range=None, invalid_index=None)[source]
Bases:
IndexErrorRaised when the index received is out of range.
- exception qclight.error.PositiveValueError(invalid_number)[source]
Bases:
ValueErrorRaised when the value received is not positive. It means it is less or equal to 0.