Classes#
- class qiskit_rigetti.RigettiQCSProvider(*, compiler_timeout: float = 10.0, execution_timeout: float = 10.0, client_configuration: Optional[pyquil.api.QCSClient] = 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.
- backends(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(*, 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
- class qiskit_rigetti.RigettiQCSBackend(*, compiler_timeout: float, execution_timeout: float, client_configuration: pyquil.api.QCSClient, backend_configuration: qiskit.providers.models.QasmBackendConfiguration, provider: Optional[qiskit.providers.Provider], auto_set_coupling_map: bool = True, qc: Optional[pyquil.api.QuantumComputer] = None, **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.
backend_configuration – Backend configuration.
provider – Parent provider.
qc – The QuantumComputer this backend represents to Qiskit.
auto_set_coupling_map – When True, this will set the QasmBackendConfiguration coupling_map based on the QuantumComputer topology if the existing coupling_map is empty.
fields – Keyword arguments for the values to use to override the default options.
- property coupling_map#
- property qc#
- run(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
- 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
backend –
RigettiQCSBackend
that created this jobconfiguration – Configuration from parent backend
- abstract cancel()#
- Raises
NotImplementedError – There is currently no way to cancel this job.
- result()#
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()#
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()#
- Raises
NotImplementedError – This class uses the asynchronous pattern, so this method should not be called.
- class qiskit_rigetti.QuilCircuit(*regs: Register | int | Sequence[Bit], name: str | None = None, global_phase: qiskit.circuit.parameterexpression.ParameterValueType = 0, metadata: dict | None = 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(alpha: float, beta: float, gamma: float, qubit1: Any, qubit2: Any)#
Apply
qiskit_rigetti.gates.can.CanonicalGate
.
- cphase00(theta: float, control_qubit: Any, target_qubit: Any)#
Apply
qiskit_rigetti.gates.cphase.CPhase00
.
- cphase01(theta: float, control_qubit: Any, target_qubit: Any)#
Apply
qiskit_rigetti.gates.cphase.CPhase01
.
- cphase10(theta: float, control_qubit: Any, target_qubit: Any)#
Apply
qiskit_rigetti.gates.cphase.CPhase10
.
- piswap(theta: float, qubit1: Any, qubit2: Any)#
Apply
qiskit_rigetti.gates.xy.XYGate
.
- pswap(theta: float, qubit1: Any, qubit2: Any)#
Apply
qiskit_rigetti.gates.pswap.PSwapGate
.
- xy(theta: float, qubit1: Any, qubit2: Any)#
Apply
qiskit_rigetti.gates.xy.XYGate
.