-
Notifications
You must be signed in to change notification settings - Fork 204
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
Dict-based aux_operators
#406
Merged
mrossinek
merged 35 commits into
qiskit-community:main
from
mrossinek:dict-based-aux-operators
Dec 1, 2021
Merged
Changes from 13 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
5763cb7
[WIP] naive migration to dict-based aux_operators
mrossinek ef8ca14
[WIP] extract ListOrDict logic into class
mrossinek 51f2580
Revert ListOrDict integration
mrossinek f1852a1
Add basic unittest for dict-based aux ops
mrossinek 9fa525c
Refactor
mrossinek e8a8f97
Extend aux_operators public extension to support dict too
mrossinek b520b1e
Fix lint
mrossinek ef06a84
Revert some unnecessary changes
mrossinek b9904ea
Update docstrings
mrossinek 50fc492
Fix spell
mrossinek cb4ff7f
Remove unused import
mrossinek bffba0f
Merge branch 'main' into dict-based-aux-operators
manoelmarques 49d116d
Merge branch 'main' into dict-based-aux-operators
mrossinek 250f3df
Merge branch 'main' into dict-based-aux-operators
mrossinek 6448811
Fix lint
mrossinek 702812a
Reuse ListOrDict-type alias from Terra
mrossinek 3a518f4
Remove BaseProblem.main_property_name setter
mrossinek a0cc750
Improve commutation debug message
mrossinek 1c05bd4
Extract new aux_operators interface into global setting
mrossinek 49870c4
Run black
mrossinek c45c6de
Add DeprecationWarning for list-based aux_operators
mrossinek c344832
Log warning instead of raising it
mrossinek f65105f
Merge branch 'main' into dict-based-aux-operators
mrossinek 057c4ce
Merge branch 'main' into dict-based-aux-operators
mrossinek 93632ef
Merge branch 'main' into dict-based-aux-operators
mrossinek ab3e4d6
Merge branch 'main' into dict-based-aux-operators
mrossinek e21bfa7
Merge main and fix conflicts
manoelmarques 985e2be
Merge branch 'main' into dict-based-aux-operators
manoelmarques a5de212
Merge branch 'main' into dict-based-aux-operators
manoelmarques 646f0ea
Merge branch 'main' into dict-based-aux-operators
mrossinek 374e30c
Raise error upon aux_operator name clash
mrossinek 58ab2ed
Evaluate aux_operators at ground state during QEOM
mrossinek 1f36750
Merge branch 'main' into dict-based-aux-operators
manoelmarques 727460f
Merge branch 'main' into dict-based-aux-operators
manoelmarques bd3368b
Merge branch 'main' into dict-based-aux-operators
manoelmarques File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ arxiv | |
asparagine | ||
aspartic | ||
atol | ||
attr | ||
autosummary | ||
avogadro | ||
äquivalenzverbot | ||
|
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
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
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
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
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
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
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
Oops, something went wrong.
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.
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.
Do you want to do the dict so its different than the minimum eigensolver - i.e it defines keys as just 'str'? The reason was to ensure it can be serialized. So if you define int here there arguably be an impedance mismatch when going down the stack whereby perhaps int will not behave as expected - I'm thinking here more around the runtime and remoting these.
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.
Yeh you're right. Duplicating this is probably not a good way to go. Unfortunately, Qiskit Terra does not have one ground truth. Instead they have two definitions of
ListOrDict
inqiskit.algorithms.minimum_eigen_solvers
and inqiskit.algorithms.eigen_solvers
. While they are currently identical, this is rather error prone and could probably be improved.