qml.exceptions¶
This module contains all the custom exceptions and warnings used in PennyLane.
Warning
Unless you are a PennyLane or plugin developer, you will likely not need to use these classes directly. They are raised by PennyLane functions when errors are encountered.
Contents¶
The exceptions and warnings are organized by their category of use.
General Execution Errors¶
Errors related to PennyLane's Program Capture execution pipeline. |
|
Exception raised when it encounters an illegal operation in the quantum circuit. |
|
Exception raised when an illegal operation is defined in a quantum function. |
|
Raised when there is an error with the transform logic. |
|
Error for using qml.cond incorrectly |
|
Exception that is raised when there is a queuing error |
|
Exception raised by a |
|
An error raised when an unsupported operation is attempted with a quantum tape. |
|
Errors related to PennyLane's AutoGraph submodule. |
|
Error encountered in the compilation phase. |
|
Base class for decomposition errors. |
|
Exception raised from invalid TOML files. |
|
Exception raised if attempting to differentiate non-trainable |
Operator Property Errors¶
Generic exception to be used for undefined Operator properties or methods. |
|
Raised when an Operator's representation as a decomposition is undefined. |
|
Raised when an Operator's representation as a linear combination is undefined. |
|
Raised when an Operator's matrix representation is undefined. |
|
Raised when an Operator's sparse matrix representation is undefined. |
|
Raised when an Operator's eigenvalues are undefined. |
|
Raised when an Operator's diagonalizing gates are undefined. |
|
Raised when an Operator's adjoint version is undefined. |
|
Raised when an Operator's power is undefined. |
|
Exception used to indicate that an operator does not have a generator |
|
Exception used to indicate that an operator does not have parameter_frequencies |
User Warnings¶
Warning raised when a PennyLane feature is being deprecated. |
|
Warning raised to indicate experimental/non-stable feature or support. |
|
Warnings related to PennyLane's AutoGraph submodule. |