Skip to content

Commit 9b367de

Browse files
authored
Switch notebooks from dev to stable cirq where possible (#7247)
* Remove obsolete note about installing cirq-dev The notebook actually installs and tests with stable cirq. * Switch from dev to stable cirq in notebooks where it works Ref: https://github.com/quantumlib/Cirq/blob/main/docs/dev/notebooks.md#lifecycle * Exclude xeb_calibration_example.ipynb notebook from isolated_notebook_test.py This notebook is also excluded in notebook_test.py which tests with head cirq. * Delete unused tst files - calibration_api.ipynb was removed in #6580 - operators_and_observables.ipynb was renamed to operators.ipynb and it does not match the operators.txt replacement anymore * Typo `mehod` -> `method`
1 parent 4a7f810 commit 9b367de

File tree

7 files changed

+10
-52
lines changed

7 files changed

+10
-52
lines changed

cirq-core/cirq/contrib/quimb/Cirq-to-Tensor-Networks.ipynb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,7 @@
8787
"metadata": {},
8888
"source": [
8989
"### Circuit to Tensors\n",
90-
"The circuit defines a tensor network representation. By default, the initial state is the `|0...0>` state (represented by the \"zero qubit\" operations labeled \"Q0\" in the legend. \"Q1\" are single qubit operations and \"Q2\" are two qubit operations. The open legs are the indices into the state vector and are of the form \"i{m}_q{n}\" where `m` is the time index (given by the returned `qubit_frontier` dictionary) and \"n\" is the qubit string.\n",
91-
"\n",
92-
"Note: this notebook relies on unreleased Cirq features. If you want to try these features, make sure you install cirq via `pip install --upgrade cirq~=1.0.dev`."
90+
"The circuit defines a tensor network representation. By default, the initial state is the `|0...0>` state (represented by the \"zero qubit\" operations labeled \"Q0\" in the legend. \"Q1\" are single qubit operations and \"Q2\" are two qubit operations. The open legs are the indices into the state vector and are of the form \"i{m}_q{n}\" where `m` is the time index (given by the returned `qubit_frontier` dictionary) and \"n\" is the qubit string."
9391
]
9492
},
9593
{

cirq-core/cirq/contrib/quimb/Contract-a-Grid-Circuit.ipynb

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"## Setup\n",
8-
"Note: this notebook relies on unreleased Cirq features. If you want to try these features, make sure you install cirq via `pip install --upgrade cirq~=1.0.dev`."
7+
"## Setup"
98
]
109
},
1110
{
@@ -20,14 +19,14 @@
2019
" import cirq\n",
2120
"except ImportError:\n",
2221
" print(\"installing cirq...\")\n",
23-
" !pip install --upgrade --quiet cirq~=1.0.dev\n",
22+
" !pip install --quiet cirq\n",
2423
" print(\"installed cirq.\")\n",
2524
"\n",
2625
"try:\n",
2726
" import quimb\n",
2827
"except ImportError:\n",
2928
" print(\"installing cirq-core[contrib]...\")\n",
30-
" !pip install --upgrade --quiet 'cirq-core[contrib]~=1.0.dev'\n",
29+
" !pip install --quiet 'cirq-core[contrib]'\n",
3130
" print(\"installed cirq-core[contrib].\")"
3231
]
3332
},
@@ -36,9 +35,7 @@
3635
"metadata": {},
3736
"source": [
3837
"# Contract a Grid Circuit\n",
39-
"Shallow circuits on a planar grid with low-weight observables permit easy contraction.\n",
40-
"\n",
41-
"Note: this notebook relies on unreleased Cirq features. If you want to try these features, make sure you install cirq via `pip install --upgrade cirq~=1.0.dev`."
38+
"Shallow circuits on a planar grid with low-weight observables permit easy contraction."
4239
]
4340
},
4441
{

dev_tools/notebooks/isolated_notebook_test.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,8 @@
4242
# Please, always indicate in comments the feature used for easier bookkeeping.
4343

4444
NOTEBOOKS_DEPENDING_ON_UNRELEASED_FEATURES: List[str] = [
45-
# Requires pinned quimb from #6438
46-
'cirq-core/cirq/contrib/quimb/Contract-a-Grid-Circuit.ipynb',
4745
# Requires OpenQASM 3.0 support from cirq 1.5
4846
'docs/build/interop.ipynb',
49-
# get_qcs_objects_for_notebook
50-
'docs/noise/qcvv/xeb_calibration_example.ipynb',
5147
# Requires features in cirq 1.5.
5248
'docs/build/classical_control.ipynb',
5349
]
@@ -72,6 +68,8 @@
7268
'examples/advanced/*quantum_utility*',
7369
# Also skipping stabilizer code testing.
7470
"examples/*stabilizer_code*",
71+
# get_qcs_objects_for_notebook
72+
'docs/noise/qcvv/xeb_calibration_example.ipynb',
7573
# An intentionally empty/template code notebook.
7674
"docs/simulate/qvm_builder_code.ipynb",
7775
*NOTEBOOKS_DEPENDING_ON_UNRELEASED_FEATURES,

docs/gatezoo.ipynb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@
6060
"id": "541571c2edcd"
6161
},
6262
"source": [
63-
"## Setup\n",
64-
"Note: this notebook relies on unreleased Cirq features. If you want to try these features, make sure you install cirq via `pip install --upgrade cirq~=1.0.dev`"
63+
"## Setup"
6564
]
6665
},
6766
{
@@ -76,7 +75,7 @@
7675
" import cirq\n",
7776
"except ImportError:\n",
7877
" print(\"installing cirq...\")\n",
79-
" !pip install --upgrade --quiet cirq~=1.0.dev\n",
78+
" !pip install --quiet cirq\n",
8079
" print(\"installed cirq.\")\n",
8180
" \n",
8281
"import IPython.display as ipd\n",

docs/noise/calibration_api.tst

Lines changed: 0 additions & 17 deletions
This file was deleted.

docs/operators_and_observables.tst

Lines changed: 0 additions & 17 deletions
This file was deleted.

docs/transform/transformers.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@
231231
"\n",
232232
"Any valid tag can be used as a \"no-compile\" tag by adding it to the `tags_to_ignore` field in `cirq.TransformerContext`. When called with a context, cirq transformers will inspect the `context.tags_to_ignore` field and ignore an operation if `op.tags & context.tags_to_ignore` is not empty. \n",
233233
"\n",
234-
"Below, you can use no-compile tags when transforming a circuit using the `optimize_circuit` mehod defined above."
234+
"Below, you can use no-compile tags when transforming a circuit using the `optimize_circuit` method defined above."
235235
]
236236
},
237237
{

0 commit comments

Comments
 (0)