Skip to content

Commit

Permalink
Minor update to dataset docs to lead users to quickstart and list_dat…
Browse files Browse the repository at this point in the history
…asets (#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 <utkarshazad98@gmail.com>
  • Loading branch information
2 people authored and mudit2812 committed Jul 2, 2024
1 parent 2511c73 commit 053341a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
11 changes: 7 additions & 4 deletions doc/introduction/data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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:`<div class="summary-table">`

Quantum Datasets Functions and Classes
Expand Down
4 changes: 4 additions & 0 deletions doc/releases/changelog-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

<h3>Bug fixes 🐛</h3>

* Fixes a bug where `hadamard_grad` returned a wrong shape for `qml.probs()` without wires.
Expand Down Expand Up @@ -567,6 +570,7 @@ Isaac De Vlugt,
Diksha Dhawan,
Pietropaolo Frisoni,
Emiliano Godinez,
Diego Guala,
Daria Van Hende,
Austin Huang,
David Ittah,
Expand Down
2 changes: 1 addition & 1 deletion pennylane/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 </introduction/data>`.
Overview
Expand Down

0 comments on commit 053341a

Please sign in to comment.