Skip to content
Open
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
39 changes: 39 additions & 0 deletions research/clifford-shared-denominator-tape/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Terminal coefficient conversion on an adjacent-site tape

## Source and consumer

For an input sign and magnitude $N\ge0$, odd $D\ge1$ and $e,p\ge0$, the source value is $\pm N/(D2^e)$ and the returned fixed-point grid is $2^{-p}$. A source supplies the magnitude **already** scaled to the chosen common denominator. Set $s=\max(e-p,0)$, $a=\max(p-e,0)$ and divide
$$
2^aN=(D2^s)q+R_0,\qquad 0\le R_0<D2^s.
$$
For $s>0$ write $N=2^s A+B$. Divide only $A$ by $D$ and retain $B$ intact. The concatenation of the high remainder $r$ with these $s$ bits is $R_0=2^sr+B$. For $s=0$ append $a$ zeros to the input and use the ordinary remainder. The fraction $R_0/(D2^s)$ certifies the precise fractional part in output-grid units. Truncation is toward zero after the sign is reapplied.

The source check reconstructs $D$ independently from the cited data. On a rational Galois packet, compute constituent dimension $d$ from the character norm and the Gram scalar from the fixed-space weighted character sum. Apply $1/x$ or the two schedule functions $P(x)=\prod(1-h_i x)$ and $(1-P(x))/x$, then invert the character transform on all 80 classes, multiplying each orbit-summed character by $d/|G|$. Taking the LCM of the reduced entries proves minimality of the reported *shared* kernel denominator. At widths 15, 16, 18, 20 and 22, the checker also applies the grouped inverse-projector formula to the five-qubit corner rows. Their exact odd moduli have bit lengths 381, 727, 997, 2073 and 1829, respectively. The physical program receives the modulus as data. The source-precomputation cost is separate. [Four-qubit central transform](https://github.com/apoursh/integer-mult-bounds/blob/7e7e62c62fcccd11f5c8e22677b4523863a48f4b/research/clifford-transported-fibre-gram/CLASS-ALGEBRA.md) · [Five-qubit corner formula](https://github.com/apoursh/integer-mult-bounds/blob/2007a7604cf44df8b666ada3483bc553ce557fa9/research/clifford-even-five-qubit-spectrum/PROOF.md) · [Exact source checks](denominators.py)

## Tape protocol and reversibility

Each site has eight binary tracks. A primitive is NOT, CNOT or Toffoli on at most two adjacent sites; distinct wires act as controls and target. Three CNOTs exchange two wires. A single head accesses its site and the site immediately to its right. We charge unit travel per site between the leftmost sites of consecutive gates, beginning and ending at site zero. Scratch is zero on entry and exit. The magnitude result, exact Euclidean remainder and (for rounding) the one-bit decision are outputs. The sign tag bypasses unsigned arithmetic. Negatives that round to zero read as the integer zero. The program is a uniform family of schedules indexed by public lengths. Generating control instructions, building input numerators, ferrying external data, and counting a universal machine's program counter require their own model.

The modulus uses $k=\operatorname{bitlength}(D)$ bits. Choose input width $n\ge\max(1,s+1,\operatorname{bitlength}(N))$, with explicit leading-zero padding if needed. Add *one further zero* so rounding up also fits when $D=1$. The number of quotient digits is $m=1+n+p-e$. There are $S=m+k+\max(s,1)+2$ sites. Initially the data track holds $k$ zeros for the residue, the additional zero, the input and any appended zeros. The separate modulus track holds $D$ in sites 1 through $k$. A converter may reserve and re-use these $8S$ binary wires over any number of calls.

At the start of a digit, the active data window contains a $k$-bit residue $r<D$ followed by input bit $b$. Put $w=2r+b$, so $0\le w<2D$. An unsigned compare obtains $c=[w\ge D]$. Subtract $cD$ in place. The high bit of the result is zero and receives $c$, leaving the next residue in the following $k$ sites. Thus every digit advances the residue to the right and deposits a final quotient digit to the left. The bijection $w\leftrightarrow(c,w-cD)$ on the $2D$ legal values proves both exactness and the feasibility of uncomputation without saving previous input digits.

For comparison the carry of $w+\overline D+c_0$ has final value $[w>D]$ for $c_0=0$, $[w\ge D]$ for $c_0=1$. A majority is the XOR of its three pairwise ANDs. Complement one wire temporarily with two NOTs to implement the needed complement convention using three Toffolis. The low-to-high pass computes all carries; copy out the final carry and reverse the pass. For controlled subtraction, copy $c$ along the window and compute the addend bit $cD_i$ at each site. The borrow out is $\mathrm{maj}(\neg w_i,cD_i,b_i)$ with incoming borrow $b_i$. On the return pass erase that site's borrow *before* changing $w_i$ by $cD_i\mathbin\oplus b_i$. The incoming borrow still exists when needed. Uncompute the addend, copied controls and compare flag and shift the modulus to align with the next window. At the end all $m$ modulus shifts are reversed on the modulus track. Gating carries and advancing the modulus use no nonlocal fan-out. [Uniform gate generator](tape.py)

## Correct rounding and exact tape cost

For $s=0$, increment the magnitude if $2r>D$. An odd $D$ precludes equality. For $s>0$, let $b$ be the high bit of $B$ and let sticky be the OR of its remaining bits. Compare $2r+b$ with $D$. On equality increment if sticky or the truncated quotient's low bit is one. This is precisely round-to-nearest with ties to even. A reversible OR chain on the tail, plus propagation of quotient parity across the residue, supplies that carry-in to the comparator. All these temporary bits are restored before modifying the quotient. A controlled increment propagates carries from the least significant bit and erases them using the updated zero-run. Keeping the increment decision $u$ along with the original Euclidean remainder makes the conversion reversible: the magnitude of the rounded readout is $q+u$. At genuine ties, keeping only rounded magnitude and Euclidean remainder can conflate $q=1$ and $q=2$ at the same midpoint remainder. One bit of side information is both sufficient and necessary on this output convention when both inputs are admitted.

For $s=0$, the maximum scalar error in nearest conversion is $(D-1)/(2D)$ output units; the two nearest nonzero residues to the midpoint attain it for $D>1$ with unrestricted magnitudes because 2 is a unit modulo $D$. For $s>0$, half an output unit is attainable at $R_0=D2^{s-1}$. Each real or imaginary component is converted independently. The worst complex Euclidean error for independent components is $\sqrt2$ times that scalar bound, multiplied by $2^{-p}$.

Write $w=k+1$ in this invoice. Each ordinary digit uses $(8w+2,7w+1,14w)$ gates in order (NOT, CNOT, Toffoli). Restoring the initial modulus position costs an additional $3mw$ CNOTs. The nearest-rounding pass for $s=0$ adds $(4w+2m,m+3,6w+2m)$. For $s>0$ also add $(0,2w+4s+2,2s)$ for parity transport and sticky. For one digit entered and exited at its left boundary the movement is $10k+4$. Moving to the next window adds one. Each reversed modulus shift walks its $k+1$ adjacent swaps and repositions the head by at most $k+1$ between shifts. The rounding, head setup and final return use fewer than 20 full-tape sweeps (including the scratch reversals). In particular total head moves are at most $m(12k+10)+20S$. The generator/simulator computes exact moves for each choice of lengths. These upper bounds include stored input, quotient, local gate scratch and the scale-dependent remainder. [Exhaustive gate and inverse checks](check_tape.py) · [Physical coefficient replay](check_sources.py)

## Optimal between-digit state and sharp prefix latency

Consider a deterministic most-significant-first transducer at a fixed input position. It must emit the digit of the exact Euclidean quotient on each read and cannot revisit input or output. All stored information usable at the next digit, including any information in addressing or control, counts as state. Reading the $k$-bit binary expansion of $0\le r<D$ reaches residue $r$ after the same length and outputs zeros. Reading a further $k$ zeros then emits the $k$-bit word for $\lfloor2^k r/D\rfloor$, strictly increasing in $r$. Hence these $D$ prefix states must be distinct. The elementary update achieves equality. The same common suffix distinguishes all $D^L$ vectors of residues on $L$ synchronously read, independent scalar lanes. Their minimal information width is $\lceil L\log_2 D\rceil$ bits. Knowing $D$ on every lane does not supply their independent residues. On supplied independent Gaussian components one can instead time-share the converter at sequential input cost. This state lower bound concerns fixed-position, no-revisit interfaces; a tape with published output available to reread has another way to store information.

For $n$-bit integers $0\le N<2^n$ and odd $D>1$, put $h=(D-1)/2$. The nearest integer is $\lfloor(N+h)/D\rfloor$. For output bit $j$ its value flips precisely at the integer boundaries $t=kD2^j-h$ in $1\le t<2^n$, for positive integers $k$. After $d$ input bits every prefix is a dyadic interval of length $2^{n-d}$. Every such prefix determines that bit if and only if every flip occurs on an interval boundary. Consequently the exact worst-case determination time is
$$
d_j=n-\min_t v_2(t)
$$
when there is at least one flip, and zero otherwise. The two adjacent inputs $t-1,t$ for a minimizing boundary witness necessity. Aligned prefixes prove sufficiency. For $j>v_2(h)$, each boundary has valuation $v_2(h)$, giving $d_j=n-v_2(h)$. Floor division has boundaries $kD2^j$ and hence $d_j=n-j$ whenever the bit can flip. The high-bit delay caused by rounding can grow with $j$ even for a fixed supplied denominator. Allowing a backward correction pass gives the constructive tape scheme above. All claims in this paragraph concern an integer input and rounding at the integer grid; the program separately implements coarser/finer dyadic grids and signed inputs. [Prefix-tree checks and explicit large witnesses](check_latency.py)
38 changes: 38 additions & 0 deletions research/clifford-shared-denominator-tape/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# A reversible terminal divider for Clifford coefficient readouts

The four-qubit width-13 inverse Gram kernel has a 145-bit shared odd denominator. On a tape holding a signed numerator and a supplied binary scale, this package converts the corresponding rational coefficient to any requested binary output precision. The local gate program implements Euclidean division, exact remainder delivery, truncation and nearest-even rounding. The numerator can be any signed integer. For a Gaussian coefficient run its two components sequentially. [Gate program](tape.py) · [Locality, resource and latency proofs](PROOF.md)

The 80 rational classes of #7816 give the following *least common* denominators after reducing every coefficient of the specified kernel or pair. Factoring out the dyadic scale determines which conversion an actual coefficient array needs.

| Four-qubit width-13 source | Shared odd divisor | Binary scale |
|---|---:|---:|
| Canonical inverse kernel | 22,742,436,009,630,709,072,767,882,717,680,300,149,753,125 | 0 |
| Pair of kernels for the 51-step optimal-norm schedule | 470,624,175 | 11,352 |
| Pair of kernels for the 52-step dyadic schedule | 1 | 7,499 |

Source magnitudes and Pauli basis changes can carry additional scale. After the inputs are expressed over the chosen common denominator, a long dyadic tail below the requested precision stays in place as low remainder bits. It participates in a single rounding test. The odd division only processes the high numerator digits. For a short magnitude the signed wrapper automatically pads the input to at least one digit above the tail. At precision zero the actual 7,499- and 11,352-bit tails still occupy that many tape sites, including padding, and their sticky scans incur linear movement. [Source reconstruction and literal coefficient](check_sources.py) · [Published Gram kernels](https://github.com/apoursh/integer-mult-bounds/blob/7e7e62c62fcccd11f5c8e22677b4523863a48f4b/research/clifford-transported-fibre-gram/PROOF.md)

For a fixed odd divisor $D$, a most-significant-bit-first Euclidean quotient transducer requires **exactly $D$ distinguishable states** between input bits. An exact lockstep transducer for $L$ independent component streams requires $D^L$. The tape construction visits a window of $k+1$ data sites for each divided digit, where $k$ is the modulus bit length. Its ordinary digit circuit uses exactly $29(k+1)+3$ NOT, CNOT and Toffoli gates, including advancing the modulus one site. A common-denominator register and an output bank may be reused across calls. The proof gives the entire-program invoice, including retreating the modulus, rounding, scratch closure and head return.

Nearest rounding changes when a high output bit becomes knowable. For an $n$-bit integer divided by odd $D>1$, put $v=v_2((D-1)/2)$. A nonconstant rounded output bit $j>v$ first becomes determined for *every* input after exactly $n-v$ most-significant input bits. For the canonical four-qubit divisor, $v=1$. For the five-qubit canonical denominators at widths 15 and 16, $v=0$. Arbitrarily high nonconstant quotient bits can therefore depend on the last input bit at those widths. [Latency witnesses and prefix-tree replay](check_latency.py)

As a physical example, take the identity-class coefficient of the actual width-13 inverse kernel. Its 32-fraction-bit nearest readout gives $4580344441/2^{32}$. With the shared denominator above, the circuit uses 326 eight-track sites, 209,200 NOT, 260,239 CNOT and 365,064 Toffoli gates and 311,724 one-site head moves. This is an upper bound for one terminal conversion in the stated local model. Occupied coefficient construction, numerator scaling and transfer to the converter are upstream obligations in a complete supplier.

## Reproduce

Use CPython 3.12 and the standard library from the repository root.

```sh
python3.12 -B scripts/research_package.py --package research/clifford-shared-denominator-tape
```

From this package directory, `python3.12 -B convert.py -15 3 1 0` converts $-15/(3\cdot2)$ to the nearest integer. It returns $-2$, with magnitude remainder 3 modulo 6. The sign, retained rounding flag and remainder reconstruct the exact rational input. Pass `--truncate` to truncate toward zero. The package checks the bit-gate map against exact fractions, reverses the complete gate lists on all small inputs and independently computes when each output prefix becomes determined. [Signed conversion](convert.py) · [Exhaustive physical replay](check_tape.py) · [Source hashes](SOURCE-PINS.json)

## Open next questions

1. Can a producer supply these scaled numerators directly as local streams at useful precision? Price at least one complete nonidentity Pauli output, including its symplectic lookup, numerator accumulation, rounding and movement.
2. Is there a lower gate or motion bound stronger than the finite-state and latency obstructions for a named tape layout? Start with intermediate block sizes between one bit and one full residue and compare the cost of moving precomputed constants.

## Attribution

apoursh's #7805, #7812 and #7817 established the canonical denominators. The 51/52 schedules and transported kernel come from #7809 and #7816. Their underlying Clifford and character calculations credit Ali Romman, Nick Petalas, alephnan, GAP and the GAP Character Table Library. The binary restoring quotient and majority carry are classical arithmetic. This submission binds the published denominators to an explicit local reversible program, exact gate and head invoices, a residue-state lower bound and a sharp rounding-latency result. Prepared by apoursh with substantial OpenAI Codex assistance under Apache-2.0. [Collaboration claim](https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19756931)
26 changes: 26 additions & 0 deletions research/clifford-shared-denominator-tape/SOURCE-PINS.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[
{
"local": "retained/CLASS-ALGEBRA.json",
"repository": "apoursh/integer-mult-bounds",
"commit": "7e7e62c62fcccd11f5c8e22677b4523863a48f4b",
"path": "research/clifford-transported-fibre-gram/CLASS-ALGEBRA.json",
"git_blob": "cbee453d502ebcfa5dc1c286185f3e7755fda19d",
"sha256": "6c057511a066c8c0fe2c26ed69183a329e59e80308d1e6c0de7ed11f0d650537"
},
{
"local": "retained/SCHEDULE.json",
"repository": "apoursh/integer-mult-bounds",
"commit": "7e7e62c62fcccd11f5c8e22677b4523863a48f4b",
"path": "research/clifford-transported-fibre-gram/retained/SCHEDULE.json",
"git_blob": "8285a6ed622d68544ece2ecf668f54bf5b2e8bc2",
"sha256": "77a6ffadc3eb0ec32ddde33898e3dc528e0cdcf3907e565a9fee6ee0a48f5055"
},
{
"local": "retained/CORNERS.json",
"repository": "apoursh/integer-mult-bounds",
"commit": "2007a7604cf44df8b666ada3483bc553ce557fa9",
"path": "research/clifford-even-five-qubit-spectrum/CORNERS.json",
"git_blob": "3e9bfca8e013c355589154b607fc95c072e80d1d",
"sha256": "11418292858e910133324288467d8b5f438027d1cc0853c0899964eb105a44a6"
}
]
76 changes: 76 additions & 0 deletions research/clifford-shared-denominator-tape/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"schema_version": 1,
"base_commit": "e54523517d0f03e58352e647c403a5af3e525a57",
"files": [
{
"path": "certificates/selected-result.json",
"usage": "provenance",
"git_blob": "75d77b328ea02ded535e7f23aee5b1e55d0bb1a8",
"sha256": "154c3d30455d778fd3343b6b4851f0fa4665f0f7625b0adb3675e2bafbbf6bf1"
},
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec",
"sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81"
}
],
"cited_research": [
{
"pr": 7772,
"head": "1398fbdca3536389d8ac3c8b3aaa408f03e8f6c2",
"author": "aliromman",
"title": "Determine sharp four-qubit Clifford threshold conditioning",
"url": "https://github.com/CrocSwap/integer-mult-bounds/pull/7772"
},
{
"pr": 7802,
"head": "ebe2c019e398d73444e4f33f2d71bd5775795a01",
"author": "apoursh",
"title": "Determine the sharp odd denominator for noise-optimal four-qubit Clifford decoding",
"url": "https://github.com/CrocSwap/integer-mult-bounds/pull/7802"
},
{
"pr": 7805,
"head": "d3df403a13bee082a8cef62f190024aaf0cd08dd",
"author": "apoursh",
"title": "Determine the exact odd denominator of the canonical width-13 Clifford decoder",
"url": "https://github.com/CrocSwap/integer-mult-bounds/pull/7805"
},
{
"pr": 7806,
"head": "b42e665721e76e69d05f24a19bdabee0e0f77c04",
"author": "apoursh",
"title": "Prove the sharp five-qubit Clifford tensor threshold T(5) = 15",
"url": "https://github.com/CrocSwap/integer-mult-bounds/pull/7806"
},
{
"pr": 7809,
"head": "7efc2c67b32e305d20e484dc3afa9229ab119269",
"author": "apoursh",
"title": "Prove sharp 52- and 51-pass bounds for width-13 Clifford decoding",
"url": "https://github.com/CrocSwap/integer-mult-bounds/pull/7809"
},
{
"pr": 7812,
"head": "46a25a0e602ae6e2917ae2f2de3828f04bfcba4f",
"author": "apoursh",
"title": "Determine odd-denominator growth for canonical five-qubit Clifford decoding",
"url": "https://github.com/CrocSwap/integer-mult-bounds/pull/7812"
},
{
"pr": 7816,
"head": "7e7e62c62fcccd11f5c8e22677b4523863a48f4b",
"author": "apoursh",
"title": "Apply the width-13 Clifford Gram and its inverse to requested fibres",
"url": "https://github.com/CrocSwap/integer-mult-bounds/pull/7816"
},
{
"pr": 7817,
"head": "2007a7604cf44df8b666ada3483bc553ce557fa9",
"author": "apoursh",
"title": "Determine both even-width five-qubit Clifford denominator growth rates",
"url": "https://github.com/CrocSwap/integer-mult-bounds/pull/7817"
}
]
}
Loading
Loading