0
$\begingroup$

My question is very basic but I really do not know its answer. When I execute my code, I am getting some warnings as below:

DeprecationWarning: The qiskit.IBMQ entrypoint and the qiskit-ibmq-provider package (accessible from 'qiskit.providers.ibmq`) are deprecated and will be removed in a future release. Instead you should use the qiskit-ibm-provider package which is accessible from 'qiskit_ibm_provider'. 
You can install it with 'pip install qiskit_ibm_provider'. Just replace 'qiskit.IBMQ' with 'qiskit_ibm_provider.IBMProvider'
  
DeprecationWarning: The package qiskit.providers.ibmq is being deprecated. Please see https://ibm.biz/provider_migration_guide to get instructions on how to migrate to qiskit-ibm-provider (https://github.com/Qiskit/qiskit-ibm-provider) and qiskit-ibm-runtime (https://github.com/Qiskit/qiskit-ibm-runtime).
   FutureWarning: The default matplotlib drawer scheme will be changed to "iqp" in a following release. To silence this warning, specify the current default explicitly as style="clifford", or the new default as style="iqp".
  self._style, def_font_ratio = load_style(self._style)

What does exactly mean by these warnings. Does it mean that although my code is working now, it will soon stop working? Are not these frameworks in python maintain backward compatibility? It would be great if someone can explain this process of how to migrate my code. Suppose my present code is working on some particular version of qiskit, should i install the latest version of qiskit and try and follow all the solution provided in warnings?

$\endgroup$

1 Answer 1

2
$\begingroup$

These warnings are here to tell you that a part of Qiskit API that you are using will, likely in the next few months ("future releases", might be a year, but likely not a lot more than that) be removed.

Does it mean that although my code is working now but it will soon stop working?

In this case, it is nearly that. In general, a deprecation means that future versions of the framework will not support the deprecated feature anymore, but older, already published, versions will still have the feature.

In this particular case, the feature implements a way to query information from IBM servers. This means that this code will stop working when:

  1. it will be deprecated, and so no update will be performed on the code, AND
  2. the queries to the IBM server will change.

So yes, in this case, your code will eventually break.

Arenot these frameworks in python maintain backward compatability?

Yes, up to a point. Qiskit recently got out of beta and got a 1.0.0 version. According to semantic versioning, this means that backward-incompatible changes are allowed.

It would be great if someone can explain this process of how to migrate my code. Suppose my present code is working on some particular version of qiskit, should i install the latest version of qiskit and try and follow all the solution provided in warnings?

You can follow the official migration guide. There is also an explanation on the old qiskit-ibmq-provider package GitHub page.

$\endgroup$
2
  • $\begingroup$ Thank you @AdrienSuau. This means first I create a new conda environment, then install the new latest version of qiskit, then try to run my code on the latest version. Wherever the code breaks, I should refer the warnings I am getting. Fixed all of them using "official migration quide" and install all other packages (numpy, pandas etc) as needed? $\endgroup$
    – Manu
    Commented Mar 4 at 22:54
  • $\begingroup$ You will also need to use the new package by changing the imports in your code. Everything should be explained in the migration guide, and if not you should probably raise an issue on the migration guide to flag a potential improvement to the guide, as if you have an issue, it is very likely that others will have it too. $\endgroup$ Commented Mar 5 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.