pyquil.api.QVMCompiler

class pyquil.api.QVMCompiler(endpoint, device, timeout=10)[source]

Client to communicate with the Compiler Server.

Parameters
  • endpoint (str) – TCP or IPC endpoint of the Compiler Server

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

  • timeout (float) – Timeout value for each compilation stage, in seconds. If the stage does not complete within this threshold, an exception is raised.

__init__(endpoint, device, timeout=10)[source]

Client to communicate with the Compiler Server.

Parameters
  • endpoint (str) – TCP or IPC endpoint of the Compiler Server

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

  • timeout (float) – Timeout value for each compilation stage, in seconds. If the stage does not complete within this threshold, an exception is raised.

Methods

__init__(endpoint, device[, timeout])

Client to communicate with the Compiler Server.

connect()

rtype

None

get_calibration_program()

See QPUCompiler.get_calibration_program().

get_version_info()

Return version information for this compiler and its dependencies.

native_quil_to_executable(nq_program)

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()

rtype

None

reset()

Reset the state of the QVMCompiler quilc connection.

set_timeout(timeout)

Set timeout for each individual stage of compilation.

Attributes

calibration_program

rtype

Program

quilc_client

Return the Client for the compiler (i.e.