qiskit: Pulse and Schedule plots do not start at t0=0
Information
- Qiskit Terra version:
- Python version:
- Operating system:
What is the current behavior?
As noted in https://github.com/Qiskit/qiskit-terra/pull/3418#pullrequestreview-313349295, the pulse and schedule plots do not start at t=0, nor do they finish at t=t0+duration
Steps to reproduce the problem
import qiskit.pulse as pulse
import qiskit.pulse.pulse_lib as pulse_lib
sched = pulse.Schedule()
sched += pulse_lib.constant(10, 1.0)(pulse.DriveChannel(1))
sched.draw(channels_to_plot=[pulse.DriveChannel(1)])
What is the expected behavior?
They should start and stop at t0(duration)
Suggested solutions
Any ideas @nkanazawa1989?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (17 by maintainers)
Thanks. I am on it.
Sure, no problem. If I make progress I will let you know.
On Wed., 8 Jan. 2020, 01:23 Thomas Alexander, notifications@github.com wrote:
@faraimazh feel free to poke around and comment here if you have any questions!
I looked through the code a little more and it looks like it may be happening within the
_draw_channelsfunction. I tried playing around with the code in there, and if I have set thetimearray’s first entry to 0, then the channel’s figure correctly starts at 0. (Currently,time’s first entry is 0.5, which is the amount of offset we see). I have not been able to reproduce the same fix for the end of the channel’s figure though. Will play around with it a little more.