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

Adopt the centralized Xanadu Sphinx Theme #287

Merged
merged 10 commits into from
May 4, 2022
Merged
Show file tree
Hide file tree
Changes from 7 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
11 changes: 10 additions & 1 deletion .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@

### Documentation

* Use the centralized [Xanadu Sphinx Theme](https://github.com/XanaduAI/xanadu-sphinx-theme)
to style the Sphinx documentation.
[(#287)](https://github.com/PennyLaneAI/pennylane-lightning/pull/287)

### Bug fixes

### Contributors

This release contains contributions from (in alphabetical order):

Mikhail Andrenkov

---

# Release 0.23.0
Expand Down Expand Up @@ -43,6 +49,8 @@ This release contains contributions from (in alphabetical order):
* Skip over identity operations in `"lightning.qubit"`.
[(#268)](https://github.com/PennyLaneAI/pennylane-lightning/pull/268)

### Documentation

### Bug fixes

* Update tests to remove `JacobianTape`.
Expand All @@ -63,7 +71,8 @@ This release contains contributions from (in alphabetical order):
### Contributors

This release contains contributions from (in alphabetical order):
Ali Asadi, Chae-Yeun Park, Lee James O'Riordan, and Trevor Vincent

Ali Asadi, Chae-Yeun Park, and Lee James O'Riordan

---

Expand Down
Binary file removed doc/_static/pennylane.png
Binary file not shown.
Binary file added doc/_static/pl_wordmark.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 removed doc/_static/xanadu_logo.png
Binary file not shown.
Binary file removed doc/_static/xanadu_logo_small.png
Binary file not shown.
Binary file removed doc/_static/xanadu_x.png
Binary file not shown.
97 changes: 67 additions & 30 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,20 +129,18 @@ def __getattr__(cls, name):
}

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates", "xanadu_theme"]
templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = ".rst"

# The master toctree document.
master_doc = "index"

# General information about the project.
project = "PennyLane-Lightning"
copyright = "Copyright 2021"
copyright = "2022, Xanadu Quantum Technologies"
author = "Xanadu Inc."

add_module_names = False
Expand Down Expand Up @@ -199,36 +197,81 @@ def __getattr__(cls, name):

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# This is required for the alabaster theme
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
html_sidebars = {
"**": [
"logo-text.html",
"searchbox.html",
"globaltoc.html",
]
}


# -- Xanadu theme ---------------------------------------------------------
html_theme = "xanadu_theme"
html_theme_path = ["."]
html_theme = "xanadu"

# xanadu theme options (see theme.conf for more information)
html_theme_options = {
# Set the name of the project to appear in the left sidebar.
"project_nav_name": "PennyLane-Lightning",
# Path to a touch icon
"touch_icon": "logo_new.png",
"large_toc": True,
"navigation_button": "#19b37b",
"navigation_button_hover": "#0e714d",
"toc_caption": "#19b37b",
"toc_hover": "#19b37b",
"table_header_bg": "#edf7f4",
"table_header_border": "#19b37b",
"download_button": "#19b37b",
"navbar_wordmark_path": "_static/pl_wordmark.png",
# Specifying #19b37b is more correct but does not match the other PL websites.
"navbar_logo_colour": "#2d7c7f",

"navbar_home_link": "https://pennylane.ai",

"navbar_left_links": [
{
"name": "Quantum machine learning",
"href": "https://pennylane.ai/qml/",
},
{
"name": "Demos",
"href": "https://pennylane.ai/qml/demonstrations.html",
},
{
"name": "Install",
"href": "https://pennylane.ai/install.html",
},
{
"name": "Plugins",
"href": "https://pennylane.ai/plugins.html",
"active": True,
},
{
"name": "Documentation",
"href": "https://pennylane.readthedocs.io/",
},
{
"name": "Blog",
"href": "https://pennylane.ai/blog/",
}
],

"navbar_right_links": [
{
"name": "FAQ",
"href": "https://pennylane.ai/faq.html",
"icon": "fas fa-question",
},
{
"name": "Support",
"href": "https://discuss.pennylane.ai/",
"icon": "fab fa-discourse",
},
{
"name": "GitHub",
"href": "https://github.com/PennyLaneAI/pennylane-lightning",
"icon": "fab fa-github",
}
],

"extra_copyrights": [
"TensorFlow, the TensorFlow logo, and any related marks are trademarks "
"of Google Inc."
],

"border_colour": "#19b37b",
"prev_next_button_colour": "#19b37b",
"prev_next_button_hover_colour": "#0e714d",
"table_header_background_colour": "#edf7f4",
"text_accent_colour": "#19b37b",
"toc_marker_colour": "#19b37b",
}

edit_on_github_project = "PennyLaneAI/pennylane-lightning"
Expand All @@ -240,13 +283,7 @@ def __getattr__(cls, name):
autodoc_member_order = "bysource"

# inheritance_diagram graphviz attributes
inheritance_node_attrs = dict(color="lightskyblue1", style="filled")
inheritance_node_attrs = dict(color="lightskyblue1", fillcolor="lightskyblue1", style="filled")

# autodoc_default_flags = ['members']
autosummary_generate = True

from directives import CustomDeviceGalleryItemDirective


def setup(app):
app.add_directive("devicegalleryitem", CustomDeviceGalleryItemDirective)
88 changes: 0 additions & 88 deletions doc/directives.py

This file was deleted.

26 changes: 3 additions & 23 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,32 +1,12 @@
PennyLane-Lightning Plugin
##########################

:Release: |release|

.. include:: ../README.rst
:start-after: header-start-inclusion-marker-do-not-remove
:end-before: header-end-inclusion-marker-do-not-remove

Devices
=======

PennyLane-Lightning provides the following device:

.. devicegalleryitem::
:name: 'lightning.qubit'
:description: A fast state-vector qubit simulator written in C++
:link: devices.html

.. raw:: html

<div style='clear:both'></div>
</br>
.. include:: overview.rst

.. toctree::
:maxdepth: 2
:caption: PennyLane-Lightning
:titlesonly:
:hidden:

Overview <overview>
installation
support
Architecture <arch/arch_overview>
Expand Down
23 changes: 23 additions & 0 deletions doc/overview.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
PennyLane-Lightning Plugin
##########################

:Release: |release|

.. include:: ../README.rst
:start-after: header-start-inclusion-marker-do-not-remove
:end-before: header-end-inclusion-marker-do-not-remove

Devices
=======

PennyLane-Lightning provides the following device:

.. title-card::
:name: 'lightning.qubit'
:description: A fast state-vector qubit simulator written in C++
:link: devices.html

.. raw:: html

<div style='clear:both'></div>
</br>
1 change: 1 addition & 0 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ graphviz
pybind11
sphinx
sphinx-automodapi
xanadu-sphinx-theme==0.1.0
20 changes: 0 additions & 20 deletions doc/xanadu_theme/LICENSE

This file was deleted.

16 changes: 0 additions & 16 deletions doc/xanadu_theme/comments.html

This file was deleted.

Loading