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.
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
Add QPY serialization for PauliEvolutionGate #7374
Add QPY serialization for PauliEvolutionGate #7374
Changes from 9 commits
16e8647
e8bd3a0
fbc00b7
c80bfd6
19545ef
71b6ee4
a326154
10531f6
79e3870
8d8de99
4cc86bd
0f6c685
5a28626
f59887e
3034922
44d36df
babce2e
82d3576
7852fc9
05359d2
523150b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
The
str
seems unnecessary. I'm not 100% sure what this is being used for, but should it use the fully qualified name instead of just the class name in case of clashes? (Though that will limit it to classes that posses a fully qualified name.)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.
We need the class name here to build an equivalent object of the same class with the same parameters. Basically anything in https://github.com/Qiskit/qiskit-terra/blob/main/qiskit/synthesis/__init__.py is a valid type here (although
EvolutionSynthesis
orProductFormula
are abstract there). While there could be custom subclasses too we're not supporting those in qpy. So I just need to be able to dogetattr(qiskit.synthesis, synth_class)
or equivalent. The str cast is probably unnecessary though I agreeThere 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.
Sounds reasonable within the limitations to me. If we extend it, we'll probably need the fully qualified name, but that's an issue for a different time.