8000 Migrate the examples gallery to `sphinx-gallery` · Issue #612 · tqec/tqec · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Migrate the examples gallery to sphinx-gallery #612
Open
@purva-thakre

Description

@purva-thakre

The documentation examples gallery relies on nbgallery to create a gallery of jupyter notebooks.

.. _gallery-reference-label:
Computation Gallery
===================
This section contains a collection of constructed logical computations and their simulation results.
.. nbgallery::
memory.ipynb
cnot.ipynb
move_rotation.ipynb
three_cnots.ipynb
steane_encoding.ipynb

Whenever I run one of these notebooks locally in VS Code, the results show up in the diff as changes one might want to commit to a PR. I think it might be better to switch to a different gallery without the hassle of discarding the results every time. sphinx-gallery is a better option in my opinion.

The goal of this issue is to

  1. add sphinx-gallery configuration settings to docs/conf.py
  2. port the .pnyb examples in docs/gallery as example_some_name.py files. The non-code lines can be converted to reST format.

One main advantage of this is that it is easy to make changes to the code locally without the results showing up in the diff as files we might want to commit. Plus, it is easy to download a jupyter notebook version of an example if the user desires to do so. See the right column of this example.

Image

Note that it might be better to work on this issue after #592 is merged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0