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
56 changes: 56 additions & 0 deletions .github/workflows/hosted-mathematics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Hosted mathematics

on:
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:

permissions: {}

concurrency:
group: hosted-mathematics-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: false

jobs:
inspect:
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-24.04
timeout-minutes: 20
permissions:
contents: read
env:
SOURCE_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
steps:
- name: Check out the exact source commit
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
ref: ${{ env.SOURCE_SHA }}
persist-credentials: false
fetch-depth: 1
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '22'
- name: Install pinned collector dependencies
working-directory: verification/hosted
run: npm ci --ignore-scripts --no-audit --no-fund
- name: Install the collector browser
working-directory: verification/hosted
run: node node_modules/playwright/cli.js install --with-deps chromium
- name: Compare the hosted mathematics with its source
run: |
test "$(git rev-parse HEAD)" = "$SOURCE_SHA"
node verification/hosted/capture_hosted_math.cjs \
--root "$GITHUB_WORKSPACE" \
--repository "$GITHUB_REPOSITORY" \
--revision "$SOURCE_SHA" \
--contract verification/hosted/math-contract.json \
--output "$RUNNER_TEMP/hosted-mathematics"
- name: Save the report and actual hosted captures
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: hosted-mathematics-${{ env.SOURCE_SHA }}-${{ github.run_attempt }}
path: ${{ runner.temp }}/hosted-mathematics
if-no-files-found: warn
retention-days: 7
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
__pycache__/
*.py[cod]
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ How many copies of an unknown quantum state are needed to program the same refle

## Main result

Let $`N_*(d,r,k,\epsilon)`$ be the smallest hard specimen budget of a deterministic, unconditional processor that achieves error at most $`\epsilon`$ uniformly over all rank-$`r`$ projectors. For $`1\le r<d`$, $`k\ge1`$ and $`0<\epsilon\le1/8`$,
Let $`N_*(d,r,k,\epsilon)`$ be the smallest hard specimen budget of a deterministic, unconditional processor that achieves error at most $`\epsilon`$ uniformly over all rank-$`r`$ projectors. For $`1\le r\lt d`$, $`k\ge1`$ and $`0\lt \epsilon\le1/8`$,

