Skip to content

Commit

Permalink
Another round of notebook updates
Browse files Browse the repository at this point in the history
More notebook updates aimed at speeding up testing. Main changes here are to switch from XYI to XY in a few places where the gate set isn't particularly important, and to decrease the maximum circuit depth for GST experiment designs in some places.
  • Loading branch information
Corey Ostrove committed Feb 21, 2024
1 parent f257177 commit 606b9c5
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 257 deletions.
20 changes: 10 additions & 10 deletions jupyter_notebooks/Tutorials/00-Protocols.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@
"metadata": {},
"outputs": [],
"source": [
"from pygsti.modelpacks import smq1Q_XYI\n",
"from pygsti.modelpacks import smq1Q_XY\n",
"\n",
"# get experiment design\n",
"exp_design = smq1Q_XYI.create_gst_experiment_design(max_max_length=32) \n",
"exp_design = smq1Q_XY.create_gst_experiment_design(max_max_length=316) \n",
"\n",
"# write an empty data object (creates a template to fill in)\n",
"pygsti.io.write_empty_protocol_data('tutorial_files/test_gst_dir', exp_design, clobber_ok=True)\n",
Expand Down Expand Up @@ -230,7 +230,7 @@
"outputs": [],
"source": [
"# An experiment design\n",
"from pygsti.modelpacks import smq1Q_Xpi2_rpe, smq1Q_XYI\n",
"from pygsti.modelpacks import smq1Q_Xpi2_rpe, smq1Q_XY\n",
"exp_design = smq1Q_Xpi2_rpe.create_rpe_experiment_design(max_max_length=64)\n",
"\n",
"# write an empty data object (creates a template to fill in)\n",
Expand All @@ -239,7 +239,7 @@
"# fill in the template with simulated data (you would run the experiment and use actual data)\n",
"pygsti.io.fill_in_empty_dataset_with_fake_data(\n",
" \"tutorial_files/test_rpe_dir/data/dataset.txt\",\n",
" smq1Q_XYI.target_model().depolarize(op_noise=0.01, spam_noise=0.1),\n",
" smq1Q_XY.target_model().depolarize(op_noise=0.01, spam_noise=0.1),\n",
" num_samples=1000, seed=1234)\n",
"\n",
"# read the data object back in, now with the experimental data\n",
Expand Down Expand Up @@ -273,12 +273,12 @@
"metadata": {},
"outputs": [],
"source": [
"from pygsti.modelpacks import smq1Q_XYI\n",
"exp_design = smq1Q_XYI.create_gst_experiment_design(max_max_length=4)\n",
"from pygsti.modelpacks import smq1Q_XY\n",
"exp_design = smq1Q_XY.create_gst_experiment_design(max_max_length=4)\n",
"pygsti.io.write_empty_protocol_data('tutorial_files/test_drift_dir', exp_design, clobber_ok=True)\n",
"\n",
"# Simulate time dependent data (right now, this just uses a time-independent model so this is uninteresting) \n",
"datagen_model = smq1Q_XYI.target_model().depolarize(op_noise=0.05, spam_noise=0.1)\n",
"datagen_model = smq1Q_XY.target_model().depolarize(op_noise=0.05, spam_noise=0.1)\n",
"datagen_model.sim = \"map\" # only map-type can generate time-dep data\n",
" # can also construct this as target_model(simulator=\"map\") above\n",
"pygsti.io.fill_in_empty_dataset_with_fake_data('tutorial_files/test_drift_dir/data/dataset.txt',\n",
Expand Down Expand Up @@ -318,7 +318,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -332,9 +332,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.10"
"version": "3.9.13"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
12 changes: 6 additions & 6 deletions jupyter_notebooks/Tutorials/algorithms/GST-Driverfunctions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"metadata": {},
"source": [
"### Setup\n",
"First, we set our desired *target model* to be the standard $I$, $X(\\pi/2)$, $Y(\\pi/2)$ model that we've been using in many of these tutorials, and use the standard fiducial and germ sequences needed to generate the GST operation sequences (see the [standard module tutorial](../objects/advanced/StandardModules.ipynb)). We also specify a list of maximum lengths. We'll analyze the simulated data generated in the [DataSet tutorial](../objects/DataSet.ipynb), so you'll need to run that tutorial if you haven't already."
"First, we set our desired *target model* to be the standard $X(\\pi/2)$, $Y(\\pi/2)$ model that we've been using in many of these tutorials, and use the standard fiducial and germ sequences needed to generate the GST operation sequences (see the [standard module tutorial](../objects/advanced/StandardModules.ipynb)). We also specify a list of maximum lengths. We'll analyze the simulated data generated in the [DataSet tutorial](../objects/DataSet.ipynb), so you'll need to run that tutorial if you haven't already."
]
},
{
Expand All @@ -64,12 +64,12 @@
}
],
"source": [
"from pygsti.modelpacks import smq1Q_XYI\n",
"target_model = smq1Q_XYI.target_model()\n",
"prep_fiducials, meas_fiducials = smq1Q_XYI.prep_fiducials(), smq1Q_XYI.meas_fiducials()\n",
"germs = smq1Q_XYI.germs()\n",
"from pygsti.modelpacks import smq1Q_XY\n",
"target_model = smq1Q_XY.target_model()\n",
"prep_fiducials, meas_fiducials = smq1Q_XY.prep_fiducials(), smq1Q_XY.meas_fiducials()\n",
"germs = smq1Q_XY.germs()\n",
"\n",
"maxLengths = [1,2,4,8,16,32]\n",
"maxLengths = [1,2,4,8,16]\n",
"\n",
"ds = pygsti.io.load_dataset(\"../tutorial_files/Example_Dataset.txt\", cache=True)"
]
Expand Down
Loading

0 comments on commit 606b9c5

Please sign in to comment.