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

Default set to turn off approximation_degree #8595

Merged
merged 13 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from 5 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/compiler/transpiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def transpile(
scheduling_method: Optional[str] = None,
instruction_durations: Optional[InstructionDurationsType] = None,
dt: Optional[float] = None,
approximation_degree: Optional[float] = None,
approximation_degree: Optional[float] = 1.0,
timing_constraints: Optional[Dict[str, int]] = None,
seed_transpiler: Optional[int] = None,
optimization_level: Optional[int] = None,
Expand Down
10 changes: 10 additions & 0 deletions releasenotes/notes/turn-off-approx-degree-df3d39eb69f7f09f.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
upgrade:
- |
This PR turns off the implicit use of `approximation_degree!=1.0` by default
nonhermitian marked this conversation as resolved.
Show resolved Hide resolved
in the the Qiskit transpiler at `optimization_level=3`. The transpiler should, by default,
nonhermitian marked this conversation as resolved.
Show resolved Hide resolved
preserve unitarity of the input up to known transformations such as one-sided permutations
and similarity transformations. This was broken by the previous use of `approximation_degree=None`
nonhermitian marked this conversation as resolved.
Show resolved Hide resolved
leading to incorrect results in cases such as Trotterized evolution with many time steps where
unitaries were being overly approximated leading to incorrect results. It was decided that
transformations that break unitary equivilence should be explicitly activated by the user.
nonhermitian marked this conversation as resolved.
Show resolved Hide resolved