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

Support frame transformation and dressed states #94

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

BoxiLi
Copy link
Member

@BoxiLi BoxiLi commented Sep 19, 2021

  • Allow a transformation matrix to be given, which will be applied to the Hamiltonian and collapse operators when generating QobjEvo for qutip solvers.
  • Provide an option so that the dressed states w.r.t. the drift Hamiltonian will be calculated and applied as a transformation matrix.

- Allow a transformation matrix to be given, which will be applied to the Hamiltonian and collapse operators when generating QobjEvo for qutip solvers.
- Provide an option so that the dressed states w.r.t. the drift Hamiltonian will be calculated and applied as a transformation matrix.
@BoxiLi BoxiLi requested a review from hodgestar September 19, 2021 16:26
@BoxiLi
Copy link
Member Author

BoxiLi commented Sep 19, 2021

The failing test seems to be a Coveralls connection issue. Retry later.

Copy link
Contributor

@hodgestar hodgestar left a comment

Choose a reason for hiding this comment

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

This looks like a cool new feature. I think we can simplify the complexity of it greatly though by:

  • getting rid of self.use_dressed_states, self._transform, get_transform and set_transform
  • keep compute_dressed_states
  • add transform=None option to get_noisy_pulse

So that now one can do:

dressed_states = processor.compute_dressed_states()
pulses = processor.get_noisy_pulses(transform=dressed_states)

The Processor class now doesn't have to manage any new state, it's simpler and clearer to the user of the class what is happening, and the user has more control (e.g. they could pass in their own transform if they wanted).

Thoughts?

@BoxiLi
Copy link
Member Author

BoxiLi commented Sep 20, 2021

That will indeed save us from the get and set methods and self._transformation. But this means that we also need to provide transformation as a parameter for other methods that use the dynamics, such as run_state, which run the circuit simulation. The transformation is applied when calling get_qobjevo (not get_noisy_pulse because Pulse does not support math operations, and QobjEvo does.). The more widely used public APIs like run_state call get_qobjevo.

The goal is to provide

  • an easy API to use dressed states as logical qubit basis: use_dressed_states.
  • a more general API that allows one to set custom transformation: set_transformation.

In my mind, the use cases of the dressed states are mostly in the resonator-qubit model. One provides a drift Hamiltonian where the qubit and resonator are weakly coupled. If one wants to use the dressed states, one only needs to set self.use_dressed_states to True (or this could be a default setting for some predefined model).

Seems to me that a simple switch self.use_dressed_states is more convenient, especially when dressed states are used as a default basis in some predefined Processor models (in the future)?

@BoxiLi BoxiLi marked this pull request as draft October 10, 2021 12:13
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.

2 participants