Question about custom pulse
vsandinh opened this issue · 6 comments
Hi, thanks for a great tool.
Is there an efficient way to pass a custom pulse to the pulse sequence? So my custom pulse is quite simple, for example, just changing the phase of the default Gaussian pulse or change its amplitude. Is there a fast way to do it rather than having to get out the two arrays and feed them into the Operation? Thanks!
You can subclass sequencing.pulses.Pulse
, see: https://sequencing.readthedocs.io/en/latest/notebooks/01-modes.html#Defining-a-custom-pulse.
Hopefully this works for you. If not, feel free to ping me again.
GaussianPulse
also has parameters for amp and phase: https://sequencing.readthedocs.io/en/latest/api/classes.html#gaussianpulse
thanks, I was able to use GaussianPulse to change the amp and phase (I also use DRAG pulse). However, my question is whether there is a quick way that I can put it into the sequence. Right now, I need to get the two arrays for I and Q from the GaussianPulse and then use Operation. Also, I need to calibrate for that pulse again since GaussianPulse uses amp around 1 and gets calibrating later within the rotate function.
I see. I think the answer is no, there is not an easier way than putting the arrays for I and Q into an Operation
. You could subclass Qubit
and add a method similar to Qubit.rotate()
that handles making the Operation
for that specific pulse, or just write a standalone function to do it
thanks. Qubit.rotate() does serve some of my needs. I am trying to simulate some qutrit gates with virtual z gate and your tool is great.
Thanks, I'm glad you're finding it useful!