qcs_sdk.compiler.quilc
A set of options that determine the behavior of compiling programs with quilc
The result of compiling a Quil program to native quil with quilc
Metadata about a program compiled to native quil.
Description of a device to compile for.
Create a [TargetDevice] based on an [InstructionSetArchitecture].
Errors
Returns a [QuilcError] if the [InstructionSetArchitecture]
cannot be converted into a format that Quilc understands.
Pauli Term
Request to conjugate a Pauli Term by a Clifford element.
The "outer" request shape for a conjugate_pauli_by_clifford request.
Conjugate Pauli by Clifford response.
Request to generate a randomized benchmarking sequence.
Randomly generated benchmarking sequence response.
Client used to communicate with Quilc.
Errors encountered compiling a Quil program.
Compile a quil program for a target device.
Parameters
- quil: The Quil program to compile.
- target: Architectural description of device to compile for.
- client: Client used to send compilation requests to Quilc.
- options: Optional compiler options. If
None, default values are used.
Raises
- QuilcError: If compilation fails.
Compile a quil program for a target device.
Parameters
- quil: The Quil program to compile.
- target: Architectural description of device to compile for.
- client: Client used to send compilation requests to Quilc.
- options: Optional compiler options. If
None, default values are used.
Raises
- QuilcError: If compilation fails.
Fetch the version information from the running Quilc service.
Parameters
- client: Client used to send compilation requests to Quilc.
Raises
- QuilcError: If there is a failure connecting to Quilc.
Fetch the version information from the running Quilc service.
Parameters
- client: Client used to send compilation requests to Quilc.
Raises
- QuilcError: If there is a failure connecting to Quilc.
Given a circuit that consists only of elements of the Clifford group, return its action on a PauliTerm. In particular, for Clifford C, and Pauli P, this returns the PauliTerm representing CPC^{\dagger}.
Parameters
- request: Pauli Term conjugation request.
- client: Client used to send compilation requests to Quilc.
Raises
- QuilcError: If there is a failure connecting to Quilc or if the request is malformed.
Given a circuit that consists only of elements of the Clifford group, return its action on a PauliTerm. In particular, for Clifford C, and Pauli P, this returns the PauliTerm representing CPC^{\dagger}.
Parameters
- request: Pauli Term conjugation request.
- client: Client used to send compilation requests to Quilc.
Raises
- QuilcError: If there is a failure connecting to Quilc or if the request is malformed.
Construct a randomized benchmarking experiment on the given qubits, decomposing into gateset. If interleaver is not provided, the returned sequence will have the form
C_1 C_2 ... C_(depth-1) C_inv ,
where each C is a Clifford element drawn from gateset, C_{< depth} are randomly selected, and C_inv is selected so that the entire sequence composes to the identity. If an interleaver G (which must be a Clifford, and which will be decomposed into the native gateset) is provided, then the sequence instead takes the form
C_1 G C_2 G ... C_(depth-1) G C_inv .
Parameters
- request: Randomized benchmarking request.
- client: Client used to send compilation requests to Quilc.
Raises
- QuilcError: If there is a failure connecting to Quilc or if the request is malformed.
Construct a randomized benchmarking experiment on the given qubits, decomposing into gateset. If interleaver is not provided, the returned sequence will have the form
C_1 C_2 ... C_(depth-1) C_inv ,
where each C is a Clifford element drawn from gateset, C_{< depth} are randomly selected, and C_inv is selected so that the entire sequence composes to the identity. If an interleaver G (which must be a Clifford, and which will be decomposed into the native gateset) is provided, then the sequence instead takes the form
C_1 G C_2 G ... C_(depth-1) G C_inv .
Parameters
- request: Randomized benchmarking request.
- client: Client used to send compilation requests to Quilc.
Raises
- QuilcError: If there is a failure connecting to Quilc or if the request is malformed.