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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion qiskit/transpiler/preset_passmanagers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def generate_preset_pass_manager(
routing_method=None,
translation_method=None,
scheduling_method=None,
approximation_degree=None,
approximation_degree=1.0,
seed_transpiler=None,
unitary_synthesis_method="default",
unitary_synthesis_plugin_config=None,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
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.

:func:`~.generate_preset_pass_manager` function has been
disabled. The previous default could cause undue and unexpected approximations, especially in
workloads involving Trotterization or similar runs of operations that are close, but decidedly
not equal, to the identity.

This change brings the inner pass-manager generation defaults in line with :func:`.transpile`,
which was always the intention. See `#8595 <https://github.com/Qiskit/qiskit/pull/8595>`__ for
more detail.
Loading