Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/hosted-math.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
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 isolated capture runtime
run: |
npm install --prefix "$RUNNER_TEMP/math-runtime" --no-audit --no-fund 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 a representative hosted page
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 README.md \
--output "$RUNNER_TEMP/hosted-probe"
- name: Compare all hosted Markdown at both viewports
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 actual reports and captures
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
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,20 @@ Start with the [connected scientific route](science/README.md), or go directly t

[llms.txt](llms.txt) maps theorem, story and reproduction requests to those files.

## Learn the argument

The [learning route](learning/README.md) uses John Watrous's *The Theory of Quantum Information* (2018) as its educational anchor. A [section-by-section bridge](learning/WATROUS_BRIDGE.md) and [four-label worked example](learning/WORKED_EXAMPLE.md) lead into [30 intrinsic milestones](learning/MILESTONES.md): 12 on background and preliminaries, followed by 18 on the theorem, matching proofs, costs and interpretation. The route builds from local calculations to the complete scientific claim.

## Reproduce the finite checks

With Python 3.10 or later, no additional packages are needed:

~~~bash
python3 verification/check_science.py
python3 verification/check_learning.py
~~~

The 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 [verification guide](verification/README.md) gives its 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 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

Expand Down
293 changes: 293 additions & 0 deletions learning/MILESTONES.md

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions learning/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Learning route

