Skip to content

Commit

Permalink
Use sphinx-panels for accordion content (#5354) (#5390)
Browse files Browse the repository at this point in the history
* move to new qiskit theme

* Move to sphinx-panels for accordian content

* add transpiler part

* bump theme version

(cherry picked from commit 42531aa)

Co-authored-by: Paul Nation <[email protected]>
  • Loading branch information
mergify[bot] and nonhermitian authored Nov 12, 2020
1 parent 1a009ca commit a44bdbe
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 42 deletions.
12 changes: 0 additions & 12 deletions docs/_static/style.css

This file was deleted.

7 changes: 3 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@
'jupyter_sphinx',
'sphinx_autodoc_typehints',
'reno.sphinxext',
'sphinx_panels',
]
html_static_path = ['_static']
templates_path = ['_templates']
html_css_files = ['style.css', 'custom.css']
html_css_files = []

# -----------------------------------------------------------------------------
# Autosummary
Expand Down Expand Up @@ -130,9 +131,8 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme' # use the theme in subdir 'theme'
html_theme = 'qiskit_sphinx_theme' # use the theme in subdir 'theme'

html_logo = 'images/logo.png'
#html_sidebars = {'**': ['globaltoc.html']}
html_last_updated_fmt = '%Y/%m/%d'

Expand All @@ -141,7 +141,6 @@
'display_version': True,
'prev_next_buttons_location': 'bottom',
'style_external_links': True,
'style_nav_header_background': '#212121',
}

autoclass_content = 'both'
7 changes: 2 additions & 5 deletions qiskit/circuit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,8 @@
Supplementary Information
=========================
.. container:: toggle
.. container:: header
**Quantum Circuit Properties**
.. dropdown:: Quantum Circuit Properties
:animate: fade-in-slide-down
When constructing quantum circuits, there are several properties that help quantify
the "size" of the circuits, and their ability to be run on a noisy quantum device.
Expand Down
28 changes: 8 additions & 20 deletions qiskit/transpiler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,8 @@
Supplementary Information
=========================
.. container:: toggle
.. container:: header
**Basis Gates**
.. dropdown:: Basis gates
:animate: fade-in-slide-down
When writing a quantum circuit you are free to use any quantum gate (unitary operator) that
you like, along with a collection of non-gate operations such as qubit measurements and
Expand Down Expand Up @@ -152,11 +149,8 @@
<br>
.. container:: toggle
.. container:: header
**Initial Layout**
.. dropdown:: Initial layout
:animate: fade-in-slide-down
Quantum circuits are abstract entities whose qubits are "virtual" representations of actual
qubits used in computations. We need to be able to map these virtual qubits in a one-to-one
Expand Down Expand Up @@ -247,11 +241,8 @@
<br>
.. container:: toggle
.. container:: header
**Mapping Circuits to Hardware Topology**
.. dropdown:: Mapping circuits to hardware topology
:animate: fade-in-slide-down
In order to implement a CNOT gate between qubits in a quantum circuit that are not directly
connected on a quantum device one or more SWAP gates must be inserted into the circuit to
Expand Down Expand Up @@ -317,11 +308,8 @@
<br>
.. container:: toggle
.. container:: header
**Gate Optimization**
.. dropdown:: Gate optimization
:animate: fade-in-slide-down
Decomposing quantum circuits into the basis gate set of the IBM Quantum devices,
and the addition of SWAP gates needed to match hardware topology, conspire to
Expand Down
3 changes: 2 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ ddt>=1.2.0,!=1.4.0
seaborn>=0.9.0
reno>=3.2.0
Sphinx>=1.8.3,<3.1.0
sphinx-rtd-theme>=0.4.0
qiskit-sphinx-theme>=1.6
sphinx-autodoc-typehints
jupyter-sphinx
sphinx-panels
pygments>=2.4
tweedledum

0 comments on commit a44bdbe

Please sign in to comment.