diff --git a/README.md b/README.md index 405d17e..c58e826 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,12 @@ Conversely, below the relevant $`q`$-fold repetition scale, the finite-phase ens The complement task and positive-state swapper are due to Benedetti, Buhrman and Weggemans. The power extractor and its occupation compiler are inherited from [Quantum Coherent Collisions](https://github.com/GoGoKo699/Quantum-Coherent-Collisions/tree/219f590010247124f48feffaf244a60f306335f4). Random-phase coupon simulation and phase-moment methods also have prior sources. [Related work](references/related-work.md) separates those ingredients from the output-specific persistence law. +## Fixed prefix measurement and quantum memory + +The sister project [Local-Quantum-Complement-Sampling](https://github.com/GoGoKo699/Local-Quantum-Complement-Sampling) gives the exact positive-input decoding frontier when part of each specimen is measured first. The [joint extension](science/prefix-measurement.md) adapts phase recovery to that interface. Write $`F_q(N,B)`$ for the unrestricted copy order above and $`m`$ for the retained suffix qubits per copy. Collective suffix processing has order $`F_q(N,B)`$ for uniform balanced supports and $`m\ge2`$. A guarantee for every balanced support costs order $`\max\{F_q(N,B),N/2^m\}`$. + +For frozen unknown signs, two retained suffix qubits per copy and a uniformly random balanced support, storing and jointly measuring batches costs $`\Theta(\sqrt N)`$ copies. Measuring every suffix on arrival costs $`\Theta(\sqrt{N\log N})`$ at the same $`2/3`$ target, even with arbitrary classical memory. These are established endpoints of the storage comparison. + ## Read the science Start with the [connected scientific route](science/README.md), or go directly to a question: @@ -53,6 +59,7 @@ Start with the [connected scientific route](science/README.md), or go directly t | What is the exact theorem and its regime map? | [Persistence frontier](science/persistence-frontier.md) | | Why can no collective receiver beat the copy order? | [Phase-twirl converse](science/phase-twirl-converse.md) | | How does recovery work within a refresh block? | [Coherent recovery](science/coherent-recovery.md) | +| How does fixed prefix measurement change copy cost and the role of quantum memory? | [Prefix measurement](science/prefix-measurement.md) | | How are gates, workspace and rare-success precision charged? | [Implementation](science/implementation.md) | | What does equality of one-copy states leave undetermined? | [Interpretation](science/interpretation.md) | | Which conclusions and tools are inherited? | [Attribution](references/related-work.md) and [bibliography](references/references.bib) | @@ -69,10 +76,11 @@ With Python 3.10 or later, no additional packages are needed: ~~~bash python3 verification/check_science.py +python3 verification/check_prefix_complement.py python3 verification/check_learning.py ~~~ -The science suite independently checks phase ensembles, occupation blocks, Kraus admissibility and factorization, exact batch probabilities, classical posteriors, charged source-clock schedules and phase-cell diffusion. The learning checker checks the map's structure and navigation. The [verification guide](verification/README.md) gives their finite scope. These checks support the derivations; they are not an asymptotic proof, hardware experiment or priority certificate. +The science suite independently checks phase ensembles, occupation blocks, Kraus admissibility and factorization, exact batch probabilities, classical posteriors, charged source-clock schedules and phase-cell diffusion. The prefix checker compares the transcript-wise occupation extraction with its unrestricted output and checks finite cases of the on-arrival analysis. The learning checker checks the map's structure and navigation. The [verification guide](verification/README.md) gives their finite scope. These checks support the derivations; they are not an asymptotic proof, hardware experiment or priority certificate. ## Scope and costs diff --git a/learning/MILESTONES.md b/learning/MILESTONES.md index 02d5b11..18b6d5b 100644 --- a/learning/MILESTONES.md +++ b/learning/MILESTONES.md @@ -214,7 +214,7 @@ The chapter files are [Chapter 2](https://cs.uwaterloo.ca/~watrous/TQI/TQI.2.pdf - **Understanding target:** Sum the residual multinomial weights to obtain the falling-factorial success formula times a no-$`q`$-collision occupancy probability. Check that the answer is independent of the hidden phases and support labels. - **Dependencies and story role:** Uses M09 and M21. It supplies the finite probability required to choose a charged schedule. - **Conceptual connection:** The same ordinary occupancy law quantifies a useful coherent subspace in the upper bound and an inaccessible one in the converse. -- **Source pointers:** W7-symmetry, section 7.1.1, for normalized occupations; W2-readout, section 2.3.2, for successful trace; [coherent recovery: exact success probability](../science/coherent-recovery.md). +- **Source pointers:** W7-symmetry, section 7.1.1, for normalized occupations; W2-readout, section 2.3.2, for successful trace; [coherent recovery: exact success probability](../science/coherent-recovery.md); [fixed-prefix extraction](../science/prefix-measurement.md#1-exact-extraction-from-measured-prefixes). ### M23 — Choose a batch before it becomes too large @@ -250,7 +250,7 @@ The chapter files are [Chapter 2](https://cs.uwaterloo.ca/~watrous/TQI/TQI.2.pdf - **Understanding target:** Combine the lower and upper bounds and locate the ordinary, refresh-limited and frozen regimes. Derive the sign and three-phase examples while keeping phase order fixed. - **Dependencies and story role:** Uses M19, M24 and M25. It assembles the central result from its independently justified halves. - **Conceptual connection:** Identical one-copy averaged density operators can support distinct optimal multicopy capabilities because their hidden-source correlations differ. -- **Source pointers:** W2-states, section 2.1.2, for the marginal/joint distinction; [persistence frontier sections 1, 5 and 6](../science/persistence-frontier.md); [interpretation](../science/interpretation.md). +- **Source pointers:** W2-states, section 2.1.2, for the marginal/joint distinction; [persistence frontier sections 1, 5 and 6](../science/persistence-frontier.md); [interpretation](../science/interpretation.md); [copy frontiers with measured prefixes](../science/prefix-measurement.md#the-model-and-copy-frontiers). ### M27 — Phase cells and an explicit success margin @@ -277,7 +277,7 @@ The chapter files are [Chapter 2](https://cs.uwaterloo.ca/~watrous/TQI/TQI.2.pdf - **Understanding target:** Account for acquisition, batch width, known gates, classical schedules and source preparation. Explain the stated near-linear processing overhead and why it does not supply a free preparation circuit or a hardware crossover. - **Dependencies and story role:** Uses M12, M24, M25 and M28. It fixes the implementation scope of the algorithmic conclusion. - **Conceptual connection:** Supplied-copy complexity, coherent width, gate count and the cost of creating each specimen are distinct quantities. -- **Source pointers:** W2-channels, section 2.2.1, for the declared input/output interface; [implementation](../science/implementation.md); [model section 8](../science/model.md); [interpretation](../science/interpretation.md). +- **Source pointers:** W2-channels, section 2.2.1, for the declared input/output interface; [implementation](../science/implementation.md); [model section 8](../science/model.md); [interpretation](../science/interpretation.md); [measurement on arrival](../science/prefix-measurement.md#3-measuring-each-two-qubit-suffix-on-arrival). ### M30 — One connected scientific account @@ -290,4 +290,4 @@ The chapter files are [Chapter 2](https://cs.uwaterloo.ca/~watrous/TQI/TQI.2.pdf ## Where to return for a specific gap -Use the central question of a milestone to locate the missing part of the argument. M01–M12 resolve the experiment and language; M13–M19 reconstruct the converse; M20–M25 reconstruct the attaining algorithm; M26–M30 reconcile the frontier, robustness, implementation and attribution. The [worked example](WORKED_EXAMPLE.md) provides finite instances, and the [verification guide](../verification/README.md) identifies the actual checks and their limits. +Use the central question of a milestone to locate the missing part of the argument. M01–M12 resolve the experiment and language; M13–M19 reconstruct the converse; M20–M25 reconstruct the attaining algorithm; M26–M30 reconcile the frontier, robustness, implementation and attribution. The [fixed-prefix bridge](WATROUS_BRIDGE.md#when-the-prefix-is-measured-first) extends the M20–M29 argument to the suffix interface. The [worked example](WORKED_EXAMPLE.md) provides finite instances, and the [verification guide](../verification/README.md) identifies the actual checks and their limits. diff --git a/learning/README.md b/learning/README.md index 59f5f8a..70cfc2e 100644 --- a/learning/README.md +++ b/learning/README.md @@ -4,6 +4,8 @@ The educational anchor is **John Watrous, *The Theory of Quantum Information* (2 Start with the [Watrous bridge](WATROUS_BRIDGE.md), which translates the selected textbook sections into the source model and supplies the extra occupation and phase calculations. Then follow the [30 milestones](MILESTONES.md) in order. The [four-label worked example](WORKED_EXAMPLE.md) makes the distinction between a one-copy average and repeated-source correlations explicit before returning to the asymptotic theorem. +Once you reach M26, [the fixed-prefix route](WATROUS_BRIDGE.md#when-the-prefix-is-measured-first) applies the same textbook tools to a source that retains only suffix qubits. It leads from the exact recovery instrument to the worst-case copy term and the on-arrival measurement result. + ## Why 12 background milestones and 18 narrative milestones? M01–M12 build the complete language needed to ask the question: the support task, quantum versus classical data, correlated ensembles, instruments, unconditional success, trace-distance bounds, occupations, phase characters, posterior sampling and the source clock. M13–M30 then follow the actual argument from its simple endpoints through the unrestricted converse, the attaining instrument and schedule, and the implementation and interpretation limits. The longer second phase reflects the two matching proofs and their resource accounting. diff --git a/learning/WATROUS_BRIDGE.md b/learning/WATROUS_BRIDGE.md index 7b206f7..ca0d07a 100644 --- a/learning/WATROUS_BRIDGE.md +++ b/learning/WATROUS_BRIDGE.md @@ -139,4 +139,12 @@ The [frontier](../science/persistence-frontier.md) supplies the complete theorem This is a supplied-copy result. No membership oracle, source preparation program, inverse, reflection or QRAM is supplied. Source construction and receiver gates, storage and synthesis are accounted for separately in [implementation](../science/implementation.md). The bridge and finite example do not establish an end-to-end classical-data runtime advantage, unknown-boundary robustness or the asymptotic proof by numerical inspection. +## When the prefix is measured first + +Use §2.3.2 for product measurements and instruments, and §7.1.1 for normalized symmetric occupations. M20–M22 describe the unrestricted extractor. To adapt it, group the suffix registers by their classical prefix transcript and count the compatible label words in each occupation. The same factor rescales every compatible coefficient for a fixed transcript. Summing over all transcripts with those prefix counts cancels the squared factor. + +For a small example, take $`N=8`$, $`q=2`$, two retained suffix qubits, and two occupied suffixes in each of the two prefixes. Two calls have the same prefix with probability $`1/2`$. Within that prefix the equality sector has probability $`1/2`$, and the inherited success effect has weight $`1/3`$ there. The net repair probability is $`1/12`$. The successful suffix is the positive state of the two occupied suffix labels, regardless of their signs. The known suffix reflection in [Local-Quantum-Complement-Sampling](https://github.com/GoGoKo699/Local-Quantum-Complement-Sampling) then returns a missing suffix in that fiber. + +Continue from M26 to compare the ordinary-prefix lower bound for unions of full fibers with the collective extraction upper bound. For the measurement-on-arrival comparison, use §2.3.2 to write the likelihood of a fixed adaptive path as a product of effects. Follow the [joint proof](../science/prefix-measurement.md) for the two-visit posterior bound and the opposite-basis sampling procedure that reaches the exact threshold. The posterior calculations and copy orders are established by the research argument. + [Worked example](WORKED_EXAMPLE.md) · [Source model](../science/model.md) · [Scientific reading route](../science/README.md) diff --git a/llms.txt b/llms.txt index 7924053..49ccc80 100644 --- a/llms.txt +++ b/llms.txt @@ -10,11 +10,13 @@ Theorem, regimes, source-clock quantifiers: science/persistence-frontier.md Unrestricted collective classical-output lower bound: science/phase-twirl-converse.md Inherited exact power instrument and attaining schedule: science/coherent-recovery.md Gates, storage, synthesis and source preparation: science/implementation.md +Fixed-prefix extension, average and worst-case copy orders, and single-suffix measurement endpoint: science/prefix-measurement.md +Sister project and positive-input suffix decoder: https://github.com/GoGoKo699/Local-Quantum-Complement-Sampling Physical and algorithmic meaning: science/interpretation.md Attribution and closest-work differences: references/related-work.md Structured bibliography: references/references.bib Finite checks and their limits: verification/README.md -Reproduction command: python3 verification/check_science.py +Reproduction commands: python3 verification/check_science.py and python3 verification/check_prefix_complement.py Educational route: learning/README.md Single educational anchor: John Watrous, The Theory of Quantum Information (2018), official author page https://cs.uwaterloo.ca/~watrous/TQI/ @@ -25,4 +27,6 @@ Learning structure and navigation command: python3 verification/check_learning.p Keep these distinctions: fixed q, balanced support, known exact B-call blocks, supplied specimens only, every failed/discarded acquisition charged, unconditional classical output. No source inverse/reflection, membership oracle, hidden phase program or QRAM is supplied. B is not a receiver-memory cap. Refreshed dephasing requires vanishing pairwise phase correlations across different addresses, satisfied by independent uniform root phases. Persistent and refreshed sources share one-copy averages but different many-copy states. +For the forced-prefix interface with m retained suffix qubits, collective copy order at threshold 2/3 remains the unrestricted order on uniform balanced supports for m >= 2. The worst-case order also includes the N/2^m term. With m = 2 and one sufficiently long frozen sign block, per-arrival measurement needs order sqrt(N log N) versus collective order sqrt(N). This last comparison permits arbitrary classical records and leaves general intermediate quantum memory open. + The power extractor, coupon simulator, phase averaging, birthday method and positive complement swapper are inherited and attributed. The new account concerns their matching classical-output persistence consequence. Do not infer a coherent state-transformation lower bound from the sampling theorem or the reverse. Do not infer end-to-end classical-data speedup, generic noise robustness, a hardware crossover, growing-q uniformity or exhaustive priority. diff --git a/references/references.bib b/references/references.bib index c106321..aa4df63 100644 --- a/references/references.bib +++ b/references/references.bib @@ -63,6 +63,16 @@ @misc{AAGW26 url = {https://arxiv.org/html/2608.00265v1} } +@inproceedings{CCHL21, + author = {Chen, Sitan and Cotler, Jordan and Huang, Hsin-Yuan and Li, Jerry}, + title = {Exponential Separations Between Learning With and Without Quantum Memory}, + booktitle = {2021 IEEE 62nd Annual Symposium on Foundations of Computer Science (FOCS)}, + year = {2021}, + eprint = {2111.05881}, + archivePrefix = {arXiv}, + url = {https://arxiv.org/abs/2111.05881} +} + @misc{QCC26, title = {Quantum Coherent Collisions}, howpublished = {Public scientific repository}, diff --git a/references/related-work.md b/references/related-work.md index 0f5d10a..11131cf 100644 --- a/references/related-work.md +++ b/references/related-work.md @@ -33,10 +33,16 @@ The earlier converse has a different output contract: a coherent powered state f | Account | Actual source and task | Shared ingredient and distinct conclusion | | --- | --- | --- | | [Quantum Example Entropy](https://github.com/GoGoKo699/Quantum-Example-Entropy/tree/d1077fac179d33972a63f57d60d54b822721b328) [QEE26] | A pure graph example includes an address and a hidden random label register. The same label table may be frozen across copies. A quantum simulator receives ordinary classical examples. | Its common positive component and coherent permutation simulator preserve the underlying classical signal under a conditional-label collision criterion. It does not state a phase-only complement-sampling frontier. | -| [Local Quantum Complement Sampling](https://github.com/GoGoKo699/Local-Quantum-Complement-Sampling/tree/1d5f10d2ee166ce02dea3bfcdd21bf9f26959d39) [LQCS26] | One positive-amplitude balanced-subset sample has specified input qubits measured computationally before decoding. It gives an exact average success frontier and one-copy residual-dephasing analysis. | It quantifies access within one specimen. The present source has unrestricted collective access to many specimens and varies the persistence of hidden phases between specimens. | +| [Local-Quantum-Complement-Sampling](https://github.com/GoGoKo699/Local-Quantum-Complement-Sampling/tree/1d5f10d2ee166ce02dea3bfcdd21bf9f26959d39) [LQCS26] | One positive-amplitude balanced-subset sample has specified input qubits measured computationally before decoding. It gives an exact average success frontier and one-copy residual-dephasing analysis. | It quantifies access within one specimen. The present source has unrestricted collective access to many specimens and varies the persistence of hidden phases between specimens. | These comparisons concern scientific statements at the linked revisions. Shared techniques are credited once; changing the output task or source correlation does not automatically imply a new theorem or transfer an existing converse. +## Fixed prefix measurement and on-arrival readout + +[LQCS26] solves positive-amplitude one-copy decoding under a fixed computational prefix measurement. [QCC26] supplies the exact coherent occupation extractor. The [joint extension](../science/prefix-measurement.md) shows how to realize its classical-prefix and quantum-suffix output with the prefix measured at acquisition. It reuses the unrestricted phase-persistence lower bound, proves the extra worst-case prefix-count cost, and gives matching copy bounds for on-arrival measurement of two-qubit suffixes under frozen signs. + +Chen, Cotler, Huang and Li [CCHL21] define adaptive single-specimen receivers and distinguish classical storage from retained quantum memory for tasks including shadow tomography and purity testing. The on-arrival receiver here uses that type of adaptive measurement model. The task-specific proof uses support posteriors for a missing label at the exact $`2/3`$ threshold, with a forced prefix measurement and shared signs. + ## What this account adds For fixed phase alphabet size, the [main theorem](../science/persistence-frontier.md) combines a matching complement-output converse with an attaining copy schedule across known refresh blocks. It identifies when phase persistence restores a sample advantage despite an identical one-copy averaged density operator. The phase-cell result retains that order under its explicit calibrated width and success margin. @@ -52,4 +58,5 @@ The comparisons above cover the stated primary sources and the linked public acc - **[GMR25]** Vipul Goyal, Giulio Malavolta and Bhaskar Roberts, [*Unconditional Quantum Cryptography with a Bounded Number of Keys*](https://doi.org/10.62056/ayzoxrxqi), *IACR Communications in Cryptology* **2**(1) (2025), Theorems 3–4 and Section 3.1. - **[ABFGVZZ24]** Scott Aaronson, Adam Bouland, Bill Fefferman, Soumik Ghosh, Umesh Vazirani, Chenyi Zhang and Zixin Zhou, [*Quantum Pseudoentanglement*](https://doi.org/10.4230/LIPIcs.ITCS.2024.2), ITCS 2024, pp. 2:1–2:21. The fixed-support comparison used here is [arXiv:2211.00747v2, Lemma 2.4](https://arxiv.org/html/2211.00747v2). - **[AAGW26]** Omar Alrabiah, Srinivasan Arunachalam, Sabee Grewal and John Wright, [*No low-degree tests for quantum states*](https://arxiv.org/html/2608.00265v1), arXiv:2608.00265v1 (2026), Appendix B. +- **[CCHL21]** Sitan Chen, Jordan Cotler, Hsin-Yuan Huang and Jerry Li, [*Exponential separations between learning with and without quantum memory*](https://arxiv.org/abs/2111.05881), FOCS 2021. Sections 5–6 give the measurement models. - **[QCC26]**, **[QEE26]**, **[LQCS26]** The three public scientific accounts linked above, at their stated revisions. diff --git a/science/README.md b/science/README.md index a476465..09ca80c 100644 --- a/science/README.md +++ b/science/README.md @@ -9,6 +9,8 @@ The operational question is whether hidden phases that persist across emissions 5. [Implementation](implementation.md) accounts for occupation processing, protected workspace, rare-batch synthesis, source descriptions and preparation costs. 6. [Interpretation](interpretation.md) explains the temporal resource distinction and the limits of the sampling advantage. +The [fixed-prefix extension](prefix-measurement.md) changes the receiver interface and uses the local decoder from [Local-Quantum-Complement-Sampling](https://github.com/GoGoKo699/Local-Quantum-Complement-Sampling). It derives the average and worst-case collective copy orders and the sign-source endpoint with per-arrival measurement. + The [related-work account](../references/related-work.md) identifies the original complement sampler, the inherited coupon-state simulator, phase-moment methods and the power extractor. Each proof page names its dependencies. The [finite verification](../verification/README.md) checks consequential identities by independent enumeration and small-state constructions, while the analytical proofs establish the asymptotic laws. The symbol $`N`$ denotes the universe size, $`M=N/2`$ the support size, $`q`$ a fixed cyclic phase order, $`B`$ the known number of consecutive copies sharing one phase table, and $`T`$ a hard total copy budget. The parameter $`B`$ restricts the source, not receiver memory. diff --git a/science/model.md b/science/model.md index ea79b2c..6885b1d 100644 --- a/science/model.md +++ b/science/model.md @@ -94,6 +94,8 @@ The receiver may use: The lower bound imposes no measurement-batch cap and no coherent-memory cap. In particular, the parameter $`B`$ restricts the persistence of the source phase table, not the receiver's storage or the number of specimens it may jointly measure. +The [fixed-prefix extension](prefix-measurement.md) replaces this receiver input with a computational prefix record and retained suffix qubits. It also studies the stricter receiver that measures every two-qubit suffix upon arrival. Those results specify their own support guarantee and use the exact $`2/3`$ target. + The receiver does not receive any of the following resources: - a membership or value oracle for $`S`$; diff --git a/science/prefix-measurement.md b/science/prefix-measurement.md new file mode 100644 index 0000000..ba80401 --- /dev/null +++ b/science/prefix-measurement.md @@ -0,0 +1,141 @@ +# Complement sampling after a fixed prefix measurement + +[Source model](model.md) · [Unrestricted frontier](persistence-frontier.md) · [Local-Quantum-Complement-Sampling](https://github.com/GoGoKo699/Local-Quantum-Complement-Sampling) + +What survives when every specimen loses its prefix coherence before the receiver can act? Collective suffix processing preserves the average-case copy frontier. The worst-case frontier also charges for finding a suitable prefix. Measuring every suffix on arrival can cost more than storing batches of suffixes, even with unlimited classical memory. + +## The model and copy frontiers + +Use the exact-root [source model](model.md) with $`N=2^n`$ labels, a support $`S`$ of size $`M=N/2`$, and a fixed root order $`q\ge2`$. The phase table is constant for known blocks of $`B`$ calls. Before entering the receiver, each specimen undergoes a fixed computational-basis measurement of its first $`n-m`$ qubits. The receiver obtains the outcome $`z`$ and the remaining $`m`$ suffix qubits. Write $`D=2^m`$, $`L=N/D`$ and $`S_z=\{a:(z,a)\in S\}`$. The prefix $`z`$ has probability $`|S_z|/M`$. The task is to produce a classical label outside $`S`$ with unconditional success at least $`2/3`$ under a deterministic acquisition cap. + +Write + +```math +F_q(N,B)=\min\!\left\{N,\max\!\left\{N^{1-1/q},(N/B)^{q-1}\right\}\right\}. +``` + +| Receiver and support guarantee | Optimal hard copy order | +| --- | --- | +| Collective suffix processing, uniform balanced $`S`$, $`m\ge2`$ | $`\Theta_q(F_q(N,B))`$ | +| Collective suffix processing, every balanced $`S`$, $`0\le m\le n`$ | $`\Theta_q(\max\{F_q(N,B),N/2^m\})`$ | +| Each suffix measured on arrival, uniform balanced $`S`$, $`q=2`$ and $`m=2`$, one sufficiently long sign block | $`\Theta(\sqrt{N\log N})`$ | + +The upper bounds hold uniformly over permitted phase tables. In the third row, one sufficiently long block means one that accommodates the deterministic cap of the receiver below. The first row specializes to $`\Theta(\sqrt N)`$ in that regime. The third-row receiver may keep arbitrary classical records, including previous prefix outcomes and measurement outcomes. It carries no quantum state between arrivals. + +## 1. Exact extraction from measured prefixes + +The [inherited finite-batch extractor](coherent-recovery.md#the-finite-batch-instrument) acts on the normalized symmetric occupations of $`b`$ copies from one phase block. Write $`\mathbf n`$ for an occupation and $`\alpha_x`$ for the supplied amplitude. Its input coefficient is + +```math +A_{\mathbf n}=\sqrt{\frac{b!}{\prod_x n_x!}}\prod_x\alpha_x^{n_x}. +``` + +One coordinate $`x`$ must occur between $`q`$ and $`2q-1`$ times, with every other multiplicity below $`q`$. A successful Kraus operator with residual $`\mathbf v`$ maps $`\mathbf n=\mathbf v+q e_x`$ to $`|x\rangle`$ with coefficient + +```math +c_{\mathbf v,x}=\sqrt{\frac{(v_x+q)!}{v_x!\, C_q}}, +\qquad C_q=\frac{(2q-1)!}{(q-1)!}. +``` + +Let $`\tau`$ be the actual ordered prefix transcript, with counts $`r_z`$. The accessible normalized occupation basis in this branch is the tensor product of the symmetric suffix-occupation bases of the slots in each prefix. It is indexed by full occupations with these counts. The unnormalized coefficient of compatible $`\mathbf n`$ is $`c_{\mathbf r} A_{\mathbf n}`$, where + +```math +c_{\mathbf r}=\sqrt{\frac{\prod_z r_z!}{b!}}. +``` + +Indeed, $`b!/\prod_x n_x!`$ words belong to the full occupation and $`\prod_z r_z!/\prod_x n_x!`$ of those words have transcript $`\tau`$. The factor is common to every compatible occupation. + +In branch $`\tau`$, label the successful operations by $`(\mathbf v,u)`$, where $`u`$ is the prefix of the distinguished address. Map each compatible accessible basis state $`\mathbf v+q e_x`$ with prefix $`u`$ to the suffix of $`x`$, using the same coefficient $`c_{\mathbf v,x}`$. Each input occupation has at most one accepted distinguished coordinate and residual. Different occupied columns of a single operation have orthogonal output suffixes, and each coefficient has magnitude at most one. The successful effects therefore sum to at most the identity. Complete them with a failure outcome. + +For fixed $`(\mathbf v,u)`$, the prefix counts are the prefix counts of $`\mathbf v`$ plus $`q`$ occurrences of $`u`$. Every compatible transcript gives the same suffix density contribution in this branch, scaled by $`c_{\mathbf r}^2`$. There are $`1/c_{\mathbf r}^2`$ compatible transcripts. Summing over them gives exactly the successful output of the unrestricted instrument followed by measuring its output prefix. Its success probability remains the [original exact value](coherent-recovery.md#exact-success-probability) $`p_b`$. That value is independent of $`S`$ and of the phase table. The factor $`\alpha_x^q`$ cancels the root phases, so after success the classical prefix has distribution $`|S_z|/M`$ and the suffix is the normalized positive superposition on $`S_z`$. Reintroducing prefix bits as computational-basis registers and directly applying the unrestricted symmetric projection would introduce the extra transcript factor. + +To implement the measured-prefix instrument, group the stored suffix slots by their classical prefixes. Encode the local symmetric occupations reversibly, check global eligibility across the groups, and perform the inherited multiplicity-dependent rotation in the distinguished group. Record the output prefix and remove the distinguished suffix's $`q`$ occurrences coherently. Uncompute any extra record that would disclose the distinguished suffix beyond the intended output and residual. The group encoding and cleanup require coherent workspace in addition to the $`mb`$ live input-suffix qubits. See the [occupation implementation](implementation.md#the-coherent-circuit-for-one-batch) for the underlying operations and precision accounting. + +Use the [same hard schedule](coherent-recovery.md#a-hard-schedule-with-exact-refresh-boundaries) and count each attempt and discarded tail. To acquire a fixed number of repaired specimens, divide one scheduled list of attempts into that many predetermined groups. Keep the first success within each group. The probability of a group failure can be made any fixed small constant by increasing its deterministic attempt count. Conditional on $`S`$ and any phase tables, the repaired candidates have independent prefix laws in the successful groups. All attempts use fresh calls and every group has a support-independent success probability. The cap uses $`O_q(F_q(N,B))`$ calls when the coherent schedule is selected. If the coherent route costs at least order $`N`$, use the ordinary-label fallback instead. + +For a schedule that holds at most $`K`$ input suffix registers in each recovery batch, one may substitute $`\min\{B,K\}`$ for $`B`$ in the batch-size choice while still observing the actual source boundaries. If $`\min\{B,K\}\lt q`$, ordinary sampling gives the order-$`N`$ upper bound. Guards, occupation workspace and any retained repaired outputs are additional resources. In the collective upper bounds, this gives the same substitution in $`F_q`$. The schedule is an achievable batch-width tradeoff. An optimal law for general intermediate live quantum memory is open. + +## 2. Collective suffix processing + +### Uniform balanced support + +For $`m\ge2`$, feed a repaired specimen to the [local complement decoder](https://github.com/GoGoKo699/Local-Quantum-Complement-Sampling/blob/1d5f10d2ee166ce02dea3bfcdd21bf9f26959d39/science/access-frontier.md). It reflects the suffix about its uniform state, measures it, and appends the measured prefix. Since the repair success is independent of $`S`$, the conditional average success of this decoder is its original value $`(N-N/D)/(N-1)\ge3/4`$. A recovery failure rate at most $`1/4`$ with a uniform-output fallback gives success at least $`11/16`$. The [unrestricted converse](phase-twirl-converse.md) uses the uniform balanced support prior and applies directly because the unrestricted receiver can first perform the same prefix measurement. + +### Worst-case support + +For the extra lower bound at $`L\ge2`$, take a uniformly chosen union of exactly $`L/2`$ whole prefix fibers, with all phases positive. Every suffix is the same known uniform state and the prefix is an ordinary sample from the occupied half of the prefixes. A successful receiver must output an unoccupied prefix. After $`t`$ ordinary samples with $`d\le t`$ distinct observed prefixes, the best posterior success is $`(L/2)/(L-d)`$ when unobserved prefixes remain. Thus $`\Omega(L)`$ calls are necessary for success $`2/3`$. At $`L=1`$ this term is absorbed by $`F_q(N,B)`$. Together with the unrestricted converse this gives the claimed lower bound. + +For the upper bound, write $`f_z=|S_z|/D`$. The uniform-prefix mean is $`1/2`$, so at least one third of prefixes have $`f_z\le3/4`$. Either at least a sixth have $`f_z\le1/4`$, or at least a sixth have $`1/4\lt f_z\le3/4`$. A uniform prefix hits the first set with probability at least $`1/6`$ when that set is large. A repaired specimen hits the second set with probability at least $`1/12`$ when the latter is large, since its prefix probability is $`2f_z/L`$. + +Generate a constant number of independent uniform candidate prefixes and a constant number of repaired specimens. Keep the repaired suffixes. Take $`t=O(L)`$ fresh prefix samples using basis measurement and estimate each candidate's $`f_z`$ by $`L C_z/(2t)`$, with $`C_z`$ its observed count. The estimator is unbiased with variance at most $`L/(2t)`$. Choose the constant in $`t`$ so that all constant-many estimates have absolute error at most $`0.01`$ with probability at least $`0.99`$. Then make one of the following choices. + +1. If a uniform candidate has estimate at most $`0.26`$, output a uniform suffix there. On the accuracy event, its success is at least $`0.73`$. +2. Otherwise, if a repaired candidate has estimate in $`[0.24,0.76]`$, apply the local uniform reflection to its suffix and measure it. At true density $`f`$ the complement probability in that fiber is $`4f(1-f)`$, since the reflection puts the same amplitude on every missing suffix. Here $`f\in[0.23,0.77]`$ on the accuracy event, giving success at least $`0.7084`$. +3. If neither choice is available, output a uniform label. + +A candidate from the relevant large set passes its branch's estimate test on the accuracy event. Choose candidate counts for coverage probability at least $`0.99`$ conditional on recovery, and choose the repair groups for joint success probability at least $`0.99`$. The simultaneous good event then has probability at least $`0.97`$. Even zero success off that event leaves the product above $`2/3`$. The copy order is $`O_q(F_q(N,B)+L)`$, with only a constant number of repaired suffixes held in addition to the active batch and its workspace. The endpoints $`m=0`$ and $`m=n`$ are covered by ordinary sampling and unrestricted recovery respectively. + +## 3. Measuring each two-qubit suffix on arrival + +In this section $`m=2`$ and $`q=2`$. The receiver must convert every incoming suffix to a classical record before the next arrival. The prefix record and classical history can select any per-arrival measurement. + +### Lower bound + +For the prior, select $`S`$ uniformly and assign independent fair signs at each supported address and in each block. Pad an early-stopping receiver to its hard cap $`T`$ while preserving its output. Fix a complete transcript, including classical random choices and outcomes. Along that transcript the effects of the adaptive measurements are fixed. The likelihood at fixed support and signs is a product of unnormalized prefix-and-outcome likelihoods. Sign averaging factors by prefix and block. + +Fix the output address $`a`$ and reveal in the posterior calculation the exact support mask of all other visited prefixes, on at most $`4T`$ addresses. All likelihood factors from those prefixes are now constant in the mask of the output's prefix. The prior on that remaining four-address fiber is hypergeometric. Each local mask has probability $`2^{-4}(1+O(T/N))`$ when $`T=o(N)`$, uniformly in the revealed mask. This follows by exposing four occupancies from a remaining population whose size and number occupied differ from $`N`$ and $`N/2`$ by $`O(T)`$. Consequently any local posterior calculated at independent occupancy $`1/2`$ changes by only $`O(T/N)`$ in the actual model. The reveal is solely a device for bounding the original posterior by averaging over the revealed values. + +Zero visits to the target prefix give prior absence probability $`1/2`$ in the independent model. A single visit has sign-averaged likelihood equal to a sum of nonnegative diagonal effect weights on occupied addresses. Adding $`a`$ increases that likelihood, so the absence posterior is at most $`1/2`$. Two visits in distinct blocks again have a nondecreasing likelihood under adding $`a`$. + +For two visits in the same block, let $`L_0,L_1`$ be the transcript likelihoods under target absence and presence, averaged over other independent occupations and all signs. On real sign states it suffices to use the real symmetric parts of the effects. These are positive on real vectors and have real rank-one decompositions. By bilinearity it suffices to compute with two real vectors $`u,v`$. Denote by $`u_0,v_0`$ their components on $`a`$. Over the other suffix coordinates let $`U=\sum_i u_i^2`$, $`V=\sum_i v_i^2`$, $`C=\sum_i u_i v_i`$ and $`H=\sum_i u_i^2v_i^2`$. The fourth moments of independent signed Bernoulli occupancies give + +```math +L_0=\frac{UV+2C^2-H}{4}\ge\frac{C^2}{2}, +\qquad +L_1-L_0=\frac{u_0^2 V+v_0^2 U}{2}+u_0^2v_0^2+2u_0v_0C. +``` + +A common normalization from the unnormalized specimens cancels in these likelihood ratios. For $`w=|u_0v_0|`$, the last expression is at least $`w^2+w(\sqrt{UV}-2|C|)\ge-C^2/4\ge-L_0/2`$. Thus $`L_1\ge L_0/2`$, and the absence posterior is at most $`2/3`$ before the $`O(T/N)`$ prior correction. This applies to arbitrary positive effects on a fixed adaptive path. + +Conditional on any support, no prefix has probability larger than $`8/N`$. The probability of any triple prefix visit is at most $`64\binom T3/N^2`$. When $`T\le N/16`$, the all-distinct probability is at least $`\prod_{j=0}^{T-1}(1-8j/N)\ge\exp(-8T(T-1)/N)`$. The all-distinct event allows only the zero-visit or one-visit posterior, and the triple event is bounded by success one. The total success is therefore at most + +```math +\frac23+O(T/N)+\frac{\Pr(\text{some triple visit})}{3} +-\frac{\Pr(\text{all prefixes distinct})}{6}. +``` + +For $`T\le\sqrt{N\log N}/8`$, the last probability is at least $`N^{-1/8}`$, which dominates the positive error terms asymptotically. This proves the hard-budget lower bound even when the sign table can persist indefinitely. + +### Matching upper bound for a frozen sign block + +Fix distinct suffix addresses $`a,b`$ in every prefix. Plan two independent Poisson stages with mean $`\lambda=A\sqrt{N\log N}`$ per stage, with $`A`$ a sufficiently large fixed constant. Pre-draw the counts. If the sum exceeds $`\lceil4\lambda\rceil`$, immediately output a uniform label. Otherwise execute both stages within the same sign block. + +Use one-suffix projective measurements. In stage one choose the vector $`\sqrt{2/3}|b\rangle+\sqrt{1/3}|a\rangle`$ as one basis element, and in stage two use $`\sqrt{2/3}|b\rangle-\sqrt{1/3}|a\rangle`$. In both stages complete the basis with the orthogonal vector in the pair span and computational vectors outside it. Record whether an outcome lies in the pair span, and whether it equals the chosen vector. A prefix flags if each stage has exactly one outcome in its pair span and both are chosen-vector outcomes. Output $`a`$ in the first flagged prefix in a fixed order, or a uniform label if there is none. + +For the untruncated Poisson analysis put $`x=\lambda/M`$. The flags are independent across prefixes conditional on $`S`$ and its sign table, by Poisson thinning. The flag probabilities by occupancy of the pair are + +| Occupied pair addresses | Flag probability | +| --- | --- | +| Only $`b`$ | $`\alpha=\tfrac49 x^2e^{-2x}`$ | +| Only $`a`$ | $`\alpha/4`$ | +| Both | $`(\alpha/4)e^{-2x}`$ | +| Neither | $`0`$ | + +In the both-occupied case, the opposite rotations make the product of the two selected outcome likelihoods independent of the relative sign. Requiring exactly one outcome in the pair span per stage penalizes a doubly occupied pair by the additional $`e^{-2x}`$ factor. + +For an identified first flagged prefix, let $`h_k`$ be the probability that no earlier prefix flags given that its designated pair has $`k`$ occupied addresses. The other addresses are a uniform $`(M-k)`$-subset. Couple their $`k=1`$ and $`k=2`$ laws by deleting one uniformly chosen occupied address. At most one earlier flag probability changes, and its failure factor lies in $`[1-\alpha,1]`$. Hence $`h_2/h_1\le1/(1-\alpha)`$. The support prior gives the two singleton events equal probability and gives double occupancy probability at most the probability of only $`b`$. The conditional success for the first flag is at least + +```math +\left[1+\frac14+\frac{e^{-2x}}{4(1-\alpha)}\right]^{-1} +=\frac23+\frac{2x}{9}+O(x^2). +``` + +There are order $`N`$ prefixes with only $`b`$ in their designated pair except with probability $`O(1/N)`$. Their count has mean of order $`N`$ and variance $`O(N)`$: the single-pair probability is $`N/[4(N-1)]`$, and the joint probability for two disjoint pairs divided by the squared single-pair probability is $`1+2/[N(N-3)]`$. Thus the no-flag probability is at most $`O(1/N)+\exp(-cN\alpha)`$ for a constant $`c>0`$, and increasing $`A`$ makes it $`o(x)`$. The Poisson overflow probability is exponentially small in $`\lambda`$. Comparing to the untruncated frozen experiment, the truncated receiver loses at most that probability and always obeys its cap. Its total success reaches $`2/3`$ for sufficiently large $`N`$. Fixed small sizes can use the ordinary-sample receiver. + +The two basis changes are known one-suffix operations. Their ideal forms, and the independently drawn planned counts, suffice for the copy theorem. For a finite approximation, the success margin is of order $`x`$. One may allocate $`o(x)`$ error to count generation and total measurement error. For example, per-call measurement-channel error $`O(N^{-2})`$ has accumulated error $`o(x)`$ over the hard cap. The corresponding gates and classical processing are separate costs. The collective upper bounds have a constant whole-run margin, with per-attempt accuracy governed by the [existing rare-success accounting](implementation.md#finite-universal-gates-rare-success-must-be-included). + +## Attribution and reading route + +Benedetti, Buhrman and Weggemans introduced the complement task and calibrated global reflection. [Quantum-Coherent-Collisions](https://github.com/GoGoKo699/Quantum-Coherent-Collisions/tree/219f590010247124f48feffaf244a60f306335f4) supplied the exact occupation extractor. This repository's unrestricted persistence law and its sister's positive-input local decoder supply the two endpoints of the composition. The measured-prefix implementation of the extractor, the worst-case prefix-count term, and the matching frozen-sign on-arrival endpoint are the joint extension. See [related work](../references/related-work.md) for those distinctions and the comparison with adaptive single-copy learning. + +Follow the [Watrous bridge](../learning/WATROUS_BRIDGE.md) for instruments, product measurements and symmetric occupations. The [verification guide](../verification/README.md) identifies the finite checks for this extension. diff --git a/verification/README.md b/verification/README.md index ec92fbd..caeaa8e 100644 --- a/verification/README.md +++ b/verification/README.md @@ -23,6 +23,14 @@ The source clock tested here keeps each phase pattern for exactly the specified These checks support the calculations at the tested sizes. The scientific proofs establish the general resource laws; the program does not prove asymptotic optimality, independently establish novelty, test every joint quantum protocol, or implement the complete symmetrization circuit on hardware. +## Fixed-prefix extension + +```bash +python3 verification/check_prefix_complement.py +``` + +The companion program checks finite cases of the [fixed-prefix proof](../science/prefix-measurement.md), including the conditioned occupation coefficients and successful output after summing over prefix transcripts. The analytic proof gives the asymptotic copy and memory conclusions. + ## Learning-route structure ```bash diff --git a/verification/check_prefix_complement.py b/verification/check_prefix_complement.py new file mode 100644 index 0000000..3f898b8 --- /dev/null +++ b/verification/check_prefix_complement.py @@ -0,0 +1,191 @@ +#!/usr/bin/env python3 +"""Finite checks for complement sampling after measuring the prefix. + +Run with Python 3.10 or later. No third-party packages are required. +""" + +from cmath import exp as complex_exp +from itertools import product +from math import exp, factorial, isclose, pi, prod, sqrt +from random import Random + + +def occupations(total, width): + """Generate nonnegative occupation vectors with the specified total.""" + if width == 1: + yield (total,) + return + for count in range(total + 1): + for tail in occupations(total - count, width - 1): + yield (count, *tail) + + +def normalize(amplitudes): + norm = sqrt(sum(abs(amplitude) ** 2 for amplitude in amplitudes)) + return tuple(amplitude / norm for amplitude in amplitudes) + + +def prefix_counts(occupation, suffix_dimension): + return tuple( + sum(occupation[start : start + suffix_dimension]) + for start in range(0, len(occupation), suffix_dimension) + ) + + +def ordered_prefix_amplitudes(amplitudes, batch_size, suffix_dimension): + """Build projected local-occupation amplitudes from ordered words.""" + accumulated = {} + labels = range(len(amplitudes)) + for word in product(labels, repeat=batch_size): + occupation = tuple(word.count(label) for label in labels) + record = tuple(label // suffix_dimension for label in word) + coefficient = prod(amplitudes[label] for label in word) + by_occupation = accumulated.setdefault(record, {}) + total, count = by_occupation.get(occupation, (0j, 0)) + by_occupation[occupation] = (total + coefficient, count + 1) + + by_counts = {} + for record, by_occupation in accumulated.items(): + counts = tuple(record.count(u) for u in range(len(amplitudes) // suffix_dimension)) + coefficients = { + occupation: total / sqrt(count) + for occupation, (total, count) in by_occupation.items() + } + by_counts.setdefault(counts, []).append(coefficients) + return by_counts + + +def check_prefix_instrument(amplitudes, suffix_dimension, order, batch_size): + """Compare every residual-and-prefix success density block.""" + label_count = len(amplitudes) + prefix_count = label_count // suffix_dimension + c_q = factorial(2 * order - 1) / factorial(order - 1) + projected = ordered_prefix_amplitudes(amplitudes, batch_size, suffix_dimension) + entries = 0 + largest_error = 0.0 + + for residual in occupations(batch_size - order, label_count): + if max(residual) >= order: + continue + residual_factorials = prod(factorial(count) for count in residual) + powered_scale = sqrt(factorial(batch_size) / (c_q * residual_factorials)) + powered_scale *= prod(amplitude**count for amplitude, count in zip(amplitudes, residual)) + prefix_profile = prefix_counts(residual, suffix_dimension) + + for prefix in range(prefix_count): + counts = list(prefix_profile) + counts[prefix] += order + records = projected[tuple(counts)] + labels = range(prefix * suffix_dimension, (prefix + 1) * suffix_dimension) + global_vector = [powered_scale * amplitudes[label] ** order for label in labels] + + local_vectors = [] + for record in records: + local = [] + for label in labels: + occupation = list(residual) + occupation[label] += order + weight = sqrt( + factorial(occupation[label]) / (factorial(residual[label]) * c_q) + ) + local.append(weight * record[tuple(occupation)]) + local_vectors.append(local) + + for a, b in product(range(suffix_dimension), repeat=2): + before = global_vector[a] * global_vector[b].conjugate() + after = sum(local[a] * local[b].conjugate() for local in local_vectors) + error = abs(before - after) + if error > 1e-12: + raise AssertionError((order, batch_size, residual, prefix, a, b, error)) + largest_error = max(largest_error, error) + entries += 1 + + return entries, largest_error + + +def check_poisson_flags(): + """Check both rotations for all signed occupancies of the designated pair.""" + checked = 0 + for a, b in product((-1, 0, 1), repeat=2): + occupied = a * a + b * b + first = (a / sqrt(3) + b * sqrt(2 / 3)) ** 2 + second = (-a / sqrt(3) + b * sqrt(2 / 3)) ** 2 + for rate in (0.001, 0.1, 0.7, 1.5): + actual = rate * first * exp(-rate * occupied) * rate * second * exp(-rate * occupied) + b_only = (4 / 9) * rate**2 * exp(-2 * rate) + expected = { + (False, False): 0.0, + (False, True): b_only, + (True, False): b_only / 4, + (True, True): b_only * exp(-2 * rate) / 4, + }[bool(a), bool(b)] + if not isclose(actual, expected, rel_tol=1e-12, abs_tol=1e-16): + raise AssertionError((a, b, rate, actual, expected)) + checked += 1 + return checked + + +def product_likelihoods(first, second): + """Sum two real rank-one report likelihoods over signed Bernoulli occupancies.""" + absent = 0 + present_twice = 0 + for other_signs in product((-1, 0, 1), repeat=len(first) - 1): + # Multiplying all pattern weights by 4**len(other_signs) makes them integral. + weight = 2 ** other_signs.count(0) + x = sum(coefficient * sign for coefficient, sign in zip(first[1:], other_signs)) + y = sum(coefficient * sign for coefficient, sign in zip(second[1:], other_signs)) + absent += weight * x**2 * y**2 + present_twice += weight * ( + (x + first[0]) ** 2 * (y + second[0]) ** 2 + + (x - first[0]) ** 2 * (y - second[0]) ** 2 + ) + return absent, present_twice + + +def check_product_posterior(): + """Check the two-report 2/3 inequality and a saturating example.""" + pair_vectors = tuple(product(range(-2, 3), repeat=2)) + random = Random(204) + four_vectors = [tuple(random.randint(-4, 4) for _ in range(4)) for _ in range(64)] + checked = 0 + for vectors in (pair_vectors, four_vectors): + for first, second in product(vectors, repeat=2): + absent, present_twice = product_likelihoods(first, second) + if present_twice < absent: + raise AssertionError((first, second, absent, present_twice)) + checked += 1 + + absent, present_twice = product_likelihoods((1, sqrt(2)), (-1, sqrt(2))) + correct_posterior = absent / (absent + present_twice / 2) + if not isclose(correct_posterior, 2 / 3, rel_tol=1e-12): + raise AssertionError(correct_posterior) + return checked + 1 + + +def main(): + entries = 0 + worst_error = 0.0 + four_amplitudes = normalize((-2 + 1j, 2j, 3 - 2j, 1 + 3j)) + for order in range(2, 5): + root = complex_exp(2j * pi / order) + root_amplitudes = normalize((1, root, 0, 0)) + for batch_size in range(order, order + 5): + for source in (four_amplitudes, root_amplitudes): + count, error = check_prefix_instrument(source, 2, order, batch_size) + entries += count + worst_error = max(worst_error, error) + + # Test a two-qubit suffix using four supported addresses in two prefixes. + eight_amplitudes = normalize((1, root, 0, 0, root**2, 0, root, 0)) + for batch_size in (order, order + 1): + count, error = check_prefix_instrument(eight_amplitudes, 4, order, batch_size) + entries += count + worst_error = max(worst_error, error) + + print(f"Occupation instrument: {entries} density entries, max error {worst_error:.3g}") + print(f"Frozen-sign Poisson flag identity: {check_poisson_flags()} cases") + print(f"Two-report product posterior: {check_product_posterior()} cases") + + +if __name__ == "__main__": + main()