Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The deprecated calling sytle of circut draw function has been updated in tutorials. #743

Merged
merged 4 commits into from
Jan 29, 2024

Conversation

espREssOOOHHH
Copy link
Contributor

Dear Maintainers,

I hope this message finds you well. I've noticed a small issue within the neural networks tutorial (docs/tutorials/01_neural_networks.ipynb), specifically in code block #26. It appears that the line qc1.draw("mpl") is incompatible with qiskit version 0.45.2.

I've taken the liberty of updating the code to ensure compatibility with the specified version of qiskit. I believe this adjustment will enhance the tutorial's reliability for users working with the current version.

Thank you for considering this fix. I look forward to your feedback.

Summary

Details and comments

This error occurs in docs/tutorials/01_neural_networks.ipynb, codeblock qiskit-community#26, the end line.
@CLAassistant
Copy link

CLAassistant commented Jan 23, 2024

CLA assistant check
All committers have signed the CLA.

@coveralls
Copy link

coveralls commented Jan 23, 2024

Pull Request Test Coverage Report for Build 7665469135

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.567%

Totals Coverage Status
Change from base Build 7644765021: 0.0%
Covered Lines: 1868
Relevant Lines: 2018

💛 - Coveralls

@woodsp-ibm
Copy link
Member

Hi, you fixed one of the places in the file, not the other (this is what the output from CI looks like now at this place in the file)

image

I would suggest you restart/re-run the entire tutorial after making changes - call 26 confused me until I see this is how it is numbered since it did not start at 1.

This is just one of a number of tutorials that need updating for which I raised #725 a while back. I fixed one in the list when I needed to update it as part of another fix but the others all still need doing.

@espREssOOOHHH espREssOOOHHH changed the title Fix for 'qc1.draw()' in 01_neural_networks.ipynb The deprecated calling sytle of circut draw function has been updated in tutorials. Jan 24, 2024
@espREssOOOHHH
Copy link
Contributor Author

Dear @woodsp-ibm and other reviewers,

I'm pleased to inform you that I have successfully updated all instances of the deprecated calling style of the circuit draw function (e.g. qc1.draw("mpl")) in the tutorials, including tutorial #1, #2, #02a, #4, #5, #10, #12. These changes are now reflected in my branch.

I have carefully tested each tutorial to ensure that the updates are consistent and function correctly with the current version of Qiskit. I believe these changes will significantly improve the tutorial's usability and reliability for users working with the latest version of the library.

I would greatly appreciate it if you could review these updates at your earliest convenience. I'm open to any further suggestions or improvements and am committed to ensuring the highest quality contributions to this project.

Thank you for your guidance and feedback in this process.

@woodsp-ibm
Copy link
Member

Thanks for the updates in the rest of the tutorials too. There is one place that it seems you missed in 12_quantum_autoencoder.ipynb I noticed it in the build output from CI here but you can see it in the notebook on your fork too

image

@espREssOOOHHH
Copy link
Contributor Author

Dear @woodsp-ibm ,

Thank you for pointing out the missed update in the "12_quantum_autoencoder.ipynb" tutorial. I have reviewed the notebook and located the section you mentioned. I'm happy to inform you that I've now fixed this and updated the calling style of the circuit draw function in this part of the tutorial as well.

@woodsp-ibm woodsp-ibm added the stable backport potential The bug might be minimal and/or import enough to be port to stable label Jan 26, 2024
Copy link
Member

@woodsp-ibm woodsp-ibm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contribution which takes care of the deprecation warnings, due to the former usage of circuit draw() in the notebooks.

I labelled this for backporting so we can re-publish the docs without those warnings once this merged there. I'll leave this without merging, for the moment, in case one of the other maintainers wants to look.

@woodsp-ibm woodsp-ibm merged commit 30aa648 into qiskit-community:main Jan 29, 2024
16 checks passed
mergify bot pushed a commit that referenced this pull request Jan 29, 2024
… in tutorials. (#743)

* Fix error on 'qc1.draw'

This error occurs in docs/tutorials/01_neural_networks.ipynb, codeblock #26, the end line.

* The deprecated calling sytle of circut draw function has been updated in tutorials.

* All outdated usages of drawing cirucit in '12_quantum_autoencoder.ipynb' are fixed.

---------

Co-authored-by: Steve Wood <[email protected]>
(cherry picked from commit 30aa648)
woodsp-ibm pushed a commit that referenced this pull request Jan 29, 2024
… in tutorials. (#743) (#746)

* Fix error on 'qc1.draw'

This error occurs in docs/tutorials/01_neural_networks.ipynb, codeblock #26, the end line.

* The deprecated calling sytle of circut draw function has been updated in tutorials.

* All outdated usages of drawing cirucit in '12_quantum_autoencoder.ipynb' are fixed.

---------

Co-authored-by: Steve Wood <[email protected]>
(cherry picked from commit 30aa648)

Co-authored-by: 苏小冷 <[email protected]>
oscar-wallis pushed a commit that referenced this pull request Feb 16, 2024
… in tutorials. (#743)

* Fix error on 'qc1.draw'

This error occurs in docs/tutorials/01_neural_networks.ipynb, codeblock #26, the end line.

* The deprecated calling sytle of circut draw function has been updated in tutorials.

* All outdated usages of drawing cirucit in '12_quantum_autoencoder.ipynb' are fixed.

---------

Co-authored-by: Steve Wood <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants