Skip to content

Commit 443f431

Browse files
change ^ to \oplus in comparison docs (#1582)
* change ^ to \oplus in comparison docs * nit * use proper latex
1 parent f668c7a commit 443f431

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

qualtran/bloqs/arithmetic/comparison.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@
361361
},
362362
"source": [
363363
"## `LessThanConstant`\n",
364-
"Applies U_a|x>|z> = |x> |z ^ (x < a)>"
364+
"Applies $U_a\\ket{x}\\ket{z} \\rightarrow \\ket{x} \\ket{z \\oplus (x < a)}$"
365365
]
366366
},
367367
{
@@ -676,7 +676,7 @@
676676
},
677677
"source": [
678678
"## `LessThanEqual`\n",
679-
"Applies U|x>|y>|z> = |x>|y> |z ^ (x <= y)>\n",
679+
"Applies $U\\ket{x}\\ket{y}\\ket{z} \\rightarrow \\ket{x} \\ket{y} \\ket{z \\oplus (x \\leq y)}$\n",
680680
"\n",
681681
"Decomposes the gate in a T-complexity optimal way.\n",
682682
"\n",

qualtran/bloqs/arithmetic/comparison.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767

6868
@frozen
6969
class LessThanConstant(GateWithRegisters, cirq.ArithmeticGate): # type: ignore[misc]
70-
"""Applies U_a|x>|z> = |x> |z ^ (x < a)>"""
70+
r"""Applies $U_a\ket{x}\ket{z} \rightarrow \ket{x} \ket{z \oplus (x < a)}$"""
7171

7272
bitsize: SymbolicInt
7373
less_than_val: SymbolicInt
@@ -406,7 +406,7 @@ def _equality_with_zero(
406406

407407
@frozen
408408
class LessThanEqual(GateWithRegisters, cirq.ArithmeticGate): # type: ignore[misc]
409-
"""Applies U|x>|y>|z> = |x>|y> |z ^ (x <= y)>
409+
r"""Applies $U\ket{x}\ket{y}\ket{z} \rightarrow \ket{x} \ket{y} \ket{z \oplus (x \leq y)}$
410410
411411
Decomposes the gate in a T-complexity optimal way.
412412

0 commit comments

Comments
 (0)