load_quil¶
- load_quil(quil_str: str)[source]¶
Load a quil string as a PennyLane template.
During loading, gates are converted to PennyLane gates as far as possible. If the gates are not supported they are replaced with QubitUnitary instances. The import ignores all statements that are not declarations or gates (e.g. pragmas, classical control flow and measurements).
Every variable that is present in the Program and that is not used as the target register of a measurement has to be provided in the
parameter_map
of the template.- Parameters
quil_str (str) – The program that should be loaded
- Returns
a ProgramLoader instance that can be called like a template
- Return type
ProgramLoader
code/api/pennylane_rigetti.load_quil
Download Python script
Download Notebook
View on GitHub