Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs #2

Merged
merged 9 commits into from
Nov 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ name: pytest
on:
pull_request:
branches: [ "master" ]
schedule:
# Every Monday at 0AM UTC
- cron: "0 0 * * 1"

permissions:
contents: read
Expand Down
20 changes: 20 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

build:
os: ubuntu-20.04
tools:
python: "3.9"

sphinx:
configuration: docs/source/conf.py

python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Graphix Perceval interface
<!--

![PyPI](https://img.shields.io/pypi/v/graphix-perceval)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/graphix-perceval) -->
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/graphix-perceval)

Provides an interface to run MBQC pattern (`graphix.Pattern`) on Quandela's optical quantum devices as well as Perceval's simulator backends.

Expand All @@ -22,4 +22,4 @@ install with `pip`

## License

[Apache License 2.0](LICENSE)
[Apache License 2.0](LICENSE)
Binary file added docs/logo/black_with_name.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/logo/black_with_text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/logo/graphix-logo.pptx
Binary file not shown.
Binary file added docs/logo/white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/logo/white_with_text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
105 changes: 105 additions & 0 deletions docs/source/_static/img/ghz_circuit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/img/ghz_pattern.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
import os
import sys

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "graphix-perceval"
copyright = "2023, Team Graphix"
author = "Kazuki Tsuoka, Shinichi Sunami"
release = "0.0.1"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.viewcode",
"sphinx.ext.autosummary",
"sphinx.ext.autosectionlabel",
"sphinx.ext.napoleon",
"sphinx_gallery.gen_gallery",
]

templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
autosectionlabel_prefix_document = True


sys.path.insert(0, os.path.abspath("../.."))


def skip(app, what, name, obj, would_skip, options):
if name == "__init__":
return False
return would_skip


def setup(app):
app.connect("autodoc-skip-member", skip)


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output


html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]
html_logo = "../logo/white_with_text.png"
html_theme_options = {
"logo_only": True,
"display_version": False,
}

sphinx_gallery_conf = {
"examples_dirs": "../../examples", # path to your example scripts
"gallery_dirs": "gallery", # path to where to save gallery generated output
"filename_pattern": "/",
}
11 changes: 11 additions & 0 deletions docs/source/converter.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Pattern converter
==================

:mod:`graphix_perceval.converter` module
+++++++++++++++++++++++++++++++++++++++++

.. automodule:: graphix_perceval.converter
:members:

.. autoclass:: PercevalCircuitConstructor
:members:
16 changes: 16 additions & 0 deletions docs/source/experiment.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Device interface
================

:mod:`graphix_perceval.experiment` module
+++++++++++++++++++++++++++++++++++++++++

.. automodule:: graphix_perceval.experiment

.. autoclass:: PercevalExperiment
:members:

.. autoclass:: PhotonCount
:members:

.. autoclass:: PhotonDistribution
:members:
13 changes: 13 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. graphix-perceval documentation master file, created by
sphinx-quickstart on Mon Oct 16 05:34:14 2023.

Graphix-perceval - executing MBQC patterns on Perceval devices
==============================================================

.. toctree::
:maxdepth: 1
:caption: Documentation

tutorial
gallery/index
reference
8 changes: 8 additions & 0 deletions docs/source/reference.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Module reference
================

.. toctree::
:maxdepth: 2

converter
experiment
Loading