Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions qualtran/bloqs/arithmetic/controlled_add_or_subtract.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@
"Applies the transformation\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
" |1\\rangle |a\\rangle |b\\rangle \\mapsto |1\\rangle |a\\rangle |b + a\\rangle \\\\\n",
" |0\\rangle |a\\rangle |b\\rangle \\mapsto |0\\rangle |a\\rangle |b - a\\rangle\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"Given two numbers `a`, `b` and a control bit `ctrl`, this bloq computes:\n",
Expand Down
2 changes: 2 additions & 0 deletions qualtran/bloqs/arithmetic/controlled_add_or_subtract.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ class ControlledAddOrSubtract(Bloq):
Applies the transformation

$$
\begin{aligned}
|1\rangle |a\rangle |b\rangle \mapsto |1\rangle |a\rangle |b + a\rangle \\
|0\rangle |a\rangle |b\rangle \mapsto |0\rangle |a\rangle |b - a\rangle
\end{aligned}
$$

Given two numbers `a`, `b` and a control bit `ctrl`, this bloq computes:
Expand Down
Loading