Qiskit Runtime client release notes
0.32.0 (2024-10-30)
New Features
-
Added
draw_execution_spans()
, a function for creating a Plotly figure that visualizes one or moreExecutionSpans
objects. Also added the convenience methoddraw()
to invoke the drawing function on a particular instance. (1923)from qiskit_ibm_runtime.visualization import draw_execution_spans # use the drawing function on spans from sampler job data spans1 = sampler_job1.result().metadata["execution"]["execution_spans"] spans2 = sampler_job2.result().metadata["execution"]["execution_spans"] draw_execution_spans(spans1, spans2) # convenience to plot just spans1 spans1.draw()
-
Added a new method,
backend.refresh()
that refreshes the current backend target with the latest updates from the server. (1955) -
Added
DoubleSliceSpan
, anExecutionSpan
for batching with two slices. (1982) -
Each of
SamplerV2
,EstimatorV2
, andnoise_learner.NoiseLearner
now has abackend()
method that returns the backend that the class is configured with. (1995)
Other Notes
-
Deprecations from the
0.25.0
release have been removed.optimization_level
is no longer a valid option forEstimatorV2
.- Job methods
interim_results()
andstream_results()
have been removed. (1965)
-
The
channel_strategy
parameter inQiskitRuntimeService
has been removed. To continue using Q-CTRL in your workflow, please explore the following options:- If your organization has an existing IBM Quantum Premium Plan instance: migrate to the Q-CTRL Performance Management Function, found in the Qiskit Functions Catalog.
- To continue using Qiskit Runtime with IBM Cloud: migrate to Q-CTRL Fire Opal, the same performance management product accessible directly through Q-CTRL. You can connect your IBM Cloud API key and Qiskit Runtime CRN to Fire Opal. (1966)
0.31.0 (2024-10-15)
New Features
- Added Noisy Estimator Analyzer Tool (NEAT), a class to help understand the expected performance of Estimator jobs. (1950)
- Updated the ISA check to validate that the
rzz
angle is between[0, pi/2]
. (1953)
Bug Fixes
- Fixed an issue with ISA validation where a change related to connectivity inside control operations was not applied correctly. (1954)
Other Notes
- Fake V1 backends have been removed. (1946)
0.30.0 (2024-09-23)
Deprecation Notes
-
The utilityy function
get_runtime_api_base_url
has been deprecated. Usedefault_runtime_url_resolver
instead. (1914) -
The
channel_strategy
parameter has been deprecated. The Q-CTRL Performance Management strategy will be removed on October 18th, 2024. To continue using Q-CTRL in your workflow, please explore the following options:- If your organization has an existing IBM Quantum Premium Plan instance: migrate to the Q-CTRL Performance Management Function, found in the Qiskit Functions Catalog.
- To continue using Qiskit Runtime with IBM Cloud: migrate to Q-CTRL Fire Opal, the same performance management product accessible directly through Q-CTRL. You can connect your IBM Cloud API key and Qiskit Runtime CRN to Fire Opal. (1931)
-
In a future release,
RuntimeJob.status()
will be returned as a string instead of an instance ofJobStatus
. (1933)
New Features
-
Added new methods
Session.usage()
,Batch.usage()
, andJob.usage()
that all return information regarding job and session usage. Please find more information here. (1827) -
Added
ConvertISAToClifford
transpilation pass to convert the gates of a circuit to Clifford gates. (1887) -
Added
url_resolver
optional input toQiskitRuntimeService
constructor to enable custom generation of the Qiskit Runtime API URL based on the providedurl
,instance
andprivate_endpoint
. If not specified, the default resolver will be used.# Define a custom resolver. In this case returns the concatenation of the provided `url` and the `instance` def custom_url_resolver(url, instance, *args, **kwargs): return f"{url}/{instance}" service = QiskitRuntimeService(channel="ibm_quantum", instance="ibm-q/open/main", url="https://baseurl.org" url_resolver=custom_url_resolver) # resulting resolved url will be: `https://baseurl.org/ibm-q/open/main`
-
Added utility function
default_runtime_url_resolver
. (1914) -
The
use_fractional_gates
flag forQiskitRuntimeService.backend()
andQiskitRuntimeService.backends()
can now beNone
. When set toNone
, no instruction filtering is done, and the returned backend target may contain both fractional gates and control flow operations. (1938)
Bug Fixes
- Fixed a bug where primitives could not be run in the session context with fractional gates. (1922)
Other Notes
-
Deprecations from the
0.24.0
release have been removed. The following changes have beend made.- The arguments backend and session for Sampler and Estimator have been removed and replaced with “mode”
- The primitive
Session
property has been replaced withmode
- Specifying options without the full dictionary structure is no longer supported
Job.program_id()
has been replaced withJob.primitive_id()
Service.run()
andSession.run()
have been replaced with a private method,_run()
- In
Service.backend()
, “name” is now a required parameter Service.get_backend()
has been removed and replaced withbackend()
(1907)
0.29.1 (2024-09-17)
New Features
- Added logic to encode and decode
NoiseLearnerResult
. (1908)
0.29.0 (2024-09-04)
Deprecation Notes
- The simulator option
noise_model
is now deprecated for jobs running on real devices.noise_model
will still be an acceptable option when using the local testing mode. (1892)
New Features
- We added new classes,
ExecutionSpan
andExecutionSpanSet
. These classes are used in the primitive result metadata, to convey information about start and stop times of batch jobs. (1833) - Added a new
private
option underEnvironmentOptions
. (1888) - Added
fallback
option to ZNE extrapolators. (1902)
Bug Fixes
- Ported the
Noise_model.from_dict()
method fromqiskit-aer
because it was removed in0.15.0
. (1890) - Revert a previous change to
backend.target
where the target was no longer being cached. (1891) - Fixed an issue where
Session.from_id()
would create a new empty session. (1896)
0.28.0 (2024-08-15)
New Features
ResilienceOptionsV2
has a new fieldlayer_noise_model
. When this field is set, all the mitigation strategies that require noise data skip the noise learning stage, and instead gather the required information fromlayer_noise_model
. (1858)
Other Notes
- The V1 Primitives
SamplerV1
andEstimatorV1
have been completely removed. Please see the migration guide and use the V2 Primitives instead. (1857) - The
service
parameter is now required inSession.from_id()
. (1868)
0.27.1 (2024-08-12)
New Features
- Added logic to encode and decode
PauliLindbladError
andLayerError
. (1853)
0.27.0 (2024-08-08)
New Features
- Added
PauliLindbladError
andLayerError
classes to represent layers noise processes. (1844)
Bug Fixes
- Fixed an issue with using the aer simulator and local service mode with sessions. (1838)
0.26.0 (2024-07-31)
Deprecation Notes
- Passing in a backend as a string into
Session
,Batch
,EstimatorV2
, andSamplerV2
has been deprecated. Use the actual backend object instead. (1804) - Passing a backend as the mode in
SamplerV2
andEstimatorV2
currently runs a job in job mode even if inside of aSession
orBatch
context manager. This behavior is deprecated and in a future release the the Session/Batch will take precedence. (1816) - Passing in
service
inSession
,Batch
has been deprecated. Theservice
parameter is no longer necessary because the service can be extracted from the backend. (1826) - Since backend modules from
qiskit.providers.models
includingBackendProperties
andBackendConfiguration
are deprecated in Qiskit 1.2, they have been copied intoqiskit-ibm-runtime
. Make sure to upgrade to the latest version,0.26.0
, to use these classes. (1803)
New Features
-
The methods
properties
,defaults
,configuration
, andcheck_faulty
have been added toFakeBackendV2
. (1765) -
If jobs are run in a session created with
QiskitRuntimeService.Session.from_id()
where the session is already closed, the jobs are rejected immediately. (1780) -
The input parameters for jobs will no longer be cached. These parameters can include large circuits and should not be automatically kept in memory. (1783)
-
QiskitRuntimeLocalService
was created to support a local testing mode. To avoid having to initialize a separate class, “local” has been added as a validQiskitRuntimeService
channel.service = QiskitRuntimeService(channel="local")
will return a
QiskitRuntimeLocalService
instance. (1793) -
When running jobs on the open plan, there will now be a warning if the limit for the maximum number of pending jobs has been reached. The service will also attempt to wait for the oldest pending jobs to finish running before submitting a new job. (1794)
-
Added
NoiseLearner
and related functionality, such asNoiseLearnerOptions
andNoiseLearnerResults
. (1805)
Bug Fixes
- Every circuit is checked to be ISA compliant. As part of this check, an error is raised if instructions that are not supported by the backend are detected. Previously, a bug caused some of the instructions to be skipped (those that reside inside bodies of control flow operations). We have fixed the bug in this release. (1784)
- Fixed an issue where calling
IBMBackend.target_history()
would cache the backend target and then callingIBMBackend.target()
would incorrectly return that cached target. (1791) - The options validation for checking if
zne_mitigation
orpec_mitigation
are set toTrue
when using other related options has been removed. (1792) - Fixed an issue where users were unable to retrieve job results if the python library
simplejson
was installed in their environment. (1800)
0.25.0 (2024-07-02)
Deprecation Notes
- The
optimization_level
option inEstimatorV2
is deprecated. Instead, you can perform circuit optimization using the Qiskit transpiler or Qiskit transpiler service. (1748) qiskit_ibm_runtime.RuntimeJobV2.interim_results()
,qiskit_ibm_runtime.RuntimeJobV2.stream_results()
,qiskit_ibm_runtime.RuntimeJob.interim_results()
, andqiskit_ibm_runtime.RuntimeJob.stream_results()
are now all deprecated. (1776)
New Features
- Added
backend
,backends
, andleast_busy
methods toQiskitRuntimeLocalService
. (1764) - Added an
instance
property toBaseRuntimeJob
which returns the instance where the job was run. (1771) default_shots
are now a supported option when usingEstimatorV2
in local testing mode. (1773)
0.24.1 (2024-06-18)
Bug Fixes
- Disallowing fractional gates by default, so backend target would not exclude control flow. (1755)
0.24.0 (2024-06-10)
Deprecation Notes
-
name
will now be a required parameter in backend().backend()
will no longer return the first backend out of all backends ifname
is not provided. (1147) -
After the removal of custom programs, the following methods are being deprecated and renamed.
qiskit_ibm_runtime.QiskitRuntimeService.run()
is deprecated and will be replaced by a private methodqiskit_ibm_runtime.QiskitRuntimeService._run()
.qiskit_ibm_runtime.Session.run()
is deprecated and will be replaced by a private methodqiskit_ibm_runtime.Session._run()
.qiskit_ibm_runtime.RuntimeJob.program_id()
is deprecated and will be replaced byqiskit_ibm_runtime.RuntimeJob.primitive_id()
. (1238) -
The
backend
argument in Sampler and Estimator has been deprecated. Please usemode
instead. Thesession
argument in Sampler and Estimator has also been deprecated. Please usemode
instead. (1556) -
qiskit_ibm_runtime.QiskitRuntimeService.get_backend()
is deprecated. Pleaseqiskit_ibm_runtime.QiskitRuntimeService.backend()
use instead. The V1 fake backends,FakeBackend
, along withFakeProvider
are also being deprecated in favor of the V2 fake backends andFakeProviderForBackendV2
. (1689) -
Specifying options without the full dictionary structure is deprecated. Instead, pass in a fully structured dictionary. For example, use
{'environment': {'log_level': 'INFO'}}
instead of{'log_level': 'INFO'}
. (1731)
New Features
-
Related to the execution modes, Sampler and Estimator now include a
mode
argument. Themode
parameter can be a Backend, Session, Batch, or None. As a result, the backend name has been deprecated, and will no longer be supported as a valid execution mode. (1556) -
The ZneOptions.amplifier option was added, which can be one of these strings:
"gate_folding"
(default) uses 2-qubit gate folding to amplify noise. If the noise factor requires amplifying only a subset of the gates, then these gates are chosen randomly."gate_folding_front"
uses 2-qubit gate folding to amplify noise. If the noise factor requires amplifying only a subset of the gates, then these gates are selected from the front of the topologically ordered DAG circuit."gate_folding_back"
uses 2-qubit gate folding to amplify noise. If the noise factor requires amplifying only a subset of the gates, then these gates are selected from the back of the topologically ordered DAG circuit. (1679)
-
When saving an account, there is a new parameter,
private_endpoint
that if set toTrue
, allows users to connect to a private IBM Cloud API. This parameter can also be used when the service is initialized, for example:QiskitRuntimeService(private_endpoint = True)
. (1699) -
New opt-in feature to support fractional gates is added to
IBMBackend
. IBM backends currently support dynamic circuits and fractional gates exclusively and the two features cannot be used in the same primitive job. In addition, some error mitigation protocols you can use with the estimator primitive, such as PEC or PEA, may not support gate twirling with the fractional gates. Since Qiskit Target model doesn’t represent such constraint, we adopted the opt-in approach, where your backend target includes only fractional gates (control flow instructions) when the backend is (not) opted. This feature is controlled when you retrieve the target backend from theQiskitRuntimeService
.from qiskit_ibm_runtime import QiskitRuntimeService backend = QiskitRuntimeService(channel="ibm_quantum").backends( "name_of_your_backend", use_fractional_gates=True, )[0]
When the fractional feature is enabled, transpiled circuits may have shorter depth compared with the conventional IBM basis gates, e.g. [sx, rz, ecr].
When you use control flow instructions, e.g.
if_else
, in your circuit, you must disable the fractional gate feature to get executable ISA circuits. The choice of the instruction set is now responsibility of users.Note that this pattern may be modified or removed without deprecation when the IBM backends is updated in future development. (1715)
-
You can now use the experimental option in
qiskit_ibm_runtime.options.EstimatorOptions
to enable Probabilistic Error Amplification (PEA) error mitigation method for your estimator jobs. (1728) -
Qiskit version
1.1
is now supported and required. (1700)
Upgrade Notes
QiskitRuntimeService.backends()
now always returns a newIBMBackend
instance even when the same query is used. The backend properties and defaults data are retrieved from the server for every instance when they are accessed for the first time, while the configuration data is cached internally in the service instance. (1732)
Bug Fixes
- Fixed an issue where retrieving jobs with job() and jobs() would only return
RuntimeJob
instances, even if the job was run with a V2 primitive. Now, V2 primitive jobs will be returned correctly asRuntimeJobV2
instances. (1471) - To avoid network disruptions during long job processes, websocket errors will no longer be raised. (1518)
- Fixed the combination of
insert_multiple_cycles
andcoupling_map
options inPadDynamicalDecoupling
. This combination allows to select staggered dynamical decoupling with multiple sequence cycles in each delay that crosses the threshold set bysequence_min_length_ratios
. (1630) - Fixed a serialization issue where decoding job metadata resulted in an error. (1682)
- Fixed measurement twirling docstring which incorrectly indicated it’s enabled by default for Sampler. (1722)
- Fixed nested experimental suboptions override non-experimental suboptions. (1731)
- The backend utils method
convert_to_target
has been replaced with the convert_to_target method from Qiskit. This fixes some issues related to target generation and calibration data. (1600)
0.23.0 (2024-04-15)
Deprecation Notes
- backend.run() has been deprecated. Please use the primitives instead. More details can be found in the migration guide . (1561)
- In a future release, the
service
parameter in from_id() will be required. (1311)
New Features
- Printing
Options
andOptionsV2
will now be formatted as a table. (1490) - Add
block_ordering_callable
argument toBlockBasePadder
,PadDynamicalDecoupling
,PadDelay
, andBaseDynamicCircuitAnalysis
. This allows the user to construct blocks using an algorithm of their choosing. No assumptions or checks are made on the validity of the output that theblock_ordering_callable
produces. The motivation for this argument is that for some families of circuits, the existing functionblock_order_op_nodes
can be very slow. (1531) - The Sampler and Estimator V2 Primitives have been enhanced to incorporate custom validation procedures when the channel_strategy property is set as “q-ctrl.” This customized validation logic effectively rectifies incorrect input options and safeguards users against inadvertently disabling Q-CTRL’s performance enhancements. (1550)
SamplerV2
now supports twirling. Twirling will only be applied to those measurement registers not involved within a conditional logic. (1557)- Session details() now includes a new field,
usage_time
. Usage is defined as the time a quantum system is committed to complete a job. (1567)
Bug Fixes
RuntimeJobV2
will no longer error when the API returns an unknown status. Instead, the status from the API will directly be returned. (1476)- Fixed a bug where custom headers were not being sent in the
/jobs
request. (1508) - Fixed a bug with encoding/decoding
ParameterExpression
. (1521) - Fixed an issue where the in_final_state() method in
RuntimeJobV2
would not update the status when called. (1547)
0.22.0 (2024-03-21)
Upgrade Notes
- Modify
skip_reset_qubits
optional flag to the constructor forPadDynamicalDecoupling
. IfFalse
, dynamical decoupling is applied on qubits regardless of their state, even on delays that are at the beginning of a circuit. This option now matches the behavior in Qiskit. (1409)
New Features
- A new local testing mode is added. It allows you to validate your quantum prorams before sending them to a physical system. The local testing mode is activated if one of the fake backends in
qiskit_ibm_runtime.fake_provider
or a Qiskit Aer backend instance is used when instantiating a primitive or a session. (1495)
Bug Fixes
- Fix a bug that caused setting of
resilience_level=0
inEstimatorV2
to be ignored (and the default value used instead). (1541)
0.21.2 (2024-03-18)
Bug Fixes
- Fixed a bug where
RuntimeDecoder
could import arbitrary classes. (1527)
0.21.1
Bug Fixes
- Fixed a bug where
SamplerV1
andEstimatorV1
could not be imported because of an issue with how the aliases were defined.
0.21.0
Upgrade Notes
- Circuits that do not match the target hardware definition are no longer supported by Qiskit Runtime primitives, unless
channel_strategy="q-ctrl"
is used. See the transpilation documentation (transpile) for instructions to transform circuits and the primitive examples (run/primitives-examples) to see this coupled with operator transformations.
Deprecation Notes
-
In a future release,
backend
will be a required parameter forqiskit_ibm_runtime.Sampler
, andqiskit_ibm_runtime.Estimator
ifsession
is not specified, even when using theibm_cloud
channel.It will also be a required parameter for
qiskit_ibm_runtime.Session
andqiskit_ibm_runtime.Batch
.
Bug Fixes
- Fixed an issue with the
IBMBackend.target
where it would incorrectly exclude supported control flow operations (IfElseOp
,WhileLoop
, etc.) if a given backend supported them. - Fixed a bug where retrieving a fake backend through
FakeProviderForBackendV2.backend()
would result in a type error. - Fixes the check for ISA circuits to allow pulse gates and circuits that don’t have layout.
0.20.0
New Features
-
Add
dd_barrier
optional input to PadDynamicalDecoupling constructor to identify portions of the circuit to apply dynamical decoupling (dd) on selectively. If this string is contained in the label of a barrier in the circuit, dd is applied on the delays ending with it (on the same qubits); otherwise, it is not applied. -
Python 3.12 is now supported.
-
Sessions will now be started with a new
/sessions
endpoint that allows for different execution modes. Batch mode is now supported throughBatch
, and Session will work the same as way as before. Please see run/sessions for more information.Note that
Session
andBatch
created fromqiskit-ibm-runtime
prior to this release will no longer be supported after March 31, 2024. Please update yourqiskit-ibm-runtime
version as soon as possible before this date.Also note that using simulators with sessions is no longer supported. Users can still start sessions with simulators without any issues but a session will not actually be created. There will be no session ID.
-
Sessions started with qiskit_ibm_runtime.IBMBackend.open_session() will use the new
/sessions
endpoint.The sessions functionality will not change but note that
backend.run()
sessions prior to this release will no longer be supported after March 31, 2024. Please update yourqiskit-ibm-runtime
version as soon as possible before this date.
Deprecation Notes
- Circuits that do not match the target hardware definition will no longer be supported after March 1, 2024. See the transpilation documentation (transpile) for instructions to transform circuits and the primitive examples (run/primitives-examples) to see this coupled with operator transformations.
Bug Fixes
- Fix assignment of instruction durations when scheduling circuits with control flow. Prior to this fix, the indices for instructions on inner blocks were not mapped to the physical indices in the outer dag.
Other Notes
- The
InstructionDurations
durations input is now also required for the constructor ofPadDelay
.
0.19.1
Upgrade Notes
- Extend
DynamicCircuitInstructions.from_backend()
to extract and patch durations from bothBackendV1
andBackendV2
objects. Also addDynamicCircuitInstructions.from_target()
to use aTarget
object instead.
Bug Fixes
- Fix the patching of
DynamicCircuitInstructions
for instructions with durations that are not in units ofdt
. - Fixed an issue with the
qpy.dump()
function, when theuse_symengine
flag was set to a truthy object that evaluated toTrue
but was not actually the booleanTrue
the generated QPY payload would be corrupt.
0.19.0
Upgrade Notes
- qiskit-ibm-provider is pending deprecation, and therefore will no longer be a dependency for qiskit-ibm-runtime.
- qiskit-ibm-runtime is now compatible with Qiskit versions >= 0.45, including 1.0.0.
0.18.0
New Features
- Added a new parameter, dynamic_circuits to backends() to allow filtering of backends that support dynamic circuits.
- Added
max_time
parameter toIBMBackend.open_session()
. - Added a method
RuntimeJob.queue_info()
to get the queue information from the backend. This feature was transferred fromqiskit_ibm_provider
.
Deprecation Notes
- runtime() has been deprecated.
Bug Fixes
- Many methods in RuntimeJob require retrieving the job data from the API with
job_get()
. This API call will now exclude theparams
field by default because they are only necessary in qiskit_ibm_runtime.RuntimeJob.inputs().
0.17.0
New Features
- Added a new method properties() which returns the backend properties of the job at the time the job was run.
- details() has a new field, activated_at, which is the timestamp of when the session was changed to active.
Bug Fixes
-
When a single backend is retrieved with the
instance
parameter,service.backend('ibm_torino', instance='ibm-q/open/main') # raises error if torino is not in ibm-q/open/main but in a different instance # the user has access to service = QiskitRuntimeService(channel="ibm_quantum", instance="ibm-q/open/main") service.backend('ibm_torino') # raises the same error
if the backend is not in the instance but in a different one the user has access to, an error will be raised. The same error will now be raised if an instance is passed in at initialization and then a backend not in that instance is retrieved.
-
Fixed an issue where retrieving the coupling_map of some backends would result in a NameError.
0.16.0
Prelude
Sessions are now thread-safe and allow for multiple concurrent interactive experiments.
New Features
- Sessions are now thread-safe.
Upgrade Notes
- Methods related to using custom programs are removed.
Bug Fixes
- If a cloud instance that is
q-ctrl
enabled is used whileq-ctrl
is not passed in as thechannel_strategy
, an error will be raised.
0.15.1
Bug Fixes
- Reverting 0.15.0 changes to from_id() because it was a breaking change without proper deprecation.
0.15.0
New Features
-
A new module qiskit_ibm_runtime.fake_provider, has been added to provide access to a series of fake backends derived from snapshots of IBM Quantum devices. This functionality was originally provided by the
qiskit.providers.fake_provider
module, but will soon be deprecated in favor of qiskit_ibm_runtime.fake_provider.The snapshots provided by the fake backends are useful for local testing of the transpiler and performing local noisy simulations of the system before running on real devices. Here is an example of using a fake backend for transpilation and simulation:
from qiskit import QuantumCircuit from qiskit import transpile from qiskit_ibm_runtime.fake_provider import FakeManilaV2 # Get a fake backend from the fake provider backend = FakeManilaV2() # Create a simple circuit circuit = QuantumCircuit(3) circuit.h(0) circuit.cx(0,1) circuit.cx(0,2) circuit.measure_all() # Transpile the ideal circuit to a circuit that can be directly executed by the backend transpiled_circuit = transpile(circuit, backend) # Run the transpiled circuit using the simulated fake backend job = backend.run(transpiled_circuit) counts = job.result().get_counts()
-
Added support for
backend.run()
. The functionality is similar to that inqiskit-ibm-provider
. -
An error will be raised during initialization if
q-ctrl
is passed in as thechannel_strategy
and the account instance does not haveq-ctrl
enabled. -
Removed storing result in
RuntimeJob._results
. Instead retrieve results every time theresults()
method is called.
Deprecation Notes
- Usage of the
~/.qiskit/qiskitrc.json
file for account information has been deprecated. Use~/.qiskit/qiskit-ibm.json
instead.
Bug Fixes
- Fixed an issue where canceled and failed jobs would return an invalid result that resulted in a type error, preventing the actual error from being returned to the user.
- A warning will be raised at initialization if the DE environment is being used since not all features are supported there.
- The
backend
parameter in from_id() is being deprecated because sessions do not support multiple backends. Additionally, theservice
parameter is no longer optional. - The
circuit_indices
andobservable_indices
run inputs for Estimator and Sampler have been completely removed.
Other Notes
- Added migration code for running
backend.run
in qiskit_ibm_runtime instead of in qiskit_ibm_provider.
0.14.0
New Features
- There is a new class,
qiskit_ibm_runtime.Batch
that currently works the same way as qiskit_ibm_runtime.Session but will later be updated to better support submitting multiple jobs at once. - Arbitrary keys and values are no longer allowed in
Options
.
Deprecation Notes
- Custom programs are being deprecated as of qiskit-ibm-runtime 0.14.0 and will be removed on November 27, 2023. Users can instead convert their custom programs to use Qiskit Runtime primitives with Qiskit Serverless. Refer to the migration guide for instructions: https://qiskit.github.io/qiskit-serverless/migration/migration_from_qiskit_runtime_programs.html
0.13.0
New Features
-
Added a new method, details() that returns information about a session, including: maximum session time, active time remaining, the current state, and whether or not the session is accepting jobs.
Also added status(), which returns the current status of the session.
-
At initialization, if not passed in directly, the default
instance
selected by the provider will be logged at the “INFO” level. When running a job, if the backend selected is not in the default instance but in a different instance the user also has access to, that instance will also be logged.
Upgrade Notes
-
qiskit_ibm_runtime.Session.close() has been updated to mark a
Session
as no longer accepting new jobs. The session won’t accept more jobs but it will continue to run any queued jobs until they are done or the max time expires. This will also happen automatically when the session context manager is exited. When a session that is not accepting jobs has run out of jobs to run, it’s immediately closed, freeing up the backend to run more jobs rather than wait for the interactive timeout.The old close method behavior has been moved to a new method, qiskit_ibm_runtime.Session.cancel(), where all queued jobs within a session are cancelled and terminated.
Bug Fixes
- Fixed a bug where
shots
passed in as a numpy type were not being serialized correctly. - Fixed a bug in target_history() where the datetime parameter was not being used to retrieve backend properties from the specified date.
0.12.2
New Features
- If using a
channel_strategy
, only backends that support thatchannel_strategy
will be accessible to the user. - Added the option to define a default account in the account json file. To select an account as default, define
set_as_default=True
inQiskitRuntimeService.save_account()
. - Added new method
Session.from_id
which creates a new session with a given id. - There will now be a warning if a user submits a job that is predicted to exceed their system execution time monthly quota of 10 minutes. This only applies to jobs run on real hardware in the instance
ibm-q/open/main
. If the job does end up exceeding the quota, it will be canceled.
Upgrade Notes
- Job error messages now include the error code. Error codes can be found in errors.
0.12.1
New Features
- Users can use a new environment variable,
USAGE_DATA_OPT_OUT
to opt out of user module usage tracking by setting this value toTrue
. Additionally, only certain qiskit modules will be tracked instead of all modules that begin with qiskit or qiskit_. - Users can now pass in a value of
default
to thechannel_strategy
parameter in qiskit_ibm_runtime.QiskitRuntimeService. Now, if an account is configured with a certain channel strategy, the user can override it by passing indefault
. - The Sampler and Estimator primitives have been enhanced to incorporate custom validation procedures when the channel_strategy property within the :class:qiskit_ibm_runtime.QiskitRuntimeService is configured as “q-ctrl.” This customized validation logic effectively rectifies incorrect input options and safeguards users against inadvertently disabling Q-CTRL’s performance enhancements.
Bug Fixes
- Retrieving backend properties with properties() now supports passing a
datetime
parameter to retrieve properties from a past date. - The
noise_factors
andextrapolator
options in qiskit_ibm_runtime.options.ResilienceOptions will now default toNone
unlessresilience_level
is set to 2. Only options relevant to the resilience level will be set, so when usingresilience_level
2,noise_factors
will still default to(1, 3, 5)
andextrapolator
will default toLinearExtrapolator
. Additionally, options with a value ofNone
will no longer be sent to the server. - Job error messages will no longer be returned in all uppercase.
- The max_execution_time option is now based on system execution time instead of wall clock time. System execution time is the amount of time that the system is dedicated to processing your job. If a job exceeds this time limit, it is forcibly cancelled. Simulator jobs continue to use wall clock time.
0.12.0
New Features
-
Added a
global_service
, so that if the user defines a QiskitRuntimeService, it will be used by the primitives, even if the service is not passed to them explicitly. For example:from qiskit_ibm_runtime import QiskitRuntimeService, Sampler service = QiskitRuntimeService(channel="ibm_quantum") # Sampler._service field will be initialized to ``service`` sampler = Sampler(backend="ibmq_qasm_simulator")
-
Added a new method, qiskit_ibm_runtime.QiskitRuntimeService.instances() that returns all instances(hub/group/project) the user is in. This is only for the
ibm_quantum
channel since theibm_cloud
channel does not have multiple instances. -
Added validations for options on the second level of the dict, i.e., for each of resilience, simulator, execution, and transpilation, check that their options are supported. Otherwise throw an exception.
-
There is a new parameter,
channel_strategy
that can be set in the initialization of qiskit_ibm_runtime.QiskitRuntimeService or saved in qiskit_ibm_runtime.QiskitRuntimeService.save_account(). Ifchannel_strategy
is set toq-ctrl
, all jobs within the service will use the Q-CTRL error mitigation strategy.
Upgrade Notes
- Circuits and other input parameters will no longer be automatically stored in runtime jobs. They can still be retrieved with qiskit_ibm_runtime.RuntimeJob.inputs().
Deprecation Notes
- The
noise_amplifier
resilience options is deprecated. After the deprecation period, only local folding amplification will be supported. Refer to https://github.com/qiskit-community/prototype-zne for global folding amplification.
Bug Fixes
- When running on channel “ibm_cloud”, it is possible not to specify the backend. In this case, the system selects one of the available backends for this service. Issue #625 https://github.com/Qiskit/qiskit-ibm-runtime/issues/625 reported that the the backend returned by
job.backend()
was not always the actual backend on which the job was run. This PR fixes this bug. - Fixes a race condition in the test test_cancel_running_job() in test_job.py where job cancellation could not be performed. Refer to #1019 <https://github.com/Qiskit/qiskit-ibm-runtime/issues/1019>_ for more details.
- Previously we added validation when jobs were run to make sure the number of circuits was not greater than the maximum for that backend,
backend.max_circuits
. This limit isn’t actually necessary for primtives run from within a session.
0.11.3
New Features
- Added reason for failure when invoking the method error_message().
- Added a new property, usage_estimation() that returns the estimated system execution time,
quantum_seconds
. System execution time represents the amount of time that the system is dedicated to processing your job. - Raise an exception if the number of circuits passed to
_run_primitive()
exceeds the number of circuits supported on the backend. - There is a new method update_tags() that can be used to update the
job_tags
of a job. - If
instance
is provided as parameter to qiskit_ibm_runtime.QiskitRuntimeService, then this is used as a filter inQiskitRuntimeService.backends()
. Ifinstance
is not recognized as one of the provider instances, an exception will be raised. Previously, we only issued a warning.
0.11.2
New Features
-
If a job has been cancelled, and job.result() is requested, throw an exception rather than returning None.
-
A new method, qiskit_ibm_runtime.options.SimulatorOptions.set_backend(), allows users to more easily set simulator options for a backend.
from qiskit.providers.fake_provider import FakeManila from qiskit_aer.noise import NoiseModel # Make a noise model fake_backend = FakeManila() # Set options to include the noise model options = Options() options.simulator.set_backend(fake_backend) options.simulator.seed_simulator = 42
Bug Fixes
- Fixed infinite recursion when attempting to deepcopy an IBMBackend. Added a method
qiskit_ibm_runtime.IBMBackend.deepcopy()
. - Fixed an issue where circuit metadata was not being serialized correctly resulting in a type error.
0.11.1
Deprecation Notes
- In qiskit_ibm_runtime.RuntimeJob.metrics(), the bss field will be replaced by usage.
0.11.0
New Features
-
When retrieving a job with
qiskit_ibm_runtime.IBMRuntimeService.job()
theparams
will no longer be returned from the API. They will instead be loaded loazily when they are actually needed in qiskit_ibm_runtime.RuntimeJob.inputs(). -
Added warning when the backend is not active in QiskitRuntimeService.run.
-
Support input of type
CouplingMap
when given as simulator option. Previously we supported, for example:options.simulator = {"coupling_map": [[0, 1], [1, 0]]}
Now we also support the following:
options.simulator = {"coupling_map": CouplingMap.from_line(10)}
Upgrade Notes
- A default session is no longer open for you if you pass a backend name or backend instance to qiskit_ibm_runtime.Sampler or qiskit_ibm_runtime.Estimator constructors. The primitive will instead run without a session. In addition, you should now use the
backend
parameter to pass a backend name or instance instead of thesession
parameter (which can continue to be used to pass a session). - The first parameter of the qiskit_ibm_runtime.Sampler and qiskit_ibm_runtime.Estimator constructors is now
backend
instead ofsession
.
Deprecation Notes
- Passing a backend name or backend instance to the
session
parameter when initializing a qiskit_ibm_runtime.Sampler or qiskit_ibm_runtime.Estimator has been deprecated. Please use thebackend
parameter instead. You can continue to pass a session using thesession
parameter.
0.10.0
New Features
- Python 3.11 is now supported.
Upgrade Notes
- Added error messages in case the user defines unsupported values for ‘max_execution_time’. Previously, this validation was done on the server side.
Bug Fixes
- Added deserialization of the params of RuntimeJob.inputs. Previously, the circuits were returned in serialized format. Fixes issue #829.
- Allow for users to retrieve all backends even if one of the backends has a missing configuration. The backend without a configuration will not be returned.
0.9.4
New Features
- Added methods to validate input options to
transpilation
andenvironment
options.
Upgrade Notes
- When constructing a backend
qiskit.transpiler.Target
, faulty qubits and gates from the backend configuration will be filtered out.
Deprecation Notes
-
The deprecated arguments
circuits
,parameters
,service
, andskip_transpilation
have been removed from Sampler.Similarly, the deprecated arguments
circuits
,observables
,parameters
,service
, andskip_transpilation
have been removed from Estimator.In QiskitRuntimeService, the
auth
parameter has been removed. Additionally, theinstance
,job_tags
, andmax_execution_time
paramters have been removed from qiskit_ibm_runtime.QiskitRuntimeService.run(). They can be passed in through RuntimeOptions instead.Within RuntimeOptions,
backend_name
is no longer supported. Please usebackend
instead.
Bug Fixes
- Fixed a bug where retrieving a job from a backend without
noise_model
orseed_simulator
options would result in a key error.
0.9.3
Upgrade Notes
- Added error messages in case the user defines unsupported values for ‘optimization_level’ or for ‘resilience_level’. Added validation checking for options given as input to
resilience
. Previously, this validation was done on the server side. By adding them on the client side, response will be much faster upon failure. The environment variableQISKIT_RUNTIME_SKIP_OPTIONS_VALIDATION
is used to control validation. If set, validation will be skipped. - Backend configurations are no longer loaded when QiskitRuntimeService is initialized. Instead, the configuration is only loaded and cached during get_backend() and backends().
Bug Fixes
- When creating an Option object and passing an input option to
resilience_options
, this option was included inresilience_options
, but the other, default options were removed. This was fixed, so now inputs are handled correctly, like other option types.
0.9.2
New Features
- Added a new argument called
session_time
to the program_run method and qiskit_ibm_runtime.RuntimeOptions. Now values entered by the user for sessionmax_time
will be sent to the server side assession_time
. This allows users to specify different values for sessionmax_time
andmax_execution_time
. - Added the method target_history(). This method is similar to target(). The difference is that the new method enables the user to pass a datetime parameter, to retrieve historical data from the backend.
Upgrade Notes
- Accept all options on given on level 1 and assign them to the appropriate hierarchical option type. For example, if the user provides
options = {"shots": 10}
as input to Sampler/Estimator, this will be interpreted asoptions = {"execution: {"shots": 10}}
. - If a job is returned without a backend, retrieving the backend through qiskit_ibm_runtime.RuntimeJob.backend() will re-retrieve data from the server and attempt to update the backend. Additionally,
job_id
andbackend
, which were deprecated attributes of qiskit_ibm_runtime.RuntimeJob have now been removed. - Added a user warning when the user passes an option that is not supported in Options.
Bug Fixes
- Fixed a bug where the default values for
optimization_level
and forresilience_level
were not being set correctly. - Fixed an issue where if no backend was selected,
optimization_level
andresilience_level
would default toNone
, causing the job to fail. - If an instance is passed in to qiskit_ibm_runtime.QiskitRuntimeService.get_backend() and then the backend is used in a session, all jobs within the session will be run from the original instance passed in.
- Removed additional decomposition of
BlueprintCircuit
s in the JSON encoder. This was introduced as a bugfix, but has since been fixed. Still doing the decomposition led to possible problems if the decomposed circuit was not in the correct basis set of the backend anymore.
0.9.1
Upgrade Notes
-
qiskit_ibm_runtime.QiskitRuntimeService.jobs() now has a
backend_name
parameter that can be used to only return jobs run with the specified backend. -
Allow the user to store account details in a file specified by the user in the parameter.
filename
. The default remains ~/.qiskit/qiskit-ibm.json. Example of usage: Ex:QiskitRuntimeService.save_account(channel="ibm_quantum", filename="~/my_account_file.json", name = "my_account", token="my_token") service = QiskitRuntimeService(channel="ibm_quantum", filename="~/my_account_file.json", name = "my_account",)
Deprecation Notes
backend
is no longer a supported option when using qiskit_ibm_runtime.Session.run(). Sessions do not support multiple cross backends. Additionally, an exception will be raised if a backend passed in through options does not match the original session backend in an active session.
Bug Fixes
ECRGate
andCZGate
mappings have been added to theTarget
constructor to fix a tranpile bug.
Other Notes
- Since error messages from a failing job may be long, we shortened them so that they begin from the last
Traceback
in the message.
0.9.0
Upgrade Notes
- Changed the default values for
optimization_level
and forresilience_level
inqiskit_ibm_runtime.Options
. If their values are defined by the user, they are not modified. If not set, if the backend is a noiseless simulator thenoptimization_level
is set to 1 andresilience_level
is set to 0; Otherwise, they are be set to 3 and 1 respectively. - session_id() and tags() were added for an easy way to return the session_id and job_tags of a job.
Bug Fixes
- Fixed a bug where jobs that did not run before a session closes are not actually run as a part of that session. Jobs should run as a part of a session even if that session is closed by the exit of the context manager.
- Fixes the issue wherein submitting a large job fails due to write operation timeout.
0.8.0
New Features
- Python 3.10 is now supported.
- Advanced resilience options can now be set under
options.resilience
. See qiskit_ibm_runtime.options.ResilienceOptions for all available options. - You can now specify a pair of result decoders for the
result_decoder
parameter of qiskit_ibm_runtime.QiskitRuntimeService.run() method. If a pair is specified, the first one is used to decode interim results and the second the final results.
Upgrade Notes
- The default
resilience_level
option for has been changed from 0 to 1. In addition, the defaultoptimization_level
option has been changed from 1 to 3.
Deprecation Notes
- The transpilation options
translation_method
andtiming_constraints
have been deprecated.
Bug Fixes
- If a qiskit_ibm_runtime.IBMBackend instance is passed to the qiskit_ibm_runtime.Session constructor, the service used to initialize the
IBMBackend
instance is used for the session instead of the default account service.
0.7.0
New Features
qiskit_ibm_runtime.Options
class now accepts arbitrary keyword arguments. This allows users to specify new options to the primitive programs without upgradingqiskit_ibm_runtime
. These arbitrary keyword arguments, however, are not validated.- The qiskit_ibm_runtime.options.EnvironmentOptions class now accepts a
callback
parameter. This parameter can be used to stream the interim and final results of the primitives. - The
qiskit_ibm_runtime.Options
class now acceptsmax_execution_time
as a first level option andjob_tags
as an option underenvironment
. qiskit_ibm_runtime.RuntimeOptions has also been updated to include these two parameters.
Upgrade Notes
- This version of qiskit-ibm-runtime requires qiskit-terra version 0.22 or higher. The
requirements.txt
file has been updated accordingly.
Deprecation Notes
- Qiskit Runtime programs
torch-train
,torch-infer
,sample-expval
,sample-program
, andquantum_kernal_alignment
have been deprecated due to low usage. - Passing
instance
parameter to the qiskit_ibm_runtime.QiskitRuntimeService.run() has been deprecated. Instead, you can pass theinstance
parameter inside theoptions
parameter. - Passing
job_tags
andmax_execution_time
as parameters to qiskit_ibm_runtime.QiskitRuntimeService has been deprecated. Please pass them insideoptions
.
Bug Fixes
- Fixes the missing section on retrieving jobs in the how-to guide.
0.7.0rc2
Upgrade Notes
- Added a validation check to run(). It raises an error if there is no classical bit.
- Sampler is updated to return
SamplerResult
withSamplerResult.quasi_dists
as a list ofQuasiDistrbution
. It used to set a list ofdict
asSamplerResult.quasi_dists
, but it did not follow the design ofSamplerResult
. - The RuntimeJob class is now a subclass of
qiskit.providers.Job
.
Deprecation Notes
job_id
andbackend
attributes of qiskit_ibm_runtime.RuntimeJob have been deprecated. Please use qiskit_ibm_runtime.RuntimeJob.job_id() and qiskit_ibm_runtime.RuntimeJob.backend() methods instead.- The
backend_name
attribute in qiskit_ibm_runtime.RuntimeOptions is deprecated and replaced bybackend
.
0.7.0rc1
Prelude
There are significant changes to how primitives are invoked within a session, and the options available to the primitives. Please review the rest of the release notes and the tutorials for full information.
New Features
-
You can now invoke the same or different primitive programs multiple times within a session. For example:
from qiskit_ibm_runtime import QiskitRuntimeService, Session, Sampler, Estimator, Options from qiskit.test.reference_circuits import ReferenceCircuits from qiskit.circuit.library import RealAmplitudes from qiskit.quantum_info import SparsePauliOp # Initialize account. service = QiskitRuntimeService() # Set options, which can be overwritten at job level. options = Options(optimization_level=1) # Prepare inputs. bell = ReferenceCircuits.bell() psi = RealAmplitudes(num_qubits=2, reps=2) H1 = SparsePauliOp.from_list([("II", 1), ("IZ", 2), ("XI", 3)]) theta = [0, 1, 1, 2, 3, 5] with Session(service=service, backend="ibmq_qasm_simulator") as session: # Submit a request to the Sampler primitive within the session. sampler = Sampler(session=session, options=options) job = sampler.run(circuits=bell) print(f"Sampler results: {job.result()}") # Submit a request to the Estimator primitive within the session. estimator = Estimator(session=session, options=options) job = estimator.run( circuits=[psi], observables=[H1], parameter_values=[theta] ) print(f"Estimator results: {job.result()}")
-
A new
qiskit_ibm_runtime.Options
class is introduced. This class allows you to auto-complete options related to primitive programs. For example:from qiskit_ibm_runtime import Session, Sampler, Options from qiskit.test.reference_circuits import ReferenceCircuits options = Options() options.optimization_level = 3 # This can be done using auto-complete. with Session(backend="ibmq_qasm_simulator") as session: # Pass the options to Sampler. sampler = Sampler(session=session, options=options) # Or at job level. job = sampler.run(circuits=ReferenceCircuits.bell(), shots=4000)
-
qiskit_ibm_runtime.RuntimeJob has a new method metrics(). This method returns the metrics of a job, which includes timestamp information.
-
The qiskit_ibm_runtime.QiskitRuntimeService
channel
can now be stored as an environment variable,QISKIT_IBM_CHANNEL
. This way, when using Runtime Primitives, the service does not have to be instantiated manually and can instead be created directly from environment variables.
Upgrade Notes
-
Raise
RuntimeJobMaxTimeoutError
when a job runs for too long so that it can be handled appropriately by programs. -
The experimental parameters
transpilation_settings
,resilience_settings
, andmax_time
to the :class:`qiskit_ibm_runtime.Sampler and qiskit_ibm_runtime.Estimator constructors have been removed. You can instead use theqiskit_ibm_runtime.Options
class to specify the settings, andmax_time
can be specified when starting a new session. For example:from qiskit_ibm_runtime import Session, Sampler, Options options = Options() # This can be done using auto-complete. option.optimization_level = 3 options.resilience_level = 1 with Session(max_time="2h") as session: # Pass the options to Sampler. sampler = Sampler(session=session, options=options)
-
Since some accounts have many runtime programs, caching a list of all programs on the first call of
programs()
has been removed. Instead, programs will only be cached up to thelimit
given, which has a default value of 20.
Deprecation Notes
-
Invoking qiskit_ibm_runtime.Sampler and qiskit_ibm_runtime.Estimator as context managers has been deprecated. You can instead use the qiskit_ibm_runtime.Session class to create a new session and invoke one or more primitives within the session.
As a result, passing input parameters, such as
circuits
,observables
, andparameter_values
, as well asservice
to the constructors ofSampler
andEstimator
has also been deprecated. The inputs can now be passed to therun()
method of the primitive classes, andservice
can be passed to qiskit_ibm_runtime.Session when starting a new session. -
Passing
skip_transpilation
to the :class:`qiskit_ibm_runtime.Sampler and qiskit_ibm_runtime.Estimator constructors has been deprecated. You can instead use theqiskit_ibm_runtime.Options
class to specify this option. For example:from qiskit_ibm_runtime import Options options = Options() # This can be done using auto-complete. options.transpilation.skip_transpilation = True
Bug Fixes
- Fixes issue #428 by raising the minimum required
qiskit-terra
version to0.21.0
, since latest version ofqiskit-ibm-runtime
is not compatible with0.20.0
or earlier ofqiskit-terra
.
0.6.0
Upgrade Notes
-
When migrating from
qiskit-ibmq-provider
youribm_quantum
channel credentials will get automatically copied over from the qiskitrc file and a qiskit-ibm.json file will get created if one doesn’t exist. You have to just initialize QiskitRuntimeService class without passing any parameters to use this copied over defaultibm_quantum
account.Ex:
from qiskit_ibm_runtime import QiskitRuntimeService service = QiskitRuntimeService()
-
IBMEstimator
class which was deprecated earlier is now removed. Use Estimator class going forward. -
IBMRuntimeService
class which was deprecated earlier is now removed. Use QiskitRuntimeService class going forward.
0.5.0
Prelude
This release leverages the API and Queue enhancements to become more runtime session aware. As a result when using the primitives (sampler and estimator), runtime jobs in the same session will skip to the front of the queue, thereby speeding up the runtime session, once it has started.
New Features
-
The
service
object which is an instance of QiskitRuntimeService class can now be accessed from IBMBackend class using theservice
property.Ex:
backend = service.get_backend("ibmq_qasm_simulator") backend.service # QiskitRuntimeService instance used to instantiate the backend
Upgrade Notes
-
jobs() has two new parameters,
created_after
andcreated_before
. These can be used to filter jobs by creation date in local time. -
The parameters
circuit_indices
andobservable_indices
when callingestimator
are now deprecated and will be removed in a future release. You can now pass either indices or objects using thecircuits
andobservables
parameters.Ex:
with Estimator( circuits=[qc1, qc2], observables=[H1, H2, H3], service=service, options=options ) as estimator: # pass circuits and observables as indices result = estimator(circuits=[0, 1], observables=[0, 1], parameter_values=[theta1, theta2]) # pass circuits and observables as objects result = estimator(circuits=[qc1, qc2], observables=[H1, H3], parameter_values=[theta1, theta3])
-
The parameters
circuit_indices
andobservable_indices
when callingestimator
are now deprecated and will be removed in a future release. You can now pass either indices or objects using thecircuits
andobservables
parameters.Ex:
with Sampler( circuits=[qc1, qc2], service=service, options=options ) as sampler: # pass circuits as indices result = sampler(circuits=[0, 1], parameter_values=[theta1, theta2]) # pass circuit as objects result = sampler(circuits=[qc1, qc2], parameter_values=[theta2, theta3])
-
The
session_id
, which is the Job ID of the first job in a runtime session can now be used as a filter in jobs() with the parametersession_id
. -
run() now supports a new parameter,
job_tags
. These tags can be used when filtering jobs with jobs(). -
run() now supports a new parameter,
max_execution_time
, which can be used to override the default program maximum execution time. It should be less than or equal to the program maximum execution time. -
jobs() has a new parameter,
descending
. This parameter defaults toTrue
, where jobs will be returned in descending order based on creation date. -
RuntimeJobTimeoutError
is now raised when thetimeout
set in result() or wait_for_final_state() expires. -
When initializing QiskitRuntimeService and an invalid token is used,
IBMNotAuthorizedError
will be raised instead ofRequestsApiError
. -
IBMSampler
class which was deprecated earlier is now removed. Use Sampler class going forward. -
qubit_properties() will now return a sub class of
QubitProperties
calledIBMQubitProperties
and will expose anharmonicity in addition to the t1, t2 and frequency already exposed by theQubitProperties
class.
0.4.0
Upgrade Notes
-
IBMRuntimeService
has been renamed toQiskitRuntimeSerice
.IBMRuntimeService
class is now deprecated and will be removed in a future release.Example:
Before:
from qiskit_ibm_runtime import IBMRuntimeService service = IBMRuntimeService(channel="ibm_cloud", token="...", instance="...")
After:
from qiskit_ibm_runtime import QiskitRuntimeService service = QiskitRuntimeService(channel="ibm_cloud", token="...", instance="...")
-
IBMEstimator
class is now deprecated and will be removed in a future release. Use Estimator class going forward.Example:
Before:
from qiskit_ibm_runtime import IBMRuntimeService, IBMEstimator service = IBMRuntimeService(channel="ibm_cloud", token="...", instance="...") estimator_factory = IBMEstimator(service=service, backend="ibmq_qasm_simulator") with estimator_factory(circuits=[qc], observables="...", parameters="...") as estimator: result = estimator(circuit_indices=[0], ...)
After:
from qiskit_ibm_runtime import QiskitRuntimeService, Estimator service = QiskitRuntimeService(channel="ibm_cloud", token="...", instance="...") with Estimator( circuits=[qc], observables="...", parameters="...", service=service, options={ "backend": "ibmq_qasm_simulator" }, # or IBMBackend<"ibmq_qasm_simulator"> ) as estimator: result = estimator(circuit_indices=[0], ...)
-
IBMSampler
class is now deprecated and will be removed in a future release. Use Sampler class going forward.Example:
Before:
from qiskit_ibm_runtime import IBMRuntimeService, IBMSampler service = IBMRuntimeService(channel="ibm_cloud", token="...", instance="...") sampler_factory = IBMSampler(service=service, backend="ibmq_qasm_simulator") with sampler_factory(circuits=[qc], parameters="...") as sampler: result = sampler(circuit_indices=[0], ...)
After:
from qiskit_ibm_runtime import QiskitRuntimeService, Sampler service = QiskitRuntimeService(channel="ibm_cloud", token="...", instance="...") with Sampler( circuits=[qc], parameters="...", service=service, options={ "backend": "ibmq_qasm_simulator" }, # or IBMBackend<"ibmq_qasm_simulator"> ) as sampler: result = sampler(circuit_indices=[0], ...)
Deprecation Notes
IBMRuntimeService
,IBMEstimator
andIBMSampler
classes have been deprecated and will be removed in a future release. Use QiskitRuntimeService, Estimator and Sampler classes instead. See upgrade notes section for a detailed explanation with examples.
0.3.0
Upgrade Notes
- A new parameter
channel
has now been added toqiskit_ibm_runtime.IBMRuntimeService
class and also to methods likesave_account()
,saved_accounts()
anddelete_account()
. It can be set toibm_quantum
oribm_cloud
to authenticate to either of the two different channels through which Qiskit Runtime service is currently offered.channel
replaces theauth
parameter which has now been deprecated.
Deprecation Notes
- The
auth
parameter toqiskit_ibm_runtime.IBMRuntimeService
class and also to methods likesave_account()
,saved_accounts()
anddelete_account()
has now been deprecated and will be removed in a future release. Please use the newchannel
parameter instead.
Bug Fixes
- Fixed #291 where passing a single
QuantumCircuit
to sampler or estimator primitives was throwing an error.
0.2.0
New Features
qiskit_ibm_runtime.IBMEstimator
andqiskit_ibm_runtime.IBMSampler
classes now allow you to easily interact with theestimator
andsampler
primitive programs. Refer to the examples in the respective class doc strings to learn more about how to use them.
Bug Fixes
- Fixed a bug where qiskit_ibm_runtime.RuntimeJob.wait_for_final_state() would result in a NoneType error if the job already completed and qiskit_ibm_runtime.RuntimeJob.status() was called beforehand.
0.1.0
Prelude
qiskit-ibm-runtime is a new Python API client for accessing the quantum programs, systems and simulators at IBM Quantum via the Qiskit Runtime Service.
This new package is built upon the work already done in qiskit.providers.ibmq.runtime module in the qiskit-ibmq-provider package and replaces it going forward. The runtime module in qiskit-ibmq-provider package is now deprecated.
qiskit-ibm-runtime is not included as part of Qiskit meta package and thereby you have to install it separately using pip install qiskit-ibm-runtime
.
New Features
qiskit_ibm_runtime.IBMRuntimeService.least_busy()
will now allow you find the least busy backend.
Upgrade Notes
-
qiskit-ibm-runtime package no longer uses the $HOME/.qiskit/qiskitrc file used by qiskit-ibmq-provider to save credentials. Credentials are now stored in a JSON format in $HOME/.qiskit/qiskit-ibm.json file when you use
qiskit_ibm_runtime.IBMRuntimeService.save_account()
method.You can now save multiple credentials and give an optional name for each credential.
-
Qiskit Runtime service is accessible using an IBM Quantum (legacy) account or an IBM Cloud (cloud) account. qiskit-ibm-runtime enables you to connect to either of these accounts:
# Legacy from qiskit_ibm_runtime import IBMRuntimeService service = IBMRuntimeService(auth="legacy", token="abc") # Cloud from qiskit_ibm_runtime import IBMRuntimeService service = IBMRuntimeService(auth="cloud", token="abc", instance="IBM Cloud CRN or Service instance name")
-
qiskit_ibm_runtime.IBMBackend class now implements the
qiskit.providers.BackendV2
interface and provides flatter access to the configuration of a backend, for example:# BackendV1: backend.configuration().n_qubits # BackendV2: backend.num_qubits
Only breaking change when compared to BackendV1 is backend.name is now an attribute instead of a method.
Refer to the qiskit_ibm_runtime.IBMBackend class doc string for a list of all available attributes.
-
If you used qiskit.providers.ibmq.AccountProvider.get_backend method (for example,
provider.get_backend("ibmq_qasm_simulator")
) in the qiskit-ibmq-provider package, it’s equivalent method in this new package isqiskit_ibm_runtime.IBMRuntimeService.backend()
:service = IBMRuntimeService() backend = service.backend("ibmq_qasm_simulator")
-
It is now optional to specify a hub/group/project upfront when connecting to the legacy IBM Quantum account. The hub/group/project is selected in the following order.
- hub/group/project if passed via
instance
parameter when initializingqiskit_ibm_runtime.IBMRuntimeService
- the specific hub/group/project required by the backend specified when calling
qiskit_ibm_runtime.IBMRuntimeService.run()
- the default set previously via
qiskit_ibm_runtime.IBMRuntimeService.save_account()
- a premium hub/group/project in your account
- open access hub/group/project
- hub/group/project if passed via
-
It is now optional to specify backend_name in options when executing
qiskit_ibm_runtime.IBMRuntimeService.run()
method when using cloud runtime (IBM Cloud only). The server will automatically pick a backend and return the name. -
qiskit.providers.ibmq.runtime.IBMRuntimeService.logout method in qiskit-ibmq-provider which was used to clear authorization cache on the server has been removed.
-
Python 3.6 has reached end of life and will no longer be supported in the new qiskit-ibm-runtime package.
-
qiskit.providers.ibmq.runtime.IBMRuntimeService.run_circuits method in qiskit-ibmq-provider has been removed and will be replaced by the
Sampler
primitive program. -
qiskit_ibm_runtime.IBMRuntimeService.run()
method now accepts runtime execution options as qiskit_ibm_runtime.RuntimeOptions class in addition to already supported Dict. backend_name, image and log_level are the currently available options. -
Final result is also streamed now after interim results when you specify a
callback
toqiskit_ibm_runtime.IBMRuntimeService.run()
or qiskit_ibm_runtime.RuntimeJob.stream_results().
0.1.0rc2
New Features
- For convenience, you can now set the
IBM Cloud service name
as a value for the accountinstance
parameter. If you choose to set the name instead of theCRN
, the initialization time of theqiskit_ibm_runtime.IBMRuntimeService
class is slightly higher because the requiredCRN
value is internally resolved via IBM Cloud APIs.
Bug Fixes
- qiskit_ibm_runtime.utils.json.RuntimeEncoder and qiskit_ibm_runtime.utils.json.RuntimeDecoder have been updated to handle instances of the Instruction class.
- Fixed an issue where numpy ndarrays with object types could not be serialized. qiskit_ibm_runtime.utils.json.RuntimeEncoder and qiskit_ibm_runtime.utils.json.RuntimeDecoder have been updated to handle these ndarrays.
0.1.0rc1
New Features
- You can now pass
instance
parameter in the hub/group/project format toqiskit_ibm_runtime.IBMRuntimeService.jobs()
to filter jobs. Currently only supported for legacy authentication. - You can now use the qiskit_ibm_runtime.RuntimeJob.interim_results() method to retrieve runtime program interim results. Note that interim results will only be available for up to two days.
Upgrade Notes
- In order to be consistent with other properties in qiskit_ibm_runtime.RuntimeJob class the job_id and backend methods have been converted to properties.
- When uploading a program with
qiskit_ibm_runtime.IBMRuntimeService.upload_program()
, the program description is now optional. - When printing programs with
qiskit_ibm_runtime.IBMRuntimeService.pprint_programs()
,backend_requirements
will now be listed.
Bug Fixes
- Fixed an issue with JSON encoding and decoding when using
ParameterExpression
s in conjunction with Qiskit Terra 0.19.1 and above. Previously, theParameter
instances reconstructed from the JSON output would have different unique identifiers, causing them to seem unequal to the input. They will now have the correct backing identities.