Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 74 additions & 42 deletions docs/examples/DataSet/The-Experiment-Container.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"metadata": {},
"outputs": [],
"source": [
"import uuid\n",
"from pathlib import Path\n",
"\n",
"from qcodes.dataset import (\n",
Expand All @@ -48,11 +49,14 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"db_file_path = Path.cwd().parent / \"example_output\" / \"exp_container_tutorial.db\"\n",
"db_file_path = (\n",
" Path.cwd().parent / \"example_output\" / f\"exp_container_tutorial_{uuid.uuid4()}.db\"\n",
")\n",
"# we create a database with an uuid in the name to ensure we always start with a clean database for this tutorial\n",
"initialise_or_create_database_at(db_file_path)"
]
},
Expand Down Expand Up @@ -145,12 +149,12 @@
{
"data": {
"text/plain": [
"[first_exp#old_sample#1@C:\\Users\\a-fbonabi\\temp_work\\exp_container_tutorial.db\n",
" -----------------------------------------------------------------------------,\n",
" second_exp#slightly_newer_sample#2@C:\\Users\\a-fbonabi\\temp_work\\exp_container_tutorial.db\n",
" -----------------------------------------------------------------------------------------,\n",
" third_exp#brand_new_sample#3@C:\\Users\\a-fbonabi\\temp_work\\exp_container_tutorial.db\n",
" -----------------------------------------------------------------------------------]"
"[first_exp#old_sample#1@d:\\source\\repos\\worktrees\\qcodes_docs_parallel\\docs\\examples\\example_output\\exp_container_tutorial_7ef46669-2463-4dfd-9da8-b03183d5c86e.db\n",
" -----------------------------------------------------------------------------------------------------------------------------------------------------------------,\n",
" second_exp#slightly_newer_sample#2@d:\\source\\repos\\worktrees\\qcodes_docs_parallel\\docs\\examples\\example_output\\exp_container_tutorial_7ef46669-2463-4dfd-9da8-b03183d5c86e.db\n",
" -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------,\n",
" third_exp#brand_new_sample#3@d:\\source\\repos\\worktrees\\qcodes_docs_parallel\\docs\\examples\\example_output\\exp_container_tutorial_7ef46669-2463-4dfd-9da8-b03183d5c86e.db\n",
" -----------------------------------------------------------------------------------------------------------------------------------------------------------------------]"
]
},
"execution_count": 6,
Expand Down Expand Up @@ -218,8 +222,8 @@
{
"data": {
"text/plain": [
"run_a #1@C:\\Users\\a-fbonabi\\temp_work\\exp_container_tutorial.db\n",
"---------------------------------------------------------------"
"run_a #1@d:\\source\\repos\\worktrees\\qcodes_docs_parallel\\docs\\examples\\example_output\\exp_container_tutorial_7ef46669-2463-4dfd-9da8-b03183d5c86e.db\n",
"---------------------------------------------------------------------------------------------------------------------------------------------------"
]
},
"execution_count": 8,
Expand All @@ -246,9 +250,9 @@
{
"data": {
"text/plain": [
"third_exp#brand_new_sample#3@C:\\Users\\a-fbonabi\\temp_work\\exp_container_tutorial.db\n",
"-----------------------------------------------------------------------------------\n",
"1-run_a-1--0"
"third_exp#brand_new_sample#3@d:\\source\\repos\\worktrees\\qcodes_docs_parallel\\docs\\examples\\example_output\\exp_container_tutorial_7ef46669-2463-4dfd-9da8-b03183d5c86e.db\n",
"-----------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
"1-run_a-1-None-0"
]
},
"execution_count": 9,
Expand All @@ -275,8 +279,8 @@
{
"data": {
"text/plain": [
"second_exp#slightly_newer_sample#2@C:\\Users\\a-fbonabi\\temp_work\\exp_container_tutorial.db\n",
"-----------------------------------------------------------------------------------------"
"second_exp#slightly_newer_sample#2@d:\\source\\repos\\worktrees\\qcodes_docs_parallel\\docs\\examples\\example_output\\exp_container_tutorial_7ef46669-2463-4dfd-9da8-b03183d5c86e.db\n",
"-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------"
]
},
"execution_count": 10,
Expand Down Expand Up @@ -323,8 +327,8 @@
{
"data": {
"text/plain": [
"first_run_b #2@C:\\Users\\a-fbonabi\\temp_work\\exp_container_tutorial.db\n",
"---------------------------------------------------------------------"
"first_run_b #2@d:\\source\\repos\\worktrees\\qcodes_docs_parallel\\docs\\examples\\example_output\\exp_container_tutorial_7ef46669-2463-4dfd-9da8-b03183d5c86e.db\n",
"---------------------------------------------------------------------------------------------------------------------------------------------------------"
]
},
"execution_count": 12,
Expand All @@ -344,8 +348,8 @@
{
"data": {
"text/plain": [
"second_run_b #3@C:\\Users\\a-fbonabi\\temp_work\\exp_container_tutorial.db\n",
"----------------------------------------------------------------------"
"second_run_b #3@d:\\source\\repos\\worktrees\\qcodes_docs_parallel\\docs\\examples\\example_output\\exp_container_tutorial_7ef46669-2463-4dfd-9da8-b03183d5c86e.db\n",
"----------------------------------------------------------------------------------------------------------------------------------------------------------"
]
},
"execution_count": 13,
Expand All @@ -372,10 +376,10 @@
{
"data": {
"text/plain": [
"second_exp#slightly_newer_sample#2@C:\\Users\\a-fbonabi\\temp_work\\exp_container_tutorial.db\n",
"-----------------------------------------------------------------------------------------\n",
"2-first_run_b-1--0\n",
"3-second_run_b-2--0"
"second_exp#slightly_newer_sample#2@d:\\source\\repos\\worktrees\\qcodes_docs_parallel\\docs\\examples\\example_output\\exp_container_tutorial_7ef46669-2463-4dfd-9da8-b03183d5c86e.db\n",
"-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
"2-first_run_b-1-None-0\n",
"3-second_run_b-2-None-0"
]
},
"execution_count": 14,
Expand All @@ -402,8 +406,8 @@
{
"data": {
"text/plain": [
"first_run #4@C:\\Users\\a-fbonabi\\temp_work\\exp_container_tutorial.db\n",
"-------------------------------------------------------------------"
"first_run #4@d:\\source\\repos\\worktrees\\qcodes_docs_parallel\\docs\\examples\\example_output\\exp_container_tutorial_7ef46669-2463-4dfd-9da8-b03183d5c86e.db\n",
"-------------------------------------------------------------------------------------------------------------------------------------------------------"
]
},
"execution_count": 15,
Expand All @@ -423,9 +427,9 @@
{
"data": {
"text/plain": [
"first_exp#old_sample#1@C:\\Users\\a-fbonabi\\temp_work\\exp_container_tutorial.db\n",
"-----------------------------------------------------------------------------\n",
"4-first_run-1--0"
"first_exp#old_sample#1@d:\\source\\repos\\worktrees\\qcodes_docs_parallel\\docs\\examples\\example_output\\exp_container_tutorial_7ef46669-2463-4dfd-9da8-b03183d5c86e.db\n",
"-----------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
"4-first_run-1-None-0"
]
},
"execution_count": 16,
Expand Down Expand Up @@ -502,9 +506,9 @@
{
"data": {
"text/plain": [
"first_exp#old_sample#1@C:\\Users\\a-fbonabi\\temp_work\\exp_container_tutorial.db\n",
"-----------------------------------------------------------------------------\n",
"4-first_run-1--0"
"first_exp#old_sample#1@d:\\source\\repos\\worktrees\\qcodes_docs_parallel\\docs\\examples\\example_output\\exp_container_tutorial_7ef46669-2463-4dfd-9da8-b03183d5c86e.db\n",
"-----------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
"4-first_run-1-None-0"
]
},
"execution_count": 19,
Expand Down Expand Up @@ -587,8 +591,8 @@
{
"data": {
"text/plain": [
"default_run #5@C:\\Users\\a-fbonabi\\temp_work\\exp_container_tutorial.db\n",
"---------------------------------------------------------------------"
"default_run #5@d:\\source\\repos\\worktrees\\qcodes_docs_parallel\\docs\\examples\\example_output\\exp_container_tutorial_7ef46669-2463-4dfd-9da8-b03183d5c86e.db\n",
"---------------------------------------------------------------------------------------------------------------------------------------------------------"
]
},
"execution_count": 23,
Expand All @@ -615,10 +619,10 @@
{
"data": {
"text/plain": [
"third_exp#brand_new_sample#3@C:\\Users\\a-fbonabi\\temp_work\\exp_container_tutorial.db\n",
"-----------------------------------------------------------------------------------\n",
"1-run_a-1--0\n",
"5-default_run-2--0"
"third_exp#brand_new_sample#3@d:\\source\\repos\\worktrees\\qcodes_docs_parallel\\docs\\examples\\example_output\\exp_container_tutorial_7ef46669-2463-4dfd-9da8-b03183d5c86e.db\n",
"-----------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
"1-run_a-1-None-0\n",
"5-default_run-2-None-0"
]
},
"execution_count": 24,
Expand All @@ -639,9 +643,23 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 25,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"second_exp#slightly_newer_sample#2@d:\\source\\repos\\worktrees\\qcodes_docs_parallel\\docs\\examples\\example_output\\exp_container_tutorial_7ef46669-2463-4dfd-9da8-b03183d5c86e.db\n",
"-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
"2-first_run_b-1-None-0\n",
"3-second_run_b-2-None-0"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"load_experiment_by_name(\n",
" \"second_exp\", sample=\"slightly_newer_sample\"\n",
Expand All @@ -650,9 +668,23 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 26,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"third_exp#brand_new_sample#3@d:\\source\\repos\\worktrees\\qcodes_docs_parallel\\docs\\examples\\example_output\\exp_container_tutorial_7ef46669-2463-4dfd-9da8-b03183d5c86e.db\n",
"-----------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
"1-run_a-1-None-0\n",
"5-default_run-2-None-0"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"load_last_experiment() # loads the last experiment in the database"
]
Expand All @@ -674,7 +706,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.2"
"version": "3.12.12"
},
"toc": {
"base_numbering": 1,
Expand Down
Loading