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 a function that generates a qscript from a quantum function without any operation queuing taking place. |
Classes¶
|
A template and quantum function inspector, allowing easy introspection of operators that have been applied without requiring a QNode. |
|
The state preparation, operations, and measurements that represent instructions for execution on a quantum device. |
|
A quantum tape recorder, that records and stores 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¶
