diff --git a/.github/workflows/hosted-math.yml b/.github/workflows/hosted-math.yml new file mode 100644 index 0000000..316d73c --- /dev/null +++ b/.github/workflows/hosted-math.yml @@ -0,0 +1,61 @@ +name: Hosted mathematics + +on: + pull_request: + paths: + - '**.md' + - 'verification/hosted_math/**' + - '.github/workflows/hosted-math.yml' + +permissions: + contents: read + +concurrency: + group: hosted-math-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + capture: + if: github.event.pull_request.head.repo.full_name == github.repository + runs-on: ubuntu-24.04 + timeout-minutes: 25 + env: + CAPTURE_REVISION: ${{ github.event.pull_request.head.sha }} + steps: + - name: Check out the exact proposed source + uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 + with: + ref: ${{ env.CAPTURE_REVISION }} + persist-credentials: false + - name: Set up Node + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 + with: + node-version: '22' + - name: Install the capture runtime + run: | + npm install --prefix "$RUNNER_TEMP/math-runtime" playwright@1.56.1 mathjax-full@3.2.1 + node "$RUNNER_TEMP/math-runtime/node_modules/playwright/cli.js" install --with-deps chromium + - name: Probe representative hosted mathematics + run: | + export NODE_PATH="$RUNNER_TEMP/math-runtime/node_modules" + node verification/hosted_math/probe_hosted_math.cjs \ + --root "$GITHUB_WORKSPACE" --repository "$GITHUB_REPOSITORY" \ + --revision "$CAPTURE_REVISION" --page science/model.md \ + --output "$RUNNER_TEMP/hosted-probe" + - name: Compare every hosted mathematical expression + if: ${{ !cancelled() }} + run: | + export NODE_PATH="$RUNNER_TEMP/math-runtime/node_modules" + node verification/hosted_math/capture_hosted_math.cjs \ + --root "$GITHUB_WORKSPACE" --repository "$GITHUB_REPOSITORY" \ + --revision "$CAPTURE_REVISION" --output "$RUNNER_TEMP/hosted-math" + - name: Retain the actual captures and comparison report + if: always() + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 + with: + name: hosted-math-${{ env.CAPTURE_REVISION }} + path: | + ${{ runner.temp }}/hosted-probe + ${{ runner.temp }}/hosted-math + if-no-files-found: error + retention-days: 14 diff --git a/README.md b/README.md index 61e2e7f..735f31d 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Given a reversible source circuit and its inverse, the algorithm returns a class ```math Z\in\Delta_d,\qquad \mathbb EZ=p,\qquad -\mathbb E\|Z-p\|_2^2\le\frac{32(d-1)}{T^2}, +\mathbb E\Vert Z-p\Vert _2^2\le\frac{32(d-1)}{T^2}, \qquad \mathbb EQ\le(C_{\rm prep}+C_{\rm ref})(d-1)T. ``` @@ -37,6 +37,10 @@ Start with the [scientific route](science/README.md) or the [model and exact the The convex-range consequence preserves known affine constraints and positivity in each realization. Fresh unbiased random transition matrices preserve the mean evolution; for contracting mean dynamics their distribution-vector errors satisfy a stable variance bound. Reusing one random table under powers generally introduces bias. These results concern probability objects and their mean-square error, not a faster trajectory sampler or a demonstrated hardware advantage. +## Learn the construction + +The [learning route](learning/README.md) starts from Andrew M. Childs's *Lecture Notes on Quantum Algorithms*, 17 April 2025. The [source-to-project bridge](learning/anchor-bridge.md) identifies the relevant foundations and supplies the missing links to this construction. The [30-milestone map](learning/milestones.md) follows the argument from reversible sources to the full estimator and its limits. + ## Reproduce the finite checks ```bash diff --git a/learning/README.md b/learning/README.md new file mode 100644 index 0000000..a8b6ecf --- /dev/null +++ b/learning/README.md @@ -0,0 +1,18 @@ +# Learning route + +The scientific question is how to estimate several outcome probabilities with quantum precision while returning a valid probability vector in every run. The construction joins a scalar sine-clock estimator, paid reflections about conditional states, and a probability tree whose random node weights determine its work. + +The single educational anchor is **Andrew M. Childs, *Lecture Notes on Quantum Algorithms*, 17 April 2025**, available from the [official notes page](https://www.cs.umd.edu/~amchilds/qa/). The [anchor bridge](anchor-bridge.md) gives selective section readings, a notation dictionary, the steps supplied by this project, and a complete three-outcome example. The notes provide foundations rather than the simplex theorem. + +The [30-milestone map](milestones.md) has twelve background milestones and eighteen narrative milestones. The first phase connects source circuits, reflections, phase information and charged queries. The second builds the conditional operation and random-mass tree into the theorem, then connects it to convex constraints, stochastic evolution and implementation limits. These are common understanding targets for the project; they do not record an individual reader's assessment or progress. + +| Starting point | Route | +|---|---| +| A concrete first encounter | [Worked example](anchor-bridge.md#3-a-complete-three-outcome-example) | +| The prerequisite-to-result connection | [Selective readings and notation](anchor-bridge.md#1-selective-readings) | +| The complete understanding map | [Milestones M01–M30](milestones.md) | +| The formal theorem and assumptions | [Scientific model](../science/model.md) | +| The proofs without the learning route | [Science index](../science/README.md) | +| What the finite checks establish | [Verification guide](../verification/README.md) | + +Every route preserves the same qualifications: fixed-alphabet Heisenberg scaling concerns expected source/inverse work with unbounded stopping tails; exactness uses ideal operations; finite caps and synthesis introduce a separately controlled approximation. Positivity and normalization do not make nonlinear reuse of an estimate unbiased. diff --git a/learning/anchor-bridge.md b/learning/anchor-bridge.md new file mode 100644 index 0000000..4a56422 --- /dev/null +++ b/learning/anchor-bridge.md @@ -0,0 +1,120 @@ +# From quantum algorithms to a valid random probability vector + +A source can produce three labels, but its probabilities are unknown. Measuring it repeatedly gives a frequency vector: every entry is nonnegative, the entries sum to one, and their means are correct. The aim here is to keep those properties while reducing the mean-square error quadratically with expected coherent source work. A small coordinate error alone does not ensure this: clipping or renormalizing estimates can change their means. + +The single anchor is **Andrew M. Childs, *Lecture Notes on Quantum Algorithms*, 17 April 2025**. Use the [official notes page](https://www.cs.umd.edu/~amchilds/qa/) and its [dated document](https://www.cs.umd.edu/~amchilds/qa/qa.pdf). Page references below are the printed page numbers. The [milestones](milestones.md) organize this project's story; the notes are selective support, not a book-length prerequisite. + +## 1. Selective readings + +| Anchor section | Printed page | Connection here | +|---|---:|---| +| §§1.1–1.2, quantum data and circuits; §1.4, reversible computation | 1–2 | The complete source, its garbage, and its inverse | +| §4.3, phase estimation | 19 | Coherent powers write phase information into a clock | +| §19.3, amplitude amplification and quantum counting | 88 | Two reflections amplify or measure an event | +| §§21.1–21.3, query complexity, quantum queries, and polynomials | 97–98 | Why an access model and its charged calls matter | +| §28.3, linear combinations of unitaries | 140 | The conditional unitary's scaled success block and oblivious amplification | +| §29.1, block encoding | 143 | A matrix represented by a unitary's flagged block | +| §2.1, subadditivity of errors | 7 | Accumulated approximation in a finite implementation | + +A first reading can use §§1.1–1.4, 4.3 and 19.3, then follow the example below. Return to §§28.3 and 29.1 for the conditional circuit. The query sections supply background; the project's expected-work lower bound uses its separately stated source model, not an automatic transfer of a Boolean-oracle theorem. + +### Notation dictionary + +| Object in the notes | Object in this project | Distinction to retain | +|---|---|---| +| The unitary whose eigenphase is estimated | The Grover product $`G`$ | The original source is $`U`$; the clock uses a derived unitary | +| Eigenphase in $`e^{i\varphi}`$ | Grover phases $`\pm\varphi`$, with $`\cos\varphi=1-2q`$ | A phase is not itself the event probability | +| Success probability in amplification | Conditional split probability $`q=s_L/s_S`$ | The original subset mass is the different quantity $`s_S`$ | +| Flagged block of a unitary | $`(s_S/4)V_S`$ | Its success amplitude is $`s_S/4`$, not $`\sqrt{s_S}`$ | +| One query in a chosen oracle model | One call to $`U`$ or $`U^\dagger`$ | Native gates and known tests also cost work | + +Here $`V_S=I-2|\phi_S\rangle\langle\phi_S|`$ and $`|\phi_S\rangle=\Pi_S U|0\rangle/\sqrt{s_S}`$. The scalar clock uses the opposite state-reflection sign, $`-V_S`$; a controlled call includes the corresponding known minus phase. The [scalar page](../science/scalar-clock.md) fixes that convention. + +## 2. The missing steps supplied by this project + +The notes introduce the algorithmic language. The research account supplies the following specific connections. + +1. **A bounded exactly unbiased scalar readout.** The inherited sine-clock estimator returns $`Y\in[0,1]`$, has mean $`q`$, and has variance $`\kappa_m q(1-q)`$. Its exact law and attribution are in [the scalar account](../science/scalar-clock.md). A generic accurate phase readout does not automatically have those moments. +2. **Conditioning without a free conditional inverse.** Filtering a source prepares one conditional specimen. It does not supply the reflection needed by amplitude estimation. The [conditional-reflection proof](../science/conditional-reflection.md) builds the controlled reflection from the original source and known subset tests. Its common success amplitude and input-restoring retries preserve arbitrary data and references. +3. **A budget coupled to a random mass.** A node receives an estimated global mass $`W`$. It gets a coherent clock only when $`TW\ge3`$, with clock length at most $`TW`$. Exact $`\mathbb EW=s_S`$ pays for the reflection's expected inverse-mass cost. A separate minimum positive weight pays for entering the node. +4. **A full vector proof.** Local mass conservation gives the simplex constraint; conditional expectation gives exact means; martingale increments give the total variance. See [the tree proof](../science/simplex-estimator.md), including zero-mass branches. + +These are different arguments. A correct conditional mean does not alone bound work, and a finite expected work bound does not impose a deterministic stopping deadline. + +## 3. A complete three-outcome example + +Let the source probabilities be + +```math +p=(1/2,1/3,1/6). +``` + +The algorithm does not receive these numbers. They specify the example whose output law we can calculate. Split labels $`\{1,2\}`$ from label $`3`$, so the true root split probability is $`s=5/6`$. Inside the first group the probability of label $`1`$ is $`r=(1/2)/(5/6)=3/5`$. + +Use scale $`T=3`$. The root's sine clock has length $`m=3`$, whose three possible readouts are $`0,1/2,1`$. For an event probability $`q`$, its law is + +```math +\Pr(Y=0)=(1-q)^2,\qquad +\Pr(Y=1/2)=2q(1-q),\qquad +\Pr(Y=1)=q^2. +``` + +This follows from the three-point support, exact mean $`q`$, and variance $`q(1-q)/2`$. At this smallest clock its law coincides with the average of two Bernoulli samples; this example illustrates assembly and accounting, not an asymptotic advantage from that one clock. + +Call the root readout $`W`$. Its probabilities are $`1/36`$, $`5/18`$, and $`25/36`$ respectively. The next action depends on that readout: + +- If $`W=0`$, skip the first group and return $`(0,0,1)`$. +- If $`W=1/2`$, then $`TW=3/2\lt 3`$. Prepare one conditional specimen and measure its label, using a Bernoulli readout $`Y`$ of mean $`r=3/5`$. +- If $`W=1`$, then $`TW=3`$. Prepare the conditional specimen and use a length-three sine clock for $`r`$. + +In either nonzero branch return + +```math +Z=(WY,\,W(1-Y),\,1-W). +``` + +The complete ideal output law is therefore: + +| Returned vector $`Z`$ | Probability | +|---|---:| +| $`(0,0,1)`$ | $`1/36`$ | +| $`(1/2,0,1/2)`$ | $`1/6`$ | +| $`(0,1/2,1/2)`$ | $`1/9`$ | +| $`(0,1,0)`$ | $`1/9`$ | +| $`(1/2,1/2,0)`$ | $`1/3`$ | +| $`(1,0,0)`$ | $`1/4`$ | + +All six vectors are valid probability vectors. The table probabilities sum to one. Multiplying the first coordinates by their probabilities gives + +```math +\mathbb EZ_1=\frac12\frac16+\frac12\frac13+\frac14=\frac12. +``` + +The same calculation gives $`\mathbb EZ_2=1/3`$ and $`\mathbb EZ_3=1/6`$. Thus the **whole output vector** is exactly unbiased, even though individual runs can be far from $`p`$. Its exact squared-norm moment is $`\mathbb E\Vert Z\Vert _2^2=25/36`$. Since $`\Vert p\Vert _2^2=7/18`$, its trace mean-square error is $`11/36`$. + +### What was measured and what was paid + +At the root, a clock measurement produces $`W`$. At the child, either one label measurement or another clock measurement produces $`Y`$. The source's garbage stays inside the full source register used by its inverse and reflection; its particular state does not alter this probability calculation. + +Both conditional operations are charged. The root has true mass one. The child has true mass $`5/6`$, is entered with probability $`35/36`$, and uses three controlled conditional reflections only in the $`W=1`$ branch, of probability $`25/36`$. The primitive bounds therefore give + +```math +\mathbb EQ\le +C_{\rm prep}\left(1+\frac{35}{36}\sqrt{\frac65}\right) ++C_{\rm ref}\left(3+\frac{25}{36}\frac{3}{5/6}\right) +\le6(C_{\rm prep}+C_{\rm ref}). +``` + +Here $`Q`$ counts original source and inverse calls; the universal constants are the explicitly implemented primitive bounds in [the model](../science/model.md). Known predicate logic, clock gates, measurements and classical arithmetic remain additional costs. This is an expectation, because the exact conditional routines can retry for arbitrarily long. + +For larger $`T`$, the same construction selects longer clocks only for sufficiently large received weights. Its proof gives total vector error at most $`32(d-1)/T^2`$ and expected source work at most $`(C_{\rm prep}+C_{\rm ref})(d-1)T`$. The boundary case is essential: a true zero-mass subset receives positive estimated mass with probability zero, so no undefined conditional operation is entered. + +## 4. From the example to the complete result + +The example has two splits. A $`d`$-label tree has $`d-1`$. To follow the global proof, keep two different masses visible: the true subset mass $`s_S`$ determines the cost of a conditional operation, while the random received mass $`W_S`$ determines its clock. Conditional unbiasedness links them through $`\mathbb EW_S=s_S`$. + +The minimum positive weight is a second link. Every visited node has $`W_S\ge T^{-2}`$. Hence a rare node cannot be visited too frequently. That pays for the conditional specimen; the separate bound on $`\mathbb E(TW_S)/s_S`$ pays for its controlled reflections. The [martingale proof](../science/simplex-estimator.md) then adds bounded split variances without assuming independent final coordinates. + +The [convex-composition page](../science/convex-composition.md) translates the returned weights into known finite convex combinations and fresh stochastic transition tables. It also gives an explicit counterexample to reusing one table under powers. The [precision page](../science/precision-and-resources.md) explains why a finite execution cap and finite gate synthesis preserve a controlled approximation rather than the full exact ideal claim. These boundaries belong to the theorem's meaning, not to optional implementation details. + +Use the [milestones](milestones.md) for the full local-to-global route, or the [science index](../science/README.md) for direct access to the canonical statements and proofs. Research citations in [related work](../references/related-work.md) establish attribution; they are not additional educational anchors. diff --git a/learning/milestones.md b/learning/milestones.md new file mode 100644 index 0000000..9a0c7aa --- /dev/null +++ b/learning/milestones.md @@ -0,0 +1,311 @@ +# Thirty milestones: from one source to a valid random probability vector + +This is the common understanding map for Quantum Simplex Estimation. Its single educational anchor is Andrew M. Childs, *Lecture Notes on Quantum Algorithms*, **17 April 2025**, available from the [author's course page](https://www.cs.umd.edu/~amchilds/qa/). The source pointers below identify exact sections in that version. The anchor supplies quantum-circuit, amplification, phase-estimation and block-encoding foundations; the statistical argument, inherited sine measurement and present conditional tree are supplied by this repository and its credited research sources. + +The map has **12 background/preliminaries milestones, M01–M12, and 18 narrative/innovation milestones, M13–M30**. The first phase joins a labelled quantum experiment, a valid probability estimate and the operations that can be paid for. The second builds the conditional reflection and random-mass tree, proves their global statistical and resource guarantees, then explains composition and implementation limits. This allocation follows the two ingredients that must meet: a quantum operation must remain coherent inside a split, and its random classical output must remain a valid probability vector outside it. + +Each milestone has a conceptual target and earlier dependencies. The map covers the connected scientific account without assigning every technical detail or implying that all of it appears in the anchor. Begin with the [source-to-project bridge](anchor-bridge.md) for notation and a complete small example. The [scientific reading route](../science/README.md) provides direct access to the authoritative proofs. + +## Phase I: background and preliminaries + +### M01 — A labelled experiment and its hidden workspace + +**Phase:** background/preliminaries. + +- **Central question:** What distribution is produced when a coherent source has both an output label and unobserved garbage? +- **Understanding target:** Explain why the squared norm of each labelled component is its outcome probability, and why garbage may be arbitrary while the complete source register must remain available to its inverse. +- **Dependencies and story role:** No earlier milestone. This identifies the experiment whose probabilities the project estimates. +- **Conceptual connection:** Measurement probabilities connect quantum amplitudes to an ordinary categorical distribution without assuming clean label amplitudes. +- **Source pointers:** Childs §§1.1–1.2; [model §1](../science/model.md#1-source-and-labels). + +### M02 — Three properties of an empirical probability vector + +**Phase:** background/preliminaries. + +- **Central question:** Why are positivity, normalization and the correct expectation separate requirements? +- **Understanding target:** Distinguish a valid probability vector in each run from a vector whose coordinates merely have the right means. Interpret mean squared Euclidean error as total coordinate variance for an unbiased estimator. +- **Dependencies and story role:** M01. This turns the source experiment into a precise statistical output problem. +- **Conceptual connection:** The simplex is both a feasible set for every realization and the domain of the unknown target. Averaging and nonlinear repair have different effects on the mean. +- **Source pointers:** Childs §1.1 for outcome probabilities; the statistical definitions are in [model §3](../science/model.md#3-required-output-and-error) and [the classical empirical vector](../science/lower-bounds.md#classical-independent-sample-lower-bound). + +### M03 — A coherent query and its inverse + +**Phase:** background/preliminaries. + +- **Central question:** Which access distinguishes the quantum experiment from receiving independent classical samples? +- **Understanding target:** Identify the actual source unitary, inverse and known controls. Explain why a reversible circuit can be run coherently, whereas a measured output specimen alone is not an inverse oracle. +- **Dependencies and story role:** M01–M02. This fixes the resource model before an apparent precision gain is interpreted. +- **Conceptual connection:** Reversible computation and query accounting connect a source program to the operations an amplitude-estimation circuit can execute. +- **Source pointers:** Childs §§1.4, 1.6 and 21.1–21.2; [model §2](../science/model.md#2-allowed-work-and-charged-resources). + +### M04 — A subset test is a binary projective measurement + +**Phase:** background/preliminaries. + +- **Central question:** How can a label subset be tested while preserving coherence inside its two outcome sectors? +- **Understanding target:** Describe the projector for a known subset, its reflection, and the good/bad decomposition. Distinguish the two-outcome test of an all-zero flag from measuring every signal register separately on failure. +- **Dependencies and story role:** M01 and M03. This supplies the measurement interface used by both conditioning and rewinding. +- **Conceptual connection:** A classical label predicate becomes a coherent reflection; the precise measurement instrument determines what information a failure record reveals. +- **Source pointers:** Childs §§1.1–1.2 and 19.3; [projector encodings](../science/conditional-reflection.md#1-exact-projector-encodings) and [binary flag checks](../science/precision-and-resources.md#binary-flag-checks-are-necessary). + +### M05 — Two reflections produce a probability-dependent rotation + +**Phase:** background/preliminaries. + +- **Central question:** Why does a success probability appear as an angle in Grover dynamics? +- **Understanding target:** Relate the normalized good/bad plane, the reflection about the prepared state, and the success reflection. Track the sign convention that makes the cosine of the Grover eigenphase equal to one minus twice the probability. +- **Dependencies and story role:** M03–M04. This provides the local quantum mechanism behind probability estimation. +- **Conceptual connection:** Geometry of two reflections turns a measurement probability into coherent phase information. +- **Source pointers:** Childs §§19.1–19.3; [scalar circuit](../science/scalar-clock.md#circuit-and-readout) and [its good/bad reduction](../science/scalar-clock.md#why-the-measurement-is-bounded-and-unbiased). + +### M06 — Amplification without knowing the success mass + +**Phase:** background/preliminaries. + +- **Central question:** How can a conditional specimen be obtained when its probability is unknown? +- **Understanding target:** Explain why randomly selected amplification lengths and verified success avoid a supplied probability estimate. Separate almost-sure termination and finite expected work from a deterministic deadline. +- **Dependencies and story role:** M04–M05. This introduces the stopping-time resource that later conditioning must pay for. +- **Conceptual connection:** Coherent amplification changes the cost of obtaining a successful specimen; its success test does not create a reversible conditional source. +- **Source pointers:** Childs §19.3 for amplification; the unknown-mass schedule and its exact successful state are derived in [conditional preparation](../science/conditional-reflection.md#6-ordinary-conditional-state-preparation). + +### M07 — A phase clock becomes a classical readout + +**Phase:** background/preliminaries. + +- **Central question:** What do controlled powers and a Fourier-type readout extract from an eigenphase? +- **Understanding target:** Follow a clock register through controlled evolution and basis change. Distinguish an estimate's numerical output, its expectation and its probability law. +- **Dependencies and story role:** M03 and M05. This prepares the reader for the particular sine clock rather than assuming that all phase readouts share its moments. +- **Conceptual connection:** Phase estimation supplies the architecture; choosing a clock state and readout observable determines the estimator's statistical properties. +- **Source pointers:** Childs §§4.1–4.3 and 19.3; [scalar clock circuit and readout](../science/scalar-clock.md#circuit-and-readout). + +### M08 — A bounded observable gives a bounded unbiased scalar + +**Phase:** background/preliminaries. + +- **Central question:** Why does the inherited sine measurement always report a number between zero and one with exactly the right mean? +- **Understanding target:** Connect the sine state, path-adjacency eigenvectors and the measured clock observable. Explain how its spectrum gives boundedness and its phased expectation gives unbiasedness. +- **Dependencies and story role:** M02, M05 and M07. This establishes the scalar ingredient that the present work inherits. +- **Conceptual connection:** An observable's spectrum controls individual realizations, while its expectation controls the estimator's mean; these are different parts of the same measurement construction. +- **Source pointers:** Childs §4.3 for the clock foundation; the specific sine observable and proof are in [the inherited scalar account](../science/scalar-clock.md#why-the-measurement-is-bounded-and-unbiased), with attribution in [related work §3](../references/related-work.md#3-the-bounded-scalar-estimator-is-an-inherited-foundation). + +### M09 — Scalar variance and exact endpoint behavior + +**Phase:** background/preliminaries. + +- **Central question:** Which properties of the scalar law matter beyond its precision exponent? +- **Understanding target:** Interpret the variance coefficient proportional to the probability times its complement, deterministic outputs at zero and one, and the smallest positive discrete readout. Recognize that all three will enter the tree proof. +- **Dependencies and story role:** M08. This identifies the specific inherited facts needed for rare branches and simplex faces. +- **Conceptual connection:** A local measurement's support is a computational resource: its minimum positive value will control the frequency of expensive conditional work. +- **Source pointers:** Childs §19.3 for counting background; [scalar variance and discrete support](../science/scalar-clock.md#exact-variance) and [the scalar facts used by the tree](../science/simplex-estimator.md#1-inherited-scalar-sine-estimator). + +### M10 — Small operator blocks inside larger unitaries + +**Phase:** background/preliminaries. + +- **Central question:** How can a contraction such as a projector or weighted operator be represented by a unitary circuit? +- **Understanding target:** Identify a block encoding's signal-zero subspace, normalization and data register. Explain how products and linear combinations produce the desired zero block, and why oblivious amplification needs a scalar times a unitary on all data inputs. +- **Dependencies and story role:** M03–M05. This supplies the algebraic toolbox for constructing a conditional reflection from the original source. +- **Conceptual connection:** A probabilistic block can implement an operation on unknown data only when its success structure preserves that data coherently. +- **Source pointers:** Childs §§28.3 and 29.1; [projector products](../science/conditional-reflection.md#1-exact-projector-encodings), [flat LCU](../science/conditional-reflection.md#2-a-flat-four-way-unitary-block-encoder) and [oblivious amplification](../science/conditional-reflection.md#3-oblivious-amplification-at-any-integer-length). + +### M11 — Conditional means connect adaptive local experiments + +**Phase:** background/preliminaries. + +- **Central question:** What statistical identity remains useful when a later experiment's budget depends on an earlier result? +- **Understanding target:** Explain conditional unbiasedness given the completed record, the tower rule for expectations, and why zero-mean martingale increments have no cross terms in total mean squared error. +- **Dependencies and story role:** M02 and M09. This supplies the local-to-global probability language needed for the adaptive tree. +- **Conceptual connection:** A random budget can change work and variance while preserving the mean, provided the local estimator is unbiased at every selected budget. +- **Source pointers:** Childs §21.1 for the algorithmic setting; the required probability argument is supplied in [split means](../science/simplex-estimator.md#3-what-every-split-preserves) and [the vector martingale](../science/simplex-estimator.md#5-uniform-mean-squared-error). + +### M12 — The complete background contract + +**Phase:** background/preliminaries. + +- **Central question:** What must be available, paid for and returned before a scalar quantum estimate can become a valid multinomial estimate? +- **Understanding target:** Assemble the source/inverse, known subset predicates, initial conditional specimens, controlled reflections, scalar readout and conditional-mean rules into one operational problem. State why scalar precision alone does not settle it. +- **Dependencies and story role:** M01–M11. This integrates the background phase and fixes the question answered by the construction. +- **Conceptual connection:** Quantum access and classical output geometry impose simultaneous requirements; neither one may be removed from the resource comparison. +- **Source pointers:** Childs §§1.4, 19.3, 21.1–21.2, 28.3 and 29.1; [model §§2–5](../science/model.md#2-allowed-work-and-charged-resources) and [the retained contribution](../references/related-work.md#5-operational-scope). + +## Phase II: narrative and innovation + +### M13 — The missing inverse inside a conditional split + +**Phase:** narrative/innovation. + +- **Central question:** Why does preparing a postselected conditional specimen fail to provide everything needed by its sine estimator? +- **Understanding target:** Distinguish a successful state specimen from an exact coherent reflection about that normalized state. Identify the unknown subset mass in the desired normalized projector and the operations that the original source actually supplies. +- **Dependencies and story role:** M06, M08, M10 and M12. This isolates the load-bearing implementation gap before the tree is assembled. +- **Conceptual connection:** A conditional state's normalization is harmless when merely measuring one specimen but becomes an operator-construction problem when the state must define a coherent reflection. +- **Source pointers:** Childs §§19.3 and 29.1; [paid conditional interfaces](../science/model.md#4-two-paid-conditional-operations) and [the conditional-reflection setup](../science/conditional-reflection.md#interfaces-and-assumptions). + +### M14 — A common-amplitude controlled reflection block + +**Phase:** narrative/innovation. + +- **Central question:** How can the unnormalized source data encode the normalized conditional reflection? +- **Understanding target:** Reconstruct the scalar-mass block and projected rank-one block, then combine them into the subset mass times the desired reflection. Explain why the controlled construction must have the same scalar amplitude on both control sectors. +- **Dependencies and story role:** M10 and M13. This provides the concrete operator to which amplification and rewinding can be applied. +- **Conceptual connection:** The unknown normalization moves into a common success amplitude; it is not estimated or supplied as a free parameter. +- **Source pointers:** Childs §§28.3 and 29.1; [the flat four-way block encoding](../science/conditional-reflection.md#2-a-flat-four-way-unitary-block-encoder). + +### M15 — A failure that restores unknown data + +**Phase:** narrative/innovation. + +- **Central question:** How can a measured attempt be repeated without discarding or disturbing unknown input data? +- **Understanding target:** Follow the alternating forward/inverse binary checks. Explain why each terminating history applies either the target unitary or the identity up to one scalar, including when the data is entangled with a reference. +- **Dependencies and story role:** M04, M10 and M14. This resolves the coherence requirement inside the conditional scalar clock. +- **Conceptual connection:** Equal singular values turn the signal measurements into input-independent records, so classical retries can coexist with an exact coherent data operation. +- **Source pointers:** Childs §28.3 for oblivious amplification; [the exact restoring trial](../science/conditional-reflection.md#4-an-exact-trial-that-either-applies-the-target-or-restores-the-input) supplies the project-specific calculation. + +### M16 — Two different prices for conditioning + +**Phase:** narrative/innovation. + +- **Central question:** What is the expected cost of obtaining a specimen, and of applying a reflection, on a rare subset? +- **Understanding target:** Derive the distinct inverse-square-root-mass and inverse-mass bounds from the verified-success and input-restoring schedules. Explain their almost-sure termination and unbounded tails without assuming the mass is known. +- **Dependencies and story role:** M06 and M14–M15. This completes the paid conditional toolkit before its cost is cancelled globally. +- **Conceptual connection:** State acquisition and coherent operation on arbitrary data are different tasks and need separate resource ledgers. +- **Source pointers:** Childs §§19.3 and 28.3; [unknown-mass reflection schedule](../science/conditional-reflection.md#5-unknown-mass-an-integer-randomized-schedule), [specimen preparation](../science/conditional-reflection.md#6-ordinary-conditional-state-preparation) and [native work](../science/conditional-reflection.md#7-workspace-known-gates-and-loop-cost). + +### M17 — A three-label split that conserves mass + +**Phase:** narrative/innovation. + +- **Central question:** How can two binary estimates form one jointly valid three-outcome estimate? +- **Understanding target:** Explain the output consisting of a first mass times a conditional split, its complementary child, and the remaining root mass. Track positivity and exact normalization on an individual run. +- **Dependencies and story role:** M02, M08 and M16. This turns the paid ingredients into a complete small example of the proposed output object. +- **Conceptual connection:** Complementary child weights are formed together, so their joint normalization does not require repairing independently estimated coordinates. +- **Source pointers:** Childs §19.3 for the binary quantum building block; [three-label example](../science/simplex-estimator.md#7-three-labels-as-a-worked-example) and [forecast example](../science/convex-composition.md#2-a-three-outcome-forecast). + +### M18 — Unbiasedness survives a random local budget + +**Phase:** narrative/innovation. + +- **Central question:** Why does selecting a child clock from the first random weight preserve the correct leaf means? +- **Understanding target:** Use the conditional mean at every allowed clock and the tower rule to obtain the mean of each product weight. Explain why zero true mass gives zero estimated mass almost surely and prevents an undefined conditional call. +- **Dependencies and story role:** M11 and M17. This proves the statistical correctness of adaptive splitting before discussing its precision. +- **Conceptual connection:** Exact positivity makes the expectation-zero statement operational: it becomes an exact guard against entering a zero-probability subset. +- **Source pointers:** Childs §§1.1 and 19.3 for source/estimation foundations; [preserved split means and zero-mass induction](../science/simplex-estimator.md#3-what-every-split-preserves). + +### M19 — Spend coherent work in proportion to estimated mass + +**Phase:** narrative/innovation. + +- **Central question:** Why does a node with a small received weight use an ordinary sample while a larger one receives a sine clock? +- **Understanding target:** Explain the threshold at received weight times scale equal to three, the largest allowed dyadic clock, and why the local weighted variance remains uniformly bounded by a constant times inverse scale squared. +- **Dependencies and story role:** M09, M16 and M18. This introduces the allocation that changes the complete expected-cost comparison. +- **Conceptual connection:** A small mass can tolerate a noisy local split because its contribution to the final vector is multiplied by that mass. +- **Source pointers:** Childs §§4.3 and 19.3; [the allocation algorithm](../science/simplex-estimator.md#2-the-algorithm) and [its local variance bound](../science/simplex-estimator.md#5-uniform-mean-squared-error). + +### M20 — A discrete minimum pays for rare entries + +**Phase:** narrative/innovation. + +- **Central question:** How can the tree pay for initially preparing a rare conditional specimen? +- **Understanding target:** Follow the invariant that every positive global weight is at least inverse scale squared. Combine it with the exact mean weight to bound the probability that a node is entered, and explain why the invariant does not deteriorate with depth. +- **Dependencies and story role:** M09 and M18–M19. This supplies the resource argument that a variance bound or reflection-cost cancellation alone would miss. +- **Conceptual connection:** Discrete output support links a statistical realization to the expected frequency of an expensive quantum operation. +- **Source pointers:** Childs §19.3 for conditional preparation background; [minimum positive weights](../science/simplex-estimator.md#4-a-minimum-positive-global-weight) and [specimen cost](../science/simplex-estimator.md#6-expected-original-source-queries). + +### M21 — The local errors form one vector martingale + +**Phase:** narrative/innovation. + +- **Central question:** Why do the split errors add in mean square rather than accumulating as an uncontrolled product error? +- **Understanding target:** Describe the frontier's true conditional leaf distributions, the zero-mean increment revealed by one split, and the disjoint child supports. Use their bounded norm and orthogonal martingale increments to obtain the finite-alphabet trace-MSE bound. +- **Dependencies and story role:** M11 and M18–M20. This integrates the local statistical mechanism into the full error theorem. +- **Conceptual connection:** The tree's exact mass conservation and conditional unbiasedness produce a martingale whose endpoint is the returned vector. +- **Source pointers:** Childs §21.1 for the algorithmic setting; the martingale argument and constant 32 are supplied in [uniform mean squared error](../science/simplex-estimator.md#5-uniform-mean-squared-error). + +### M22 — Cancellation of the inverse-mass reflection cost + +**Phase:** narrative/innovation. + +- **Central question:** Why does an arbitrarily small subset probability not destroy the uniform expected query bound? +- **Understanding target:** Separate the initial specimen charge from the repeated reflection charge. For the latter, combine the clock bound by scale times random weight with the weight's exact mean; include every inverse, failed trial and rewind. +- **Dependencies and story role:** M16, M18–M20. This integrates the implementation and probability accounting into the global work bound. +- **Conceptual connection:** The same conditional unbiasedness that preserves the final means cancels the inverse true mass in expected coherent work. +- **Source pointers:** Childs §§21.1–21.2 and 28.3; [expected source-query proof](../science/simplex-estimator.md#6-expected-original-source-queries) and [conditional native ledger](../science/conditional-reflection.md#7-workspace-known-gates-and-loop-cost). + +### M23 — The complete finite-alphabet theorem + +**Phase:** narrative/innovation. + +- **Central question:** Which guarantees have now been established together, and with which dependence on alphabet size? +- **Understanding target:** State exact simplex membership, exact coordinate means, the mean squared error bound proportional to the number of internal nodes over scale squared, and expected work proportional to internal nodes times scale. Distinguish fixed-dimension precision optimality from an unproved dimension-optimal law. +- **Dependencies and story role:** M17–M22. This is the first synthesis of the complete ideal contribution. +- **Conceptual connection:** A local measurement, a paid conditional operation and a global probability argument jointly produce a valid classical probability object at the quantum precision rate. +- **Source pointers:** Childs §§19.3 and 21.1–21.2 for precision/query foundations; [model theorem](../science/model.md#5-the-finite-alphabet-result), [full tree proof](../science/simplex-estimator.md) and [what is matched](../science/lower-bounds.md#what-is-matched). + +### M24 — Convex constraints remain true in each realization + +**Phase:** narrative/innovation. + +- **Central question:** What changes when the probability weights multiply known vectors rather than one-hot label vectors? +- **Understanding target:** Explain why the resulting estimate stays in the supplied finite convex hull, preserves its affine constraints, and has the correct mean. Relate the variance to the hull's diameter and distinguish smooth-loss control from unbiased nonlinear plug-in values. +- **Dependencies and story role:** M02, M21 and M23. This identifies a consequence of the joint output constraint beyond coordinate accuracy. +- **Conceptual connection:** The simplex theorem transfers through a known affine map while retaining both feasibility and the expectation. +- **Source pointers:** Childs §1.4 for implementing the supplied computation; the geometric consequence and paid table/output costs are in [finite convex ranges](../science/convex-composition.md#1-a-finite-known-convex-range). + +### M25 — Fresh stochastic matrices preserve mean evolution + +**Phase:** narrative/innovation. + +- **Central question:** When does a product of random valid transition matrices have the desired mean product? +- **Understanding target:** Identify the conditional-mean requirement on each fresh matrix and show how it preserves probability vectors and their mean evolution. Explain the explicit failure when one unbiased random matrix is reused in its own square. +- **Dependencies and story role:** M11, M23–M24. This turns a one-run feasible estimate into a composition rule with an essential freshness condition. +- **Conceptual connection:** Entrywise unbiasedness becomes compositional only when the next random operator has the correct mean conditional on the past. +- **Source pointers:** Childs §18.2 for Markov-chain context; [fresh matrix products](../science/convex-composition.md#3-fresh-stochastic-matrices-preserve-the-mean-evolution) and [the reuse counterexample](../science/convex-composition.md#5-why-one-random-table-cannot-be-reused-without-analysis) supply the project statements. + +### M26 — Stable error under a contractive mean kernel + +**Phase:** narrative/innovation. + +- **Central question:** Which contraction property prevents fresh row-estimation error from growing indefinitely? +- **Understanding target:** Derive the error recurrence with a zero-mean innovation and identify the contraction assumption on deterministic mean matrices. Explain the binary contracting example, the remaining linear horizon cost, and why row stochasticity alone does not imply Euclidean contraction. +- **Dependencies and story role:** M11, M21 and M25. This supplies a concrete useful regime for repeated valid stochastic operators. +- **Conceptual connection:** Martingale noise cancellation combines with deterministic contraction; the random realized matrices need not themselves contract. +- **Source pointers:** Childs §18.2 for transition-operator background; [contractive variance propagation](../science/convex-composition.md#4-a-variance-bound-for-contractive-mean-dynamics) and [the explicit binary family](../science/convex-composition.md#an-explicit-contracting-family). + +### M27 — Precision lower bounds with the same budget convention + +**Phase:** narrative/innovation. + +- **Central question:** What does the precision comparison establish when algorithms may stop adaptively? +- **Understanding target:** Explain the two nearby Bernoulli-source alternatives, expected-budget truncation in the quantum hybrid, and the stopped-transcript divergence in the classical sample bound. State exactly which precision orders are matched at fixed dimension. +- **Dependencies and story role:** M03, M06, M22–M23. This places the achieved precision rate against an appropriate baseline without substituting a fixed-query proof for an expected-query claim. +- **Conceptual connection:** A resource definition must travel through a lower-bound argument just as carefully as through an algorithm. +- **Source pointers:** Childs §§21.1–21.2 for query models and lower-bound context; [the quantum expected-budget proof](../science/lower-bounds.md#quantum-lower-bound-with-a-uniform-expected-budget), [the classical sample proof](../science/lower-bounds.md#classical-independent-sample-lower-bound) and [comparison scope](../science/lower-bounds.md#what-is-matched). + +### M28 — Finite budget arithmetic and finite output are different + +**Phase:** narrative/innovation. + +- **Central question:** Which classical approximations can change work allocation while preserving the ideal estimator's exact mean? +- **Understanding target:** Explain certified lower approximations of a positive weight, endpoint-based zero recognition, and the relaxed error constant of the finite allocator. Distinguish that policy from rounding returned split values, which preserves the simplex but generally introduces bias. +- **Dependencies and story role:** M19–M23. This makes the mathematical budget rule executable without treating exact real comparisons as free. +- **Conceptual connection:** An approximate past-record-dependent choice of an otherwise unbiased experiment differs from approximation of the experiment's returned value. +- **Source pointers:** Childs §§1.4–1.5 and 3.4 for effective computation and synthesis context; [the certified allocator](../science/simplex-estimator.md#9-a-certified-finite-arithmetic-clock-choice) and [simplex-preserving output rounding](../science/precision-and-resources.md#rounding-while-preserving-the-simplex). + +### M29 — A finite cap protects the zero-mass boundary + +**Phase:** narrative/innovation. + +- **Central question:** Why does a tiny gate error require more than the ideal almost-sure termination argument? +- **Understanding target:** Explain how an error could activate a zero-mass branch, why all work events must be included in a cap, and how abort probability, channel perturbation and rounding affect bias and mean squared error. Distinguish expected work from the larger worst-case execution cap. +- **Dependencies and story role:** M04, M18, M22 and M28. This completes the implementation qualification that accompanies the exact ideal result. +- **Conceptual connection:** Exact boundary support protects the ideal stopping rule; a perturbed implementation instead needs an explicit total-work and statistical-error budget. +- **Source pointers:** Childs §§2.1, 3.4 and 1.7 for error accumulation, synthesis and fault-tolerance background; [capped implementation theorem](../science/precision-and-resources.md#a-capped-perturbed-implementation-theorem), [retaining the expected precision exponent](../science/precision-and-resources.md#precision-choice-retaining-the-expected-exponent) and [zero-mass qualification](../science/precision-and-resources.md#why-the-cap-is-needed-at-zero-mass). + +### M30 — The contribution, its uses and its boundaries + +**Phase:** narrative/innovation. + +- **Central question:** What can now be produced, after the inherited tools and all material qualifications are stated? +- **Understanding target:** Give one connected account from the original paid source to an unbiased feasible probability vector, its expected-work precision law, and its convex/stochastic uses. Credit existing scalar, multivariate and debiasing results, and retain the limits on dimension, stopping tails, finite precision, coherent multirow use and unrestricted classical advantage. +- **Dependencies and story role:** M12 and M23–M29. This integrates both phases into the complete scientific account rather than adding another extension. +- **Conceptual connection:** The surviving addition is the simultaneous per-realization convex constraint and exact ideal mean, supported by an executable conditional construction and global cost proof. +- **Source pointers:** Childs §§19.3, 21.1–21.2, 28.3 and 29.1 for the assembled toolbox; [model theorem](../science/model.md#5-the-finite-alphabet-result), [operational contribution and attribution](../references/related-work.md#5-operational-scope), [convex/stochastic scope](../science/convex-composition.md#6-what-this-capability-adds) and [precision account](../science/precision-and-resources.md). diff --git a/llms.txt b/llms.txt index 4e87425..48300a1 100644 --- a/llms.txt +++ b/llms.txt @@ -5,6 +5,7 @@ This repository studies exactly unbiased classical probability-vector estimates ## Reading by purpose - Story and headline: README.md and science/README.md. +- Study route: learning/README.md, the Childs (17 April 2025) bridge in learning/anchor-bridge.md, and the fixed project map M01–M30 in learning/milestones.md. - Exact source/access/output model and theorem: science/model.md. - Full algorithm and unbiasedness, zero-mass, minimum-weight, martingale-error and expected-query proofs: science/simplex-estimator.md. - Inherited scalar sine-clock circuit and moment proof: science/scalar-clock.md. diff --git a/references/references.bib b/references/references.bib index d453c54..f23bbe8 100644 --- a/references/references.bib +++ b/references/references.bib @@ -130,3 +130,11 @@ @article{Guerreschi2019 archivePrefix = {arXiv}, url = {https://arxiv.org/abs/1808.02900} } + +@misc{Childs2025, + author = {Andrew M. Childs}, + title = {Lecture Notes on Quantum Algorithms}, + year = {2025}, + note = {Version dated 17 April 2025; selected educational anchor}, + url = {https://www.cs.umd.edu/~amchilds/qa/qa.pdf} +} diff --git a/references/related-work.md b/references/related-work.md index b55c249..e871693 100644 --- a/references/related-work.md +++ b/references/related-work.md @@ -36,7 +36,7 @@ The sine-clock/discrete-sine-transform construction in [Lin, *Bounded Unbiased A ```math 0\le Z_M\le1,\qquad \mathbb E Z_M=p,\qquad -\operatorname{Var}(Z_M)=\kappa_Mp(1-p),\qquad +\mathrm{Var}(Z_M)=\kappa_Mp(1-p),\qquad \kappa_M=\frac{M-1}{M+1}\tan^2\frac{\pi}{M+1}. ``` diff --git a/science/conditional-reflection.md b/science/conditional-reflection.md index 4e3de00..8758bef 100644 --- a/science/conditional-reflection.md +++ b/science/conditional-reflection.md @@ -17,7 +17,7 @@ The two operations are: | Operation | Exact output in the ideal model | Expected source calls | | --- | --- | --- | -| `PrepareConditional` | One specimen in $`|\phi\rangle`$ | $`C_{\mathrm{prep}}/\sqrt{s}`$ | +| `PrepareConditional` | One specimen in $`\lvert\phi\rangle`$ | $`C_{\mathrm{prep}}/\sqrt{s}`$ | | `ReflectConditional` | $`R_\phi`$ on arbitrary data, or its controlled version | $`C_{\mathrm{ref}}/s`$ | Both halt almost surely without knowing $`s`$. Source calls count applications of $`U`$ and $`U^\dagger`$ equally. The constants are universal and need not be optimized; the explicit reflection schedule below permits $`C_{\mathrm{ref}}=512`$ for the stated four-query block encoder. Known predicates, zero tests, ancillary registers and classical loops have additional costs stated below. @@ -72,7 +72,7 @@ sI,\qquad -B,\qquad -B,\qquad 0. The zero branch flips an otherwise zero block flag. The minus signs are known selector phases. Unprepare the selector with Hadamards. With $`P`$ denoting the joint zero selector, program and block flags, the resulting unitary $`A`$ satisfies ```math -PAP\big|_{\operatorname{ran}P} +PAP\big|_{\mathrm{ran}P} =\frac{sI-2B}{4} =\frac{s}{4}R_\phi. ``` @@ -128,7 +128,7 @@ G=-AJA^\dagger J,\qquad V_j=G^jA\quad(j\geq0). The uniform-singular-value case of oblivious amplitude amplification gives ```math -PV_jP\big|_{\operatorname{ran}P} +PV_jP\big|_{\mathrm{ran}P} =a_jR_\phi,\qquad a_j=\sin((2j+1)\theta). ``` @@ -148,7 +148,7 @@ The following argument applies to any unitary $`V`$ with block $`PVP=aR`$, where Each check must be the **binary nondemolition measurement** of all-zero versus its complement. Measuring every signal qubit separately on a failure would refine the measurement, destroy the two-subspace argument and invalidate the restoration claim. Implement a binary check by computing the all-zero predicate into one flag, measuring only that flag, uncomputing the predicate and resetting the measured flag. -For the proof, let $`|i\rangle=|0\rangle|d\rangle`$ and $`|o\rangle=|0\rangle R|d\rangle`$. For $`0
0,
+\mathrm{Var}(X)=\mathrm{Var}(Y)=v>0,
```
where $`X,Y`$ are independent. Then $`\mathbb E Q=P`$, but direct multiplication gives
diff --git a/science/lower-bounds.md b/science/lower-bounds.md
index f298b28..bbe05a4 100644
--- a/science/lower-bounds.md
+++ b/science/lower-bounds.md
@@ -7,12 +7,12 @@ The estimator's precision exponent is optimal for fixed output dimension in the
Fix $`d\ge2`$. Let an algorithm return an arbitrary real vector $`\widehat p`$; the lower bound does not require positivity or unbiasedness. Suppose, uniformly over all allowed coherent source oracles,
```math
-\mathbb E\|\widehat p-p\|_2^2\le\varepsilon^2,
+\mathbb E\Vert \widehat p-p\Vert _2^2\le\varepsilon^2,
\qquad
\mathbb E N\le Q.
```
-Here $`N`$ counts every source, inverse-source and controlled-source call. Measurements, adaptive stopping, arbitrary known controls and extra workspace are permitted. For $`0<\varepsilon\le1/16`$,
+Here $`N`$ counts every source, inverse-source and controlled-source call. Measurements, adaptive stopping, arbitrary known controls and extra workspace are permitted. For $`0\lt \varepsilon\le1/16`$,
```math
Q=\Omega(\varepsilon^{-1}).
@@ -52,7 +52,7 @@ source calls and assigning any decision on an abort. The abort probability is at
A usual query hybrid applies also to controlled calls, inverse calls and classically selected call types. Their operator-norm difference is bounded by
```math
-\Delta=\|U_{\theta_+}-U_{\theta_-}\|
+\Delta=\Vert U_{\theta_+}-U_{\theta_-}\Vert
\le |\theta_+-\theta_-|
\le\frac{4h}{\sqrt3}
=\frac{16\varepsilon}{\sqrt3},
@@ -83,15 +83,15 @@ Q_{\mathrm{cl}}=\Omega(\varepsilon^{-2}).
**Proof.** Use the same Bernoulli pair $`a_\pm=1/2\pm h`$ and the same threshold test. Its decision distributions have total-variation distance at least $`7/8`$. For the stopped transcript, the relative-entropy chain rule gives
```math
-D(\mathsf P_+\|\mathsf P_-)
+D(\mathsf P_+\Vert \mathsf P_-)
=\mathbb E_+[N]\,
-D\!\left(\operatorname{Ber}(a_+)\middle\|\operatorname{Ber}(a_-)\right).
+D\!\left(\mathrm{Ber}(a_+)\middle\Vert \mathrm{Ber}(a_-)\right).
```
The algorithm's own randomization and stopping decisions contribute no conditional divergence. The identity follows first for finite truncations and then for an integrable stopping time; the Bernoulli log-likelihood increments are bounded on the chosen interval. With natural logarithms,
```math
-D\!\left(\operatorname{Ber}(a_+)\middle\|\operatorname{Ber}(a_-)\right)
+D\!\left(\mathrm{Ber}(a_+)\middle\Vert \mathrm{Ber}(a_-)\right)
=2h\log\frac{1+2h}{1-2h}
\le16h^2.
```
@@ -100,7 +100,7 @@ Pinsker's inequality and data processing therefore imply
```math
2\left(\frac78\right)^2
-\le D(\mathsf P_+\|\mathsf P_-)
+\le D(\mathsf P_+\Vert \mathsf P_-)
\le16h^2Q_{\mathrm{cl}},
\qquad
Q_{\mathrm{cl}}\ge\frac{49}{8192\,\varepsilon^2}.
@@ -113,8 +113,8 @@ The empirical frequency vector achieves the classical order while remaining exac
```math
\widehat p_{\mathrm{emp}}=\frac1n\sum_{t=1}^n e_{J_t},
\qquad
-\mathbb E\|\widehat p_{\mathrm{emp}}-p\|_2^2
-=\frac{1-\|p\|_2^2}{n}\le\frac1n.
+\mathbb E\Vert \widehat p_{\mathrm{emp}}-p\Vert _2^2
+=\frac{1-\Vert p\Vert _2^2}{n}\le\frac1n.
```
## What is matched
diff --git a/science/model.md b/science/model.md
index ebc49fa..9f37691 100644
--- a/science/model.md
+++ b/science/model.md
@@ -57,8 +57,8 @@ The error is the total Euclidean mean squared error, equivalently the trace of t
```math
\mathcal R_2(p)
-=\mathbb E_p\|\widehat p-p\|_2^2
-=\sum_{i=1}^{d}\operatorname{Var}_p(\widehat p_i).
+=\mathbb E_p\Vert \widehat p-p\Vert _2^2
+=\sum_{i=1}^{d}\mathrm{Var}_p(\widehat p_i).
```
Exact normalization refers to the complete returned vector, rather than separately normalized coordinates in expectation. In particular, if $`p_i=0`$, positivity and unbiasedness require $`\widehat p_i=0`$ almost surely. The construction respects these faces without knowing which probabilities vanish.
@@ -78,8 +78,8 @@ The [conditional-reflection construction](conditional-reflection.md) supplies tw
| Operation | Exact ideal guarantee | Expected original-source queries |
| --- | --- | --- |
-| Prepare a conditional specimen | Return $`|\phi_S\rangle`$ after verified success | At most $`C_{\rm prep}/\sqrt{s_S}`$ |
-| Apply a conditional reflection | Apply $`V_S=I-2|\phi_S\rangle\langle\phi_S|`$, or its coherent controlled version, to arbitrary data and reference | At most $`C_{\rm ref}/s_S`$ |
+| Prepare a conditional specimen | Return $`\lvert\phi_S\rangle`$ after verified success | At most $`C_{\rm prep}/\sqrt{s_S}`$ |
+| Apply a conditional reflection | Apply $`V_S=I-2\lvert\phi_S\rangle\langle\phi_S\rvert`$, or its coherent controlled version, to arbitrary data and reference | At most $`C_{\rm ref}/s_S`$ |
Here $`C_{\rm prep}`$ and $`C_{\rm ref}`$ are universal valid constants for the specified amplification schedules and their constant-query block encodings. They do not depend on $`p`$, the data input, the reference, $`d`$, $`T`$, or $`s_S`$. Known-predicate and native gate costs remain charged separately.
@@ -96,7 +96,7 @@ There is no claim of termination for the conditional routines at $`s_S=0`$. The
\qquad
\mathbb E_p\widehat p=p,
\qquad
-\mathbb E_p\|\widehat p-p\|_2^2
+\mathbb E_p\Vert \widehat p-p\Vert _2^2
\le\frac{32(d-1)}{T^2},
```
@@ -109,7 +109,7 @@ and
For $`d=1`$, return $`(1)`$ without a source query. The displayed constants concern the stated allocation and the two paid primitive bounds; they are not optimized circuit constants. Simplex boundedness also gives the elementary error ceiling $`\mathcal R_2(p)\le2`$.
-The construction also gives a certified finite-arithmetic clock-allocation rule with the same query bound and error constant64 in place of32. Its ideal quantum outputs remain exactly unbiased. This qualification avoids treating exact real-number floor comparisons as a free native operation; quantum gate synthesis and output rounding remain separate approximations.
+The construction also gives a certified finite-arithmetic clock-allocation rule with the same query bound and error constant 64 in place of 32. Its ideal quantum outputs remain exactly unbiased. This qualification avoids treating exact real-number floor comparisons as a free native operation; quantum gate synthesis and output rounding remain separate approximations.
At fixed $`d`$, the result is quadratic error reduction in expected source work while preserving exact probabilistic validity and unbiasedness. The stated dimension dependence is not optimal distribution-estimation complexity: achieving root mean squared Euclidean error $`\varepsilon`$ through this bound costs $`O(d^{3/2}/\varepsilon)`$ expected source queries. Ordinary multidimensional quantum estimation already gives stronger dimension-dependent precision bounds under its own guarantees. The addition studied here is the conjunction of the exact simplex constraint and exact unbiasedness.
diff --git a/science/precision-and-resources.md b/science/precision-and-resources.md
index 91538ce..d46d8c0 100644
--- a/science/precision-and-resources.md
+++ b/science/precision-and-resources.md
@@ -9,7 +9,7 @@ Let $`U|0\rangle=\sum_j\sqrt{p_j}|j\rangle|\mathrm{junk}_j\rangle`$ on $`n`$ sou
The [tree estimator](simplex-estimator.md) uses a scale $`T\ge1`$ and has
```math
-\mathbb E\|Z-p\|_2^2\le V_d(T)
+\mathbb E\Vert Z-p\Vert _2^2\le V_d(T)
:=\frac{32(d-1)}{T^2},
\qquad
\mathbb EZ=p,
@@ -71,20 +71,20 @@ The exact-budget policy in the tree proof uses real-valued comparisons. The foll
\frac{3W}{4}\le\underline W\le W
```
-when $`W>0`$. Zero weights are recognized from the clock's exact endpoint label or a zero Bernoulli child; no numerical zero test is needed. If $`T\underline W<3`$, use the one-specimen conditional draw. Otherwise choose the largest dyadic clock $`m=2^\ell-1\le T\underline W`$. This choice depends only on earlier classical outcomes and so preserves exact conditional unbiasedness in the ideal quantum model.
+when $`W>0`$. Zero weights are recognized from the clock's exact endpoint label or a zero Bernoulli child; no numerical zero test is needed. If $`T\underline W\lt 3`$, use the one-specimen conditional draw. Otherwise choose the largest dyadic clock $`m=2^\ell-1\le T\underline W`$. This choice depends only on earlier classical outcomes and so preserves exact conditional unbiasedness in the ideal quantum model.
The cost argument is unchanged because $`m\le TW`$. The smallest-positive-weight invariant also remains valid: in a clock branch $`m+1\le TW+1\le4TW/3`$, so its smallest positive child is at least $`27/(16T^2W)\ge T^{-2}`$; in a Bernoulli branch a positive child retains $`W`$. The root has weight one.
-The variance constant increases. In a one-specimen branch, $`TW<4`$ and
+The variance constant increases. In a one-specimen branch, $`TW\lt 4`$ and
```math
-W^2\operatorname{Var}(Y\mid W)\le W^2/4<4/T^2.
+W^2\mathrm{Var}(Y\mid W)\le W^2/4\lt 4/T^2.
```
In a clock branch, $`L=m+1>(T\underline W+1)/2\ge3TW/8`$. Using the scalar bound $`\kappa_m\le16/L^2`$ and $`r(1-r)\le1/4`$ gives
```math
-W^2\operatorname{Var}(Y\mid W)
+W^2\mathrm{Var}(Y\mid W)
\le\frac{256}{9T^2}.
```
@@ -94,7 +94,7 @@ The same martingale calculation as in the tree proof therefore yields
\mathbb EZ=p,
\qquad Z\in\Delta_d,
\qquad
-\mathbb E\|Z-p\|_2^2
+\mathbb E\Vert Z-p\Vert _2^2
\le V_d^{\mathrm{finite\ allocator}}(T)
:=\frac{64(d-1)}{T^2}.
```
@@ -103,7 +103,7 @@ Every positive $`W`$ is at least $`T^{-2}`$. Compute a dyadic $`\widehat W`$ wit
## A capped, perturbed implementation theorem
-Consider either exact ideal allocator above, with expected elementary work at most $`B=B_d(T)`$. Write $`V(T)`$ for its proved mean-square bound: $`32(d-1)/T^2`$ for the original exact-budget policy, or $`64(d-1)/T^2`$ for the certified finite-arithmetic allocator. Count the events to be capped so that every unitary application, binary measurement and classical control action is included. Let $`0<\delta<1`$, and set
+Consider either exact ideal allocator above, with expected elementary work at most $`B=B_d(T)`$. Write $`V(T)`$ for its proved mean-square bound: $`32(d-1)/T^2`$ for the original exact-budget policy, or $`64(d-1)/T^2`$ for the certified finite-arithmetic allocator. Count the events to be capped so that every unitary application, binary measurement and classical control action is included. Let $`0\lt \delta\lt 1`$, and set
```math
K=\left\lceil\frac B\delta\right\rceil.
@@ -118,14 +118,14 @@ Finally, round the recorded local binary split values within $`[0,1]`$ and form
```math
\widetilde Z\in\Delta_d,
\qquad
-\|\mathbb E\widetilde Z-p\|_2
+\Vert \mathbb E\widetilde Z-p\Vert _2
\le\sqrt2\,(\delta+K\eta)+\rho,
```
and
```math
-\sqrt{\mathbb E\|\widetilde Z-p\|_2^2}
+\sqrt{\mathbb E\Vert \widetilde Z-p\Vert _2^2}
\le
\sqrt{V(T)+2(\delta+K\eta)}+\rho.
```
@@ -164,13 +164,13 @@ For a gate-synthesis scheme with cost logarithmic in inverse error, the requeste
## Rounding while preserving the simplex
-At each internal node round its split $`y_v`$ down to a $`b`$-bit binary value $`\bar y_v\in[0,1]`$, with $`|\bar y_v-y_v|<2^{-b}`$. Form child weights as $`W\bar y_v`$ and $`W(1-\bar y_v)`$ using exact rational arithmetic. Every leaf weight is nonnegative and the sum remains exactly one. Successive replacement of the node splits gives
+At each internal node round its split $`y_v`$ down to a $`b`$-bit binary value $`\bar y_v\in[0,1]`$, with $`|\bar y_v-y_v|\lt 2^{-b}`$. Form child weights as $`W\bar y_v`$ and $`W(1-\bar y_v)`$ using exact rational arithmetic. Every leaf weight is nonnegative and the sum remains exactly one. Successive replacement of the node splits gives
```math
-\|\bar Z-Z\|_2
-\le\|\bar Z-Z\|_1
+\Vert \bar Z-Z\Vert _2
+\le\Vert \bar Z-Z\Vert _1
\le2\sum_{v\ \mathrm{internal}}|\bar y_v-y_v|
-<2(d-1)2^{-b}.
+\lt 2(d-1)2^{-b}.
```
Thus $`b\ge\lceil\log_2(2(d-1)/\rho)\rceil`$ suffices. Store the split values or their exact dyadic products; independently rounding the final leaf coordinates need not preserve normalization. The rounding described here is deterministic and generally biased.
diff --git a/science/scalar-clock.md b/science/scalar-clock.md
index b99c09b..a381cac 100644
--- a/science/scalar-clock.md
+++ b/science/scalar-clock.md
@@ -50,7 +50,7 @@ Let $`H`$ be the path adjacency matrix, $`H_{r,s}=1`$ for $`|r-s|=1`$ and zero o
```math
Ha=2ca,
-\qquad DHD=\operatorname{diag}_{j=1}^m(2\cos(j\alpha)).
+\qquad DHD=\mathrm{diag}_{j=1}^m(2\cos(j\alpha)).
```
Thus the reported value is a projective measurement of
@@ -70,7 +70,7 @@ At $`q=0`$ only $`j=1`$ occurs and $`Y=0`$; at $`q=1`$ only $`j=m`$ occurs and $
## Exact variance
-Since the mean is $`q`$, the variance on a phase vector is $`\|(B-qI)v(\varphi)\|^2`$. Direct substitution gives
+Since the mean is $`q`$, the variance on a phase vector is $`\Vert (B-qI)v(\varphi)\Vert ^2`$. Direct substitution gives
```math
[(B-qI)v(\varphi)]_r
@@ -87,7 +87,7 @@ The sine addition formula yields
Consequently both phase vectors, and their mixture with the same mean, have
```math
-\operatorname{Var}(Y)
+\mathrm{Var}(Y)
=\kappa_m q(1-q),
\qquad
\kappa_m=\frac{m-1}{m+1}\tan^2\!\left(\frac\pi{m+1}\right).
diff --git a/science/simplex-estimator.md b/science/simplex-estimator.md
index 852453d..1ea27a2 100644
--- a/science/simplex-estimator.md
+++ b/science/simplex-estimator.md
@@ -24,7 +24,7 @@ A sine-clock block with $`m`$ controlled Grover steps returns $`Y\in\{z_1,\ldots
\qquad
\mathbb E Y=q,
\qquad
-\operatorname{Var}(Y)=\kappa_m q(1-q),
+\mathrm{Var}(Y)=\kappa_m q(1-q),
\qquad
\kappa_m=\frac{m-1}{m+1}\tan^2\!\left(\frac\pi{m+1}\right).
```
@@ -41,18 +41,20 @@ Our conditional primitive returns $`V=I-2|\phi\rangle\langle\phi|`$. Thus the fi
Two scalar facts will be used with explicit constants. Since $`\alpha\le\pi/4`$, convexity of the tangent function gives $`\tan\alpha\le4\alpha/\pi`$, and hence
+**Equation (1).**
+
```math
\kappa_m\le\frac{16}{L^2}.
-\tag{1}
```
Also $`z_1=0`$, $`z_m=1`$, the readouts increase with $`j`$, and they are symmetric under $`z\mapsto1-z`$. The smallest positive readout, and the smallest positive complementary readout, is
+**Equation (2).**
+
```math
z_2
=\frac{\sin(3\alpha/2)\sin(\alpha/2)}{\cos\alpha}
\ge\frac{3}{L^2}.
-\tag{2}
```
For the inequality, both sine arguments lie in $`[0,\pi/2]`$, where $`\sin u\ge2u/\pi`$, and $`\cos\alpha\le1`$.
@@ -63,39 +65,46 @@ Choose any fixed binary tree with $`d`$ label leaves and a precision parameter $
At an internal node $`S`$ with children $`L,R`$, do the following.
-1. If $`W_S=0`$, assign zero weight to both children and skip all conditional-source work.
-2. Otherwise prepare a fresh exact specimen $`|\phi_S\rangle=\Pi_S|\psi\rangle/\sqrt{s_S}`$ using the paid conditional-preparation routine.
-3. Put $`x=TW_S`$. If $`x<3`$, measure whether the specimen lies in $`L`$. Use the resulting $`Y_S\in\{0,1\}`$.
-4. If $`x\ge3`$, choose
+**1.** If $`W_S=0`$, assign zero weight to both children and skip all conditional-source work.
+
+**2.** Otherwise prepare a fresh exact specimen $`|\phi_S\rangle=\Pi_S|\psi\rangle/\sqrt{s_S}`$ using the paid conditional-preparation routine.
+
+**3.** Put $`x=TW_S`$. If $`x\lt 3`$, measure whether the specimen lies in $`L`$. Use the resulting $`Y_S\in\{0,1\}`$.
+
+**4.** If $`x\ge3`$, choose
+
+**Equation (3).**
```math
m_S=2^{\lfloor\log_2(x+1)\rfloor}-1,
\qquad L_S=m_S+1.
-\tag{3}
```
- Run the scalar sine estimator with this clock, initial specimen $`|\phi_S\rangle`$, success projector $`\Pi_L`$, and the paid controlled conditional reflection. Its result is $`Y_S\in[0,1]`$.
-5. Set
+Run the scalar sine estimator with this clock, initial specimen $`|\phi_S\rangle`$, success projector $`\Pi_L`$, and the paid controlled conditional reflection. Its result is $`Y_S\in[0,1]`$.
+
+**5.** Set
+
+**Equation (4).**
```math
W_L=W_SY_S,
\qquad
W_R=W_S(1-Y_S).
-\tag{4}
```
At the end return the leaf weights $`\widehat p_i=W_{\{i\}}`$. A conditional specimen is consumed by its one split; the algorithm does not assume that a previously measured or disturbed specimen can be reused as a fresh source.
The choice in (3) is the largest available dyadic sine clock not exceeding $`x`$. At the fence $`x=3`$ it chooses $`m_S=3`$. For every large-clock branch,
+**Equation (5).**
+
```math
3\le m_S\le x,
\qquad
-\frac{x+1}{2}