Warning
The package qiskit-ibmq-provider
is being deprecated and its repo is going to be archived soon.
Please transition to the new packages. More information in https://ibm.biz/provider_migration_guide
Release Notes¶
0.20.0¶
Deprecation Notes¶
As of version 0.20.0, qiskit-ibmq-provider has been deprecated with its support ending and eventual archival being no sooner than 3 months from that date. The function provided by qiskit-ibmq-provider is not going away rather it has being split out to separate repositories. Please see https://github.com/Qiskit/qiskit-ibmq-provider#migration-guides.
Bug Fixes¶
In the upcoming terra release there will be a release candidate tagged prior to the final release. However changing the version string for the package is blocked on the qiskit-ibmq-provider right now because it is trying to parse the version and is assuming there will be no prelease suffix on the version string (see #8200 for the details). PR #1135 fixes this version parsing to use the regex from the pypa/packaging project which handles all the PEP440 package versioning include pre-release suffixes. This will enable terra to release an 0.21.0rc1 tag without breaking the qiskit-ibmq-provider.
PR #1129 updates
least_busy()
method to no longer support BaseBackend as a valid input or output type since it has been long deprecated in qiskit-terra and has recently been removed.
threading.currentThread
andnotifyAll
were deprecated in Python 3.10 (October 2021) and will be removed in Python 3.12 (October 2023). PR #1133 replaces them withthreading.current_thread
,notify_all
added in Python 2.6 (October 2008).
Calls to run a quantum circuit with
dynamic=True
now raise an error that asks the user to install the newqiskit-ibm-provider
.
0.19.0¶
New Features¶
The qiskit-ibmq-provider package now supports IBM Quantum LiveData features. These features allow users to observe the real-time behavior of IBM Quantum backends while executing jobs. Specifically, the provider now includes a new tab in the backend Jupyter-related widget and supports the execution of jobs (via
qiskit.providers.ibmq.IBMQBackend.run()
method) with the live_data_enabled=True parameter in allowed IBM Quantum backends.
You can now specify a different logging level in the
options
keyword when submitting a Qiskit Runtime job with theqiskit.providers.ibmq.runtime.IBMRuntimeService.run()
method.
Upgrade Notes¶
Python 3.6 support has been dropped since it has reached end of life in Dec 2021.
qiskit.providers.ibmq.random, the random number service which was used to access the CQC randomness extractor is no longer supported and has been removed.
Deprecation Notes¶
The
image
keyword in theqiskit.providers.ibmq.runtime.IBMRuntimeService.run()
method is deprecated. You should instead specify the image to use in theoptions
keyword.
Bug Fixes¶
Fixes #209 where the websocket connection kept timing out when streaming results for a runtime job, due to inactivity, when the job is in a pending state for a long time.
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.
qiskit.providers.ibmq.runtime.RuntimeEncoder
andqiskit.providers.ibmq.runtime.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.providers.ibmq.runtime.RuntimeEncoder
andqiskit.providers.ibmq.runtime.RuntimeDecoder
have been updated to handle these ndarrays.
Fixes the issue wherein
qiskit.providers.ibmq.runtime.RuntimeEncoder
does an extra decompose() if the circuit being serialized is aBlueprintCircuit
.
0.18.0¶
New Features¶
You can now pass
program_id
parameter toqiskit.providers.ibmq.runtime.IBMRuntimeService.jobs()
method to filter jobs by Program ID.
You can view the last updated date of a runtime program using
update_date
property.
If you are the author of a runtime program, you can now use
qiskit.providers.ibmq.runtime.RuntimeProgram.data
property to retrieve the program data as a string.
You can now use the
qiskit.providers.ibmq.runtime.IBMRuntimeService.update_program()
method to update the metadata for a Qiskit Runtime program. Program metadata can be specified using themetadata
parameter or individual parameters, such asname
anddescription
. If the same metadata field is specified in both places, the individual parameter takes precedence.
You can now use the
qiskit.providers.ibmq.runtime.IBMRuntimeService.update_program()
method to update the data of an existing runtime program.
Upgrade Notes¶
Runtime programs will no longer have a
version
field.
By default,
qiskit.providers.ibmq.runtime.IBMRuntimeService.pprint_programs()
now only prints the summary of each runtime program instead of all of the details. There is a new parameterdetailed
that can be set toTrue
to print all details.
limit
andskip
parameters have been added toqiskit.providers.ibmq.runtime.IBMRuntimeService.programs()
andqiskit.providers.ibmq.runtime.IBMRuntimeService.pprint_programs()
.limit
can be used to set the number of runtime programs returned andskip
is the number of programs to skip when retrieving programs.
The data parameter to
qiskit.providers.ibmq.runtime.IBMRuntimeService.upload_program()
can now only be of type string. It can be either the program data, or path to the file that contains program data.
qiskit.providers.ibmq.runtime.IBMRuntimeService.upload_program()
now takes only two parameters,data
, which is the program passed as a string or the path to the program file and themetadata
, which is passed as a dictionary or path to the metadata JSON file. Inmetadata
thebackend_requirements
,parameters
,return_values
andinterim_results
are now grouped under a specificationsspec
section.parameters
,return_values
andinterim_results
should now be specified as JSON Schema.
qiskit.providers.ibmq.AccountProvider.run_circuits()
method now takes a backend_name parameter, which is a string, instead of backend, which is aBackend
object.
The default number of
shots
(represents the number of repetitions of each circuit, for sampling) inqiskit.providers.ibmq.IBMQBackend.run()
, has been increased from 1024 to 4000.
Bug Fixes¶
Fixes the issue wherein a runtime job result cannot be retrieved multiple times if the result contains a numpy array.
0.17.0¶
New Features¶
A runtime program’s visibility can now be specified on upload using
is_public
parameter inqiskit.providers.ibmq.runtime.IBMRuntimeService.upload_program()
.
You can now specify a parent experiment ID when creating an experiment with
qiskit.providers.ibmq.experiment.IBMExperimentService.create_experiment()
. Experiments can also be filtered by their parent experiment ID inqiskit.providers.ibmq.experiment.IBMExperimentService.experiments()
.
Runtime image can now be specified using the image parameter in
qiskit.providers.ibmq.runtime.IBMRuntimeService.run()
. Note that not all accounts are authorized to select a different image.
Upgrade Notes¶
qiskit.providers.ibmq.runtime.RuntimeEncoder
andqiskit.providers.ibmq.runtime.RuntimeDecoder
are updated to support Pythondatetime
, which is not JSON serializable by default.
Bug Fixes¶
Fixes the issue where
qiskit.providers.ibmq.managed.IBMQJobManager.retrieve_job_set()
only retrieves the first 10 jobs in aqiskit.providers.ibmq.managed.ManagedJobSet
.
qiskit.providers.ibmq.runtime.RuntimeDecoder
can now restore dictionary integer keys in optimizer settings from a JSON string representation dumped by theqiskit.providers.ibmq.runtime.RuntimeEncoder
.
0.16.0¶
New Features¶
A user can now set and retrieve preferences for
qiskit.providers.ibmq.experiment.IBMExperimentService
. Preferences are saved on disk in the$HOME/.qiskit/qiskitrc
file. Currently the only preference option isauto_save
, which tells applications that use this service, such as qiskit-experiments, whether you want changes to be automatically saved.Usage examples:
provider.experiment.save_preferences(auto_save=True) # set and save preferences provider.experiment.preferences # return all saved preferences
The methods
qiskit.providers.ibmq.experiment.IBMExperimentService.create_figure()
andqiskit.providers.ibmq.experiment.IBMExperimentService.update_figure()
now accept thesync_upload
keyword. This controls whether or not the figure will be uploaded asynchronously or synchronously to backend storage. By defaultsync_upload
isTrue
for synchronous upload.
Upgrade Notes¶
IBMExperimentService
is updated to work with the newqiskit-experiments
. As a result, the syntax of the experiment service is drastically changed. This change, however, takes the experiment service out of beta mode, and future changes will provide backward compatibility according to Qiskit deprecation policy.
qiskit.providers.ibmq.runtime.utils.RuntimeEncoder
now convert a callable object toNone
, since callables are not JSON serializable.
qiskit.providers.ibmq.IBMQBackend.run()
no longer accepts validate_qobj as a parameter. If you were relying on this schema validation you should pull the schemas from the Qiskit/ibm-quantum-schemas and directly validate your payloads with that.
0.15.0¶
New Features¶
Add support for new method
qiskit.providers.ibmq.runtime.RuntimeJob.error_message()
which will return a string representing the reason if the job failed.
The inputs parameter to
qiskit.providers.ibmq.runtime.IBMRuntimeService.run()
method can now be specified as aqiskit.providers.ibmq.runtime.ParameterNamespace
instance which supports auto-complete features. You can useqiskit.providers.ibmq.runtime.RuntimeProgram.parameters()
to retrieve anParameterNamespace
instance.For example:
from qiskit import IBMQ provider = IBMQ.load_account() # Set the "sample-program" program parameters. params = provider.runtime.program(program_id="sample-program").parameters() params.iterations = 2 # Configure backend options options = {'backend_name': 'ibmq_qasm_simulator'} # Execute the circuit using the "circuit-runner" program. job = provider.runtime.run(program_id="sample-program", options=options, inputs=params)
The user can now set the visibility (private/public) of a Qiskit Runtime program using
qiskit.providers.ibmq.runtime.IBMRuntimeService.set_program_visibility()
.
An optional boolean parameter pending has been added to
qiskit.providers.ibmq.runtime.IBMRuntimeService.jobs()
and it allows filtering jobs by their status. If pending is not specified all jobs are returned. If pending is set to True, ‘QUEUED’ and ‘RUNNING’ jobs are returned. If pending is set to False, ‘DONE’, ‘ERROR’ and ‘CANCELLED’ jobs are returned.
Add support for the
use_measure_esp
flag in theqiskit.providers.ibmq.IBMQBackend.run()
method. IfTrue
, the backend will use ESP readout for all measurements which are the terminal instruction on that qubit. If used and the backend does not support ESP readout, an error is raised.
Upgrade Notes¶
qiskit.providers.ibmq.runtime.RuntimeProgram.parameters()
is now a method that returns aqiskit.providers.ibmq.runtime.ParameterNamespace
instance, which you can use to fill in runtime program parameter values and pass toqiskit.providers.ibmq.runtime.IBMRuntimeService.run()
.
The
open_pulse
flag in backend configuration no longer indicates whether a backend supports pulse-level control. As a result,qiskit.providers.ibmq.IBMQBackend.configuration()
may return aPulseBackendConfiguration
instance even if itsopen_pulse
flag isFalse
.
Job share level is no longer supported due to low adoption and the corresponding interface will be removed in a future release. This means you should no longer pass share_level when creating a job or use
qiskit.providers.ibmq.job.IBMQJob.share_level()
method to get a job’s share level.
Deprecation Notes¶
The
id
instruction has been deprecated on IBM hardware backends. Instead, please use thedelay
instruction which implements variable-length delays, specified in units ofdt
. When running a circuit containing anid
instruction, a warning will be raised on job submission and anyid
instructions in the job will be automatically replaced with their equivalentdelay
instruction.
0.14.0¶
New Features¶
You can now use the
qiskit.providers.ibmq.runtime.RuntimeJob.logs()
method to retrieve job logs. Note that logs are only available after the job finishes.
A new backend configuration attribute
input_allowed
now tells you the types of input supported by the backend. Valid input types arejob
, which means circuit jobs, andruntime
, which means Qiskit Runtime.You can also use
input_allowed
in backend filtering. For example:from qiskit import IBMQ provider = IBMQ.load_account() # Get a list of all backends that support runtime. runtime_backends = provider.backends(input_allowed='runtime')
Upgrade Notes¶
qiskit-ibmq-provider
now requires a new packagewebsocket-client
. The package has been added to the requirements.txt file.
qiskit-ibmq-provider
now uses a new packagewebsocket-client
as its websocket client, and packageswebsockets
andnest-asyncio
are no longer required.setup.py
andrequirements.txt
have been updated accordingly.
Bug Fixes¶
Fixes the issue that uses
shots=1
instead of the documented default when noshots
is specified forrun_circuits()
.
Fixes the issue wherein a
QiskitBackendNotFoundError
exception is raised when retrieving a runtime job that was submitted using a different provider than the one used for retrival.
Streaming runtime program interim results with proxies is now supported. You can specify the proxies to use when enabling the account as usual, for example:
from qiskit import IBMQ proxies = {'urls': {'https://127.0.0.1:8085'}} provider = IBMQ.enable_account(API_TOKEN, proxies=proxies)
0.13.0¶
Prelude¶
This release introduces a new feature Qiskit Runtime Service
. Qiskit Runtime is a new architecture offered by IBM Quantum that significantly reduces waiting time during computational iterations. You can execute your experiments near the quantum hardware, without the interactions of multiple layers of classical and quantum hardware slowing it down.
Qiskit Runtime allows authorized users to upload their Qiskit quantum programs, which are Python code that takes certain inputs, performs quantum and maybe classical computation, and returns the processing results. The same or other authorized users can then invoke these quantum programs by simply passing in the required input parameters.
Qiskit Runtime is currently in private beta for select account but will be released to the public in the near future.
New Features¶
qiskit.providers.ibmq.experiment.analysis_result.AnalysisResult
now has an additionalverified
attribute which identifies if thequality
has been verified by a human.
qiskit.providers.ibmq.experiment.Experiment
now has an additionalnotes
attribute which can be used to set notes on an experiment.
This release introduces a new feature
Qiskit Runtime Service
. Qiskit Runtime is a new architecture that significantly reduces waiting time during computational iterations. This new service allows authorized users to upload their Qiskit quantum programs, which are Python code that takes certain inputs, performs quantum and maybe classical computation, and returns the processing results. The same or other authorized users can then invoke these quantum programs by simply passing in the required input parameters.An example of using this new service:
from qiskit import IBMQ provider = IBMQ.load_account() # Print all avaiable programs. provider.runtime.pprint_programs() # Prepare the inputs. See program documentation on input parameters. inputs = {...} options = {"backend_name": provider.backend.ibmq_montreal.name()} job = provider.runtime.run(program_id="circuit-runner", options=options, inputs=inputs) # Check job status. print(f"job status is {job.status()}") # Get job result. result = job.result()
Upgrade Notes¶
The deprecated
Human Bad
,Computer Bad
,Computer Good
andHuman Good
enum values have been removed fromqiskit.providers.ibmq.experiment.constants.ResultQuality
. They are replaced withBad
andGood
values which should be used with theverified
attribute onqiskit.providers.ibmq.experiment.analysis_result.AnalysisResult
:Old Quality
New Quality
Verified
Human Bad
Bad
True
Computer Bad
Bad
False
Computer Good
Good
False
Human Good
Good
True
Furthermore, the
NO_INFORMATION
enum has been renamed toUNKNOWN
.
The
qiskit.providers.ibmq.IBMQBackend.defaults()
method now always returns pulse defaults if they are available, regardless whether open pulse is enabled for the provider.
Bug Fixes¶
Fixes the issue wherein passing in a noise model when sending a job to an IBMQ simulator would raise a
TypeError
. Fixes #894
Other Notes¶
The
qiskit.providers.ibmq.experiment.analysis_result.AnalysisResult
fit
attribute is now optional.
0.12.0¶
Prelude¶
qiskit.providers.ibmq.IBMQBackend.run()
method now takes one or more QuantumCircuit
or Schedule
. Use of QasmQobj
and PulseQobj
is now deprecated. Runtime configuration options, such as the number of shots, can be set via either the run()
method, or the qiskit.providers.ibmq.IBMQBackend.set_options()
method. The former is used as a one-time setting for the job, and the latter for all jobs sent to the backend. If an option is set in both places, the value set in run()
takes precedence.
IBM Quantum credentials are now loaded only from sections of the qiskitrc
file that start with ‘ibmq’.
New Features¶
Python 3.9 support has been added in this release. You can now run Qiskit IBMQ provider using Python 3.9.
qiskit.providers.ibmq.AccountProvider.backends()
now has a new parameter min_num_qubits that allows you to filter by the minimum number of qubits.
qiskit.providers.ibmq.IBMQBackend.run()
method now takes one or moreQuantumCircuit
orSchedule
. Runtime configuration options, such as the number of shots, can be set via either therun()
method, or theqiskit.providers.ibmq.IBMQBackend.set_options()
method. The former is used as a one-time setting for the job, and the latter for all jobs sent to the backend. If an option is set in both places, the value set inrun()
takes precedence. For example:from qiskit import IBMQ, transpile from qiskit.test.reference_circuits import ReferenceCircuits provider = IBMQ.load_account() backend = provider.get_backend('ibmq_vigo') circuits = transpile(ReferenceCircuits.bell(), backend=backend) default_shots = backend.options.shots # Returns the backend default of 1024 shots. backend.set_options(shots=2048) # All jobs will now have use 2048 shots. backend.run(circuits) # This runs with 2048 shots. backend.run(circuits, shots=8192) # This runs with 8192 shots. backend.run(circuits) # This again runs with 2048 shots.
qiskit.providers.ibmq.experiment.Experiment
now has three additional attributes, hub, group, and project, that identify the provider used to create the experiment.
You can now assign an
experiment_id
to a job when submitting it usingqiskit.providers.ibmq.IBMQBackend.run()
. You can use this new field to group together a collection of jobs that belong to the same experiment. Theqiskit.providers.ibmq.IBMQBackendService.jobs()
method was also updated to allow filtering byexperiment_id
.
qiskit.providers.ibmq.experiment.Experiment
now has two additional attributes:share_level: The level at which the experiment is shared which determines who can see it when listing experiments. This can be updated.
owner: The ID of the user that uploaded the experiment. This is set by the server and cannot be updated.
The method
qiskit.providers.ibmq.experimentservice.ExperimentService.experiments()
now acceptshub
,group
, andproject
as filtering keywords.
Methods
qiskit.providers.ibmq.experiment.ExperimentService.experiments()
andqiskit.providers.ibmq.experiment.ExperimentService.analysis_results()
now support alimit
parameter that allows you to limit the number of experiments and analysis results returned.
The method
qiskit.providers.ibmq.experimentservice.ExperimentService.experiments()
now acceptsexclude_mine
andmine_only
as filtering keywords.
The method
qiskit.providers.ibmq.experimentservice.ExperimentService.experiments()
now acceptsexclude_public
andpublic_only
as filtering keywords.
qiskit.providers.ibmq.managed.IBMQJobManager.run()
now accepts a singleQuantumCircuit
orSchedule
in addition to a list of them.
The
least_busy()
function now skips backends that are operational but paused, meaning they are accepting but not processing jobs.
You can now pickle an
IBMQJob
instance, as long as it doesn’t contain custom data that is not picklable (e.g. in Qobj header).
You can now use the two new methods,
qiskit.providers.ibmq.AccountProvider.services()
andqiskit.providers.ibmq.AccountProvider.service()
to find out what services are available to your account and get an instance of a particular service.
The
qiskit.providers.ibmq.IBMQBackend.reservations()
method now always returns the reservation scheduling modes even for reservations that you don’t own.
Upgrade Notes¶
A number of previously deprecated methods and features have been removed, including:
qiskit.providers.ibmq.job.IBMQJob.to_dict()
qiskit.providers.ibmq.job.IBMQJob.from_dict()
Qconfig.py support
Use of proxy URLs that do not include protocols
A new parameter,
limit
is now the first parameter for bothqiskit.providers.ibmq.experiment.ExperimentService.experiments()
andqiskit.providers.ibmq.experiment.ExperimentService.analysis_results()
methods. Thislimit
has a default value of 10, meaning by deafult only 10 experiments and analysis results will be returned.
IBM Quantum credentials are now loaded only from sections of the
qiskitrc
file that start with ‘ibmq’. This allows theqiskitrc
file to be used for other functionality.
Deprecation Notes¶
Use of
QasmQobj
andPulseQobj
in theqiskit.providers.ibmq.IBMQBackend.run()
method is now deprecated.QuantumCircuit
andSchedule
should now be used instead.
The
backends
attribute ofqiskit.providers.ibmq.AccountProvider
has been renamed tobackend
(sigular). For backward compatibility, you can continue to usebackends
, but it is deprecated and will be removed in a future release. Theqiskit.providers.ibmq.AccountProvider.backends()
method remains unchanged. For example:backend = provider.backend.ibmq_vigo # This is the new syntax. backend = provider.backends.ibmq_vigo # This is deprecated. backends = provider.backends() # This continues to work as before.
Setting of the
IBMQJob
client_version
attribute has been deprecated. You can, however, continue to read the value of attribute.
“The
validate_qobj
keyword inqiskit.providers.ibmq.IBMQBackend.run()
is deprecated and will be removed in a future release. If you’re relying on this schema validation you should pull the schemas from the Qiskit/ibmq-schemas and directly validate your payloads with that.
Bug Fixes¶
Fixes the issue wherein a job could be left in the
CREATING
state if job submit fails half-way through.
Fixes the issue wherein using Jupyter backend widget would fail if the backend’s basis gates do not include the traditional u1, u2, and u3. Fixes #844
Fixes the infinite loop raised when passing an
IBMQRandomService
instance to a child process.
Fixes the issue wherein a
TypeError
is raised if the server returns an error code but the response data is not in the expected format.
0.10.0¶
New Features¶
CQC randomness extractors can now be invoked asynchronously, using methods
run_async_ext1()
andrun_async_ext2()
. Each of these methods returns aCQCExtractorJob
instance that allows you to check on the job status (usingstatus()
) and wait for its result (usingblock_until_ready()
). Theqiskit.provider.ibmq.random.CQCExtractor.run()
method remains synchronous.
You can now use the new IBMQ experiment service to query, retrieve, and download experiment related data. Interface to this service is located in the new
qiskit.providers.ibmq.experiment
package. Note that this feature is still in beta, and not all accounts have access to it. It is also subject to heavy modification in both functionality and API without backward compatibility.
Two Jupyter magic functions, the IQX dashboard and the backend widget, are updated to display backend reservations. If a backend has reservations scheduled in the next 24 hours, time to the next one and its duration are displayed (e.g.
Reservation: in 6 hrs 30 min (60m)
). If there is a reservation and the backend is active, the backend status is displayed asactive [R]
.
Upgrade Notes¶
Starting from this release, the basis_gates returned by
qiskit.providers.ibmq.IBMQBackend.configuration()
may differ for each backend. You should update your program if it relies on the basis gates being['id','u1','u2','u3','cx']
. We recommend always using theconfiguration()
method to find backend configuration values instead of hard coding them.
qiskit-ibmq-provider
release 0.10 requiresqiskit-terra
release 0.15 or above. The package metadata has been updated to reflect the new dependency.
The deprecated support for running qiskit-ibmq-provider with Python 3.5 has been removed. To use qiskit-ibmq-provider >=0.11.0 you will now need at least Python 3.6. If you are using Python 3.5 the last version which will work is qiskit-ibmq-provider 0.10.x.
Prior to this release,
websockets
7.0 was used for Python 3.6. With this release,websockets
8.0 or above is required for all Python versions. The package requirements have been updated to reflect this.