```math
\frac{9}{8\pi^2}\frac{rk^2}{\epsilon}
Expand Down Expand Up @@ -39,11 +39,19 @@ The collective interaction itself is an instance of Hermitian-preserving map exp

The [science index](science/README.md) gives the proof dependencies. Each argument has one authoritative page.

## Learn the project

The single educational anchor is **John Watrous, *The Theory of Quantum Information* (2018)**. The [source bridge](learning/ANCHOR.md) selects the relevant chapters and translates the channel, fidelity and norm conventions used in the proofs.

The [30-milestone map](learning/MILESTONES.md) has **12 background/preliminaries milestones** and **18 narrative/innovation milestones**. The first phase builds the complete programming contract from states, channels and distinguishability; the second connects the variance mechanism, implementation and converse to the optimal large-batch law.

Use the [worked tutorial](learning/TUTORIAL.md) to follow that route through a two-target example, error accounting and the discrimination argument. The [LLM reading guide](llms.txt) maps questions to the authoritative science and learning pages.

## Scope and limitations

The rank is known and the spectrum is exactly flat. Access consists of independent specimens of $`P/r`$; a preparation unitary, its inverse, a purification oracle and a classical eigenbasis are not supplied. Specimens are consumed. The guarantee concerns a parallel batch and does not provide a reusable oracle for future adaptive requests.

For $`k<r`$, the upper and lower bounds do not generally match. For $`r=d`$, the target is the identity channel and requires no specimens. The sample saving is not a claimed gate-count or wall-clock improvement: bounded-size groups use $`O(r^2k^2/\epsilon)`$ pair partial swaps, with additional dimension and rotation-synthesis costs stated explicitly.
For $`k\lt r`$, the upper and lower bounds do not generally match. For $`r=d`$, the target is the identity channel and requires no specimens. The sample saving is not a claimed gate-count or wall-clock improvement: bounded-size groups use $`O(r^2k^2/\epsilon)`$ pair partial swaps, with additional dimension and rotation-synthesis costs stated explicitly.

## Reproduce the finite checks

Expand Down
89 changes: 89 additions & 0 deletions learning/ANCHOR.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# From Watrous to collective quantum programming

The educational anchor is **John Watrous, *The Theory of Quantum Information* (Cambridge University Press, 2018)**. Use the [author's book page](https://cs.uwaterloo.ca/~watrous/TQI/) and its **standard-layout manuscript**. Section, definition, theorem, and page numbers below refer to that manuscript's printed numbering, not the PDF viewer's page count. The author provides the manuscript for personal use; the links here point to that source.

Watrous supplies the language of states, reduced channels, fidelity, and reference-assisted distinguishability. This project uses that language to ask how many copies of an unknown state $`P/r`$ are needed to apply $`I-2P`$ to a batch of data registers. The [milestone map](MILESTONES.md) organizes the project's dependencies. The sections below supply the source-to-project translation without requiring the whole textbook as a preliminary assignment.

## Relevant parts of the source

| Foundation | Location in the standard manuscript | Use in this project |
|---|---|---|
| Tensor products, operators, and positive order | [Chapter 1](https://cs.uwaterloo.ca/~watrous/TQI/TQI.1.pdf), §§1.1.1–1.1.2; tensor products on p. 6, projectors on p. 18, positive order on p. 21 | Separate program, data, and reference registers; interpret the unknown support projector. |
| Spectral decomposition and operator norms | [Chapter 1](https://cs.uwaterloo.ca/~watrous/TQI/TQI.1.pdf), §1.1.3; Theorem 1.3 on p. 25, Schatten norms on pp. 32–34 | Turn the flat spectrum into a reflection and distinguish operator error from channel error. |
| States, reductions, and purifications | [Chapter 2](https://cs.uwaterloo.ca/~watrous/TQI/TQI.2.pdf), §§2.1.1–2.1.3, pp. 58–71; Definition 2.5 on p. 62 | Describe the mixed specimens and use a purification as an analytical representation. |
| Physical maps and their representations | [Chapter 2](https://cs.uwaterloo.ca/~watrous/TQI/TQI.2.pdf), §§2.2.1–2.2.2, pp. 72–90; Theorem 2.22 on p. 82 and Corollary 2.27 on p. 89 | Express a collision as an isometry followed by discarding an environment; identify its Kraus contributions. |
| State discrimination and fidelity | [Chapter 3](https://cs.uwaterloo.ca/~watrous/TQI/TQI.3.pdf), §3.1.1 and §§3.2.1–3.2.3; Definition 3.11 on p. 139, Proposition 3.16 on p. 143, Theorem 3.33 on p. 161 | Compare nearby programs, combine independent specimens, and bound their distinguishability. |
| Channel distance and composition | [Chapter 3](https://cs.uwaterloo.ca/~watrous/TQI/TQI.3.pdf), §§3.3.2–3.3.3, pp. 166–184; Definition 3.43 on p. 170 and Proposition 3.48 on p. 174 | Keep the error valid with arbitrary reference entanglement and accumulate it through a circuit. |

These are foundations for the local arguments. The compressed-variance estimate, flat-program moment evaluation, parallel sample law, and concrete gate budget are derived in the scientific pages linked below.

## Notation and normalization

| Watrous's convention | Convention used here |
|---|---|
| A vector $`u`$, its outer product $`uu^*`$, and an adjoint $`X^*`$ | $`\lvert u\rangle`$, $`\lvert u\rangle\langle u\rvert`$, and $`X^\dagger`$. These are changes of notation. |
| $`\mathrm L(\mathcal X)`$ and $`\mathrm D(\mathcal X)`$ | $`\mathsf L(A)`$ and $`\mathsf D(A)`$: operators and density operators on the indicated space. |
| A projection $`\Pi`$ onto a subspace | $`P`$ is the unknown support projector; $`\rho_P=P/r`$ is the supplied state. |
| Schatten norms $`\Vert X\Vert_1`$ and $`\Vert X\Vert_\infty`$ | The same trace and operator norms. The subscript identifies which norm is used. |
| Fidelity $`F(\rho,\sigma)`$ in Definition 3.11 | Root fidelity $`f(\rho,\sigma)=\Vert\sqrt\rho\sqrt\sigma\Vert_1`$. Thus $`F=f`$, not $`f^2`$. |
| Completely bounded trace norm $`\lvert\!\lvert\!\lvert\Phi\rvert\!\rvert\!\rvert_1`$ in Definition 3.43 | Diamond norm $`\Vert\Phi\Vert_\diamond`$, with no factor of one-half. |

The [model](../science/model.md) measures channel error by the unhalved diamond norm, while the [converse](../science/converse.md) writes state trace distance as $`T(\rho,\sigma)=\frac12\Vert\rho-\sigma\Vert_1`$. Consequently, for any input-reference state $`\omega`$,

```math
\Vert\Phi-\Psi\Vert_\diamond\le\epsilon
\quad\Longrightarrow\quad
T\!\left((\Phi\otimes\mathrm{id})(\omega),
(\Psi\otimes\mathrm{id})(\omega)\right)
\le\frac{\epsilon}{2}.
```

Theorem 3.33 uses Watrous's root fidelity. In the local notation its upper trace-distance bound is $`T(\rho,\sigma)\le\sqrt{1-f(\rho,\sigma)^2}`$. These two normalization choices account for the factors of two in the converse.

## From states and channels to the program model

The textbook's compound registers let the entire batch be treated as one data system $`A=(\mathbb C^d)^{\otimes k}`$. A reference is a further system retained while the processor acts on $`A`$. The joint criterion therefore permits data entangled both within the batch and with that reference.

The project adds a specific source restriction: $`P`$ is unknown, its rank is known, and only independent copies of $`P/r`$ are supplied. Writing a density operator or a purification in a proof does not provide a physical preparation oracle. The [model](../science/model.md) states the actual access, chronology, hard specimen budget, and unconditional output requirement. Spectral calculus then explains the target: $`e^{-i\pi r\rho_P}=e^{-i\pi P}=I-2P`$.

## From channel representations to the variance bound

Corollary 2.27 identifies channels with isometric evolutions followed by a partial trace. For the [collision proof](../science/collision_bound.md), an analytical purification $`|s\rangle`$ of the mixed program gives an isometry $`V|x\rangle=|x\rangle|s\rangle`$. Extending the physical interaction by the identity on the purifying register gives $`\widehat H`$. The physical source still supplies only the mixed specimen.

The project compresses the interaction $`\widehat H`$ through this isometry. Its first two moments are $`h=V^\dagger\widehat H V`$ and $`M=V^\dagger\widehat H^2V`$. The positive operator

```math
M-h^2
=V^\dagger\widehat H(I-VV^\dagger)\widehat H V
```

measures coupling out of the fixed-program subspace. This is the bridge from channel representation to the local variance estimate. The proof separates the Kraus contribution that remains in that subspace from a completely positive leakage contribution. Both contribute at second order, giving $`\Vert\Phi_\tau-\mathcal U_\tau\Vert_\diamond\le2\tau^2\Vert M-h^2\Vert_\infty`$ for collision duration $`\tau`$. Here $`\Phi_\tau`$ is the reduced collision channel and $`\mathcal U_\tau`$ is the unitary channel generated by $`h`$. The interaction-picture estimate and its constant are supplied by the project, rather than by the representation theorem alone.

## From a shared specimen to the parallel law

The [parallel construction](../science/parallel_program.md) uses one fresh program register $`a`$ in the interaction $`H_* = \sum_j S_{a,j}`$, where $`S_{a,j}`$ swaps that register with target $`j`$. The program state is $`\rho=P/r`$, and the register is discarded after the collision. Its mean is $`h=\sum_j\rho_j`$, where $`\rho_j`$ acts as $`\rho`$ on target $`j`$ and as the identity on the other targets. The intended evolution therefore factors into the same operation on every target. The second moment contains cross terms whose norm is controlled by $`\Vert\rho\Vert_\infty=1/r`$. Evaluating those terms is the project-specific step that improves the copy count.

Proposition 3.48 supplies the composition rule needed to accumulate the collision errors. Its use is reference-stable: other targets can remain part of the reference while one group is processed. Fresh specimens give repeated copies of the same reduced channel; independent groups give a product of group channels. The resulting $`O((r^2k+rk^2)/\epsilon)`$ bound concerns the complete parallel output. Joint availability of the targets within a group remains part of the construction.

## From fidelity to the unrestricted converse

Proposition 3.16 and Theorem 3.33 convert a single-specimen root fidelity $`f`$ into the bound

```math
T(\rho_0^{\otimes L},\rho_\theta^{\otimes L})
\le\sqrt{1-f^{2L}}.
```

The [converse](../science/converse.md) supplies the nearby supports: one support direction is rotated into the complement, giving $`f=(r-1+\cos\theta)/r`$. It also supplies the discrimination experiment. A known comparison reflection and an entangled batch turn repeated ideal invocations into orthogonal outputs.

Channel composition bounds the error of the implemented experiment, while trace-distance contractivity limits what any processing of the source specimens can distinguish. Comparing these two bounds forces $`N=\Omega(rk^2/\epsilon)`$. The argument permits arbitrary deterministic processors because the complete experiment is a channel of the supplied programs. The rotated family and phase amplification specialize the research-level fidelity/query reduction to this task; they are not textbook results about a general unknown projector.

## From channel accuracy to finite gates

The norm inequalities in §1.1.3 and the composition rule in Proposition 3.48 connect an implementation error to the promised output error. The [resource account](../science/resources.md) makes this connection explicit through $`\Vert\mathrm{Ad}_U-\mathrm{Ad}_V\Vert_\diamond\le2\Vert U-V\Vert_\infty`$, then allocates error among collisions, symmetric sweeps, and rotation synthesis.

The controlled-swap gadget, its returned work qubit, the sweep remainder, and the gate counts are developed in that account. Finite-gate synthesis uses the attributed Dawson–Nielsen result. Ideal rotations return the work qubit exactly; approximate synthesis controls its return jointly with the data-channel error. Source preparation and storage remain separately charged resources.

## Textbook foundations and research dependencies

Watrous is the single educational anchor. The [related-work account](../references/RELATED_WORK.md) retains the primary research dependencies: HME supplies the collective interaction and earlier moment-sensitive analysis, Go et al. supply the fidelity/query-discrimination method, Cattaneo et al. supply a relevant collective-collision architecture, and Dawson and Nielsen supply finite-gate compilation. The scientific pages establish the resulting rank-dependent law, including matching upper and lower sample orders for integers $`1\le r\lt d`$ and $`k\ge r`$, with $`0\lt \epsilon\le1/8`$. Their exact model and constants remain the authoritative statements.
Loading
Loading