Skip to content

Commit ceb6132

Browse files
khalatepradnyabettinaheim
authored andcommitted
Fixes for Python notebooks (#2472)
Follow-up to PR# 2455 and PR# 2467 * Fix for invalid notebook - hadamard_test.ipynb * Remove explicit setting of target (default target is nvidia if GPU(s) present) - digitized_counterdiabatic_qaoa.ipynb Addresses CI failures in the image validation step. Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
1 parent a8b1212 commit ceb6132

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

docs/sphinx/applications/python/digitized_counterdiabatic_qaoa.ipynb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,13 @@
4444
},
4545
{
4646
"cell_type": "code",
47-
"execution_count": null,
47+
"execution_count": 1,
4848
"metadata": {},
4949
"outputs": [],
5050
"source": [
5151
"import cudaq\n",
5252
"from cudaq import spin\n",
53-
"import numpy as np\n",
54-
"\n",
55-
"cudaq.set_target('nvidia')\n",
56-
"# cudaq.set_target('qpp-cpu') # Uncomment this line if no GPUs are available"
53+
"import numpy as np\n"
5754
]
5855
},
5956
{
@@ -65,7 +62,7 @@
6562
},
6663
{
6764
"cell_type": "code",
68-
"execution_count": null,
65+
"execution_count": 2,
6966
"metadata": {},
7067
"outputs": [
7168
{

docs/sphinx/applications/python/hadamard_test.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"![Htest2](./images/htestfactored.png)\n",
3838
"\n",
3939
"By preparing this circuit, and repeatedly measuring the ancilla qubit, we estimate the expectation value as $$P(0)-P(1) = Re \\bra{\\psi} O \\ket{\\phi}.$$\n",
40-
"\,
40+
"\n",
4141
"\n",
4242
"The following sections demonstrate how this can be performed in CUDA-Q."
4343
]

0 commit comments

Comments
 (0)