qiskit icon indicating copy to clipboard operation
qiskit copied to clipboard

pulse amplitudes not show in schedule.draw()

Open ajavadia opened this issue 6 years ago • 32 comments

the amplitudes of pulses are not shown in a schedule and it's hard to know the scale.

image

single pulse visualizations (commands) have this information image

ajavadia avatar Nov 17 '19 22:11 ajavadia

Is this issue still open?

pushpulldecoder avatar Jul 29 '20 09:07 pushpulldecoder

Hello @pushpulldecoder, this is still open. Do you wish me to assign this issue to you? If so I believe we should make this an option show_yaxis.

taalexander avatar Jul 29 '20 23:07 taalexander

Sure I would like to work on it.

pushpulldecoder avatar Jul 30 '20 17:07 pushpulldecoder

Assigned 😄

taalexander avatar Jul 31 '20 13:07 taalexander

image

So, I have to make this label within red optional?

pushpulldecoder avatar Aug 05 '20 10:08 pushpulldecoder

Hey! Is anybody still working on it?

coder-mtv avatar Aug 09 '20 18:08 coder-mtv

@pushpulldecoder, sorry about the delay in my response. I believe we need to add amplitude values only the y-axis like @ajavadia's second image shows

@coder-mtv - This is currently assigned to @pushpulldecoder. If for some reason they cannot undertake the issue I can reassign to you.

taalexander avatar Aug 15 '20 20:08 taalexander

@coder-mtv, it seems little progress has been made by @pushpulldecoder. I can reassign to you if you would like?

taalexander avatar Sep 15 '20 17:09 taalexander

That would be great! @taalexander

coder-mtv avatar Sep 17 '20 14:09 coder-mtv

Awesome, assigned!

taalexander avatar Sep 26 '20 13:09 taalexander

Hi @coder-mtv are you still working on this? I want to give it a try!

I have tried to gain some knowledge from online resource regarding Pulse Programming Model, Pulse Schedule and Instructions. I don't think I understood them completely but if someone can tell me how(the code) to replicate this issue. Then I think I can further use my Python knowledge to debug it. @taalexander @ajavadia

vishalg2235 avatar Nov 24 '20 17:11 vishalg2235

Hello @vishalg2235, I have assigned.

Something like:

from qiskit import pulse

waveform = pulse.Waveform([0.0, 0.1, 0.2, 0.3, 0.4])
waveform.draw()

Should allow you to generate the plot with an axis and for without an axis add:

sched = pulse.Schedule()
sched += pulse.Play(waveform, pulse.DriveChannel(0))
sched.draw()

taalexander avatar Nov 24 '20 20:11 taalexander

Thanks @taalexander

vishalg2235 avatar Nov 25 '20 02:11 vishalg2235

Hi @taalexander @ajavadia I found the line of code responsible for the issue here After commenting out that line I found following plot. Have a look at the yellow circled zone where labels overlap each other.

Screenshot 2020-11-25 at 10 17 34 AM

vishalg2235 avatar Nov 25 '20 04:11 vishalg2235

When I removed X-axis limit then it somewhat adjusts itself to display without overlap. Screenshot 2020-11-25 at 12 19 35 PM

vishalg2235 avatar Nov 25 '20 06:11 vishalg2235

@taalexander in multiple channels the Y-axis labels can be misleading/wrong as you can see in pic below that for 'd0' channel labeled amplitude is correct but for channel 'd1' its wrong:

Screenshot 2020-11-26 at 12 42 33 AM

vishalg2235 avatar Nov 25 '20 19:11 vishalg2235

I believe the values for the y-axis would need to be manually added. I see the problem now, @nkanazawa1989 may know how to better resolve this.

taalexander avatar Dec 03 '20 20:12 taalexander

Ok meanwhile I'm also getting an idea of filling Yaxis values based on the pulses and making a list of them and finally using that list in the graph. I will show it here once done with it.

vishalg2235 avatar Dec 06 '20 06:12 vishalg2235

Any update here @nkanazawa1989?

taalexander avatar Jan 04 '21 18:01 taalexander

I don't think we updated this. In v2 still yaxis value is missing, but with debugging stylesheet we can show max/min amplitude for each pulse.

nkanazawa1989 avatar Jan 05 '21 07:01 nkanazawa1989

Hi @vishalg2235 are you still working on this? Let us know if you have any further questions 😄

javabster avatar Apr 27 '21 09:04 javabster

Yes @javabster I was hoping for a better explanation. I will look deeply into this again and comment here all my doubts shortly.

vishalg2235 avatar Apr 27 '21 15:04 vishalg2235

@nkanazawa1989 can you paste an example picture from the v2 debugging stylesheet? maybe we just go with that

ajavadia avatar May 12 '21 13:05 ajavadia

Sorry about slow response. It looks like this with the stylesheet.

from qiskit import pulse
from qiskit.visualization.pulse_v2 import IQXDebugging

p = pulse.Drag(160, 0.3, 40, 10)
p.draw(style=IQXDebugging())

image

nkanazawa1989 avatar Oct 15 '21 14:10 nkanazawa1989

Update for Santa- QGoGP

✅ Issue reproducible! Y-axis ticks are not implemented in v2 version of pulse visualization (but min-max vals can be plotted out with debugging stylesheet which can help a bit) and older issues of v1 still exist as discussed above.

Will update comment/add more comments if cause is found/fixed!

Python version 3.9.7 qiskit-terra version: 0.19.1

mrvee-qC avatar Dec 15 '21 19:12 mrvee-qC

ping @vishalg2235 ?

1ucian0 avatar Dec 15 '21 21:12 1ucian0

@vishalg2235 Hey, just want to check in to see if you are still working on this issue. Please let us know if you need any help!

HuangJunye avatar Aug 18 '22 10:08 HuangJunye

as there is no response from the original assignee I am un-assigning so this issue is now open for others to pick up 😄

javabster avatar Dec 12 '22 19:12 javabster

Hi, I am looking for a first issue to work on, could this be assigned to me if no one is currently working on it?

A-Tessier01 avatar Jun 28 '23 15:06 A-Tessier01

Thanks for volunteering @A-Tessier01, I'll assing to you :) Please make sure to read the contributing guidelines, and take a look at this youtube series for github support

javabster avatar Jul 03 '23 15:07 javabster