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

Fix approximation_degree default in generate_preset_pass_maanger #11695

Conversation

jakelishman
Copy link
Member

@jakelishman jakelishman commented Jan 31, 2024

Summary

This brings it inline with transpile, as was done in gh-8595.

Details and comments

I'm proposing this as a candidate for 1.0 despite missing the deadline (needs another maintainer's sign-off) because this is really surprising behaviour, and we decided way back in #8595 that the default of "approximate away literally all of my Trotterisation" was a sufficiently poor default we ought to make the change as a sort-of bugfix. It's even more surprising for generate_preset_pass_manager to do this if transpile isn't.

Fix #11693.

This brings it inline with `transpile`, as was done in Qiskitgh-8595.
@jakelishman jakelishman added the Changelog: API Change Include in the "Changed" section of the changelog label Jan 31, 2024
@jakelishman jakelishman added this to the 1.0.0 milestone Jan 31, 2024
@jakelishman jakelishman requested a review from a team as a code owner January 31, 2024 23:09
@qiskit-bot
Copy link
Collaborator

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core

Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

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

I'm ok with granting a freeze exception for this PR, it was a good catch by @chriseclectic to find this was mismatched with transpile(). We definitely don't want this as the default and we should definitely get this in before rc1 tomorrow. Just one inline suggestion and then I think we can enqueue this for merging.

---
upgrade:
- |
The implicit use of ``approximation_degree!=1.0`` by default in the
Copy link
Member

Choose a reason for hiding this comment

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

FWIW, I think was only the case if a backend or target with error properties are set. The default of approximation_degree=None was a short hand of approximate up to the error rate reported in the target. So if there was no error rate it wouldn't approximate the decomposition.

Copy link
Member Author

Choose a reason for hiding this comment

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

tbh I just copied the first sentence of the note from #8595. Happy to change it to whatever you like

Copy link
Member

Choose a reason for hiding this comment

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

It's fine this was more just me musing out loud. It's why I didn't leave a concrete suggestion.

@coveralls
Copy link

coveralls commented Jan 31, 2024

Pull Request Test Coverage Report for Build 7733817763

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 57 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.02%) to 89.507%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 3 93.2%
qiskit/circuit/quantumcircuit.py 54 94.23%
Totals Coverage Status
Change from base Build 7732804564: 0.02%
Covered Lines: 59390
Relevant Lines: 66352

💛 - Coveralls

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
@mtreinish mtreinish added this pull request to the merge queue Feb 1, 2024
Merged via the queue into Qiskit:main with commit 9dfb668 Feb 1, 2024
12 checks passed
@jakelishman jakelishman deleted the fix-preset-passmanager-approximation-degree-default branch February 1, 2024 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: API Change Include in the "Changed" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default values for approximation_degree differ in transpile and generate_preset_pass_manager
4 participants