Skip to content

Commit 80364b6

Browse files
KLee1248mpharrigan
andauthored
Update cAddSub docs to align equations (#1827)
It seems like this was meant to be on two separate lines, but the currently rendered output is on one line. This ultimately affected the rendering at [qualtran.dev](https://qualtran.dev/explore/ControlledAddOrSubtract). Before the change: <img width="700" height="300" alt="before" src="https://github.com/user-attachments/assets/dfe4eef5-2777-41b8-8dea-9076f8bf6b76" /> After the change: <img width="600" height="400" alt="after" src="https://github.com/user-attachments/assets/412a81ff-7b4f-4908-b3f6-6edfac08299f" /> --------- Co-authored-by: Matthew Harrigan <mpharrigan@google.com>
1 parent 992afe8 commit 80364b6

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

qualtran/bloqs/arithmetic/controlled_add_or_subtract.ipynb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@
4141
"Applies the transformation\n",
4242
"\n",
4343
"$$\n",
44+
"\\begin{aligned}\n",
4445
" |1\\rangle |a\\rangle |b\\rangle \\mapsto |1\\rangle |a\\rangle |b + a\\rangle \\\\\n",
4546
" |0\\rangle |a\\rangle |b\\rangle \\mapsto |0\\rangle |a\\rangle |b - a\\rangle\n",
47+
"\\end{aligned}\n",
4648
"$$\n",
4749
"\n",
4850
"Given two numbers `a`, `b` and a control bit `ctrl`, this bloq computes:\n",

qualtran/bloqs/arithmetic/controlled_add_or_subtract.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ class ControlledAddOrSubtract(Bloq):
3232
Applies the transformation
3333
3434
$$
35+
\begin{aligned}
3536
|1\rangle |a\rangle |b\rangle \mapsto |1\rangle |a\rangle |b + a\rangle \\
3637
|0\rangle |a\rangle |b\rangle \mapsto |0\rangle |a\rangle |b - a\rangle
38+
\end{aligned}
3739
$$
3840
3941
Given two numbers `a`, `b` and a control bit `ctrl`, this bloq computes:

0 commit comments

Comments
 (0)