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

Clear error message if plugin is not installed #5218

Merged
merged 7 commits into from
Feb 15, 2024
Merged

Conversation

lillian542
Copy link
Contributor

Context:
Currently if you try to use qml.from_qiskit without the plugin installed, you get the somewhat non-specific
ValueError: Converter does not exist. Make sure the required plugin is installed and supports conversion.

Description of the Change:
If the "converter does not exist" error is raised when calling qml.from_qiskit, the user is shown a more explicit message with instructions for installing the plugin and for contacting the forum if they have issues.

Copy link

codecov bot commented Feb 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6a53702) 99.68% compared to head (a05ef64) 99.68%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5218      +/-   ##
==========================================
- Coverage   99.68%   99.68%   -0.01%     
==========================================
  Files         396      396              
  Lines       36656    36389     -267     
==========================================
- Hits        36542    36274     -268     
- Misses        114      115       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@trbromley trbromley left a comment

Choose a reason for hiding this comment

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

Nice!!

pennylane/io.py Outdated Show resolved Hide resolved
lillian542 and others added 2 commits February 15, 2024 14:03
Co-authored-by: Thomas R. Bromley <49409390+trbromley@users.noreply.github.com>
@lillian542 lillian542 marked this pull request as ready for review February 15, 2024 19:04
@lillian542
Copy link
Contributor Author

[sc-56069]

Copy link
Contributor

@obliviateandsurrender obliviateandsurrender left a comment

Choose a reason for hiding this comment

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

Looks great, should be good to go once the codecov is happy.

pennylane/io.py Show resolved Hide resolved
pennylane/io.py Outdated Show resolved Hide resolved
@lillian542 lillian542 merged commit 3216650 into master Feb 15, 2024
36 checks passed
@lillian542 lillian542 deleted the install_plugin_error branch February 15, 2024 21:33
Mandrenkov pushed a commit that referenced this pull request Feb 16, 2024
**Context:**
Currently if you try to use `qml.from_qiskit` without the plugin
installed, you get the somewhat non-specific
`ValueError: Converter does not exist. Make sure the required plugin is
installed and supports conversion.`

**Description of the Change:**
If the "converter does not exist" error is raised when calling
`qml.from_qiskit`, the user is shown a more explicit message with
instructions for installing the plugin and for contacting the forum if
they have issues.

---------

Co-authored-by: Thomas R. Bromley <49409390+trbromley@users.noreply.github.com>
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants