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

Multiple Evaluation Modes with Operator Collections #20

Merged
merged 712 commits into from
Aug 27, 2021

Conversation

averyparr
Copy link
Contributor

@averyparr averyparr commented Aug 23, 2021

Summary

  1. OperatorCollections provide a modular way for Model classes to use and easily switch between different evaluation modes.

    a. Easier to implement new evaluation modes without cluttering every Model class

    b. Allows Models to work in four steps, each of which is modular and separated from the main Model implementation.

  2. Rotating Wave Approximation is now handled by a function mapping Model classes to other Model classes

    a. 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 is
    dealing with, along with a smal bit of special handling for each Model class. This makes adding new Model classes
    relatively straightforward.

  3. Additional features added over the past few weeks

    a. Non-vectorized LindbladModel evaluation and RotatingFrame support for LindbladModels.

    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
    (e.g. passing only $F$, and the 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 OperatorCollections.

    f. evaluate_hamiltonian functionality for LindbladModel

Details and comments

DenseOperatorCollection
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.
use evaluate_with[out]_state
naming convention.
@averyparr averyparr changed the title Operator collections Multiple Evaluation Modes with Operator Collections Aug 23, 2021
@CLAassistant
Copy link

CLAassistant commented Aug 27, 2021

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@DanPuzzuoli DanPuzzuoli left a 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.

@DanPuzzuoli DanPuzzuoli merged commit dc10d52 into qiskit-community:main Aug 27, 2021
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 <dan.puzzuoli@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants