qiskit-advocate / qamp-spring-23

Qiskit advocate mentorship program (QAMP) Spring 23 cohort (April - July 2023)
12 stars 2 forks source link

Timeline Debugger for the Qiskit Transpiler [continued] #8

Open TheGupta2012 opened 1 year ago

TheGupta2012 commented 1 year ago

Description

Current State

Github : Qiskit Timeline Debugger PyPI : qiskit-trebugger

Deliverables

Given the evolving nature of the qiskit transpiler, the aim of this project will be to extend its existing functionalities along with more robust testing. Some major features include -

These are the initial thoughts about the features to be added, but some more functionalities may be incorporated during QAMP.

Mentors details

Looking for mentor(s)

Number of mentees

1

Type of mentees

I will be continuing the project as a mentee during the cohort. GitHub : Harshit Gupta

GemmaDawson commented 1 year ago

@TheGupta2012 - please confirm that this project does not require any additional mentees. I would like to mark it as paired, if that is the case 😸

TheGupta2012 commented 1 year ago

Yep, no further mentees required. Thanks!

GemmaDawson commented 1 year ago

@mtreinish - please add a comment so that I may assign this issue to you 😄

mtreinish commented 1 year ago

Sure, feel free to assign me to the issue.

TheGupta2012 commented 1 year ago

Hey @GemmaDawson , here are the slides for checkpoint 1 - QAMP Spring 2023 Qiskit Trebugger Checkpoint 1.pdf

TheGupta2012 commented 1 year ago

Also, please find attached below the current design for our CLI Vew (changes imminent!) :smiley_cat:

image

TheGupta2012 commented 1 year ago

Checkpoint 2 - June 2023

Updates

  1. Since the last checkpoint, the design of the CLI view of the debugger has been completed. This includes the addition of horizontal scrolling, squashing bugs in the resizing of the view, and incorporating logs and property sets of each transpilation pass in our design.
  2. Moving ahead from the prototyping phase, the first iteration of the design has been developed. The changes include updating the existing code of the original debugger, modularising the prototype code into separate classes, and integrating the transpiler data model with the new CLI view. The latest commit in repo reflects the same.
  3. The new CLI view has been introduced with a parameter view_type in the debugger's debug method.
  4. Some performance improvements were introduced -
    • Screen refreshing is now being done only once after updating the data structures of each screen component. This reduced screen flicker and optimized scrolling. This was achieved using the noutrefresh and doupdate methods of the curses module.
    • Each transpilation pass is loaded lazily thereby improving the performance of the debugger.

The CLI View of the Debugger

1. Main Panel

Displays an overview of all the transpiler passes executed by the PassManager. Contains the name, runtime, and other important information about circuit statistics

image

2. General Information

Parameters of transpilation such as optimization level, terra version, and backend info

image

3. Overview Window

Overview of the transpilation process with initial and final states of circuit properties

image

4. Pass Panel

Users can index into specific passes by pressing I and then entering the pass index. The view renders information about the pass such as docs, circuit stats, circuit diagrams, logs, and current property set. Navigation is possible between passes by using the N/P keys for next or previous passes

image

image

5. Full Working

debugger cli iteration 1

TheGupta2012 commented 1 year ago

Here are the final slides for the project : Qiskit Trebugger - Final Checkpoint - QAMP Spring '23.pdf