Skip to content

Conversation

RoyElkabetz
Copy link
Contributor

@RoyElkabetz RoyElkabetz commented Aug 15, 2025

Summary

Related issue: #2328
This Draft is adding a new visualization tool for plotting timing information of compiled quantum circuits.

Details and comments

This is still a WIP, however, I would appreciate any comments / suggestions on how to best integrate that with the repo existing visualization module and structures.

NOTE
The tool is currently using pandas, but since it is not a dependency of the repo I will change that to Numpy. Moved

TODOs

  • Change mock data for testing to match in structure data returned from SamplerPubResult
  • Change new unit-tests to match new mock data structure

@CLAassistant
Copy link

CLAassistant commented Aug 15, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@ihincks ihincks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add the main visualization function to the parent __init__.py to make it easier to import.

Is the data that comes back from the job going to be a string or some other object?

@RoyElkabetz
Copy link
Contributor Author

Here is a file with scheduling data that can be used for testing.
circuit_timing_info.txt

@RoyElkabetz
Copy link
Contributor Author

Is the data that comes back from the job going to be a string or some other object?

I expect it to be a list of strings, where each string represent a single instruction on some channel.
The instruction data will be comma separated into the following data types,

Branch, Instruction, Channel, T0, Duration, Pulse

where,
Branch - determines if the instruction is in a control flow (then / else) or a main branch
Instruction - the gate and the qubit to operate on
Channel - the channel that is being assigned with the instruction (Qubit x / AWGRx_y / ...)
T0 - the instruction start time within the complete schedule
Duration - the duration of the instruction
Pulse - the type of pulse operation being used

here is an example,

main,barrier,Qubit 0,7,0,barrier       # A barrier on the main branch on qubit 0 at time 7 with 0 duration
main,reset_0,Qubit 0,7,64,play         # A reset instruction on the main branch on qubit 0 at time 7 with duration 64 and a play operation
...

@RoyElkabetz
Copy link
Contributor Author

Here is an example of a circuit schedule using the tool
circuit_schedule

@RoyElkabetz RoyElkabetz marked this pull request as ready for review September 2, 2025 19:07
@jyu00
Copy link
Collaborator

jyu00 commented Sep 2, 2025

It can be a separate PR, but we talked about giving users the option of saving the figure into a file, to make it easier to zoom in etc and not blocking their notebook.

@RoyElkabetz
Copy link
Contributor Author

One last remark: we need a new feature release note to document the drawer. You can follow the instructions in the contribution guidelines.

Added in 68c693a.

@kt474 kt474 added this to the 0.43.0 milestone Sep 16, 2025
@ElePT ElePT added the Changelog: New Feature Include in the Added section of the changelog label Sep 18, 2025
ElePT
ElePT previously approved these changes Oct 7, 2025
Copy link
Collaborator

@ElePT ElePT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On my side, the PR looks in a good state to merge. Any missing points you think should block the merge to main @jyu00 @mberna? I assume there are elements that could be tweaked but it might make more sense to do so in follow ups.

jyu00
jyu00 previously approved these changes Oct 7, 2025
Copy link
Collaborator

@jyu00 jyu00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minor common on the release note, but otherwise looks good. Thanks @RoyElkabetz!

Copy link
Collaborator

@jyu00 jyu00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @RoyElkabetz!

Copy link
Collaborator

@ElePT ElePT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM too!

@ElePT ElePT enabled auto-merge October 9, 2025 13:26
@ElePT ElePT added this pull request to the merge queue Oct 9, 2025
Merged via the queue into Qiskit:main with commit aafa1af Oct 9, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelog: New Feature Include in the Added section of the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants