Release Notes¶
0.10.0¶
New Features¶
Python 3.11 is now supported.
Upgrade Notes¶
Added error messages in case the user defines unsupported values for “max_execution_time”. Previously, this validation was done on the server side.
Bug Fixes¶
Added deserialization of the params of RuntimeJob.inputs. Previously, the circuits were returned in serialized format. Fixes issue #829.
Allow for users to retrieve all backends even if one of the backends has a missing configuration. The backend without a configuration will not be returned.
0.9.4¶
New Features¶
Added methods to validate input options to
transpilation
andenvironment
options.
Upgrade Notes¶
When constructing a backend
qiskit.transpiler.Target
, faulty qubits and gates from the backend configuration will be filtered out.
Deprecation Notes¶
The deprecated arguments
circuits
,parameters
,service
, andskip_transpilation
have been removed fromSampler
.Similarly, the deprecated arguments
circuits
,observables
,parameters
,service
, andskip_transpilation
have been removed fromEstimator
.In
QiskitRuntimeService
, theauth
parameter has been removed. Additionally, theinstance
,job_tags
, andmax_execution_time
paramters have been removed fromqiskit_ibm_runtime.QiskitRuntimeService.run()
. They can be passed in throughRuntimeOptions
instead.Within
RuntimeOptions
,backend_name
is no longer supported. Please usebackend
instead.
Bug Fixes¶
Fixed a bug where retrieving a job from a backend without
noise_model
orseed_simulator
options would result in a key error.
0.9.3¶
Upgrade Notes¶
Added error messages in case the user defines unsupported values for “optimization_level” or for “resilience_level”. Added validation checking for options given as input to
resilience
. Previously, this validation was done on the server side. By adding them on the client side, response will be much faster upon failure. The environment variableQISKIT_RUNTIME_SKIP_OPTIONS_VALIDATION
is used to control validation. If set, validation will be skipped.
Backend configurations are no longer loaded when
QiskitRuntimeService
is initialized. Instead, the configuration is only loaded and cached duringget_backend()
andbackends()
.
Bug Fixes¶
When creating an Option object and passing an input option to
resilience_options
, this option was included inresilience_options
, but the other, default options were removed. This was fixed, so now inputs are handled correctly, like other option types.
0.9.2¶
New Features¶
Added a new argument called
session_time
to the program_run method andqiskit_ibm_runtime.RuntimeOptions
. Now values entered by the user for sessionmax_time
will be sent to the server side assession_time
. This allows users to specify different values for sessionmax_time
andmax_execution_time
.
Added the method
target_history()
. This method is similar totarget()
. The difference is that the new method enables the user to pass a datetime parameter, to retrieve historical data from the backend.
Upgrade Notes¶
Accept all options on given on level 1 and assign them to the appropriate hierarchical option type. For example, if the user provides
options = {"shots": 10}
as input to Sampler/Estimator, this will be interpreted asoptions = {"execution: {"shots": 10}}
.
If a job is returned without a backend, retrieving the backend through
qiskit_ibm_runtime.RuntimeJob.backend()
will re-retrieve data from the server and attempt to update the backend. Additionally,job_id
andbackend
, which were deprecated attributes ofqiskit_ibm_runtime.RuntimeJob
have now been removed.
Added a user warning when the user passes an option that is not supported in Options.
Bug Fixes¶
Fixed a bug where the default values for
optimization_level
and forresilience_level
were not being set correctly.
Fixed an issue where if no backend was selected,
optimization_level
andresilience_level
would default toNone
, causing the job to fail.
If an instance is passed in to
qiskit_ibm_runtime.QiskitRuntimeService.get_backend()
and then the backend is used in a session, all jobs within the session will be run from the original instance passed in.
Removed additional decomposition of
BlueprintCircuit
s in the JSON encoder. This was introduced as a bugfix, but has since been fixed. Still doing the decomposition led to possible problems if the decomposed circuit was not in the correct basis set of the backend anymore.
0.9.1¶
Upgrade Notes¶
qiskit_ibm_runtime.QiskitRuntimeService.jobs()
now has abackend_name
parameter that can be used to only return jobs run with the specified backend.
Allow the user to store account details in a file specified by the user in the parameter.
filename
. The default remains ~/.qiskit/qiskit-ibm.json. Example of usage: Ex:QiskitRuntimeService.save_account(channel="ibm_quantum", filename="~/my_account_file.json", name = "my_account", token="my_token") service = QiskitRuntimeService(channel="ibm_quantum", filename="~/my_account_file.json", name = "my_account",)
Deprecation Notes¶
backend
is no longer a supported option when usingqiskit_ibm_runtime.Session.run()
. Sessions do not support multiple cross backends. Additionally, an exception will be raised if a backend passed in through options does not match the original session backend in an active session.
Bug Fixes¶
ECRGate
andCZGate
mappings have been added to theTarget
constructor to fix a tranpile bug.
Other Notes¶
Since error messages from a failing job may be long, we shortened them so that they begin from the last
Traceback
in the message.
0.9.0¶
Upgrade Notes¶
Changed the default values for
optimization_level
and forresilience_level
inqiskit_ibm_runtime.Options
. If their values are defined by the user, they are not modified. If not set, if the backend is a noiseless simulator thenoptimization_level
is set to 1 andresilience_level
is set to 0; Otherwise, they are be set to 3 and 1 respectively.
session_id()
andtags()
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.ResilienceOptions
for all available options.
You can now specify a pair of result decoders for the
result_decoder
parameter ofqiskit_ibm_runtime.QiskitRuntimeService.run()
method. If a pair is specified, the first one is used to decode interim results and the second the final results.
Upgrade Notes¶
The default
resilience_level
option for has been changed from 0 to 1. In addition, the defaultoptimization_level
option has been changed from 1 to 3.
Deprecation Notes¶
The transpilation options
translation_method
andtiming_constraints
have been deprecated.
Bug Fixes¶
If a
qiskit_ibm_runtime.IBMBackend
instance is passed to theqiskit_ibm_runtime.Session
constructor, the service used to initialize theIBMBackend
instance is used for the session instead of the default account service.
0.7.0¶
New Features¶
qiskit_ibm_runtime.Options
class now accepts arbitrary keyword arguments. This allows users to specify new options to the primitive programs without upgradingqiskit_ibm_runtime
. These arbitrary keyword arguments, however, are not validated.
The
qiskit_ibm_runtime.options.EnvironmentOptions
class now accepts acallback
parameter. This parameter can be used to stream the interim and final results of the primitives.
The
qiskit_ibm_runtime.Options
class now acceptsmax_execution_time
as a first level option andjob_tags
as an option underenvironment
.qiskit_ibm_runtime.RuntimeOptions
has also been updated to include these two parameters.
Upgrade Notes¶
This version of qiskit-ibm-runtime requires qiskit-terra version 0.22 or higher. The
requirements.txt
file has been updated accordingly.
Deprecation Notes¶
Qiskit Runtime programs
torch-train
,torch-infer
,sample-expval
,sample-program
, andquantum_kernal_alignment
have been deprecated due to low usage.
Passing
instance
parameter to theqiskit_ibm_runtime.QiskitRuntimeService.run()
has been deprecated. Instead, you can pass theinstance
parameter inside theoptions
parameter.
Passing
job_tags
andmax_execution_time
as parameters toqiskit_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.6.0¶
Upgrade Notes¶
When migrating from
qiskit-ibmq-provider
youribm_quantum
channel credentials will get automatically copied over from the qiskitrc file and a qiskit-ibm.json file will get created if one doesn’t exist. You have to just initializeQiskitRuntimeService
class without passing any parameters to use this copied over defaultibm_quantum
account.Ex:
from qiskit_ibm_runtime import QiskitRuntimeService service = QiskitRuntimeService()
IBMEstimator
class which was deprecated earlier is now removed. UseEstimator
class going forward.
IBMRuntimeService
class which was deprecated earlier is now removed. UseQiskitRuntimeService
class going forward.
0.5.0¶
Prelude¶
This release leverages the API and Queue enhancements to become more runtime session aware. As a result when using the primitives (sampler and estimator), runtime jobs in the same session will skip to the front of the queue, thereby speeding up the runtime session, once it has started.
New Features¶
The
service
object which is an instance ofQiskitRuntimeService
class can now be accessed fromIBMBackend
class using theservice
property.Ex:
backend = service.get_backend("ibmq_qasm_simulator") backend.service # QiskitRuntimeService instance used to instantiate the backend
Upgrade Notes¶
jobs()
has two new parameters,created_after
andcreated_before
. These can be used to filter jobs by creation date in local time.
The parameters
circuit_indices
andobservable_indices
when callingestimator
are now deprecated and will be removed in a future release. You can now pass either indices or objects using thecircuits
andobservables
parameters.Ex:
with Estimator( circuits=[qc1, qc2], observables=[H1, H2, H3], service=service, options=options ) as estimator: # pass circuits and observables as indices result = estimator(circuits=[0, 1], observables=[0, 1], parameter_values=[theta1, theta2]) # pass circuits and observables as objects result = estimator(circuits=[qc1, qc2], observables=[H1, H3], parameter_values=[theta1, theta3])
The parameters
circuit_indices
andobservable_indices
when callingestimator
are now deprecated and will be removed in a future release. You can now pass either indices or objects using thecircuits
andobservables
parameters.Ex:
with Sampler( circuits=[qc1, qc2], service=service, options=options ) as sampler: # pass circuits as indices result = sampler(circuits=[0, 1], parameter_values=[theta1, theta2]) # pass circuit as objects result = sampler(circuits=[qc1, qc2], parameter_values=[theta2, theta3])
The
session_id
, which is the Job ID of the first job in a runtime session can now be used as a filter injobs()
with the parametersession_id
.
run()
now supports a new parameter,job_tags
. These tags can be used when filtering jobs withjobs()
.
run()
now supports a new parameter,max_execution_time
, which can be used to override the default program maximum execution time. It should be less than or equal to the program maximum execution time.
jobs()
has a new parameter,descending
. This parameter defaults toTrue
, where jobs will be returned in descending order based on creation date.
RuntimeJobTimeoutError
is now raised when thetimeout
set inresult()
orwait_for_final_state()
expires.
When initializing
QiskitRuntimeService
and an invalid token is used,IBMNotAuthorizedError
will be raised instead ofRequestsApiError
.
IBMSampler
class which was deprecated earlier is now removed. UseSampler
class going forward.
qubit_properties()
will now return a sub class ofQubitProperties
calledIBMQubitProperties
and will expose anharmonicity in addition to the t1, t2 and frequency already exposed by theQubitProperties
class.
0.4.0¶
Upgrade Notes¶
IBMRuntimeService
has been renamed toQiskitRuntimeSerice
.IBMRuntimeService
class is now deprecated and will be removed in a future release.Example:
Before:
from qiskit_ibm_runtime import IBMRuntimeService service = IBMRuntimeService(channel="ibm_cloud", token="...", instance="...")
After:
from qiskit_ibm_runtime import QiskitRuntimeService service = QiskitRuntimeService(channel="ibm_cloud", token="...", instance="...")
IBMEstimator
class is now deprecated and will be removed in a future release. UseEstimator
class going forward.Example:
Before:
from qiskit_ibm_runtime import IBMRuntimeService, IBMEstimator service = IBMRuntimeService(channel="ibm_cloud", token="...", instance="...") estimator_factory = IBMEstimator(service=service, backend="ibmq_qasm_simulator") with estimator_factory(circuits=[qc], observables="...", parameters="...") as estimator: result = estimator(circuit_indices=[0], ...)
After:
from qiskit_ibm_runtime import QiskitRuntimeService, Estimator service = QiskitRuntimeService(channel="ibm_cloud", token="...", instance="...") with Estimator( circuits=[qc], observables="...", parameters="...", service=service, options={ "backend": "ibmq_qasm_simulator" }, # or IBMBackend<"ibmq_qasm_simulator"> ) as estimator: result = estimator(circuit_indices=[0], ...)
IBMSampler
class is now deprecated and will be removed in a future release. UseSampler
class going forward.Example:
Before:
from qiskit_ibm_runtime import IBMRuntimeService, IBMSampler service = IBMRuntimeService(channel="ibm_cloud", token="...", instance="...") sampler_factory = IBMSampler(service=service, backend="ibmq_qasm_simulator") with sampler_factory(circuits=[qc], parameters="...") as sampler: result = sampler(circuit_indices=[0], ...)
After:
from qiskit_ibm_runtime import QiskitRuntimeService, Sampler service = QiskitRuntimeService(channel="ibm_cloud", token="...", instance="...") with Sampler( circuits=[qc], parameters="...", service=service, options={ "backend": "ibmq_qasm_simulator" }, # or IBMBackend<"ibmq_qasm_simulator"> ) as sampler: result = sampler(circuit_indices=[0], ...)
Deprecation Notes¶
IBMRuntimeService
,IBMEstimator
andIBMSampler
classes have been deprecated and will be removed in a future release. UseQiskitRuntimeService
,Estimator
andSampler
classes instead. See upgrade notes section for a detailed explanation with examples.
0.3.0¶
Upgrade Notes¶
A new parameter
channel
has now been added toqiskit_ibm_runtime.IBMRuntimeService
class and also to methods likesave_account()
,saved_accounts()
anddelete_account()
. It can be set toibm_quantum
oribm_cloud
to authenticate to either of the two different channels through which Qiskit Runtime service is currently offered.channel
replaces theauth
parameter which has now been deprecated.
Deprecation Notes¶
The
auth
parameter toqiskit_ibm_runtime.IBMRuntimeService
class and also to methods likesave_account()
,saved_accounts()
anddelete_account()
has now been deprecated and will be removed in a future release. Please use the newchannel
parameter instead.
Bug Fixes¶
Fixed #291 where passing a single
QuantumCircuit
to sampler or estimator primitives was throwing an error.
0.2.0¶
New Features¶
qiskit_ibm_runtime.IBMEstimator
andqiskit_ibm_runtime.IBMSampler
classes now allow you to easily interact with theestimator
andsampler
primitive programs. Refer to the examples in the respective class doc strings to learn more about how to use them.
Bug Fixes¶
Fixed a bug where
qiskit_ibm_runtime.RuntimeJob.wait_for_final_state()
would result in a NoneType error if the job already completed andqiskit_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 theqiskit.providers.BackendV2
interface and provides flatter access to the configuration of a backend, for example:# BackendV1: backend.configuration().n_qubits # BackendV2: backend.num_qubits
Only breaking change when compared to BackendV1 is backend.name is now an attribute instead of a method.
Refer to the
qiskit_ibm_runtime.IBMBackend
class doc string for a list of all available attributes.
If you used qiskit.providers.ibmq.AccountProvider.get_backend method (for example,
provider.get_backend("ibmq_qasm_simulator")
) in the qiskit-ibmq-provider package, it’s equivalent method in this new package isqiskit_ibm_runtime.IBMRuntimeService.backend()
:service = IBMRuntimeService() backend = service.backend("ibmq_qasm_simulator")
It is now optional to specify a hub/group/project upfront when connecting to the legacy IBM Quantum account. The hub/group/project is selected in the following order.
hub/group/project if passed via
instance
parameter when initializingqiskit_ibm_runtime.IBMRuntimeService
the specific hub/group/project required by the backend specified when calling
qiskit_ibm_runtime.IBMRuntimeService.run()
the default set previously via
qiskit_ibm_runtime.IBMRuntimeService.save_account()
a premium hub/group/project in your account
open access hub/group/project
It is now optional to specify backend_name in options when executing
qiskit_ibm_runtime.IBMRuntimeService.run()
method when using cloud runtime (IBM Cloud only). The server will automatically pick a backend and return the name.
qiskit.providers.ibmq.runtime.IBMRuntimeService.logout method in qiskit-ibmq-provider which was used to clear authorization cache on the server has been removed.
Python 3.6 has reached end of life and will no longer be supported in the new qiskit-ibm-runtime package.
qiskit.providers.ibmq.runtime.IBMRuntimeService.run_circuits method in qiskit-ibmq-provider has been removed and will be replaced by the
Sampler
primitive program.
qiskit_ibm_runtime.IBMRuntimeService.run()
method now accepts runtime execution options asqiskit_ibm_runtime.RuntimeOptions
class in addition to already supported Dict. backend_name, image and log_level are the currently available options.
Final result is also streamed now after interim results when you specify a
callback
toqiskit_ibm_runtime.IBMRuntimeService.run()
orqiskit_ibm_runtime.RuntimeJob.stream_results()
.
0.1.0rc2¶
New Features¶
For convenience, you can now set the
IBM Cloud service name
as a value for the accountinstance
parameter. If you choose to set the name instead of theCRN
, the initialization time of theqiskit_ibm_runtime.IBMRuntimeService
class is slightly higher because the requiredCRN
value is internally resolved via IBM Cloud APIs.
Bug Fixes¶
qiskit_ibm_runtime.utils.json.RuntimeEncoder
andqiskit_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
andqiskit_ibm_runtime.utils.json.RuntimeDecoder
have been updated to handle these ndarrays.
0.1.0rc1¶
New Features¶
You can now pass
instance
parameter in the hub/group/project format toqiskit_ibm_runtime.IBMRuntimeService.jobs()
to filter jobs. Currently only supported for legacy authentication.
You can now use the
qiskit_ibm_runtime.RuntimeJob.interim_results()
method to retrieve runtime program interim results. Note that interim results will only be available for up to two days.
Upgrade Notes¶
In order to be consistent with other properties in
qiskit_ibm_runtime.RuntimeJob
class the job_id and backend methods have been converted to properties.
When uploading a program with
qiskit_ibm_runtime.IBMRuntimeService.upload_program()
, the program description is now optional.
When printing programs with
qiskit_ibm_runtime.IBMRuntimeService.pprint_programs()
,backend_requirements
will now be listed.
Bug Fixes¶
Fixed an issue with JSON encoding and decoding when using
ParameterExpression
s in conjunction with Qiskit Terra 0.19.1 and above. Previously, theParameter
instances reconstructed from the JSON output would have different unique identifiers, causing them to seem unequal to the input. They will now have the correct backing identities.