Skip to content

Commit

Permalink
Enable testing of quimb-dependent notebook (quantumlib#6461)
Browse files Browse the repository at this point in the history
* Enable Contract-a-Grid-Circuit.ipynb in notebook tests,
  but test it only with the pre-release Cirq.

The notebook requires a pinned version of quimb from quantumlib#6438 otherwise the
tensor_expectation_value() call in the last-cell causes out-of-memory error.

Fixes quantumlib#6088
  • Loading branch information
pavoljuhas authored Feb 14, 2024
1 parent 629e55a commit 0db32a9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions cirq/contrib/quimb/Contract-a-Grid-Circuit.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Setup\n",
"Note: this notebook relies on unreleased Cirq features. If you want to try these features, make sure you install cirq via `pip install cirq --pre`."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -12,14 +20,14 @@
" import cirq\n",
"except ImportError:\n",
" print(\"installing cirq...\")\n",
" !pip install --quiet cirq\n",
" !pip install --quiet cirq --pre\n",
" print(\"installed cirq.\")\n",
"\n",
"try:\n",
" import quimb\n",
"except ImportError:\n",
" print(\"installing cirq-core[contrib]...\")\n",
" !pip install --quiet 'cirq-core[contrib]'\n",
" !pip install --quiet 'cirq-core[contrib]' --pre\n",
" print(\"installed cirq-core[contrib].\")"
]
},
Expand Down

0 comments on commit 0db32a9

Please sign in to comment.