diff --git a/.buildinfo b/.buildinfo index 5d96e112..89d19f04 100644 --- a/.buildinfo +++ b/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 55f1805b28fd84590ae1799408b974b3 +config: ca994d7d76a3b179a85e8b02c96bfa72 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/_modules/index.html b/_modules/index.html deleted file mode 100644 index e0a62f76..00000000 --- a/_modules/index.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - Overview: module code — SQuADDS 0.1.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
- - -
-
-
- - -
- -
-
-
- -
- - - - -
-
- - -
-
-
- -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/_modules/squadds/core/utils.html b/_modules/squadds/core/utils.html deleted file mode 100644 index a08584d9..00000000 --- a/_modules/squadds/core/utils.html +++ /dev/null @@ -1,332 +0,0 @@ - - - - - - - squadds.core.utils — SQuADDS 0.1.0 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
- - -
-
-
- - -
- -
-
-
-
- -

Source code for squadds.core.utils

-import urllib.parse
-import webbrowser
-import getpass
-import os
-from huggingface_hub import HfApi, HfFolder
-from squadds.core.globals import ENV_FILE_PATH
-
-
-[docs] -def set_huggingface_api_key(): - """ - Sets the Hugging Face API key by appending it to the .env file. - If the API key already exists in the .env file, it does not add it again. - If the Hugging Face token is not found, it raises a ValueError. - """ - # Check if API key already exists - if os.path.exists(ENV_FILE_PATH): - with open(ENV_FILE_PATH, 'r') as file: - existing_keys = file.read() - if 'HUGGINGFACE_API_KEY=' in existing_keys: - print('API key already exists in .env file.') - return - - # Ask for the new API key - api_key = getpass.getpass("Enter your Hugging Face API key: ") - # Append the new API key to the .env file - with open(ENV_FILE_PATH, 'a') as file: - file.write(f'\nHUGGINGFACE_API_KEY={api_key}\n') - print('API key added to .env file.') - - api = HfApi() - token = HfFolder.get_token() - if token is None: - raise ValueError("Hugging Face token not found. Please log in using `huggingface-cli login`.")
- - - - - - - -
-[docs] -def send_email_via_client(dataset_name, institute, pi_name, date, dataset_link): - """ - Sends an email notification to recipients with the details of the created dataset. - - Args: - dataset_name (str): The name of the dataset. - institute (str): The name of the institute where the dataset was created. - pi_name (str): The name of the principal investigator who created the dataset. - date (str): The date when the dataset was created. - dataset_link (str): The link to the created dataset. - - Returns: - None - """ - recipients = ["shanto@usc.edu", "elevenso@usc.edu"] - subject = f"SQuADDS: Dataset Created - {dataset_name} ({date})" - body = f"{dataset_name} has been created by {pi_name} at {institute} on {date}.\nHere is the link - {dataset_link}" - - mailto_link = create_mailto_link(recipients, subject, body) - webbrowser.open(mailto_link)
- -
- -
-
- - - - -
-
- - -
-
-
- -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/_sources/getting_started.rst.txt b/_sources/getting_started.rst.txt index 9ed9c0bc..0e0d1a18 100644 --- a/_sources/getting_started.rst.txt +++ b/_sources/getting_started.rst.txt @@ -36,7 +36,3 @@ Alternatively, you can install SQuADDS from source. FAQ --- -**Q:** Placeholder? - -**A:** Placeholder. - diff --git a/_sources/tutorials/Tutorial-1_getting_started_with_SQuADDS.ipynb.txt b/_sources/tutorials/Tutorial-1_getting_started_with_SQuADDS.ipynb.txt index f2de987e..cf5a50aa 100644 --- a/_sources/tutorials/Tutorial-1_getting_started_with_SQuADDS.ipynb.txt +++ b/_sources/tutorials/Tutorial-1_getting_started_with_SQuADDS.ipynb.txt @@ -766,7 +766,7 @@ }, { "cell_type": "code", - "execution_count": 183, + "execution_count": 249, "metadata": {}, "outputs": [], "source": [ @@ -775,7 +775,7 @@ }, { "cell_type": "code", - "execution_count": 184, + "execution_count": 250, "metadata": {}, "outputs": [], "source": [ @@ -784,7 +784,7 @@ }, { "cell_type": "code", - "execution_count": 173, + "execution_count": 251, "metadata": {}, "outputs": [ { @@ -793,7 +793,7 @@ "'qubit'" ] }, - "execution_count": 173, + "execution_count": 251, "metadata": {}, "output_type": "execute_result" } @@ -804,7 +804,7 @@ }, { "cell_type": "code", - "execution_count": 204, + "execution_count": 252, "metadata": {}, "outputs": [ { @@ -1155,7 +1155,7 @@ "[1934 rows x 17 columns]" ] }, - "execution_count": 204, + "execution_count": 252, "metadata": {}, "output_type": "execute_result" } @@ -1165,6 +1165,13 @@ "df" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, { "cell_type": "markdown", "metadata": {}, @@ -1174,57 +1181,64 @@ }, { "cell_type": "code", - "execution_count": 206, + "execution_count": 309, "metadata": {}, "outputs": [], "source": [ - "db.select_system(\"cavity_claw\")" + "db.unselect_all()" ] }, { "cell_type": "code", - "execution_count": 212, + "execution_count": 310, "metadata": {}, "outputs": [], "source": [ - "db.select_cavity_claw(\"RouteMeander\")" + "db.select_system(\"cavity_claw\")" ] }, { "cell_type": "code", - "execution_count": 219, + "execution_count": 311, "metadata": {}, "outputs": [], "source": [ - "db.select_coupler(\"CLT\")" + "db.select_cavity_claw(\"RouteMeander\")" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 312, "metadata": {}, "outputs": [], - "source": [] - }, - { - "cell_type": "markdown", - "metadata": {}, "source": [ - "### Querying for a target qubit-cavity design" + "db.select_coupler(\"CLT\")" ] }, { "cell_type": "code", - "execution_count": 154, + "execution_count": 313, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Selected component: cavity_claw\n", + "Selected component name: RouteMeander\n", + "Selected data type: eigenmode\n", + "Selected system: cavity_claw\n", + "Selected coupler: CLT\n" + ] + } + ], "source": [ - "db.select_system([\"qubit\",\"cavity_claw\"])" + "db.show_selections()" ] }, { "cell_type": "code", - "execution_count": 209, + "execution_count": 294, "metadata": {}, "outputs": [ { @@ -1501,14 +1515,67 @@ "[234 rows x 13 columns]" ] }, - "execution_count": 209, + "execution_count": 294, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "df = db.selected_system_df()\n", - "df" + "db.selected_system_df()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Querying for a target qubit-cavity design" + ] + }, + { + "cell_type": "code", + "execution_count": 314, + "metadata": {}, + "outputs": [], + "source": [ + "db.select_system([\"qubit\",\"cavity_claw\"])" + ] + }, + { + "cell_type": "code", + "execution_count": 315, + "metadata": {}, + "outputs": [], + "source": [ + "db.select_qubit(\"TransmonCross\")\n", + "db.select_cavity_claw(\"RouteMeander\")\n", + "db.select_coupler(\"CLT\")" + ] + }, + { + "cell_type": "code", + "execution_count": 316, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Selected qubit: TransmonCross\n", + "Selected cavity: RouteMeander\n", + "Selected coupler: CLT\n", + "Selected system: ['qubit', 'cavity_claw']\n" + ] + } + ], + "source": [ + "db.show_selections()" ] }, { diff --git a/_sources/tutorials/Tutorial-2_Contributing_to_SQuADDS.ipynb.txt b/_sources/tutorials/Tutorial-2_Contributing_to_SQuADDS.ipynb.txt index f80d123b..c21e8098 100644 --- a/_sources/tutorials/Tutorial-2_Contributing_to_SQuADDS.ipynb.txt +++ b/_sources/tutorials/Tutorial-2_Contributing_to_SQuADDS.ipynb.txt @@ -115,23 +115,18 @@ "- Adding to SQuADDS_DB" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## Where we left of in Tutorial 1 - *Contributing to an existing configuration* " + "## Where we left of in Tutorial 1 - *Contributing to an existing configuration* \n", + "\n", + "Format the result from Tutorial 1 to be compatible with SQuADDS." ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [] @@ -165,6 +160,25 @@ "---" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Show how to add this new data entry to the SQuADDS database by creating a PR. \n", + "\n", + "1. Code to fork the repo and create a new branch.\n", + "2. Code to add the new data to the chosen configuration.\n", + "3. Code to commit and push the changes.\n", + "4. Code to create a PR." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, { "cell_type": "markdown", "metadata": {}, @@ -213,6 +227,31 @@ "If all the `sim_results` has the same units you can just use a `\"units\":units` field instead of repeating the unit for each result." ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Metadata:\n", + "\n", + "The metadata for the configuration should include \n", + "\n", + "- the name of the configuration\n", + "- a description of the configuration\n", + "- contributors to the configuration\n", + "- device design, design tool and name\n", + "- simulation setup and simulator name\n", + "- simulation code `Simulator`\n", + "- simulation result parameters\n", + "- measured parameters" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Code to help generate portions of the metadata and guide the user to create custom `Simulator` (future release and tutorial)" + ] + }, { "cell_type": "code", "execution_count": null, @@ -258,6 +297,19 @@ "7. **Create a Pull Request**: Go to the Hugging Face Hub, navigate to your fork, and create a pull request for your new branch. The pull request will be reviewed by the dataset maintainers." ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Show \n", + "\n", + "1. Code to fork the repo and create a new branch.\n", + "2. Code to add the new data to a new configuration.\n", + "3. Code to add metadata to the configuration.\n", + "4. Code to commit and push the changes.\n", + "5. Code to create a PR." + ] + }, { "cell_type": "code", "execution_count": null, @@ -279,6 +331,17 @@ "We might have some data that can be appended to an existing dataset in SQuADDS. In this case, we can add to the existing configuration in `SQuADDS_DB` without pushing new entries to the original dataset." ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "1. Code to fork the repo and create a new branch.\n", + "2. Code to add the new data to the chosen configuration.\n", + " - handling contributions (appending code gives uploader name and institute only and notes)\n", + "3. Code to commit and push the changes.\n", + "4. Code to create a PR." + ] + }, { "cell_type": "code", "execution_count": null, diff --git a/_sources/tutorials/index.rst.txt b/_sources/tutorials/index.rst.txt index 84ac037d..6b2635de 100644 --- a/_sources/tutorials/index.rst.txt +++ b/_sources/tutorials/index.rst.txt @@ -6,3 +6,4 @@ Tutorials Tutorial-1_Getting_started_with_SQuADDS.ipynb Tutorial-2_Contributing_to_SQuADDS.ipynb + More Tutorials Coming Soon! \ No newline at end of file diff --git a/genindex.html b/genindex.html index 3baf5fbd..ea7cecf5 100644 --- a/genindex.html +++ b/genindex.html @@ -144,69 +144,8 @@

Index

- C - | M - | S
-

C

- - -
- -

M

- - -
- -

S

- - - -
    -
  • - squadds.core.globals - -
  • -
  • - squadds.core.utils - -
  • -
- diff --git a/getting_started.html b/getting_started.html index 64b06877..3b207ea0 100644 --- a/getting_started.html +++ b/getting_started.html @@ -170,8 +170,6 @@

Installation

FAQ

-

Q: Placeholder?

-

A: Placeholder.

diff --git a/modules.html b/modules.html index 3351bd0b..8a4de249 100644 --- a/modules.html +++ b/modules.html @@ -151,9 +151,9 @@

SQuADDS
  • Subpackages