load_program¶
- load_program(program: Program)[source]¶
Load a pyquil.Program instance 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
program (pyquil.Program) – 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_program
Download Python script
Download Notebook
View on GitHub