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

Supplement docs #131

Merged
merged 4 commits into from
Jan 6, 2024
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
20 changes: 20 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2 changes: 2 additions & 0 deletions doc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# PyQuafu Documentation by Sphinx

35 changes: 35 additions & 0 deletions doc/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
4 changes: 3 additions & 1 deletion doc/source/apiref/apiref_0.3.5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ API Reference

This page is still under refinement, the contents you see may be incomplete at present.

.. _quantum_circuit:

Quantum Circuit
------------------

Expand All @@ -17,7 +19,7 @@ Quantum Elements
.. hint::
hello

.. autoclass:: quafu.elements.quantum_element.Instruction
.. autoclass:: quafu.elements.Instruction
:members:


Expand Down
38 changes: 38 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 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

# -- package path -------------------------------------------
import sys
import os

package_path = os.path.join(os.getcwd(), '..\\..\\src\\')
sys.path.insert(0, package_path)

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

project = 'PyQuafu-Docs'
copyright = '2023, BAQIS-ScQ-Cloud'
author = 'BAQIS-ScQ-Cloud'
release = '0.3.6'

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

extensions = ['sphinx.ext.autodoc',
'sphinx.ext.napoleon'
] # 'sphinx.ext.autosummary'

templates_path = ['_templates']
exclude_patterns = []

# -- 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']

# Use Napoleon interpreter to support Google style docstrings
autodoc_typehints = 'description'
28 changes: 28 additions & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.. PyQuafuDoc documentation master file, created by
sphinx-quickstart on Wed Sep 13 18:54:07 2023.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to PyQuafu's documentation!
======================================

`Quafu <http://quafu.baqis.ac.cn/>`_ shares open access to
super-conducting quantum (ScQ) computing resources with public users from all around
the world. As the python SDK of `Quafu <http://quafu.baqis.ac.cn/>`_, ``pyquafu``
provides not only flexible and advanced interfaces to the experimental backends,
but also useful toolkits for simulating, visualizing and more about quantum computation.
This documentation describes its basic syntax and usages.

Contents
====================================
.. toctree::
:maxdepth: 2

User Guide <user_guide/quafu_doc_0.3.5/quafu_doc_0_3_5>
API Reference <apiref/apiref_0.3.5>
Historical Version <release_note/historical_version>

Links
====================================

Quafu Cloud Platform: `http://quafu.baqis.ac.cn/ <http://quafu.baqis.ac.cn/>`_
11 changes: 11 additions & 0 deletions doc/source/release_note/Release Notes - v0.3.6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Release Notes - v0.3.6

- Fixed bug of status code mixed up during receiving results.
- Added attributes ``named_paras`` and ``named_pos`` into ``Instruction`` and all of its subclasses. This is to further unify interface of instructions. Added ``instructions`` into ``QuantumCircuit``, the former existing ``gates`` will contain only instances of ``QuantumGate`` in future.
- Fixed some icon-missing bugs in ``CircuitPlotManager``, plots of all basic gates was tested.

发布说明 - v0.3.6

- 修复了接收结果时状态码混淆的bug。
- 添加了属性 ``named_paras`` 和``named_pos`` 到 ``Instruction`` 和它的所有子类。这是为了进一步统一 ``Instruction`` 的接口。在 ``QuantumCircuit``中添加属性 ``instructions`` ,先前存在的``gates``在稍后的版本中将只包含``QuantumGate`` 的实例。
- 修复了``CircuitPlotManager``中一些图标缺失的bug,测试了所有基本门的绘图。
7 changes: 7 additions & 0 deletions doc/source/release_note/historical_version.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _historical_version:

Historical Version
==================

.. note::
Historical version and release notes will be loaded later.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading