Qiskit Runtime client release notes
0.43 (2025-10-14)
Deprecation Notes
-
Added a new
targetargument to the initializer following transpiler analysis and padding passes:ALAPScheduleAnalysis,PadDelay,PadDynamicalDecoupling,BlockBasePadder. This change aligns these passes with the broader Qiskit transpiler architecture, and supersedes the use of thedurationsargument.The
DynamicCircuitInstructionDurationsclass, used in custom scheduling passes, has been deprecated as ofqiskit-ibm-runtimev0.43. This class was optimized for scheduling operations on Eagle processors, and it has fallen out of date with the current offering of Heron processors. This class was used to define the`durationsargument in the scheduling passes listed above (ALAPScheduleAnalysis,PadDelay,PadDynamicalDecoupling,BlockBasePadder). The argument is also deprecated and will be removed in a future release. Users are encouraged to migrate to thetargetargument. (2403) -
The
RuntimeOptionsclass is deprecated. This class was originally only meant to be used with custom programs and is no longer needed. (2435)
New Features
-
The
qiskit_ibm_runtimepackage has been extended with two new modules:circuitandcircuit.library. These modules are designed to mirror the structure of the correspondingqiskitSDK modules, while providing vendor-specific implementations of circuit objects and instructions.The first addition to this new circuit library is the
MidCircuitMeasureclass. This class enables the creation of instructions that follow the naming conventionmeasure_<identifier>, which are mapped to specific mid-circuit measurement hardware instructions matching that pattern. The default name for this instruction is"measure_2".Example usage:
from qiskit import QuantumCircuit from qiskit_ibm_runtime.circuit import MidCircuitMeasure measure_2 = MidCircuitMeasure() measure_3 = MidCircuitMeasure("measure_3") qc = QuantumCircuit(1, 1) qc.append(measure_2, [0], [0]) qc.append(measure_3, [0], [0]) qc.measure([0], [0])Output:
┌────────────┐┌────────────┐┌─┐ q: ┤0 ├┤0 ├┤M├ │ Measure_2 ││ Measure_3 │└╥┘ c: ╡0 ╞╡0 ╞═╩═ └────────────┘└────────────┘The
convert_to_target()utility has been updated to support an additional"instruction_signatures"field in backend configuration files (configuration.json). This field is intended to represent non-unitary, non-standard instructions reported by the backend and should respect the following schema:"instruction_signatures" = [ { "name": "measure_2", "num_qubits": 1, "num_clbits": 1, "parameters": [], "return_type": "Bool", "description": "An alternative measurement. This can be used as a mid-circuit measurement in a dynamic circuit. ", }, { "name": "reset_2", "num_qubits": 1, "num_clbits": 1, "parameters": [], "return_type": "Bool", "description": "An alternative reset instruction.", } ]In addition to this change, the
convert_to_target()function now accepts acustom_name_mappingargument and exposes theadd_delayandfilter_faultyflags from the original core implementation. (2316) -
QiskitRuntimeService.backends()andQiskitRuntimeService.backend()have a new parameter,calibration_id. This custom calibration will be used for constructing the target and also used when executing primitive jobs on the backend. (2432) -
Added a new function
visualization.draw_circuit_schedule_timing()to plot circuit schedule timing data returned in job result metadata. This is currently a beta feature and requires the"scheduler_timing"experimental option to be set toTrue, as shown below. This is currently only available toSamplerjobs.sampler = SamplerV2(backend) sampler.options.experimental = { "execution": { "scheduler_timing": True, }, }The circuit schedule data can then be accessed from the job’s result metadata as follows:
job_result: SamplerPubResult = job.result() circuit_schedule = job_result[0].metadata["compilation"]["scheduler_timing"] circuit_schedule_timing = circuit_schedule["timing"]This function uses the new
CircuitScheduleclass to load, parse, preprocess, and trace the data for plotting using a Plotly supported interface. (2328) -
Virtual private endpoints for IBM Quantum Platform are now supported. Learn more in our virtual private endpoints guide. (2367)
-
It is now possible to retrieve the job tags of a job without having to actually fetch the job with
QiskitRuntimeService.job(). (2420) -
The
ConvertISAToCliffordpass now supports Cliffordization of circuits containing fractional gates. (2427)
0.42.0 (2025-09-15)
Bug Fixes
- The
QiskitRuntimeService.least_busy()method’s behavior was inconsistent because it expected a fixed response from the API for the “reason” field, which is labeled as optional in the API schema. This has been fixed by no longer depending on this field. (2411)
Upgrade notes
-
When
QiskitRuntimeServiceis initialized without an instance and there is no saved account instance, there will now be a warning detailing the current filters (tags,region, andplans_preference) and available instances. Ifplans_preferenceis not set, free and trial plan instances are prioritized over paid instances.Additional warnings have also been added to make the current active instance more clear:
- Warning messages to tell users whether they’re using a saved account or using manually specified credentials.
- When Qiskit Runtime automatically selects an instance for the requested backend, there will be a warning with the instance name and plan type.
You can now initialize
QiskitRuntimeServicewith only an API token (key). Since theibm_quantumchannel name has been removed and both theibm_cloudandibm_quantum_platformchannels point to the same API, thechannelparameter is no longer required.ibm_quantum_platformis the default channel. (2375) -
Because support for streaming results was removed in
0.32.0, the deprecated (0.38.0) environment optioncallback, as well as theBaseRuntimeJobparametersclient_paramsanduser_callback, have been removed.The
RuntimeJobclass has also been removed. All primitives return jobs asRuntimeJobV2. Type hints across the codebase have been updated to reflect this change. (2298) -
RuntimeJobV2.properties()will now fetch the backend properties from when the job started running instead of when the job was created. (2369) -
Fixed an inconsistency in the unit conversion of
rep_timesinQasmBackendConfigurationto maintain consistency between initialization and serialization. The parameter is now properly converted from microseconds to seconds during initialization and back to microseconds when serialized throughto_dict(), matching the behavior of other timing parameters:rep_delay_rangeanddefault_rep_delay. (2386) -
A consistent error will now be raised during service initialization if an invalid API token is given to
QiskitRuntimeService.An error will also be raised if the account associated with the specified token does not have access to the given instance. This was the previously documented behavior in the
0.40.0release notes. (2408)
New Features
-
Since backends now support running jobs that contain both fractional gates and dynamic circuits, control flow instructions are no longer filtered out when using
use_fractional_gates=True. As a result, there is a new translation state plugin,IBMDynamicFractionalTranslationPlugin, for targeting circuits with both dynamic circuits and fractional gates.IBMFractionalTranslationPluginis deprecated since it is no longer necessary. (2366)
0.41.1 (2025-08-18)
Bug Fixes
-
Fixed multiple bugs where having a default saved instance or passing in the instance name would result in an an
IBMInputValueErrorwhen creating aSession/BatchAdditionally,
QiskitRuntimeService.least_busy()now correctly returns the least busy backend in the cases where theinstanceparameter is passed in and when there is no default instance. (2359)
0.41.0 (2025-07-24)
Prelude
The qiskit-ibm-runtime v0.41.0 release focuses on the removal of IBM Quantum Platform Classic and improving the user experience for the new IBM Quantum Platform. Among new features, improvements, and minor bug fixes, the release highlights are:
- The
ibm_quantumchannel and IQP Classic are no longer supported.QiskitRuntimeService.least_busy()is significantly faster.QiskitRuntimeService.usage()has been updated to return information regarding the current instance usage limit, consumption, and time remaining.
Upgrade Notes
- Because of the sunset of IBM Quantum Platform Classic, the
ibm_quantumchannel is no longer supported fromqiskit-ibm-runtime. Savedibm_quantumchannel accounts and data will not be accessible. Use theibm_quantum_platformchannel instead. See our migration guide for more details. (2289)
New Features
-
A new parameter,
tags, has been added to theQiskitRuntimeServiceinitializer andQiskitRuntimeService.save_account()method.tagscan be used to filter instances so only instances with the given tags are returned.Additionally, if no valid instances are returned when using the
tags,region, orplans_preferencefilters, an error will now be raised at initialization. Make sure the names of thetagsandregionpassed in match the instancetagsorregionexactly (case-insensitive). Forplans_preference, as long as a matching plan name is passed in, instances with the matching plan name will be prioritized. (2277) -
With the migration to the new IBM Quantum Platform, there were a few inconsistencies with IBM Quantum Platform Classic that needed to be addressed:
QiskitRuntimeService.usage()now returns usage information for the current active IBM Cloud instance.QiskitRuntimeService.delete_job()is not supported on the new platform, so it has been deprecated.RuntimeJobV2.instance()will now return the IBM Cloud instance CRN.RuntimeJob.queue_usage()is not supported on the new platform, so it has been deprecated. (2296)
-
Support for running
qiskit-ibm-runtimewith Python 3.9 has been deprecated and will be removed in a future release.Additionally,
qiskit-ibm-runtimenow officialy supports Python 3.13. (2314) -
When saving an account, there is now a validation check to make sure the
region,plans_preference, andtagsparameters are valid. (2319) -
There is a new method,
QiskitRuntimeService.active_instance()which returns the IBM Cloud CRN of the current active instance.The
QiskitRuntimeService.jobs()method has been updated to properly accept theinstanceparameter, which can be used to filter jobs. (2325) -
QiskitRuntimeService.usage()has been updated to include ausage_remaining_secondsfield. This field includes the difference between the reportedusage_limit_secondsorusage_allocation_seconds(depending on how the instance is configured) andusage_consumed_seconds. Learn more about instance allocation limits here. (2329) -
refresh()has a new parameter,use_fractional_gates, that can be set toTrueto allow the fake backend to include fractional gates. Note that this method only works if you have access to the real backend. (2342) -
The
QiskitRuntimeServicehas been updated to use a new API version. With the new version, theQiskitRuntimeService.least_busy()method has been updated to take advantage of the updatedBackendsResponseV2which makes it significantly faster. (2323) -
Class
TwirledSliceSpanhas a new data memberdata_slice_versionof type integer, with default value 1. When set to 2, the data slice tuples contain information about the PUB shots, used inTwirledSliceSpan.mask()to shape the returned array. The last axis will be truncated, such that its length will be shortened topub_shots. (2312) -
Added serialization for
qiskit.quantum_info.PauliLindbladMap. (2297) -
There is a new method
convert_to_rzz_valid_pub(), which can be used to transform a PUB into an equivalent PUB that is compatible with Rzz constraints. The method currently does not support dynamic circuits and does not preserve global phase. (2126)
Bug Fixes
- Fixed a bug in
BasePrimitivewhere primitives instantiated inside aSessionorBatchcontext manager without themodeparameter would fetch the backend from the service (by name) instead of using the backend passed to theSessionorBatch. This could cause issues when theSessionorBatchbackend was modified by users (for example, by removing a gate), because the primitives would instead fetch the unmodified backend object from the service. After the fix, theSessionorBatchbackend object is used directly. (2282) - Fixed an issue in
IBMBackendwhere property changes, such as modifications tobasis_gates, persisted even after the backend object was renewed. (2283) - Fixed the serialization of execution spans, to ensure that executions of old versions of qiskit-ibm-runtime will not crash when trying to decode newly encoded execution spans. However the deserialization with old versions will now return the execution spans in the format of a dictionary, and not in the form of an
ExecutionSpansobject. As part of this work, we also removed thedata_slice_versionfield fromTwirledSliceSpan; twirled slice spans that are aware of the pub shots are now managed by a new classTwirledSliceSpanV2. (2347)
Other Notes
- The deprecated
IBMBackendattributes,max_shotsandmax_experiments, have been removed and theIBMBackend.max_circuits()method now returnsNone. See the job limits guide for details. (2235) - The deprecated
IBMBackendandFakeBackendV2defaults()methods have been removed. They were deprecated in the v0.38.0 release. Pulse defaults have also been removed from all fake backends. (2238) - Improved the error message returned when
ExecutionSpan.mask()is called for a PUB that’s not contained in the span. (2311)
0.40.1 (2025-06-04)
Bug Fixes
- Fixed an issue where if there was no instance saved nor passed in at initialization, the service could not make any API calls until
QiskitRuntimeService.backend()orQiskitRuntimeService.backends()is called first. - Fixed a bug where if
use_fractional_gatesis set but the backend configuration was already cached, the incorrect configuration could be returned. (2269)
Other Notes
- Error messages related to
rzzgate angles being outside of the allowed range of 0 to during circuit validation have been updated to clarify that the angle value requested in the circuit was the problem and not an angle value provided by the backend. (2276)
0.40.0 (2025-05-28)
New Features
-
The following changes were made to support the upcoming IBM Quantum platform migration:
-
A new channel type,
ibm_quantum_platform, has been introduced for service initialization (QiskitRuntimeService()). It joins the existingibm_quantum(now deprecated) andibm_cloudchannels. By default,ibm_quantum_platformis selected when no channel is specified. This new channel connects to the new IBM Quantum Platform API and is intended to replaceibm_cloud. In the meantime, theibm_cloudchannel will redirect to the new API, but its continued use is discouraged. -
An
instancevalue is no longer required for saving (QiskitRuntimeService.save_account()) or initializing (QiskitRuntimeService()) an account on the new platform (ibm_quantum_platform, and temporarily,ibm_cloudchannels). If an instance is not passed in, all instances will be checked when a backend is retrieved, (service.backend("backend_name")). If an instance is passed intoQiskitRuntimeService.save_account(), or passed in during initialization, it will be used as the default instance when retrieving backends. The instance passed in at initialization will take precedence over the one saved in the account. -
Note that the IBM Cloud API Token (
token) is required for saving (QiskitRuntimeService.save_account()) or initializing (QiskitRuntimeService()) an account on the new platform. It’s treated as the account identifier and will unlock the resources associated with the account the token was created in. A list of tokens per account can be found here. Only one account per API token can be used. If you want to use multiple accounts, you must create multiple API tokens. -
The
QiskitRuntimeService.backend()andQiskitRuntimeService.backends()methods have been updated to accept aninstancepassed in explicitly when retrieving backends:service.backend(name="...", instance="..."). -
New parameters,
region, andplans_preference, have been added to theQiskitRuntimeServiceinitializer andQiskitRuntimeService.save_account()method. These can be used to prioritize certain instances on the new platform (ibm_quantum_platform, and temporarily,ibm_cloudchannels) without explicitly providing the CRN. In more detail:region: Sets a region preference.us-eastoreu-de.plans_preference: Is a list of account types, ordered by preference. An instance of the first type in the list will be prioritized.
For example, if
regionis saved asus-east, only instances fromus-eastwill be checked. Ifplans_preferenceis set, the instances will be prioritized in the order given, so['Open', 'Premium']would prioritize all Open Plan instances, then all Premium Plan instances, and then the rest. Note that the plan names inplans_preferencemust exactly match the API names (case insensitive). -
The
instanceinput parameter ofQiskitRuntimeServicehas been extended to accept new input types for theibm_quantum_platformandibm_cloudchannels. In addition to the IBM Cloud Resource Name (CRN), the instance name can now be passed in as the instance value. -
The
instances()method has been extended to show all available instances associated to an account for theibm_quantum_platformandibm_cloudchannels, in addition to the already enabledibm_quantumchannel.The following code snippets show the new usage patterns enabled by the changes described above (2239):
# save account service = QiskitRuntimeService.save_account( # No channel needs to be specified, ibm_quantum_platform is the default token=token, region="eu-de", # Optional plans_preference=['Open',...], #Optional set_as_default=True #Optional ) # initialize account service = QiskitRuntimeService() # defaults to ibm_quantum_platform account service.backend(name="...") # picks instance based on saved preferences service.backend(name="...", instance="...") # can also explicity pass in an instance to use # initialize account with instance service = QiskitRuntimeService(instance = "...") # sets instance as default instance service.backend(name="...") # only checks default instance, fails if the backend not in the instance service.backend(name="...", instance="...") # can still explicity pass in a different instance # OR # save account with instance service = QiskitRuntimeService.save_account( # No channel needs to be specified, ibm_quantum_platform is the default token=token, instance="..." # This will be the default instance region="us-east", # Optional plans_preference=['Open',...], #Optional set_as_default=True #Optional ) # initialize account service = QiskitRuntimeService() # defaults to ibm_quantum_platform account service.backend(name="...") # only checks saved default instance from save_account service.backend(name="...", instance="...") # can also explicity pass in an instance which takes precendence # initializing account with instance works the same way service = QiskitRuntimeService(instance = "...") # sets instance as default instance, overrides instance from save_account service.backend(name="...") # only checks default instance, fails if the backend not in the instance service.backend(name="...", instance="...") # can still explicity pass in a different instance
-
-
The
privateoption underEnvironmentOptionsis now supported on theibm_cloudandibm_quantum_platformchannels (new IBM Quantum Platform). When this option is set toTrue, the job will be returned without parameters, and results can only be retrieved once.There is also a new
private()property that returns whether or not a job is private. (2263)
Bug Fixes
- The call to
defaults()intarget()was removed because backend defaults are no longer used in the target generation. (2261)
0.39.0 (2025-05-13)
New Features
- The maximum supported QPY service version is now 14. (2231)
- Pub inputs to
EstimatorV2are now subject to a new validation step that checks that observables consist of Pauli operations that only contain {I, X, Y, Z}. (2254)
Bug Fixes
- A new parameter
create_newhas been added to theBatchandSessionclasses. This parameter allows users to control whether the POST session API endpoint should be called when initializing the class. It defaults toTrueas this is the case for most user-facing workflows. However, methods such asSession.from_id()set it toFalseto avoid generating a new session when the original session is still active. This fixed issues where multiple sessions were generated simultaneously when calling.from_id(). (2195) - Removed the incorrect
Optionaltype hint for thebackendparameter inSessionandBatch. (2222) Session.from_id()now raises an error if the session does not have a known backend. This is usually the case if there haven’t been any jobs run in the session yet. (2226)
Other Notes
- IBM Cloud accounts will now use an access token to call the Qiskit Runtime API instead of the token provided by the user. (2102)
IBMInputValueErrornow inherits fromValueError, in addition to the existing parent classIBMError. Some validation functions that previously raisedValueErrorexceptions now raiseIBMInputValueErrorexceptions. (2250)
0.38.0 (2025-04-15)
Deprecation Notes
RuntimeJobis now deprecated and will be removed no sooner than three months from this release.RuntimeJobwas superseded byRuntimeJobV2in all primitive implementations, so the deprecation should not have any user impact. The major difference between the two classes is thatstatus()returns a string instead of Qiskit’sJobStatusenum. (2170)- Since pulse gates are no longer supported, the
IBMBackendandFakeBackendV2defaults()method has been deprecated and will be removed no sooner than three months from this release. While the method still exists, these pulse defaults are no longer used to construct the backend target. (2186) - The
ibm_quantumchannel option is deprecated and will be sunset on 1 July. After this date,ibm_cloud,ibm_quantum_platform, andlocalwill be the only valid channels. For help migrating to the new IBM Quantum Platform on theibm_cloudchannel, read the migration guide. (2205)
New Features
- Attributes from the configuration of fake backends can now be retrieved directly with
backend.<attribute_name>. (2202)
Bug Fixes
- Fixed a bug where
DoubleSliceSpan.mask()andTwirledSliceSpan.mask()error when they contain a one-dimensional slice. (2184)
Upgrade Notes
- Since support for streaming results was removed in
0.32.0, the remaining related websocket code has been removed. As a part of this process, the environment optioncallbackis deprecated, as well as the parametersclient_paramsanduser_callbackinBaseRuntimeJob. (2143)
0.37.0 (2025-03-13)
Deprecation Notes
- The
IBMBackendattributesmax_shotsandmax_experiments, as well as the propertymax_circuitshave all been deprecated. These attribute values used to represent the maximum number of shots and circuits that could be submitted in one job but that is no longer the case. See the job limits guide for details. (2166)
New Features
-
qiskit-ibm-runtimeis now compatible with Qiskit 2.0. This means that classes and methods removed in Qiskit 2.0 have also been removed or handled accordingly. Thepulseandchannelrelated changes are highlighted below:Channelmethods inIBMBackendhave been removed.- The backend configuration class
PulseBackendConfigurationhas been removed, so all backends will now be returned asQasmBackendConfiguration. PulseDefaults(backend defaults) can still be retrieved but they are no longer necessary when creating a backendTarget.
See the Pulse migration guide for details. (2116)
-
Added a warning when a primitive is initialized outside of a session or batch context manager. In this scenario, the job will run in job mode instead of the session or batch. (2152)
Bug Fixes
- Fixed support for custom scheduling transpiler stages with Qiskit 2.x. (2153)
- ConvertConditionsToIfOps now correctly runs at all optimization levels of the scheduling plugins for dynamic circuits, when using Qiskit 1.x. (2154)
- When retrieving jobs with
jobs(), there is no way to distinguish between v1 and v2 primitives. Since the v1 primitives were completely removed over 6 months ago in0.28.0, jobs returned fromjobs()will now default toRuntimeJobV2. (2156)
0.36.1 (2025-02-14)
Bug Fixes
- Fixed an issue where not having
qiskit-aerinstalled would cause an import error. (2144)
0.36.0 (2025-02-14)
Upgrade Notes
-
The minimal required
qiskitversion is now 1.3. Qiskit 1.3 introduces QPY version 13. The minimum required Qiskit version was raised so Qiskit Runtime could use the latest QPY version for serializing circuits in job submissions. (2096) -
The following outdated deprecations have been removed:
- Support for the simulator option
noise_modelon cloud simulators has been removed. This option will still work in local testing mode. - The
NoiseLearnerResultpropertiesgeneratorsandrateshave been removed. They can still be accessed in theerrorproperty. - The utility function
get_runtime_api_base_url()has been removed. (2124)
- Support for the simulator option
0.35.0 (2025-02-04)
Upgrade Notes
- Python 3.8 reached end-of-life on Oct 7th, 2024. Qiskit SDK dropped support for 3.8 in
qiskit 1.3. In the same vein,qiskit-ibm-runtimedoes not support Python 3.8 anymore. (2097) - Support for
backend.run()has been removed. Refer to the migration guide for instructions to migrate any existing code that usesbackend.run()to the new V2 primitives interface. (1962) - Parameter expressions with RZZ gates will be checked against the values assigned to them in the PUB. An
IBMInputValueErrorwill be raised if parameter values specified in the PUB make a parameter expression evaluate to an invalid angle (negative, or greater thanpi/2). (2093) - When there is a maintenance outage, an appropriate error message will be raised when trying to initialize the
QiskitRuntimeService. (2100)
New Features
- Jobs run in the local testing mode will now return an instance of a new class,
LocalRuntimeJob. This new class inherits from Qiskit’sPrimitiveJobclass while adding the methods and properties found inBaseRuntimeJob. This way, running jobs in the local testing mode will be more similar to running jobs on a real backend. (2057) - Two new fake backends,
FakeFezandFakeMarrakesh, have been added. These are 156-qubit Heron devices. (2112)
0.34.0 (2024-12-05)
New Features
-
Added the
draw_zne_evsanddraw_zne_extrapolatorsfunctions to visualize data from experiments using ZNE. AddedEstimatorPubResultwith methodsdraw_zne_evsanddraw_zne_extrapolators, invoking the corresponding visualization functions. (1820) -
Added support for noise model and level 1 data to local sampler
The
simulator.noise_modeloption ofSamplerV2is now passed through to theBackendSamplerV2as a noise_model option under run_options if the primitive supports the run_options option (support was added in Qiskit v1.3).Similarly, the
execution.meas_typeoption ofSamplerV2is now translated intomeas_levelandmeas_returnoptions underrun_optionsof theBackendSamplerV2if it supportsrun_options. This change allows support for level 1 data in local testing mode, where previously only level 2 (classified) data was supported. (1990) -
A new function
validate_rzz_pubswas added. The function verifies thatrzzparameters are in the range between0andpi/2, for numeric parameters (e.g.,rzz(np.pi/4, 0)), and for unbounded parameters (rzz(theta, 0)) with values to substitute provided in the pub. Parameter expressions (e.g.,rzz(theta + phi, 0)) are still not validated. (2021) -
Added a new transpiler translation plugin
IBMFractionalTranslationPluginand a passFoldRzzAngle. This plugin is automatically applied for backends retrieved with theuse_fractional_gatesopt-in, and the folding pass is added when the backend target includes theRZZgate.The new pass modifies the input quantum circuit, so that all
RZZgates in the circuit have an angle parameter within [0, pi/2] which is supported by IBM Quantum processors. (2043)
Upgrade Notes
-
The deprecations from the
0.26.0release have been removed.- Passing a backend as a string into
Session,Batch,Sampler, andEstimatoris no longer valid. Use the actual backend object instead. - Previously, passing a backend as the mode into
SamplerV2orEstimatorV2ran jobs in job mode, even if a session context manager was open. These jobs will now run inside of the open session. Additionally, if a backend that is different from the session backend is passed in as the mode, an error will be raised. Serviceis no longer a valid parameter inSessionandBatch. (2027)
- Passing a backend as a string into
Bug Fixes
- Fixed an issue where
FakeBackendV2.refresh()wouldn’t always refresh the backend properties, defaults, and configuration. (2020) CouplingMapwas added toRuntimeEncoderso it can now be passed to theNoiseLearnerprogram. (2026)- The behavior of the
use_fractional_gatesargument ofQiskitRuntimeService.backend()has been changed. When the option is set toFalse, it now filters all references to fractional gates out of the configuration and properties data from the API. Likewise, when the option is set toTrue, all dynamic circuit instructions are filtered from the configuration and properties data. Previously, this option only impacted the creation of the backend’s target, which meant that the instructions in the target were not consistent with those in the configuration and properties data. For the most part, this change should be transparent to users, but if there is code relying on the configuration and properties data containing all instructions, it will need to be updated (note that settinguse_fractional_gatestoNonewill load all instructions without filtering). (2031) - Invalid or non-existing backend configurations on the server will no longer prevent all backends from being retrieved with
service.backends(). (2048) - Pin
pydanticdependency version to<2.10to avoid a regression breaking the build process. (2049)
Other Notes
-
The
requirements.txtandsetup.pyfiles have been removed in favor of a new dependency management approach usingpyproject. This transition simplifies the development workflow. Dependencies are now managed directly through the pyproject.toml file.- Use
pip install -e .to install qiskit-ibm-runtime dependencies. - Use
pip install -e ".[dev]"to install the development dependencies. - Use
pip install -e ".[visualization]"to install the visualization dependencies. (2053)
- Use
0.33.2 (2024-11-11)
Bug Fixes
- Fixed an issue where the RZZ validation did not handle parameter expressions correctly. (2035)
0.33.1 (2024-11-08)
Other Notes
- Added a private alias to
decode_backend_configuration(). (2028)
0.33.0 (2024-11-07)
New Features
- Added
draw_layer_errors_swarm()which draws a swarm plot of one or moreLayerErrorobjects. Also added the convenience methoddraw_swarm()to invoke the drawing function on a particular instance. (1988) - Added
TwirledSliceSpan, anExecutionSpanto be used when twirling is enabled in the Sampler. In particular, it keeps track of an extra shape axis corresponding to twirling randomizations, and also whether this axis exists at the front of the shape tuple, or right before the shots axis. (2011)
Upgrade Notes
- The remaining fake V1 backends -
FakeMelbourne,FakePoughkeepsie,FakeTenerife,FakeTokyo, andFakeRueschlikonhave been removed. (2012)
Bug Fixes
- Fixed the location of hover text on the
draw_execution_spans()function. Previous to this fix, they were drawn on the wrong markers. (2014)
0.32.0 (2024-10-30)
New Features
-
Added
draw_execution_spans(), a function for creating a Plotly figure that visualizes one or moreExecutionSpansobjects. 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, anExecutionSpanfor batching with two slices. (1982) -
Each of
SamplerV2,EstimatorV2, andnoise_learner.NoiseLearnernow has abackend()method that returns the backend that the class is configured with. (1995)
Upgrade Notes
-
Deprecations from the
0.25.0release have been removed.optimization_levelis no longer a valid option forEstimatorV2.- Job methods
interim_results()andstream_results()have been removed. (1965)
-
The
channel_strategyparameter inQiskitRuntimeServicehas 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
rzzangle is between[0, pi/2]. (1953)
Upgrade Notes
- Fake V1 backends have been removed. (1946)
Bug Fixes
- Fixed an issue with ISA validation where a change related to connectivity inside control operations was not applied correctly. (1954)
0.30.0 (2024-09-23)
Deprecation Notes
-
The utilityy function
get_runtime_api_base_urlhas been deprecated. Usedefault_runtime_url_resolverinstead. (1914) -
The
channel_strategyparameter 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
ConvertISAToCliffordtranspilation pass to convert the gates of a circuit to Clifford gates. (1887) -
Added
url_resolveroptional input toQiskitRuntimeServiceconstructor to enable custom generation of the Qiskit Runtime API URL based on the providedurl,instanceandprivate_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_gatesflag 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)
Upgrade Notes
-
Deprecations from the
0.24.0release 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
Sessionproperty 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)
Bug Fixes
- Fixed a bug where primitives could not be run in the session context with fractional gates. (1922)
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_modelis now deprecated for jobs running on real devices.noise_modelwill still be an acceptable option when using the local testing mode. (1892)
New Features
- We added new classes,
ExecutionSpanandExecutionSpanSet. These classes are used in the primitive result metadata, to convey information about start and stop times of batch jobs. (1833) - Added a new
privateoption underEnvironmentOptions. (1888) - Added
fallbackoption to ZNE extrapolators. (1902)
Bug Fixes
- Ported the
Noise_model.from_dict()method fromqiskit-aerbecause it was removed in0.15.0. (1890) - Revert a previous change to
backend.targetwhere 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
ResilienceOptionsV2has 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)
Upgrade Notes
- The V1 Primitives
SamplerV1andEstimatorV1have been completely removed. Please see the migration guide and use the V2 Primitives instead. (1857) - The
serviceparameter is now required inSession.from_id(). (1868)
0.27.1 (2024-08-12)
New Features
- Added logic to encode and decode
PauliLindbladErrorandLayerError. (1853)
0.27.0 (2024-08-08)
New Features
- Added
PauliLindbladErrorandLayerErrorclasses 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, andSamplerV2has been deprecated. Use the actual backend object instead. (1804) - Passing a backend as the mode in
SamplerV2andEstimatorV2currently runs a job in job mode even if inside of aSessionorBatchcontext manager. This behavior is deprecated and in a future release the the Session/Batch will take precedence. (1816) - Passing in
serviceinSession,Batchhas been deprecated. Theserviceparameter is no longer necessary because the service can be extracted from the backend. (1826) - Since backend modules from
qiskit.providers.modelsincludingBackendPropertiesandBackendConfigurationare 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_faultyhave 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)
-
QiskitRuntimeLocalServicewas created to support a local testing mode. To avoid having to initialize a separate class, “local” has been added as a validQiskitRuntimeServicechannel.service = QiskitRuntimeService(channel="local")will return a
QiskitRuntimeLocalServiceinstance. (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
NoiseLearnerand related functionality, such asNoiseLearnerOptionsandNoiseLearnerResults. (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_mitigationorpec_mitigationare set toTruewhen using other related options has been removed. (1792) - Fixed an issue where users were unable to retrieve job results if the python library
simplejsonwas installed in their environment. (1800)
0.25.0 (2024-07-02)
Deprecation Notes
- The
optimization_leveloption inEstimatorV2is 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_busymethods toQiskitRuntimeLocalService. (1764) - Added an
instanceproperty toBaseRuntimeJobwhich returns the instance where the job was run. (1771) default_shotsare now a supported option when usingEstimatorV2in 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
-
namewill now be a required parameter in backend().backend()will no longer return the first backend out of all backends ifnameis 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
backendargument in Sampler and Estimator has been deprecated. Please usemodeinstead. Thesessionargument in Sampler and Estimator has also been deprecated. Please usemodeinstead. (1556) -
qiskit_ibm_runtime.QiskitRuntimeService.get_backend()is deprecated. Pleaseqiskit_ibm_runtime.QiskitRuntimeService.backend()use instead. The V1 fake backends,FakeBackend, along withFakeProviderare 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
modeargument. Themodeparameter 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_endpointthat 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.EstimatorOptionsto enable Probabilistic Error Amplification (PEA) error mitigation method for your estimator jobs. (1728) -
Qiskit version
1.1is now supported and required. (1700)
Upgrade Notes
QiskitRuntimeService.backends()now always returns a newIBMBackendinstance 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
RuntimeJobinstances, even if the job was run with a V2 primitive. Now, V2 primitive jobs will be returned correctly asRuntimeJobV2instances. (1471) - To avoid network disruptions during long job processes, websocket errors will no longer be raised. (1518)
- Fixed the combination of
insert_multiple_cyclesandcoupling_mapoptions 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_targethas 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
serviceparameter in from_id() will be required. (1311)
New Features
- Printing
OptionsandOptionsV2will now be formatted as a table. (1490) - Add
block_ordering_callableargument 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_callableproduces. The motivation for this argument is that for some families of circuits, the existing functionblock_order_op_nodescan 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)
SamplerV2now 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
RuntimeJobV2will 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
/jobsrequest. (1508) - Fixed a bug with encoding/decoding
ParameterExpression. (1521) - Fixed an issue where the in_final_state() method in
RuntimeJobV2would not update the status when called. (1547)
0.22.0 (2024-03-21)
Upgrade Notes
- Modify
skip_reset_qubitsoptional 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_provideror 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=0inEstimatorV2to be ignored (and the default value used instead). (1541)
0.21.2 (2024-03-18)
Bug Fixes
- Fixed a bug where
RuntimeDecodercould import arbitrary classes. (1527)
0.21.1
Bug Fixes
- Fixed a bug where
SamplerV1andEstimatorV1could 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,
backendwill be a required parameter forqiskit_ibm_runtime.Sampler, andqiskit_ibm_runtime.Estimatorifsessionis not specified, even when using theibm_cloudchannel.It will also be a required parameter for
qiskit_ibm_runtime.Sessionandqiskit_ibm_runtime.Batch.
Bug Fixes
- Fixed an issue with the
IBMBackend.targetwhere 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_barrieroptional 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
/sessionsendpoint 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
SessionandBatchcreated fromqiskit-ibm-runtimeprior to this release will no longer be supported after March 31, 2024. Please update yourqiskit-ibm-runtimeversion 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
/sessionsendpoint.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-runtimeversion 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
InstructionDurationsdurations input is now also required for the constructor ofPadDelay.
0.19.1
Upgrade Notes
- Extend
DynamicCircuitInstructions.from_backend()to extract and patch durations from bothBackendV1andBackendV2objects. Also addDynamicCircuitInstructions.from_target()to use aTargetobject instead.
Bug Fixes
- Fix the patching of
DynamicCircuitInstructionsfor instructions with durations that are not in units ofdt. - Fixed an issue with the
qpy.dump()function, when theuse_symengineflag was set to a truthy object that evaluated toTruebut was not actually the booleanTruethe 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_timeparameter 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
QiskitRuntimeService.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 theparamsfield 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
instanceparameter,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 errorif 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-ctrlenabled is used whileq-ctrlis 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_providermodule, 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-ctrlis passed in as thechannel_strategyand the account instance does not haveq-ctrlenabled. -
Removed storing result in
RuntimeJob._results. Instead retrieve results every time theresults()method is called.
Deprecation Notes
- Usage of the
~/.qiskit/qiskitrc.jsonfile for account information has been deprecated. Use~/.qiskit/qiskit-ibm.jsoninstead.
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
backendparameter in from_id() is being deprecated because sessions do not support multiple backends. Additionally, theserviceparameter is no longer optional. - The
circuit_indicesandobservable_indicesrun inputs for Estimator and Sampler have been completely removed.
Other Notes
- Added migration code for running
backend.runin qiskit_ibm_runtime instead of in qiskit_ibm_provider.
0.14.0
New Features
- There is a new class,
qiskit_ibm_runtime.Batchthat 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
instanceselected 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
Sessionas 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
shotspassed 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_strategywill 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=TrueinQiskitRuntimeService.save_account(). - Added new method
Session.from_idwhich 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_OUTto 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
defaultto thechannel_strategyparameter 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
datetimeparameter to retrieve properties from a past date. - The
noise_factorsandextrapolatoroptions inqiskit_ibm_runtime.options.ResilienceOptionswill now default toNoneunlessresilience_levelis set to 2. Only options relevant to the resilience level will be set, so when usingresilience_level2,noise_factorswill still default to(1, 3, 5)andextrapolatorwill default toLinearExtrapolator. Additionally, options with a value ofNonewill 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_quantumchannel since theibm_cloudchannel 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_strategythat can be set in the initialization of qiskit_ibm_runtime.QiskitRuntimeService or saved in qiskit_ibm_runtime.QiskitRuntimeService.save_account(). Ifchannel_strategyis 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_amplifierresilience 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_tagsof a job. - If
instanceis provided as parameter to qiskit_ibm_runtime.QiskitRuntimeService, then this is used as a filter inQiskitRuntimeService.backends(). Ifinstanceis 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()theparamswill 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
CouplingMapwhen 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
backendparameter to pass a backend name or instance instead of thesessionparameter (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
backendinstead ofsession.
Deprecation Notes
- Passing a backend name or backend instance to the
sessionparameter when initializing a qiskit_ibm_runtime.Sampler or qiskit_ibm_runtime.Estimator has been deprecated. Please use thebackendparameter instead. You can continue to pass a session using thesessionparameter.
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
transpilationandenvironmentoptions.
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_transpilationhave been removed from Sampler.Similarly, the deprecated arguments
circuits,observables,parameters,service, andskip_transpilationhave been removed from Estimator.In QiskitRuntimeService, the
authparameter has been removed. Additionally, theinstance,job_tags, andmax_execution_timeparamters have been removed from qiskit_ibm_runtime.QiskitRuntimeService.run(). They can be passed in throughRuntimeOptionsinstead.Within
RuntimeOptionsbackend_nameis no longer supported. Please usebackendinstead.
Bug Fixes
- Fixed a bug where retrieving a job from a backend without
noise_modelorseed_simulatoroptions 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_VALIDATIONis 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_timeto the program_run method andqiskit_ibm_runtime.RuntimeOptions. Now values entered by the user for sessionmax_timewill be sent to the server side assession_time. This allows users to specify different values for sessionmax_timeandmax_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_idandbackend, 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_leveland forresilience_levelwere not being set correctly. - Fixed an issue where if no backend was selected,
optimization_levelandresilience_levelwould 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
BlueprintCircuits 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_nameparameter 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
backendis 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
ECRGateandCZGatemappings have been added to theTargetconstructor 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
Tracebackin the message.
0.9.0
Upgrade Notes
- Changed the default values for
optimization_leveland forresilience_levelinqiskit_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_levelis set to 1 andresilience_levelis 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. Seeqiskit_ibm_runtime.options.ResilienceOptionsfor all available options. - You can now specify a pair of result decoders for the
result_decoderparameter 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_leveloption for has been changed from 0 to 1. In addition, the defaultoptimization_leveloption has been changed from 1 to 3.
Deprecation Notes
- The transpilation options
translation_methodandtiming_constraintshave 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
IBMBackendinstance is used for the session instead of the default account service.
0.7.0
New Features
qiskit_ibm_runtime.Optionsclass 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
callbackparameter. This parameter can be used to stream the interim and final results of the primitives. - The
qiskit_ibm_runtime.Optionsclass now acceptsmax_execution_timeas a first level option andjob_tagsas an option underenvironment.qiskit_ibm_runtime.RuntimeOptionshas 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.txtfile has been updated accordingly.
Deprecation Notes
- Qiskit Runtime programs
torch-train,torch-infer,sample-expval,sample-program, andquantum_kernal_alignmenthave been deprecated due to low usage. - Passing
instanceparameter to the qiskit_ibm_runtime.QiskitRuntimeService.run() has been deprecated. Instead, you can pass theinstanceparameter inside theoptionsparameter. - Passing
job_tagsandmax_execution_timeas 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
Sampler.run(). It raises an error if there is no classical bit. - Sampler is updated to return
SamplerResultwithSamplerResult.quasi_distsas a list ofQuasiDistrbution. It used to set a list ofdictasSamplerResult.quasi_dists, but it did not follow the design ofSamplerResult. - The RuntimeJob class is now a subclass of
qiskit.providers.Job.
Deprecation Notes
job_idandbackendattributes 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_nameattribute inqiskit_ibm_runtime.RuntimeOptionsis 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.Optionsclass 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
channelcan 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
RuntimeJobMaxTimeoutErrorwhen a job runs for too long so that it can be handled appropriately by programs. -
The experimental parameters
transpilation_settings,resilience_settings, andmax_timeto the :class:`qiskit_ibm_runtime.Sampler and qiskit_ibm_runtime.Estimator constructors have been removed. You can instead use theqiskit_ibm_runtime.Optionsclass to specify the settings, andmax_timecan 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 thelimitgiven, 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 asserviceto the constructors ofSamplerandEstimatorhas also been deprecated. The inputs can now be passed to therun()method of the primitive classes, andservicecan be passed to qiskit_ibm_runtime.Session when starting a new session. -
Passing
skip_transpilationto the :class:`qiskit_ibm_runtime.Sampler and qiskit_ibm_runtime.Estimator constructors has been deprecated. You can instead use theqiskit_ibm_runtime.Optionsclass 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-terraversion to0.21.0, since latest version ofqiskit-ibm-runtimeis not compatible with0.20.0or earlier ofqiskit-terra.
0.6.0
Upgrade Notes
-
When migrating from
qiskit-ibmq-provideryouribm_quantumchannel 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_quantumaccount.Ex:
from qiskit_ibm_runtime import QiskitRuntimeService service = QiskitRuntimeService() -
IBMEstimatorclass which was deprecated earlier is now removed. Use Estimator class going forward. -
IBMRuntimeServiceclass 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
serviceobject which is an instance of QiskitRuntimeService class can now be accessed from IBMBackend class using theserviceproperty.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_afterandcreated_before. These can be used to filter jobs by creation date in local time. -
The parameters
circuit_indicesandobservable_indiceswhen callingestimatorare now deprecated and will be removed in a future release. You can now pass either indices or objects using thecircuitsandobservablesparameters.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_indicesandobservable_indiceswhen callingestimatorare now deprecated and will be removed in a future release. You can now pass either indices or objects using thecircuitsandobservablesparameters.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. -
RuntimeJobTimeoutErroris now raised when thetimeoutset in result() or wait_for_final_state() expires. -
When initializing QiskitRuntimeService and an invalid token is used,
IBMNotAuthorizedErrorwill be raised instead ofRequestsApiError. -
IBMSamplerclass which was deprecated earlier is now removed. Use Sampler class going forward. -
qubit_properties() will now return a sub class of
QubitPropertiescalledIBMQubitPropertiesand will expose anharmonicity in addition to the t1, t2 and frequency already exposed by theQubitPropertiesclass.
0.4.0
Upgrade Notes
-
IBMRuntimeServicehas been renamed toQiskitRuntimeSerice.IBMRuntimeServiceclass 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="...") -
IBMEstimatorclass 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], ...) -
IBMSamplerclass 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,IBMEstimatorandIBMSamplerclasses 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
channelhas now been added toqiskit_ibm_runtime.IBMRuntimeServiceclass and also to methods likesave_account(),saved_accounts()anddelete_account(). It can be set toibm_quantumoribm_cloudto authenticate to either of the two different channels through which Qiskit Runtime service is currently offered.channelreplaces theauthparameter which has now been deprecated.
Deprecation Notes
- The
authparameter toqiskit_ibm_runtime.IBMRuntimeServiceclass 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 newchannelparameter instead.
Bug Fixes
- Fixed #291 where passing a single
QuantumCircuitto sampler or estimator primitives was throwing an error.
0.2.0
New Features
qiskit_ibm_runtime.IBMEstimatorandqiskit_ibm_runtime.IBMSamplerclasses now allow you to easily interact with theestimatorandsamplerprimitive 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.BackendV2interface and provides flatter access to the configuration of a backend, for example:# BackendV1: backend.configuration().n_qubits # BackendV2: backend.num_qubitsOnly 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
instanceparameter 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
Samplerprimitive program. -
qiskit_ibm_runtime.IBMRuntimeService.run()method now accepts runtime execution options asqiskit_ibm_runtime.RuntimeOptionsclass 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
callbacktoqiskit_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 nameas a value for the accountinstanceparameter. If you choose to set the name instead of theCRN, the initialization time of theqiskit_ibm_runtime.IBMRuntimeServiceclass is slightly higher because the requiredCRNvalue 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
instanceparameter 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_requirementswill now be listed.
Bug Fixes
- Fixed an issue with JSON encoding and decoding when using
ParameterExpressions in conjunction with Qiskit Terra 0.19.1 and above. Previously, theParameterinstances 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.