Skip to content

Commit

Permalink
Fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
ori-opher committed Dec 17, 2024
1 parent bb1143d commit 1dcabf7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 39 deletions.
8 changes: 4 additions & 4 deletions algorithms/algebraic/shor/shor_modular_exponentiation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
"metadata": {},
"outputs": [],
"source": [
"from classiq.qmod import QNum, bind, control, within_apply\n",
"from classiq import *\n",
"from classiq.qmod.builtins.classical_functions import qft_const_adder_phase\n",
"\n",
"\n",
Expand Down Expand Up @@ -256,7 +256,7 @@
},
"outputs": [],
"source": [
"from classiq.qmod import QNum, inplace_prepare_int\n",
"from classiq import *\n",
"\n",
"modulo_num = 15\n",
"reg_len = math.ceil(math.log(modulo_num, 2)) + 1\n",
Expand Down Expand Up @@ -441,7 +441,7 @@
"metadata": {},
"outputs": [],
"source": [
"from classiq.qmod import SWAP, free\n",
"from classiq import *\n",
"from classiq.qmod.symbolic import min, mod_inverse\n",
"\n",
"\n",
Expand Down Expand Up @@ -535,7 +535,7 @@
"metadata": {},
"outputs": [],
"source": [
"from classiq.qmod import hadamard_transform\n",
"from classiq import *\n",
"\n",
"modulo_num = 6\n",
"reg_len = math.ceil(math.log(modulo_num, 2)) + 1\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -864,28 +864,7 @@
},
"outputs": [],
"source": [
"from classiq import molecule_problem_to_qmod\n",
"from classiq.qmod import (\n",
" CInt,\n",
" Output,\n",
" QArray,\n",
" QBit,\n",
" QCallable,\n",
" QNum,\n",
" allocate,\n",
" allocate_num,\n",
" control,\n",
" invert,\n",
" qfunc,\n",
" repeat,\n",
")\n",
"from classiq.qmod.builtins import (\n",
" H,\n",
" apply_to_all,\n",
" exponentiation_with_depth_constraint,\n",
" molecule_hartree_fock,\n",
" qft,\n",
")\n",
"from classiq import *\n",
"from classiq.qmod.symbolic import log, pi\n",
"\n",
"# this constant will be multipled be a linear factor for each qbit of the qpe, so the\n",
Expand Down Expand Up @@ -1410,19 +1389,6 @@
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "9797b512-d41f-47c1-8c0f-4134f0500b80",
"metadata": {
"id": "9797b512-d41f-47c1-8c0f-4134f0500b80"
},
"source": [
"## References\n",
"\n",
"<a name='NC'>[1]</a>: [Michael A. Nielsen and Isaac L. Chuang. 2011. Quantum Computation and Quantum Information: 10th Anniversary Edition, Cambridge University Press, New York, NY, USA.\n",
"](http://mmrc.amss.cas.cn/tlb/201702/W020170224608149940643.pdf)\n"
]
},
{
"cell_type": "markdown",
"id": "ttDDvHfPDI4y",
Expand Down

0 comments on commit 1dcabf7

Please sign in to comment.