-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add a TrappedIon ModelProcessor #191
Comments
Hi @ajrazander, thanks for your interest! It is also what we are quite interested in. A model for ion would fit nicely into the collection of different quantum devices. I guess the starting point would be formulating the implementation of native gates for trapped ion in the qutip (or, more generally, quantum control) language: I’m happy to discuss this in more detail or explain the code structure a bit more through a call if needed. |
Great! This sounds promising! I'll share an update and probably ask for some feedback once I take a first pass at writing a TrappedIonModel/TrappedIonProcessor |
I'm going to need to pad operators with identities to get spin and phonon operators to work together. Is there something like |
Is this what you are looking for? |
I'm looking for a nice way to handle tensoring all the identity operators. For example, if I have 3 qubits, and I want to define a |
Are you perhaps looking for |
Thank you @hodgestar! @BoxiLi I am working on the compiler for the Molmer Sorensen gate, and I'm a bit confused about what label to give the two-qubit drive. I'm learning from this notebook. In input cell 19, the |
Each pair in In that particular cell, I was just showing how you can drive multiple Hamiltonian terms to implement a gate. The example does not have any physical meaning because it is just implementing simultaneous single-qubit With this explained, I'm wondering why you want to label them both as |
Ah, thank you for the explanation! Now, I'm labeling the one pulse as 'ms_01', and I'd like it to show up on the Wait, I just realized I need to use the |
Great! Although I think even with |
I'm seeing an error in the calculation of the pulse area. Specifically line 416 of In summary replace: with
Should I write this up as a separate issue? |
I guess the documentation might be a bit unclear here qutip-qip/src/qutip_qip/compiler/gatecompiler.py Lines 413 to 417 in 5790ddc
The |
Thank you for the thorough explanation! I see now that I was miscalculating the pulse area. My mistake! I did notice some odd behavior with the boxcar window. The tlist and coeff output looks right and it plots as a rectangle window (as expected), but
The state dynamics look correct though. |
@BoxiLi I have a more general question for gates. I'd like to define a custom gate such as a general rotation operator
I tried integrate this gate with the TrappedIonModel, but I'm not sure the best way to go about it. The users sets the angle phi when they make add |
That figure could indeed be a mistake. Usually if one wants to use a discrete pulse like For the second question, yes, it can be done. At the Hamiltonian level, the key problem is how to implement
Here is a simplified version of the code, where the phase is hard coded. In your case you need to extract it from the qutip-qip/doc/pulse-paper/customize.py Lines 70 to 107 in 5790ddc
Also, the circuit QED model also implemented this. The DRAG pulse adds a qutip-qip/src/qutip_qip/compiler/circuitqedcompiler.py Lines 103 to 159 in 5790ddc
In your case, you need additionally
And then multiply the |
Ok, excellent! I've attached a test file that defines the classes and tests them out on a circuit. Based on my checks, everything is passing at this point. If this looks like it's heading in the right direction, I can put the changes in a pull request. |
Looks great! The fidelity is a bit low though. But I guess one needs to fine-tune the Hamiltonian to really generate a good one. You could move some inline comments to the documentation of the class. Also, it would be nice to move those tests to a separate file e.g. |
I realized that there is actually a |
The pulse fidelity is my fault! I picked the wrong final state haha I'll change that! Your comment about the MS and QROT gates already in qutip got me thinking... The |
Hey sorry about the delay. I just merged the PR for adding the
This sounds like a great idea! Especially if it is going to be useful for the Trapped Ion. Would you like to open a PR for this first, since you might have the formula and everything with you? This will be a simpler PR compared to adding the Trapped ions. |
Busy week, but I just added the PR for the Rxx and Ryy gates here |
Hey @ajrazander Is there any future plan on adding the PR for the full ion processor? |
@BoxiLi Thanks for following up. Yes, the plan is to incorporate the new MS gate, check things are working as expected, then move the example ion processor into qutip. It might take a week or two. |
Trapped ions need more detailed gate analysis (at the laser pulse level) in open source packages. Adding a TrappedIon ModelProcessor class would make qutip a great place to do detailed noise analysis on quantum gates in trapped ions--maybe the only place that isn't behind a pay wall.
There is already a nice list of ModelProcessors, but trapped ions don't quite fit any on the list. A SpinChain is not detailed enough. For example, it ignores the phonon modes of the ions which mediate the multi-qubit Molmer Sorensen gate used in most experiments. These modes are important to keep track of in error analysis. The CavityQED is actually bit closer with the inclusion of a phonon mode, but there is only one phonon mode while for N ions there are N phonon modes.
I propose that a TrappedIon ModelProcessor should be added.
I'd be happy to add it. This would be my first contribution to qutip-qip, so I'd appreciate some guidance.
The text was updated successfully, but these errors were encountered: