|
11 | 11 | "\n", |
12 | 12 | "### Summary\n", |
13 | 13 | "\n", |
14 | | - "Here I present a circuit for incrementing n-qubit integer register using only O(log n) ancillas.\n", |
| 14 | + "Here I present a circuit for incrementing an n-qubit integer register using only O(log n) ancillas.\n", |
15 | 15 | "\n", |
16 | 16 | "### Motivation\n", |
17 | 17 | "\n", |
18 | | - "The practical use case for low-ancilla incrementer is constant addition when the constant is small (let's say bit size of constant is $n_c$). Then we can use constant adder circuit with carry on first $n_c$ qubits. For the rest of the register, we just need to add a carry qubit to it, which can be done by applying incrementer controlled by the carry bit.\n", |
| 18 | + "The practical use case for a low-ancilla incrementer is in constant addition when the constant is small (let's say the bit size of the constant is $n_c$). Then we can use a constant adder circuit with carry on the first $n_c$ qubits. For the rest of the register, we just need to add a carry bit to it, which can be done by applying an incrementer controlled by the carry bit.\n", |
19 | 19 | "\n", |
20 | 20 | "### Baseline\n", |
21 | 21 | "\n", |
22 | | - "As baseline, I am using incrementer from [this paper](https://www.worldscientific.com/doi/abs/10.1142/S0217979213501919) which I generalized to a constant adder (https://arxiv.org/pdf/2501.07060) and which is implemented in [ConstAdder.qs](../lib/src/QuantumArithmetic/ConstAdder.qs).\n", |
| 22 | + "As a baseline, I am using the incrementer from [this paper](https://www.worldscientific.com/doi/abs/10.1142/S0217979213501919), which I generalized to a constant adder (https://arxiv.org/pdf/2501.07060) and which is implemented in [ConstAdder.qs](../lib/src/QuantumArithmetic/ConstAdder.qs).\n", |
23 | 23 | "\n", |
24 | 24 | "### Implementation idea\n", |
25 | 25 | "\n", |
26 | | - "Define CTO(x) - \"count trailing ones\", i.e. number of least significant bits in x equal to 1 before first 0 bit.\n", |
| 26 | + "Define CTO(x) - \"count trailing ones\", i.e., the number of least significant bits in x equal to 1 before the first 0 bit.\n", |
27 | 27 | "\n", |
28 | | - "Then to increment x we need to flip first CTO(x)+1 bits in x.\n", |
| 28 | + "Then to increment x we need to flip the first CTO(x)+1 bits in x.\n", |
29 | 29 | "\n", |
30 | 30 | "So, incrementing is reduced to implementing two operations:\n", |
31 | 31 | "* CountTrailingOnes(x, ans) - computes ans:=CTO(x)\n", |
32 | 32 | "* FlipFirst(target, ctr) - flips first `ctr` bits in `target`.\n", |
33 | 33 | "\n", |
34 | | - "Both CountTrailingOnes and FlipFirst can be implemented recursively by splitting input in 2 parts, first of them having length equal to a power of 2. Both of them use $O(\\log n)$ ancilla, adding one ancilla for each level of recursion.\n", |
| 34 | + "Both CountTrailingOnes and FlipFirst can be implemented recursively by splitting the input in 2 parts, the first of them having a length equal to a power of 2. Both of them use $O(\\log n)$ ancilla, adding one ancilla for each level of recursion.\n", |
35 | 35 | "\n", |
36 | 36 | "The incrementer works like this:\n", |
37 | 37 | "* Allocate counter register and carry qubit.\n", |
|
45 | 45 | "\n", |
46 | 46 | "### Version with carry\n", |
47 | 47 | "\n", |
48 | | - "To turn presented incremented in incrementer with carry:\n", |
| 48 | + "To turn the presented incrementer into an incrementer with carry:\n", |
49 | 49 | "* Instead of using ancilla for carry, make it input qubit.\n", |
50 | 50 | "* Do not uncompute the carry qubit.\n", |
51 | 51 | "\n", |
52 | 52 | "### Cost\n", |
53 | 53 | "\n", |
54 | 54 | "Baseline incrementer uses $n-3$ ancillary qubits.\n", |
55 | 55 | "\n", |
56 | | - "The presented incrementer uses exactly $2 \\lceil \\log_2(n+2) \\rceil -1$ ancillary qubits which becomes less than base starting from n=11.\n", |
| 56 | + "The presented incrementer uses exactly $2 \\lceil \\log_2(n+2) \\rceil -1$ ancillary qubits, which becomes less than the baseline starting from n=11.\n", |
57 | 57 | "\n", |
58 | | - "On depth, the proposed circuit uses ~10n CCZ gates while base circuit uses ~1n CCZ gates.\n", |
| 58 | + "In terms of depth, the proposed circuit uses ~10n CCZ gates while the baseline circuit uses ~1n CCZ gates.\n", |
59 | 59 | "\n", |
60 | 60 | "So it's much more expensive in depth, but might be worth it if it can reduce overall space requirement of an algorithm.\n", |
61 | 61 | "\n", |
62 | | - "The table below compares ancilla count and CCZ coutn between the baseline and proposed incrementer." |
| 62 | + "The table below compares ancilla count and CCZ count between the baseline and proposed incrementer." |
63 | 63 | ] |
64 | 64 | }, |
65 | 65 | { |
|
0 commit comments