From 3351660c74b80b8be11c03e937247c8f27496f11 Mon Sep 17 00:00:00 2001 From: Lee James O'Riordan Date: Wed, 16 Oct 2024 10:52:35 -0400 Subject: [PATCH] Add module docs for RTD generation (#6397) ### Before submitting Please complete the following checklist when submitting a PR: - [x] All new features must include a unit test. If you've fixed a bug or added code that should be tested, add a test to the test directory! - [x] All new functions and code must be clearly commented and documented. If you do make documentation changes, make sure that the docs build and render correctly by running `make docs`. - [x] Ensure that the test suite passes, by running `make test`. - [x] Add a new entry to the `doc/releases/changelog-dev.md` file, summarizing the change, and including a link back to the PR. - [x] The PennyLane source code conforms to [PEP8 standards](https://www.python.org/dev/peps/pep-0008/). We check all of our code against [Pylint](https://www.pylint.org/). To lint modified files, simply `pip install pylint`, and then run `pylint pennylane/path/to/file.py`. When all the above are checked, delete everything above the dashed line and fill in the pull request template. ------------------------------------------------------------------------------------------------------------ **Context:** Adds module-level documentation for `qml.labs` **Description of the Change:** **Benefits:** **Possible Drawbacks:** **Related GitHub Issues:** --------- Co-authored-by: Josh Izaac --- doc/code/qml_labs.rst | 7 +++++++ doc/index.rst | 1 + doc/releases/changelog-dev.md | 3 +++ pennylane/labs/__init__.py | 22 ++++++++++++++++++++-- 4 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 doc/code/qml_labs.rst diff --git a/doc/code/qml_labs.rst b/doc/code/qml_labs.rst new file mode 100644 index 00000000000..7c62dda63f4 --- /dev/null +++ b/doc/code/qml_labs.rst @@ -0,0 +1,7 @@ +qml.labs +================ + +.. currentmodule:: pennylane.labs + +.. automodule:: pennylane.labs + \ No newline at end of file diff --git a/doc/index.rst b/doc/index.rst index 045a381670b..22511ed99fc 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -201,6 +201,7 @@ PennyLane is **free** and **open source**, released under the Apache License, Ve code/qml_fourier code/qml_gradients code/qml_kernels + code/qml_labs code/qml_logging code/qml_math code/qml_noise diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 005fca850f8..80d397e8d1b 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -45,6 +45,9 @@

Improvements 🛠

+* RTD support for `qml.labs` added to API. + [(#6397)](https://github.com/PennyLaneAI/pennylane/pull/6397) + * Module-level sandboxing added to `qml.labs` via pre-commit hooks. [(#6369)](https://github.com/PennyLaneAI/pennylane/pull/6369) diff --git a/pennylane/labs/__init__.py b/pennylane/labs/__init__.py index c2c712317c0..92eb83a2c99 100644 --- a/pennylane/labs/__init__.py +++ b/pennylane/labs/__init__.py @@ -11,8 +11,26 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -""":code:`pennylane/labs/` module contains experimental features enabling -advanced quantum computing research.""" +r""" +.. currentmodule:: pennylane +This module module contains experimental features enabling +advanced quantum computing research. + +.. warning:: + + This module is experimental. Frequent changes will occur, + with no guarantees of stability or backwards compatibility. + +.. currentmodule:: pennylane.labs + +Modules +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: api + + +""" __all__ = []