From 053341adde6e9fab86cce623cfa67ab1f586e19f Mon Sep 17 00:00:00 2001 From: Diego <67476785+DSGuala@users.noreply.github.com> Date: Thu, 20 Jun 2024 11:33:18 -0400 Subject: [PATCH] Minor update to dataset docs to lead users to quickstart and list_datasets (#5484) **Context:** Users have trouble finding all `bondlength` and `basis` combinations for qchem molecules. They end up using the slider on the website to check which bond lengths are available one-by-one. ![image](https://github.com/PennyLaneAI/pennylane/assets/67476785/fe2686b9-8f37-4e4e-854f-bf4708e0900a) **Description of the Change:** - Updated the quickstart guide to say "viewing available datasets" instead of "dataset structure" - Updated the `qml.data` docs to encourage users to first read the quickstart guide **Benefits:** Users should be more likely to reach the `list_datasets` description in the quickstart guide and know that it can be used to view the available datasets. **Possible Drawbacks:** Users who use pennylane.ai/datasets but don't go to the documentation still won't see this. --------- Co-authored-by: Utkarsh --- doc/introduction/data.rst | 11 +++++++---- doc/releases/changelog-dev.md | 4 ++++ pennylane/data/__init__.py | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/doc/introduction/data.rst b/doc/introduction/data.rst index 64131c22144..0a9f274e8ea 100644 --- a/doc/introduction/data.rst +++ b/doc/introduction/data.rst @@ -97,12 +97,12 @@ use them directly in a PennyLane circuits as follows: >>> print(circuit()) -1.0791430411076344 -Dataset Structure ------------------ +Viewing Available Datasets +-------------------------- -You can call the +We can call the :func:`~pennylane.data.list_datasets` function to get a snapshot of the currently available data. -This function returns a nested dictionary as we show below. +This function returns a nested dictionary as shown below. >>> available_data = qml.data.list_datasets() >>> available_data.keys() @@ -150,6 +150,9 @@ We can then write this :class:`~pennylane.data.Dataset` to storage and read it a >>> read_dataset.energies array([-1.5, -0.5, 0.5, 1.5]) +For more details on reading and writing custom datasets, including metadata, please +see the :mod:`~.data` module documentation. + :html:`
` Quantum Datasets Functions and Classes diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 85895d4753c..b1e7a20e7a8 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -427,6 +427,9 @@ * The input types for `coupling_map` in `qml.transpile` are updated to reflect all the allowed input types by `nx.to_networkx_graph`. [(#5864)](https://github.com/PennyLaneAI/pennylane/pull/5864) +* The text in the `qml.data` module and datasets quickstart have been slightly modified to lead to the quickstart first and highlight `list_datasets`. + [(5484)](https://github.com/PennyLaneAI/pennylane/pull/5484) +

Bug fixes 🐛

* Fixes a bug where `hadamard_grad` returned a wrong shape for `qml.probs()` without wires. @@ -567,6 +570,7 @@ Isaac De Vlugt, Diksha Dhawan, Pietropaolo Frisoni, Emiliano Godinez, +Diego Guala, Daria Van Hende, Austin Huang, David Ittah, diff --git a/pennylane/data/__init__.py b/pennylane/data/__init__.py index d9b300eb227..1c9f2bf3771 100644 --- a/pennylane/data/__init__.py +++ b/pennylane/data/__init__.py @@ -15,7 +15,7 @@ .. note:: - For more details on using datasets, please see the + To start using datasets, please first see the :doc:`quantum datasets quickstart guide `. Overview