Skip to content

Commit

Permalink
Fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
matanvax2 committed Jan 2, 2025
1 parent a205b9b commit 1967528
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@
"def long_time_integrator(\n",
" T: CReal, num_slices: CInt, qbe_full: FullBE # start from time 0\n",
"):\n",
" inplace_qbe_full.counter |= num_slices\n",
" qbe_full.counter ^= num_slices\n",
" repeat(\n",
" num_slices,\n",
" lambda i: long_time_integrator_step(\n",
Expand Down Expand Up @@ -887,7 +887,7 @@
"def long_time_integrator_naive(\n",
" T: CReal, num_slices: CInt, qbe_full: FullBE # start from time 0\n",
"):\n",
" inplace_qbe_full.counter |= num_slices\n",
" qbe_full.counter ^= num_slices\n",
" repeat(\n",
" num_slices,\n",
" lambda i: long_time_integrator_step_naive(\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,13 @@
"\n",
"\n",
"@qfunc\n",
"def main(state: Output[QArray[QBit]], phase: Output[QNum]):\n",
"def main(state: Output[QArray[QBit]], phase: Output[QNum[QPE_RESOLUTION, UNSIGNED, QPE_RESOLUTION]]):\n",
" allocate(phase.size, phase)\n",
" \n",
" allocate(2, state)\n",
" allocate_num(QPE_RESOLUTION, False, QPE_RESOLUTION, phase)\n",
"\n",
" state ^= 3\n",
" X(state[0])\n",
" X(state[1])\n",
" \n",
" qpe(unitary=lambda: CRZ(pi, state[0], state[1]), phase=phase)\n",
"\n",
"\n",
Expand Down

0 comments on commit 1967528

Please sign in to comment.