The educational anchor is **John Watrous, *The Theory of Quantum Information* (2018)**. Its [official author page](https://cs.uwaterloo.ca/~watrous/TQI/) identifies the edition and provides the author's manuscript. The textbook supplies the language of states, channels, measurements, distinguishability and symmetric tensors; the persistence theorem is established in this repository.

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.

## 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.

Within each phase, the route goes from a local calculation to its global role. The dependency list on each milestone names earlier steps that it uses. The map describes the project rather than a particular reader's progress.

| Route | Use |
| --- | --- |
| [Watrous bridge](WATROUS_BRIDGE.md) | Selected sections, notation translation, and proof steps beyond the textbook |
| [Four-label example](WORKED_EXAMPLE.md) | A small source, its output, its phase correlations and its charged acquisition cost |
| [M01–M12](MILESTONES.md#m01--one-label-outside-a-hidden-set) | Background and preliminaries |
| [M13–M30](MILESTONES.md) | Narrative, proof and scientific contribution |
| [Scientific route](../science/README.md) | Full definitions and derivations |
| [Verification guide](../verification/README.md) | Reproducible finite and structural checks, with their limits |

The result assumes a balanced support, fixed phase order, known blocks of exactly the stated number of consecutive source calls, and unconditional classical-label success. It charges failed batches and discarded tails. The phase-cell extension has an explicit arc and success margin. Receiver costs are separate from source preparation; the supplied-copy result does not establish an end-to-end classical-data runtime advantage.
142 changes: 142 additions & 0 deletions learning/WATROUS_BRIDGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# From Watrous to phase persistence

The selected educational anchor is **John Watrous, *The Theory of Quantum Information* (2018)**, published by Cambridge University Press in April 2018. The [author's official book page](https://cs.uwaterloo.ca/~watrous/TQI/) supplies a [pre-publication manuscript](https://cs.uwaterloo.ca/~watrous/TQI/TQI.pdf) for personal use, with a restriction against selling or redistributing it. This repository links to that manuscript; it does not reproduce or distribute it.

The book provides the mathematical language for reading this project. The phase-persistence theorem is a research result developed in the [science route](../science/README.md), with its research dependencies identified in [related work](../references/related-work.md). Those papers and constructions are dependencies, not additional educational anchors.

## A focused route through the selected book

Section numbers and page numbers below refer to the author's standard-layout manuscript linked from the official page.

| Official chapter | Verified sections to use | Connection to this project |
| --- | --- | --- |
| [Chapter 2](https://cs.uwaterloo.ca/~watrous/TQI/TQI.2.pdf) | §2.1.2, pp. 61–66; §§2.2.1–2.2.2; §§2.3.1–2.3.2, especially the instruments discussion on pp. 111–113 | Density operators and mixtures describe hidden phases; channels and measurements describe the receiver; an instrument records success while retaining a quantum output. |
| [Chapter 3](https://cs.uwaterloo.ca/~watrous/TQI/TQI.3.pdf) | §3.1.1, especially Theorem 3.4 and Proposition 3.5, pp. 128–130 | Trace norm controls changes in observable output probabilities. |
| [Chapter 7](https://cs.uwaterloo.ca/~watrous/TQI/TQI.7.pdf) | §7.1.1, especially Proposition 7.1 and the bag-indexed basis, pp. 391–394 | Identical pure copies admit an occupation basis, which makes phase averaging explicit. |

## Translate the notation before the argument

Watrous uses ordinary vectors and their adjoints rather than Dirac notation. The translation is:

| Book notation | Notation used here |
| --- | --- |
| A classical alphabet $`\Sigma`$ and space $`\mathcal X=\mathbb C^\Sigma`$ | The known labels $`[N]=\{0,\ldots,N-1\}`$ and their $`N`$-dimensional register |
| Standard vector $`e_x`$; matrix unit $`E_{x,y}=e_xe_y^*`$ | $`\lvert x\rangle`$; $`\lvert x\rangle\langle y\rvert`$ |
| Pure state $`uu^*`$ | $`\lvert\psi\rangle\langle\psi\rvert`$ |
| Identity $`1_{\mathcal X}`$ and adjoint $`A^*`$ | $`I`$ and $`A^\dagger`$ |
| Measurement effect $`\mu(y)`$ | An effect $`E_y`$, with outcome probability $`\mathrm{Tr}(E_y\rho)`$ |
| $`n`$ tensor factors in Chapter 7; a bag $`\varphi\in\mathrm{Bag}(n,\Sigma)`$ | $`t`$ copies in one block; an occupation vector with entries $`n_x=\varphi(x)`$ |

The last row prevents a useful ambiguity: the book's tensor count $`n`$ is not the universe size $`N`$. In this project $`N=2M`$, the hidden support $`S`$ has size $`M`$, $`q\ge2`$ is a fixed phase order, $`B`$ is the known number of consecutive source calls sharing one table, and $`T`$ is the hard total acquisition budget. An individual block contributes $`t\le B`$ observed copies. The receiver knows these parameters and the basis, but does not know $`S`$ or the phase table.

## Mixture and product are different operations

For a fixed hidden support and table, define

```math
|\psi_{S,z}\rangle
=\frac1{\sqrt M}\sum_{x\in S}\omega_q^{z_x}|x\rangle,
\qquad \omega_q=e^{2\pi i/q}.
```

Averaging independent uniform table entries gives the one-copy state

```math
\rho_S
=\mathbb E_z|\psi_{S,z}\rangle\langle\psi_{S,z}|
=\frac1M\sum_{x\in S}|x\rangle\langle x|.
```

The convex-mixture and tensor-product rules from Chapter 2 must be applied in the order specified by the source. A table drawn once for $`t`$ emissions gives

```math
\Omega_{q,S}^{(t)}
=\mathbb E_z\!\left[
(|\psi_{S,z}\rangle\langle\psi_{S,z}|)^{\otimes t}
\right],
```

whereas independent redraws at every emission give $`\rho_S^{\otimes t}`$. Their one-register reductions agree; their joint states need not. This is a correlation created by reusing a hidden classical parameter. No entangling source operation is assumed: conditioned on the table, the emitted copies are a product state.

The [four-label worked example](WORKED_EXAMPLE.md) displays an off-diagonal entry that survives the first average and disappears in the second.

## From the symmetric basis to the phase-specific step

A vector $`|\psi\rangle^{\otimes t}`$ is unchanged by permutations of the copies. The bag basis in §7.1.1 becomes the normalized occupation state $`|n\rangle_{\mathrm{sym}}`$: the uniform superposition of ordered strings in which label $`x`$ occurs $`n_x`$ times. For the uniform-magnitude source, its coefficient has squared magnitude

```math
p_n=\frac{t!}{M^t\prod_x n_x!},
\qquad \sum_xn_x=t.
```

The new calculation to perform in this basis is a finite character average:

```math
\frac1q\sum_{z=0}^{q-1}\omega_q^{(n_x-m_x)z}
=\begin{cases}
1,&n_x\equiv m_x\pmod q,\\
0,&\text{otherwise}.
\end{cases}
```

It follows that a root-phase block retains exactly the occupation coherences with coordinatewise equal residues modulo $`q`$. Continuous independent address phases retain only equal occupations. These two averaging rules are research ingredients applied here; the textbook's symmetric-space framework alone does not establish the persistence law.

If every $`n_x\lt q`$, no different nonnegative occupation vector of the same total can have those residues. Indeed, writing $`m_x=n_x+qk_x`$ forces every $`k_x\ge0`$, and equal totals force all of them to vanish. Thus the two averaged states have an identical good component. Their remaining weight is bounded by

```math
\Pr[\text{a label occurs at least }q\text{ times}]
\le \binom tq M^{1-q}.
```

Here permutation-invariant vectors and permutation-invariant density operators should be distinguished. A refreshed state can commute with every register permutation without being supported entirely on the symmetric-vector subspace. The worked example gives both kinds of state explicitly.

## Why trace norm reaches every receiver

This project defines trace distance with the factor

```math
D(\rho,\sigma)=\frac12\lVert \rho-\sigma\rVert_1.
```

The measurement comparison in §3.1.1 implies that, for any effect $`0\le E\le I`$,

```math
|\mathrm{Tr}(E\rho)-\mathrm{Tr}(E\sigma)|
\le D(\rho,\sigma).
```

For example, this follows from Proposition 3.5 applied to the two-outcome measurement $`\{E,I-E\}`$: the two probability differences are opposite, so their total absolute sum is twice the displayed difference. Any receiver followed by a final yes/no success readout induces such an effect on its entire input. Its ancillas, adaptive operations and memory therefore cannot evade the full-state comparison.

For a fixed support, replace each root-phase block by its continuous-phase comparison state and telescope across blocks. The [converse](../science/phase-twirl-converse.md) obtains

```math
D(\Omega_{q,S}^{\mathbf t},\Gamma_S^{\mathbf t})
\le\min\left\{1,
M^{1-q}\sum_j\binom{t_j}{q}\right\}.
```

This is an unconditional comparison of normalized inputs. It does not condition the experiment on a collision and does not restrict the receiver to separate block measurements.

## Three further steps supplied by the research argument

The textbook tools need three task-specific additions before they become the theorem.

1. **A comparison that preserves all input information.** The continuous-phase block is generated exactly by drawing ordinary labels from $`S`$, computing their histogram and coherently preparing its normalized occupation state. This inherited coupon-state simulation retains permutation coherence, including repeated labels; it is not a claim that the block is diagonal in the ordered-string basis.
2. **The posterior for an absent label.** Under a uniform prior on balanced supports, a transcript containing $`d`$ distinct labels leaves a uniform posterior over supports containing them. Every unobserved label then has complement probability $`M/(N-d)`$. No computation on that transcript can improve on its best posterior choice. Together with the trace-distance comparison, this bounds the actual classical output.
3. **A physical route to the matching upper bound.** The inherited coherent power instrument removes the root phases while erasing any residual record that would identify the output label. Its success probability, failed attempts and block tails must all be charged. The established positive-subset diffuser then produces a complement label. General channel and instrument definitions make this a legitimate operation; they do not supply its multiplicity correction or its success formula.

The [attribution account](../references/related-work.md) identifies the phase-moment, coupon-simulation, power-extraction and positive-diffuser antecedents. The two directions combine to give, for fixed $`q`$,

```math
Q_q(N,B)
=\Theta_q\!\left(
\min\left\{N,
\max\left\{N^{1-1/q},(N/B)^{q-1}\right\}
\right\}\right).
```

The [frontier](../science/persistence-frontier.md) supplies the complete theorem and quantifiers. It counts every acquired specimen, has unconditional success at least $`2/3`$, and allows arbitrary joint processing across known exact $`B`$-call source blocks. The upper bound works for every permitted table sequence; the converse uses independent uniform tables as a hard prior. The basis and finite root alphabet are promises, not learned free resources.

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.

[Worked example](WORKED_EXAMPLE.md) · [Source model](../science/model.md) · [Scientific reading route](../science/README.md)
Loading
Loading