qml.tape¶
Quantum tapes are a datastructure that can represent quantum circuits and measurement statistics in PennyLane. They are queuing contexts that can record and process quantum operations and measurements.
In addition to being created internally by QNodes, quantum tapes can also be created,
nested, expanded (via expand()
), and executed manually.
Finally, quantum tapes are fully compatible with autodifferentiating via NumPy/Autograd, TensorFlow, and PyTorch.
Warning
Unless you are a PennyLane or plugin developer, you likely do not need to use these classes directly.
See the quantum circuits page for more
details on creating QNodes, as well as the qnode()
decorator
and QNode()
constructor.
pennylane.tape Package¶
Functions¶
Returns the currently recording tape. |
|
A context manager and decorator to ensure that contained logic is non-recordable or non-queueable within a QNode or quantum tape context. |
Classes¶
A template and quantum function inspector, allowing easy introspection of operators that have been applied without requiring a QNode. |
|
|
A quantum tape recorder, that records, validates and executes variational quantum programs. |
An error raised with a quantum tape. |
|
|
A context manager that unwraps multiple tapes with tensor-like parameters to NumPy arrays. |
|
A context manager that unwraps a single tape with tensor-like parameters to NumPy arrays. |
Class Inheritance Diagram¶
