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

PauliEvolution gate #6975

Merged
merged 45 commits into from
Oct 29, 2021
Merged

PauliEvolution gate #6975

merged 45 commits into from
Oct 29, 2021

Conversation

Cryoris
Copy link
Contributor

@Cryoris Cryoris commented Sep 2, 2021

Summary

Implement an evolution gate for the evolution of sums (or sums of sums) of Paulis. The evolution gate is an opaque block containing all evolution information so the compiler can select do the synthesis and do optimizations.

Closes #6863.

Details and comments

In a nutshell:

  • The PauliEvolutionGate contains the evolution info (Operator and evolution time) and can be equipped with an EvolutionSynthesis to specify how to unroll. Eventually the compiler should select that.
  • The EvolutionSynthesis determines how to synthesize the evolution and for now includes
    • product formulas: LieTrotter and SuzukiTrotter
    • exact, matrix-based synthesis: MatrixExponentiation

Optimizations we can do with this:

Design doc: https://gist.github.com/Cryoris/abc9753fd7dfb0cc3b3a83aa58a182e3

- add synthesis classes to imports
- implement lie-trotter w/o opflow
- PauliEvo shows as "exp(it <term>)"
and use HamiltonianGate instead of direct matrix evo
@Cryoris Cryoris changed the title [WIP] Evolution gate Evolution gate Sep 8, 2021
@Cryoris Cryoris marked this pull request as ready for review September 8, 2021 12:09
@Cryoris Cryoris requested a review from a team as a code owner September 8, 2021 12:09
@woodsp-ibm woodsp-ibm added the Changelog: New Feature Include in the "Added" section of the changelog label Sep 9, 2021
@woodsp-ibm
Copy link
Member

Needs a reno release note

Cryoris and others added 4 commits September 10, 2021 08:54
Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>
@ajavadia ajavadia changed the title Evolution gate PauliEvolution gate Oct 29, 2021
qiskit/circuit/library/evolution.py Outdated Show resolved Hide resolved
qiskit/circuit/library/evolution.py Outdated Show resolved Hide resolved
qiskit/circuit/synthesis/evolution/evolution_synthesis.py Outdated Show resolved Hide resolved
qiskit/circuit/synthesis/evolution/pauli_evolution.py Outdated Show resolved Hide resolved
qiskit/circuit/synthesis/evolution/suzuki_trotter.py Outdated Show resolved Hide resolved
Cryoris and others added 4 commits October 29, 2021 13:32
Co-authored-by: Ali Javadi-Abhari <ajavadia@users.noreply.github.com>
- synthesize(self)
- don't show `t` in evo-gate draw
- delete pauli_evolution.py
ajavadia
ajavadia previously approved these changes Oct 29, 2021
Copy link
Member

@ajavadia ajavadia left a comment

Choose a reason for hiding this comment

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

Thanks for working on this @Cryoris. I made a couple small changes, the most notable being moving qiskit.circuit.synthesis one level up to qiskit.synthesis, as I really would like to separate circuit descriptions from how they are compiled. And this can be a folder to add new synthesis methods in for other high level objects.

It looks good to me now. There is a slight thing in the drawing that doesn't show the coeffs (so it shows e^iXX and e^-iXX as the same). But I couldn't find a good solution immediately, it can be a followup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the "Added" section of the changelog
Projects
None yet
5 participants