-
Notifications
You must be signed in to change notification settings - Fork 361
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
Run truncation after resolving parameters #1428
Merged
jakelishman
merged 5 commits into
Qiskit:main
from
hhorii:resolve_parameters_before_truncation
Feb 4, 2022
Merged
Run truncation after resolving parameters #1428
jakelishman
merged 5 commits into
Qiskit:main
from
hhorii:resolve_parameters_before_truncation
Feb 4, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mtreinish
reviewed
Jan 18, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have a test to validate this works after the fix.
chriseclectic
added
Changelog: Bugfix
Include in the Fixed section of the changelog
stable-backport-potential
The issue or PR might be minimal and/or import enough to backport to stable
labels
Jan 18, 2022
hhorii
force-pushed
the
resolve_parameters_before_truncation
branch
from
January 19, 2022 04:26
a23d976
to
26825df
Compare
jakelishman
reviewed
Jan 19, 2022
hhorii
force-pushed
the
resolve_parameters_before_truncation
branch
4 times, most recently
from
January 24, 2022 16:03
4246739
to
4846c44
Compare
jakelishman
reviewed
Jan 26, 2022
Since 0.9.0, Aer reduces qubits and their instructions if they do not affect measured qubits. On the other hand, parameterized QObj contains indices of instructions and their values. Previously these values are set to instructions of a circuit after running truncation, which may reduce some of instructions. Consequently, indices of parameterized QObj may address wrong instructions in a truncated cicuit. This fix changes the order of processing of truncation and parameterization: First, Aer resolves paramers, and then runs truncation.
hhorii
force-pushed
the
resolve_parameters_before_truncation
branch
from
January 27, 2022 21:03
4846c44
to
47f2765
Compare
jakelishman
approved these changes
Feb 2, 2022
jakelishman
changed the title
run truncation after resolving parameters
Run truncation after resolving parameters
Feb 4, 2022
hhorii
added a commit
that referenced
this pull request
Feb 9, 2022
* run truncation after resolving parameters Since 0.9.0, Aer reduces qubits and their instructions if they do not affect measured qubits. On the other hand, parameterized QObj contains indices of instructions and their values. Previously these values are set to instructions of a circuit after running truncation, which may reduce some of instructions. Consequently, indices of parameterized QObj may address wrong instructions in a truncated cicuit. This fix changes the order of processing of truncation and parameterization: First, Aer resolves paramers, and then runs truncation. * Reword release note Co-authored-by: Matthew Treinish <mtreinish@kortar.org> Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
hhorii
added a commit
to hhorii/qiskit-aer
that referenced
this pull request
Feb 9, 2022
* run truncation after resolving parameters Since 0.9.0, Aer reduces qubits and their instructions if they do not affect measured qubits. On the other hand, parameterized QObj contains indices of instructions and their values. Previously these values are set to instructions of a circuit after running truncation, which may reduce some of instructions. Consequently, indices of parameterized QObj may address wrong instructions in a truncated cicuit. This fix changes the order of processing of truncation and parameterization: First, Aer resolves paramers, and then runs truncation. * Reword release note Co-authored-by: Matthew Treinish <mtreinish@kortar.org> Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Changelog: Bugfix
Include in the Fixed section of the changelog
stable-backport-potential
The issue or PR might be minimal and/or import enough to backport to stable
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Resolve #1427.
Details and comments
Perform truncation after resolving parameters.
This solution is not optimal but acceptable. Truncation for all sets of parameters results the same. Ideally, one truncation for all the sets of parameters.
However, truncation can change indices of instructions in parameter map and mapping instruction indices of before- and after-truncation needs codes.