pyquil.quantum_processor.qcs module

class pyquil.quantum_processor.qcs.QCSQuantumProcessor(quantum_processor_id: str, isa: InstructionSetArchitecture, noise_model: NoiseModel | None = None)[source]

Bases: AbstractQuantumProcessor

An AbstractQuantumProcessor initialized with an InstructionSetArchitecture returned from the QCS API. Notably, this class is able to serialize a CompilerISA based on the architecture instructions.

Initialize a new QCSQuantumProcessor.

  • quantum_processor_id – The id of the quantum processor.

  • isa – The QCS API InstructionSetArchitecture.

  • noise_model – An optional NoiseModel for configuring a noisy quantum_processor on the QVM.

noise_model: NoiseModel | None
quantum_processor_id: str
qubit_topology() Graph[source]

The connectivity of qubits in this quantum_processor given as a NetworkX graph.

qubits() List[int][source]

A sorted list of qubits in the quantum_processor topology.

to_compiler_isa() CompilerISA[source]

Construct an ISA suitable for targeting by compilation. This will raise an exception if the requested ISA is not supported by the quantum_processor.

pyquil.quantum_processor.qcs.get_qcs_quantum_processor(quantum_processor_id: str, client_configuration: QCSClient | None = None, timeout: float = 10.0) QCSQuantumProcessor[source]

Retrieve an instruction set architecture for the specified quantum_processor_id and initialize a QCSQuantumProcessor with it.

  • quantum_processor_id – QCS ID for the quantum processor.

  • timeout – Time limit for request, in seconds.

  • client_configuration – Optional client configuration. If none is provided, a default one will be loaded.


A QCSQuantumProcessor with the requested ISA.