Skip to content

Commit

Permalink
update doc example
Browse files Browse the repository at this point in the history
  • Loading branch information
anthayes92 committed Sep 19, 2024
1 parent b1e7534 commit 4d9d9b3
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions doc/introduction/data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,27 @@ Viewing Available Datasets
--------------------------

We can call the
:func:`~pennylane.data.list_datasets` function to get a snapshot of the currently available data.
:func:`~pennylane.data.list_data_names` function to get a snapshot of the currently available data.
This function returns a nested dictionary as shown below.

>>> available_data = qml.data.list_datasets()
>>> available_data.keys()
dict_keys(["qspin", "qchem"])
>>> available_data["qchem"].keys()
dict_keys(["H2", "LiH", ...])
>>> available_data['qchem']['H2'].keys()
dict_keys(["6-31G", "STO-3G"])
>>> print(available_data['qchem']['H2']['STO-3G'])
["0.5", "0.54", "0.62", "0.66", ...]
>>> qml.data.list_data_names()
["bars-and-stripes",
"downscaled-mnist",
"hamlib-max-3-sat",
"hamlib-maxcut",
"hamlib-travelling-salesperson-problem",
"hidden-manifold",
"hyperplanes",
"ketgpt",
"learning-dynamics-incoherently",
"linearly-separable",
"mnisq",
"mqt-bench",
"plus-minus",
"qchem",
"qspin",
"rydberggpt",
"two-curves"]

Note that this example limits the results
of the function calls for clarity and that as more data becomes available, the results of these
Expand Down

0 comments on commit 4d9d9b3

Please sign in to comment.