I'm trying to familiarise myself with OpenPulse but I'm confused about a few things.

Mainly, I would like to be able to take the pulse sequences that comprise standard gates on an IBMQ device and modify those sequences, but I'm having trouble doing that. If I call "backend.defaults().cmd_def", it brings up a list of Command objects that contain information about each gate's pulse sequence. However, "backend.defaults().cmd_def[i].sequence" is a list of PulseQobjInstructions. Is there a way to convert these lists of PulseQobjInstructions into pulse Schedule objects that operate on the correct channels and that I can simulate?

Additionally, I'm a little confused why each PulseQobjInstruction seemingly contains many more pulses (U-channels) than just the basic rotations that make up a gate. Is it necessary to recalibrate all the U-channels whenever a Drive channel is modified?


Try using backend.defaults().pulse_library, and taking a SamplePulse object from there. If you want the samples of a SamplePulse you can just use my_pulse.samples

|improve this answer|||||
  • $\begingroup$ Is backend.defaults().cmd_def and backend.defaults().pulse_library kept updated regularly? Is this the correct place to pull the best calibrated pulses for the standard gates? I am working on a project now and find I get wildly different answers running on OpenQASM vs OpenPulse as well as running the same pulse schedule a week apart. Thanks! $\endgroup$ – bRost03 Dec 4 '19 at 23:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.