IonQ Backends¶
IonQ provider backends.
- class qiskit_ionq.ionq_backend.IonQBackend(*, provider: IonQProvider, name: str, description: str, gateset: Literal['qis', 'native'], num_qubits: int, simulator: bool, backend_version: str = '0.0.1', max_shots: int | None = None, max_experiments: int | None = None, **initial_options)[source]¶
Common functionality for all IonQ backends (simulator and QPU).
Build a new IonQ backend instance.
- backend_version¶
Version of the backend being provided. This is not the same as
BackendV2.version
, which is the version of theBackend
abstract interface.
- property basis_gates: Sequence[str]¶
Return the basis gates for this backend.
- calibration() Characterization | None [source]¶
Return the latest characterization data (None for simulator).
- property client: IonQClient¶
Return the IonQ client for this backend.
- property coupling_map: CouplingMap¶
IonQ hardware is fully connected.
- description¶
Optional human-readable description.
- property dt: float | None¶
Return the system time resolution of input signals
This is required to be implemented if the backend supports Pulse scheduling.
- Returns:
The input signal timestep in seconds. If the backend doesn’t define
dt
,None
will be returned.
- property dtm: float¶
Return the system time resolution of output signals
- Returns:
The output signal timestep in seconds.
- Raises:
NotImplementedError – if the backend doesn’t support querying the output signal timestep
- property instruction_durations¶
Return the
InstructionDurations
object.
- property instructions: List[Tuple[Instruction, Tuple[int]]]¶
A list of Instruction tuples on the backend of the form
(instruction, (qubits)
- property max_circuits: int | None¶
The maximum number of circuits that can be run in a single job.
If there is no limit this will return None
- property meas_map: List[List[int]]¶
Return the grouping of measurements which are multiplexed
This is required to be implemented if the backend supports Pulse scheduling.
- Returns:
The grouping of measurements which are multiplexed
- Raises:
NotImplementedError – if the backend doesn’t support querying the measurement mapping
- name¶
Name of the backend.
- property num_qubits: int¶
Return the number of qubits the backend has.
- online_date¶
Date that the backend came online.
- property operation_names: List[str]¶
A list of instruction names that the backend supports.
- property operations: List[Instruction]¶
A list of
Instruction
instances that the backend supports.
- property options¶
Return the options for the backend
The options of a backend are the dynamic parameters defining how the backend is used. These are used to control the
run()
method.
- property provider¶
Return the backend provider.
- Returns:
the provider responsible for the backend.
- Return type:
provider
- qubit_properties(qubit: int | List[int]) QubitProperties | List[QubitProperties] ¶
Return QubitProperties for a given qubit.
If there are no defined or the backend doesn’t support querying these details this method does not need to be implemented.
- Parameters:
qubit – The qubit to get the
QubitProperties
object for. This can be a single integer for 1 qubit or a list of qubits and a list ofQubitProperties
objects will be returned in the same order- Returns:
The
QubitProperties
object for the specified qubit. If a list of qubits is provided a list will be returned. If properties are missing for a qubit this can beNone
.- Raises:
NotImplementedError – if the backend doesn’t support querying the qubit properties
- retrieve_jobs(job_ids: Sequence[str]) Sequence[IonQJob] [source]¶
Retrieve multiple jobs by their IDs.
- run(run_input: QuantumCircuit | Sequence[QuantumCircuit], **options) IonQJob [source]¶
Create and run a job on an IonQ Backend.
- Parameters:
run_input – A single or list of Qiskit QuantumCircuit object(s).
**options – Additional options for the job.
- Returns:
A reference to the job that was submitted.
- Return type:
- set_options(**fields)¶
Set the options fields for the backend
This method is used to update the options of a backend. If you need to change any of the options prior to running just pass in the kwarg with the new value for the options.
- Parameters:
fields – The fields to update the options
- Raises:
AttributeError – If the field passed in is not part of the options
- property target: Target | None¶
A
qiskit.transpiler.Target
object for the backend.- Return type:
Target
- class qiskit_ionq.ionq_backend.IonQQPUBackend(provider: IonQProvider, name: str = 'ionq_qpu', gateset: Literal['qis', 'native'] = 'qis', **initial_options)[source]¶
IonQ trapped-ion hardware back-ends (Aria/Alpine: MS; Forte: ZZ).
Build a new IonQ backend instance.
- backend_version¶
Version of the backend being provided. This is not the same as
BackendV2.version
, which is the version of theBackend
abstract interface.
- property basis_gates: Sequence[str]¶
Return the basis gates for this backend.
- calibration() Characterization | None ¶
Return the latest characterization data (None for simulator).
- cancel_job(job_id: str) dict ¶
Cancel a job by its ID.
- cancel_jobs(job_ids: Sequence[str]) Sequence[dict] ¶
Cancel a list of jobs by their IDs.
- property client: IonQClient¶
Return the IonQ client for this backend.
- property coupling_map: CouplingMap¶
IonQ hardware is fully connected.
- description¶
Optional human-readable description.
- property dt: float | None¶
Return the system time resolution of input signals
This is required to be implemented if the backend supports Pulse scheduling.
- Returns:
The input signal timestep in seconds. If the backend doesn’t define
dt
,None
will be returned.
- property dtm: float¶
Return the system time resolution of output signals
- Returns:
The output signal timestep in seconds.
- Raises:
NotImplementedError – if the backend doesn’t support querying the output signal timestep
- gateset() Literal['qis', 'native'] ¶
Active gateset (
"qis"
or"native"
).
- property instruction_durations¶
Return the
InstructionDurations
object.
- property instructions: List[Tuple[Instruction, Tuple[int]]]¶
A list of Instruction tuples on the backend of the form
(instruction, (qubits)
- property max_circuits: int | None¶
The maximum number of circuits that can be run in a single job.
If there is no limit this will return None
- property meas_map: List[List[int]]¶
Return the grouping of measurements which are multiplexed
This is required to be implemented if the backend supports Pulse scheduling.
- Returns:
The grouping of measurements which are multiplexed
- Raises:
NotImplementedError – if the backend doesn’t support querying the measurement mapping
- name¶
Name of the backend.
- property num_qubits: int¶
Return the number of qubits the backend has.
- online_date¶
Date that the backend came online.
- property operation_names: List[str]¶
A list of instruction names that the backend supports.
- property operations: List[Instruction]¶
A list of
Instruction
instances that the backend supports.
- property options¶
Return the options for the backend
The options of a backend are the dynamic parameters defining how the backend is used. These are used to control the
run()
method.
- property provider¶
Return the backend provider.
- Returns:
the provider responsible for the backend.
- Return type:
provider
- qubit_properties(qubit: int | List[int]) QubitProperties | List[QubitProperties] ¶
Return QubitProperties for a given qubit.
If there are no defined or the backend doesn’t support querying these details this method does not need to be implemented.
- Parameters:
qubit – The qubit to get the
QubitProperties
object for. This can be a single integer for 1 qubit or a list of qubits and a list ofQubitProperties
objects will be returned in the same order- Returns:
The
QubitProperties
object for the specified qubit. If a list of qubits is provided a list will be returned. If properties are missing for a qubit this can beNone
.- Raises:
NotImplementedError – if the backend doesn’t support querying the qubit properties
- run(run_input: QuantumCircuit | Sequence[QuantumCircuit], **options) IonQJob ¶
Create and run a job on an IonQ Backend.
- Parameters:
run_input – A single or list of Qiskit QuantumCircuit object(s).
**options – Additional options for the job.
- Returns:
A reference to the job that was submitted.
- Return type:
- set_options(**fields)¶
Set the options fields for the backend
This method is used to update the options of a backend. If you need to change any of the options prior to running just pass in the kwarg with the new value for the options.
- Parameters:
fields – The fields to update the options
- Raises:
AttributeError – If the field passed in is not part of the options
- status() bool ¶
True if the backend is currently available.
- property target: Target | None¶
A
qiskit.transpiler.Target
object for the backend.- Return type:
Target
- with_name(name: str, **kwargs) IonQQPUBackend [source]¶
Helper method that returns this backend with a more specific target system.
- class qiskit_ionq.ionq_backend.IonQSimulatorBackend(provider: IonQProvider, name: str = 'simulator', gateset: Literal['qis', 'native'] = 'qis', **initial_options)[source]¶
IonQ Backend for running simulated jobs.
Attention
When noise_model ideal is specified, the maximum shot-count for a state vector sim is always
1
.Attention
When noise_model ideal is specified, calling
get_counts
on a job processed by this backend will return counts expressed as probabilities, rather than a multiple of shots.Build a new IonQ backend instance.
- backend_version¶
Version of the backend being provided. This is not the same as
BackendV2.version
, which is the version of theBackend
abstract interface.
- property basis_gates: Sequence[str]¶
Return the basis gates for this backend.
- calibration() Characterization | None ¶
Return the latest characterization data (None for simulator).
- cancel_job(job_id: str) dict ¶
Cancel a job by its ID.
- cancel_jobs(job_ids: Sequence[str]) Sequence[dict] ¶
Cancel a list of jobs by their IDs.
- property client: IonQClient¶
Return the IonQ client for this backend.
- property coupling_map: CouplingMap¶
IonQ hardware is fully connected.
- description¶
Optional human-readable description.
- property dt: float | None¶
Return the system time resolution of input signals
This is required to be implemented if the backend supports Pulse scheduling.
- Returns:
The input signal timestep in seconds. If the backend doesn’t define
dt
,None
will be returned.
- property dtm: float¶
Return the system time resolution of output signals
- Returns:
The output signal timestep in seconds.
- Raises:
NotImplementedError – if the backend doesn’t support querying the output signal timestep
- gateset() Literal['qis', 'native'] ¶
Active gateset (
"qis"
or"native"
).
- property instruction_durations¶
Return the
InstructionDurations
object.
- property instructions: List[Tuple[Instruction, Tuple[int]]]¶
A list of Instruction tuples on the backend of the form
(instruction, (qubits)
- property max_circuits: int | None¶
The maximum number of circuits that can be run in a single job.
If there is no limit this will return None
- property meas_map: List[List[int]]¶
Return the grouping of measurements which are multiplexed
This is required to be implemented if the backend supports Pulse scheduling.
- Returns:
The grouping of measurements which are multiplexed
- Raises:
NotImplementedError – if the backend doesn’t support querying the measurement mapping
- name¶
Name of the backend.
- property num_qubits: int¶
Return the number of qubits the backend has.
- online_date¶
Date that the backend came online.
- property operation_names: List[str]¶
A list of instruction names that the backend supports.
- property operations: List[Instruction]¶
A list of
Instruction
instances that the backend supports.
- property options¶
Return the options for the backend
The options of a backend are the dynamic parameters defining how the backend is used. These are used to control the
run()
method.
- property provider¶
Return the backend provider.
- Returns:
the provider responsible for the backend.
- Return type:
provider
- qubit_properties(qubit: int | List[int]) QubitProperties | List[QubitProperties] ¶
Return QubitProperties for a given qubit.
If there are no defined or the backend doesn’t support querying these details this method does not need to be implemented.
- Parameters:
qubit – The qubit to get the
QubitProperties
object for. This can be a single integer for 1 qubit or a list of qubits and a list ofQubitProperties
objects will be returned in the same order- Returns:
The
QubitProperties
object for the specified qubit. If a list of qubits is provided a list will be returned. If properties are missing for a qubit this can beNone
.- Raises:
NotImplementedError – if the backend doesn’t support querying the qubit properties
- run(run_input: QuantumCircuit | Sequence[QuantumCircuit], **options) IonQJob ¶
Create and run a job on an IonQ Backend.
- Parameters:
run_input – A single or list of Qiskit QuantumCircuit object(s).
**options – Additional options for the job.
- Returns:
A reference to the job that was submitted.
- Return type:
- set_options(**fields)¶
Set the options fields for the backend
This method is used to update the options of a backend. If you need to change any of the options prior to running just pass in the kwarg with the new value for the options.
- Parameters:
fields – The fields to update the options
- Raises:
AttributeError – If the field passed in is not part of the options
- status() bool ¶
True if the backend is currently available.
- property target: Target | None¶
A
qiskit.transpiler.Target
object for the backend.- Return type:
Target
- with_name(name: str, **kwargs) IonQSimulatorBackend [source]¶
Helper method that returns this backend with a more specific target system.