This repository has been archived by the owner on Dec 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 376
Fix Trotter evolution of sums with identity terms #1304
Merged
manoelmarques
merged 6 commits into
qiskit-community:master
from
jlapeyre:fix-trotter-global-phase
Oct 2, 2020
Merged
Fix Trotter evolution of sums with identity terms #1304
manoelmarques
merged 6 commits into
qiskit-community:master
from
jlapeyre:fix-trotter-global-phase
Oct 2, 2020
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
Previously, Trotterization did not exclude any terms consisting of a scalar times the identity from the list of terms to be repeated. Instead, if present, an identity term was included in the resulting circuit as repeated identity gates, with the coefficient of the identity operator discarded. But, this coefficient must be accounted for: exp(-i * coeff * I) should introduce a global phase. With this PR, we remove the scalar-multiple-of-identity terms from the SummedOp to be Trotterized. We then set the global phase of the resulting circuit to account for the removed identity term. Fixes qiskit-community#1269
jlapeyre
requested review from
levbishop,
manoelmarques and
woodsp-ibm
as code owners
October 2, 2020 03:13
woodsp-ibm
added
the
Changelog: Bugfix
Include in the Fixed section of the changelog
label
Oct 2, 2020
jlapeyre
changed the title
[WIP] Fix Trotter evolution of sums with identity terms
Fix Trotter evolution of sums with identity terms
Oct 2, 2020
jlapeyre
force-pushed
the
fix-trotter-global-phase
branch
from
October 2, 2020 19:35
fbda906
to
c92b42f
Compare
woodsp-ibm
approved these changes
Oct 2, 2020
mtreinish
pushed a commit
to mtreinish/qiskit-core
that referenced
this pull request
Nov 20, 2020
…iskit-aqua#1304) * Fix Trotter evolution of sums with identity terms Previously, Trotterization did not exclude any terms consisting of a scalar times the identity from the list of terms to be repeated. Instead, if present, an identity term was included in the resulting circuit as repeated identity gates, with the coefficient of the identity operator discarded. But, this coefficient must be accounted for: exp(-i * coeff * I) should introduce a global phase. With this PR, we remove the scalar-multiple-of-identity terms from the SummedOp to be Trotterized. We then set the global phase of the resulting circuit to account for the removed identity term. Fixes qiskit-community/qiskit-aqua#1269 * Add test for Trotter evolution of sums with identity terms * Add release note for fix-trotter-global-phase * Fix linter complaints Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>
manoelmarques
pushed a commit
to manoelmarques/qiskit-terra
that referenced
this pull request
Dec 2, 2020
…iskit-aqua#1304) * Fix Trotter evolution of sums with identity terms Previously, Trotterization did not exclude any terms consisting of a scalar times the identity from the list of terms to be repeated. Instead, if present, an identity term was included in the resulting circuit as repeated identity gates, with the coefficient of the identity operator discarded. But, this coefficient must be accounted for: exp(-i * coeff * I) should introduce a global phase. With this PR, we remove the scalar-multiple-of-identity terms from the SummedOp to be Trotterized. We then set the global phase of the resulting circuit to account for the removed identity term. Fixes qiskit-community/qiskit-aqua#1269 * Add test for Trotter evolution of sums with identity terms * Add release note for fix-trotter-global-phase * Fix linter complaints Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>
manoelmarques
pushed a commit
to manoelmarques/qiskit-terra
that referenced
this pull request
Dec 7, 2020
…iskit-aqua#1304) * Fix Trotter evolution of sums with identity terms Previously, Trotterization did not exclude any terms consisting of a scalar times the identity from the list of terms to be repeated. Instead, if present, an identity term was included in the resulting circuit as repeated identity gates, with the coefficient of the identity operator discarded. But, this coefficient must be accounted for: exp(-i * coeff * I) should introduce a global phase. With this PR, we remove the scalar-multiple-of-identity terms from the SummedOp to be Trotterized. We then set the global phase of the resulting circuit to account for the removed identity term. Fixes qiskit-community/qiskit-aqua#1269 * Add test for Trotter evolution of sums with identity terms * Add release note for fix-trotter-global-phase * Fix linter complaints Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Previously, Trotterization did not exclude any terms consisting of a scalar times the
identity from the list of terms to be repeated. Instead, if present, an identity term was
included in the resulting circuit as repeated identity gates, with the coefficient of the
identity operator discarded. But, this coefficient must be accounted for:
exp(-i * coeff * I)
should introduce a global phase.With this PR, we remove the scalar-multiple-of-identity terms from the SummedOp to be
Trotterized. We then set the global phase of the resulting circuit to account for the
removed identity terms.
Fixes #1269
This PR appears to solve the problem and not cause tests to fail.
It requires tests and a release note.