Skip to content

Commit bf3c133

Browse files
committed
fixed qmod tutorial2
1 parent a070e8a commit bf3c133

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tutorials/basic_tutorials/the_classiq_tutorial/Qmod_tutorial_part2.ipynb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -471,18 +471,19 @@
471471
"metadata": {},
472472
"outputs": [],
473473
"source": [
474+
"import numpy as np\n",
475+
"\n",
474476
"from classiq import *\n",
475-
"from classiq.qmod.symbolic import sqrt\n",
476477
"\n",
477478
"\n",
478479
"@qfunc\n",
479-
"def pre_prepared_state(q: QArray[QBit]) -> None:\n",
480+
"def pre_prepared_state(q: Output[QArray]) -> None:\n",
480481
" prepare_state(\n",
481482
" [\n",
482483
" 1 / 8,\n",
483484
" 1 / 8,\n",
484-
" 1 / 8 - sqrt(3) / 16,\n",
485-
" 1 / 8 + sqrt(3) / 16,\n",
485+
" 1 / 8 - np.sqrt(3) / 16,\n",
486+
" 1 / 8 + np.sqrt(3) / 16,\n",
486487
" 1 / 8,\n",
487488
" 1 / 8,\n",
488489
" 1 / 8,\n",
@@ -834,7 +835,7 @@
834835
],
835836
"metadata": {
836837
"kernelspec": {
837-
"display_name": "Python 3",
838+
"display_name": "Python 3 (ipykernel)",
838839
"language": "python",
839840
"name": "python3"
840841
},
@@ -848,7 +849,7 @@
848849
"name": "python",
849850
"nbconvert_exporter": "python",
850851
"pygments_lexer": "ipython3",
851-
"version": "3.11.9"
852+
"version": "3.11.4"
852853
}
853854
},
854855
"nbformat": 4,

0 commit comments

Comments
 (0)