quil-rs icon indicating copy to clipboard operation
quil-rs copied to clipboard

Create a schedule plotting package

Open bramathon opened this issue 4 months ago • 0 comments

Visualizing the schedule of a quil program is an important feature for users. Program timing is often important to understanding program behaviour and the effects of noise.

To support plotting, we propose a new package called "quil-plotting", which would live in the following location:

    quil-rs
    ├── quil-cli                               
    ├── quil-py           
    ├── quil-plotting
    │    ├── quil_plotting       # The Python library package root.
    │    │     └── pulse.py
    │    │     └── __init__.py
    │    ├── pyproject.toml
    │    ├── README.md
    │    └── test                    # Plotting tests
    ├── quil-rs
    ├── scripts                              
    ├── .gitignore
    └── ...                           

The standalone package would be tested and released along with quil-py and quil-rs. The package will be fairly small, containing additional python dependencies for plotting, and functions to create a plot. An example of such a plot is attached.

gate-view

We envision that the package may grow to include other visualizations of quil programs, including multi-block visualizations, graph visualizations or ZX-diagrams. However, for the time being, we restrict the scope to a pulse plot.

Open questions

  1. quil-py exposes a rust library in python, and thus has a number of project structures to do that. It uses the maturin build system and has a src/ directory with rust code. This is unnecessary for quil-plotting, but it's desirable to maintain consistency. Should quil-plotting use this build system and have a skeleton src/ directory?

bramathon avatar Oct 06 '24 08:10 bramathon