-
Notifications
You must be signed in to change notification settings - Fork 60
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
Multiple Evaluation Modes with Operator Collections #20
Merged
DanPuzzuoli
merged 712 commits into
qiskit-community:main
from
averyparr:OperatorCollections
Aug 27, 2021
Merged
Multiple Evaluation Modes with Operator Collections #20
DanPuzzuoli
merged 712 commits into
qiskit-community:main
from
averyparr:OperatorCollections
Aug 27, 2021
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
DenseOperatorCollection
make pylint happy
cutoff_freq
frame/cutoff_freq setter functions
for GeneratorModel in a way that is compatible with OperatorCollections.
frame transformations and RWA cutoffs
_operator_collection to new _fb_op_collection.
operations are necessary.
use evaluate_with[out]_state naming convention.
DenseOperatorCollection
when evaluating without state.
ceaad2a
to
d980b47
Compare
WRT signal envelope parameter after RWA.
calling LindbladModel.from_hamiltonian
LindbladModel.evaluate(t) @ rho = LindbladModel.evaluate_rhs(t,rho) in the frame basis.
vectorized_map_into_frame
d980b47
to
d7cb96b
Compare
DanPuzzuoli
approved these changes
Aug 27, 2021
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 is good to merge.
For records: while there are no comments on this PR directly, it has been heavily reviewed in a pre-existing PR (which is now closed), as well as communication outside of github.
donsano33
pushed a commit
to donsano33/qiskit-dynamics
that referenced
this pull request
Dec 13, 2022
) * Enabled different evaluation modes for BaseGeneratorModel subclasses via the added OperatorCollection framework * Changed Frame -> RotatingFrame and added various vectorized evaluation options and modes * Migrated rotating wave handling from a property of model classes to a function rotating_wave_approximation Co-authored-by: DanPuzzuoli <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
OperatorCollection
s provide a modular way forModel
classes to use and easily switch between different evaluation modes.a. Easier to implement new evaluation modes without cluttering every
Model
classb. Allows
Models
to work in four steps, each of which is modular and separated from the mainModel
implementation.Rotating Wave Approximation is now handled by a function mapping
Model
classes to otherModel
classesa. Clearer interface on the user side with easy signal handling for translating pre-RWA to post-RWA.
b. Core functionality is implmented in helper functions, which makes future RWA implementations easier
c. Most of the
perform_rotating_wave_approximation
function is simply casework to determine which type of model it isdealing with, along with a smal bit of special handling for each
Model
class. This makes adding newModel
classesrelatively straightforward.
Additional features added over the past few weeks
a. Non-vectorized
LindbladModel
evaluation andRotatingFrame
support forLindbladModel
s.b. Basic sparse matrix operator storage and calculation (
csr_matrix
)c. Rotating frames & basis transformations for vectorized evaluation are implemented in a manner that's simpler to the user$F$ , and the
(e.g. passing only
Frame
object figuring out how to deal with vectorized operators).d. Diagonal frame operators no longer waste time changing bases.
e. Optimizations to speed in a few existing places, as well as several rounds of optimization within
OperatorCollection
s.f.
evaluate_hamiltonian
functionality forLindbladModel
Details and comments