Skip to content

Commit

Permalink
Fixes for Python notebooks (#2472)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
khalatepradnya authored and bettinaheim committed Dec 11, 2024
1 parent a8b1212 commit ceb6132
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,13 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import cudaq\n",
"from cudaq import spin\n",
"import numpy as np\n",
"\n",
"cudaq.set_target('nvidia')\n",
"# cudaq.set_target('qpp-cpu') # Uncomment this line if no GPUs are available"
"import numpy as np\n"
]
},
{
Expand All @@ -65,7 +62,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [
{
Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/applications/python/hadamard_test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"![Htest2](./images/htestfactored.png)\n",
"\n",
"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",
"\,
"\n",
"\n",
"The following sections demonstrate how this can be performed in CUDA-Q."
]
Expand Down

0 comments on commit ceb6132

Please sign in to comment.