Classes

class qiskit_rigetti.RigettiQCSProvider(*, compiler_timeout: float = 10.0, execution_timeout: float = 10.0, client_configuration: Optional[qcs_api_client.client.QCSClientConfiguration] = None, engagement_manager: Optional[pyquil.api.EngagementManager] = None)

Class for representing the set of Rigetti backends.

Parameters
  • execution_timeout – Time limit for execution requests, in seconds.

  • compiler_timeout – Time limit for compiler requests, in seconds.

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

  • engagement_manager – QPU engagement manager. If one is not provided, a default one will be created.

backends(self, name: Optional[str] = None, **__: Any)

Get the list of RigettiQCSBackend corresponding to the available Quantum Processors.

Parameters

name – An optional QPU name to match against (e.g. “Aspen-9”). If provided, only matching backends will be returned.

Returns

The list of matching backends.

Return type

List[RigettiQCSBackend]

get_simulator(self, *, num_qubits: int, noisy: bool = False)

Get a simulator (QVM).

Parameters
  • num_qubits – Number of qubits the simulator should have

  • noisy – Whether or not the simulator should simulate noise

Returns

A backend representing the simulator

Return type

RigettiQCSBackend

class qiskit_rigetti.RigettiQCSBackend(*, compiler_timeout: float, execution_timeout: float, client_configuration: qcs_api_client.client.QCSClientConfiguration, engagement_manager: pyquil.api.EngagementManager, backend_configuration: qiskit.providers.models.QasmBackendConfiguration, provider: Optional[qiskit.providers.Provider], **fields: Any)

Class for representing a Rigetti backend, which may target a real QPU or a simulator.

Parameters
  • execution_timeout – Time limit for execution requests, in seconds.

  • compiler_timeout – Time limit for compiler requests, in seconds.

  • client_configuration – QCS client configuration.

  • engagement_manager – QPU engagement manager.

  • backend_configuration – Backend configuration.

  • provider – Parent provider.

  • fields – Keyword arguments for the values to use to override the default options.

run(self, run_input: Union[qiskit.QuantumCircuit, List[qiskit.QuantumCircuit]], **options: Any)

Run the quantum circuit(s) using this backend.

Parameters
  • run_input – Either a single QuantumCircuit to run or a list of them to run in parallel.

  • **options – Execution options to forward to RigettiQCSJob.

Returns

The job that has been started. Wait for it by calling RigettiQCSJob.result()

Return type

RigettiQCSJob

class qiskit_rigetti.RigettiQCSJob(*, job_id: str, circuits: List[qiskit.QuantumCircuit], options: Dict[str, Any], qc: pyquil.api.QuantumComputer, backend: qiskit.providers.Backend, configuration: qiskit.providers.models.QasmBackendConfiguration)

Class for representing execution jobs sent to Rigetti backends.

Parameters
  • job_id – Unique identifier for this job

  • circuits – List of circuits to execute

  • options – Execution options (e.g. “shots”)

  • qc – Quantum computer to run against

  • backendRigettiQCSBackend that created this job

  • configuration – Configuration from parent backend

abstract cancel(self)
Raises

NotImplementedError – There is currently no way to cancel this job.

result(self)

Wait until the job is complete, then return a result.

Raises

JobError – If there was a problem running the Job or retrieving the result

status(self)

Get the current status of this Job

If this job was RUNNING when you called it, this function will block until the job is complete.

abstract submit(self)
Raises

NotImplementedError – This class uses the asynchronous pattern, so this method should not be called.

class qiskit_rigetti.QuilCircuit(*regs, name=None, global_phase=0, metadata=None)

A qiskit.circuit.QuantumCircuit extension with added support for standard Quil gates:

https://github.com/rigetti/quilc/blob/master/src/quil/stdgates.quil

can(self, alpha: float, beta: float, gamma: float, qubit1: Any, qubit2: Any)

Apply qiskit_rigetti.gates.can.CanonicalGate.

cphase00(self, theta: float, control_qubit: Any, target_qubit: Any)

Apply qiskit_rigetti.gates.cphase.CPhase00.

cphase01(self, theta: float, control_qubit: Any, target_qubit: Any)

Apply qiskit_rigetti.gates.cphase.CPhase01.

cphase10(self, theta: float, control_qubit: Any, target_qubit: Any)

Apply qiskit_rigetti.gates.cphase.CPhase10.

piswap(self, theta: float, qubit1: Any, qubit2: Any)

Apply qiskit_rigetti.gates.xy.XYGate.

pswap(self, theta: float, qubit1: Any, qubit2: Any)

Apply qiskit_rigetti.gates.pswap.PSwapGate.

xy(self, theta: float, qubit1: Any, qubit2: Any)

Apply qiskit_rigetti.gates.xy.XYGate.