load_quil_from_file

load_quil_from_file(file_path: str)[source]

Load a quil file 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

file_path (str) – The path to the quil file that should be loaded

Returns

a ProgramLoader instance that can be called like a template

Return type

ProgramLoader