Skip to content

Consistent cell ordering in published jupyter notebooks #693

@anthony-santana

Description

@anthony-santana

Required prerequisites

  • Search the issue tracker to check if your feature has already been mentioned or rejected in other issues.

Describe the feature

We recently added a "Tutorials" section to the documentation containing a set of jupyter notebooks. What gets published here (https://nvidia.github.io/cuda-quantum/latest/examples/python/tutorials/single_qubit_rotation.html) all comes from the files in (docs/.../python/tutorials).

If you've executed a cell within that notebook and it has no output, the published docs will show no output. If you do print something, a separate cell will be displayed with that output below the code cell in the docs. See the output here for an example { 00:490 11:510 }.

This issue is incredibly nit picky, but the notebooks display the cell number next to each code cell -- according to the order that each cell was executed locally. In the executing_circuits.ipynb file above, this results in the first code cell for sample being labeled "# 3" and the next cell for observe being "# 12". Preferably, they will instead be "# 1" and "# 2" to make them both consistent and easier to reference.

The fix should be simple -- just re-run all of the files end to end -- instead of one kernel at a time. Then just open a PR with all of those re-executed files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood first issueGood for newcomersstale-notifiedStale notification has already fired for this issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions