qua-platform / qua-qsim

A quantum simulator for QUA programs
BSD 3-Clause "New" or "Revised" License
9 stars 6 forks source link

quaqsim.architectures.resonator.py #11

Open AbdullahKazi500 opened 3 months ago

AbdullahKazi500 commented 3 months ago

will fix #1

CLAassistant commented 3 months ago

CLA assistant check
All committers have signed the CLA.

AbdullahKazi500 commented 3 months ago

Thanks for the contribution @AbdullahKazi500!

Several modifications are needed before merging this PR. Specifically:

  • The filepath should be quaqsim/architectures/resonator.py. I noticed it was written confusingly in the issue so I've rectified it
  • The file contains a new class definition for Transmon, and two definitions for Resonator. It should instead only contain a single class definition for Resonator, and in turn the Resonator should be an optional attribute of the Transmon
  • The bottom of the file contains a program() definition. This should not be in the same file as the class definition. Instead, an example file that produces accurate results as described in the issue should be included elsewhere, either in the PR description, or preferably in a separate examples folder.
  • The example should include the necessary config structure that can be used to demonstrate resonator spectroscopy

Let me know if anything is unclear, happy to discuss further!

Can we ensure that the Hamiltonian matrices of the transmon and the resonator are appropriately combined when the resonator is coupled to the transmon? How does the method incorporate the resonator's Hamiltonian into the transmon's Hamiltonian matrix?

nulinspiratie commented 3 months ago

Looking at the code, there's indeed no coupling term yet. It would make sense to use the Jaynes-Cummings Hamiltonian for this: https://en.wikipedia.org/wiki/Jaynes%E2%80%93Cummings_model A consequence of this is that we need a combined transmon+resonator wave function, an example of how this is implemented can be found in QuTiP: https://qutip.readthedocs.io/en/qutip-5.0.x/guide/guide-tensor.html#a-two-level-system-coupled-to-a-cavity-the-jaynes-cummings-model

AbdullahKazi500 commented 3 months ago

Looking at the code, there's indeed no coupling term yet. It would make sense to use the Jaynes-Cummings Hamiltonian for this: https://en.wikipedia.org/wiki/Jaynes%E2%80%93Cummings_model A consequence of this is that we need a combined transmon+resonator wave function, an example of how this is implemented can be found in QuTiP: https://qutip.readthedocs.io/en/qutip-5.0.x/guide/guide-tensor.html#a-two-level-system-coupled-to-a-cavity-the-jaynes-cummings-model

lorentzian getting something like this

nulinspiratie commented 3 months ago

The results should show qubit-resonator coupling, e.g. by having the resonator frequency depend on the qubit frequency. This is not apparent from your results yet

AbdullahKazi500 commented 3 months ago

The results should show qubit-resonator coupling, e.g. by having the resonator frequency depend on the qubit frequency. This is not apparent from your results yet

Hi assad how should the frequency be like

nulinspiratie commented 3 months ago

Hey Abdullah, the resonance frequency should match that of the resonator's ground-to-first-excited-state when coupled to a transmon. The Jaynes-Cummings model would be appropriate in this case.

AbdullahKazi500 commented 3 months ago

Hey Abdullah, the resonance frequency should match that of the resonator's ground-to-first-excited-state when coupled to a transmon. The Jaynes-Cummings model would be appropriate in this case.

Can I predict the splitting of energy levels (Rabi splitting) using the Jaynes-Cummings model?

nulinspiratie commented 3 months ago

@AbdullahKazi500 yes you can, the Jaynes-Cummings model is one of a resonator coupled to a transmon, so the resonator's frequency depends on that of the transmon. You can find each by calculating the eigenenergies of the Hamiltonian

AbdullahKazi500 commented 3 months ago

@AbdullahKazi500 yes you can, the Jaynes-Cummings model is one of a resonator coupled to a transmon, so the resonator's frequency depends on that of the transmon. You can find each by calculating the eigenenergies of the Hamiltonian

thanks will have a look