pyquil.api.QPUCompiler

class pyquil.api.QPUCompiler(quilc_endpoint, qpu_compiler_endpoint, device, timeout=10, name=None, *, session=None)[source]

Client to communicate with the Compiler Server.

Parameters
  • quilc_endpoint (Optional[str]) – TCP or IPC endpoint of the Quil Compiler (quilc).

  • qpu_compiler_endpoint (Optional[str]) – TCP or IPC endpoint of the QPU Compiler.

  • device (AbstractDevice) – PyQuil Device object to use as compilation target.

  • timeout (float) – Number of seconds to wait for a response from the client.

  • name (Optional[str]) – Name of the lattice being targeted.

  • session (Optional[ForestSession]) – ForestSession object, which manages engagement and configuration.

__init__(quilc_endpoint, qpu_compiler_endpoint, device, timeout=10, name=None, *, session=None)[source]

Client to communicate with the Compiler Server.

Parameters
  • quilc_endpoint (Optional[str]) – TCP or IPC endpoint of the Quil Compiler (quilc).

  • qpu_compiler_endpoint (Optional[str]) – TCP or IPC endpoint of the QPU Compiler.

  • device (AbstractDevice) – PyQuil Device object to use as compilation target.

  • timeout (float) – Number of seconds to wait for a response from the client.

  • name (Optional[str]) – Name of the lattice being targeted.

  • session (Optional[ForestSession]) – ForestSession object, which manages engagement and configuration.

Methods

__init__(quilc_endpoint, …[, timeout, …])

Client to communicate with the Compiler Server.

connect()

rtype

None

get_calibration_program()

Get the Quil-T calibration program associated with the underlying QPU.

get_version_info()

Return version information for this compiler and its dependencies.

native_quil_to_executable(nq_program, *[, debug])

Compile a native quil program to a binary executable.

quil_to_native_quil(program, *[, protoquil])

Compile an arbitrary quil program according to the ISA of target_device.

refresh_calibration_program()

Refresh the calibration program cache.

reset()

Reset the state of the QPUCompiler Client connections.

set_timeout(timeout)

Set timeout for each individual stage of compilation.

Attributes

calibration_program

Cached calibrations.

qpu_compiler_client

rtype

Union[Client, HTTPCompilerClient, None]