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

on:
pull_request:
paths:
- '.github/workflows/hosted-math.yml'
- 'verification/hosted_math/**'

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: 30
env:
CAPTURE_REVISION: e80c50c43b991cddd33020a1390cf63cb03bf6f7
REPRESENTATIVE_PAGE: science/rotated_surface_patch.md
CAPTURE_PAGES: |
README.md
learning/MILESTONES.md
learning/PRESKILL_BRIDGE.md
learning/README.md
science/README.md
science/rotated_surface_patch.md
verification/README.md
steps:
- name: Check out the validation helpers
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
- name: Check out the exact scientific source
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
ref: ${{ env.CAPTURE_REVISION }}
path: checked-source
persist-credentials: false
- name: Set up Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '22'
- name: Set up 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 chromium
- name: Pace GitHub navigation
run: |
cat > "$RUNNER_TEMP/hosted-navigation-pacing.cjs" <<'PACING_SCRIPT'
'use strict';

const {setTimeout: delay} = require('node:timers/promises');
const {chromium} = require('playwright');
const launch = chromium.launch.bind(chromium);
const intervalMs = 3000;
let previousStart = 0;

chromium.launch = async (...args) => {
const browser = await launch(...args);
const originalNewContext = browser.newContext.bind(browser);
browser.newContext = async (...contextArgs) => {
const context = await originalNewContext(...contextArgs);
const originalNewPage = context.newPage.bind(context);
context.newPage = async (...pageArgs) => {
const page = await originalNewPage(...pageArgs);
const originalGoto = page.goto.bind(page);
page.goto = async (url, options) => {
if (new URL(url).hostname === 'github.com') {
await delay(Math.max(0, previousStart + intervalMs - Date.now()));
previousStart = Date.now();
}
return originalGoto(url, options);
};
return page;
};
return context;
};
return browser;
};
PACING_SCRIPT
- name: Probe representative mathematics at both widths
continue-on-error: true
run: |
export NODE_PATH="$RUNNER_TEMP/math-runtime/node_modules"
node --require "$RUNNER_TEMP/hosted-navigation-pacing.cjs" verification/hosted_math/probe_hosted_math.cjs \
--root "$GITHUB_WORKSPACE/checked-source" \
--repository "$GITHUB_REPOSITORY" \
--revision "$CAPTURE_REVISION" \
--page "$REPRESENTATIVE_PAGE" \
--output "$RUNNER_TEMP/hosted-probe"
- name: Compare every changed Markdown page at both widths
if: ${{ !cancelled() }}
run: |
export NODE_PATH="$RUNNER_TEMP/math-runtime/node_modules"
page_arguments=()
while IFS= read -r page; do
if [ -n "$page" ]; then page_arguments+=(--page "$page"); fi
done <<< "$CAPTURE_PAGES"
test "${#page_arguments[@]}" -gt 0
printf '%s' "$CAPTURE_PAGES" > "$RUNNER_TEMP/hosted-scope.txt"
previous=
for attempt in 1 2 3; do
output="$RUNNER_TEMP/hosted-attempt-$attempt"
options=()
if [ -n "$previous" ]; then
options=(--resume-from "$previous")
fi
if node --require "$RUNNER_TEMP/hosted-navigation-pacing.cjs" verification/hosted_math/capture_hosted_math.cjs \
--root "$GITHUB_WORKSPACE/checked-source" \
--repository "$GITHUB_REPOSITORY" \
--revision "$CAPTURE_REVISION" \
--output "$output" "${page_arguments[@]}" "${options[@]}"; then
exit 0
fi
python3 - "$output/capture-state.json" <<'RETRY_POLICY'
import json
from pathlib import Path
import re
import sys
path = Path(sys.argv[1])
if not path.is_file():
sys.exit(1)
failures = json.loads(path.read_bytes())["failures"]
eligible = bool(failures) and all(
item["category"] == "transport_failure" and
re.search(r"HTTP (502|503|504)|ERR_EMPTY_RESPONSE", json.dumps(item))
for item in failures
)
sys.exit(0 if eligible else 1)
RETRY_POLICY
previous="$output"
sleep 25
done
exit 1
- name: Retain the captures and comparison reports
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: hosted-math-${{ env.CAPTURE_REVISION }}-${{ github.run_attempt }}
path: |
${{ runner.temp }}/hosted-attempt-*
${{ runner.temp }}/hosted-probe
${{ runner.temp }}/hosted-scope.txt
if-no-files-found: error
retention-days: 14
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@

A correctable fault during a gate can change the logical evolution rate until recovery. Exact error transparency removes this timing dependence: the physical Hamiltonian implements the same logical generator in the code and every protected error image. This repository proves general interaction-order and native coupling bounds, gives a sharp four-body witness, and constructs resource-optimal protected controls and entanglers on fixed concatenated five-qubit codes.

## Sister projects: Protected Gates and Syndrome Readout
## Sister projects: Protected Gates, Syndrome Readout, and Calibration

| Sister repository | Central question |
|---|---|
| **[Error-Transparent Locality](https://github.com/GoGoKo699/Error-Transparent-Locality) (this repository)** | Which native interaction order and coupling budget let a logical gate tolerate faults at unknown times? |
| **[Syndrome Reversibility Distance](https://github.com/GoGoKo699/Syndrome-Reversibility-Distance)** | When does the original syndrome measurement preserve logical information after a known product unitary? |
| **[Coherent Syndrome Calibration](https://github.com/GoGoKo699/Coherent-Syndrome-Calibration)** | Which sites need trusted signed pulses to learn coherent rotation signs from the original syndrome? |

The [shared gate/readout theorem](science/gate_readout_tradeoff.md) connects the two requirements on a fixed code. The gate and readout models retain separate assumptions.

On the [same calibratable rotated surface-code patch](science/rotated_surface_patch.md), two-fault-transparent logical $Z$ requires native order at least $d+6$ for every odd $d\geq5$. The order is sharp at $d=5,7$. At distance seven the optimal normalized coupling is $J/\omega=25$. The patch also admits exact known-product-unitary recovery and calibration with $d$ trusted signed phase addresses.

## General resource bounds

Let a fixed code have detection distance $d$ and encoding $V$. A Hermitian, code-preserving Hamiltonian is transparent through Pauli-error weight $t$ when
Expand Down Expand Up @@ -78,7 +81,7 @@ The first entangler's compact dense specification contains **41,032,000,000 nati
| Study from the shared educational anchor | [Learning guide](learning/README.md), [Preskill bridge](learning/PRESKILL_BRIDGE.md), and [30 milestones](learning/MILESTONES.md) |
| Check attribution and nearest precedents | [Related work](references/RELATED_WORK.md) and [bibliography](references/references.bib) |

The shared educational anchor is **John Preskill, _Quantum Information_, Chapter 7, “Quantum Error Correction”**, in the author-hosted draft updated March 2026. This project's bridge selects relevant sections and translates notation and Pauli phases; its twelve background and eighteen narrative milestones lead through protected entanglers and universal encoded control. The [sister project's Preskill bridge](https://github.com/GoGoKo699/Syndrome-Reversibility-Distance/blob/main/learning/PRESKILL_BRIDGE.md) follows the readout argument with its own 30-milestone map.
The shared educational anchor is **John Preskill, _Quantum Information_, Chapter 7, “Quantum Error Correction”**, in the author-hosted draft updated March 2026. This project's bridge selects relevant sections and translates notation and Pauli phases; its twelve background and eighteen narrative milestones lead through protected entanglers and universal encoded control. The [calibration project's Preskill bridge](https://github.com/GoGoKo699/Coherent-Syndrome-Calibration/blob/main/learning/PRESKILL_BRIDGE.md) follows syndrome identifiability. The [readout project's Preskill bridge](https://github.com/GoGoKo699/Syndrome-Reversibility-Distance/blob/main/learning/PRESKILL_BRIDGE.md) follows the readout argument with its own 30-milestone map.

## Reproduce the certificates

Expand All @@ -88,7 +91,7 @@ Only Python 3.10 or later and its standard library are required:
python verification/run_all.py
```

The [verification guide](verification/README.md) describes fourteen exact checks and their committed JSON records. They cover full error-image identities, code and stabilizer properties, coefficient normalization, moment primal/dual certificates, sparse constructions, recursive response coverage, entanglers, and control phases. No floating-point tolerance is used. Finite certificates support the stated instances; the general and arbitrary-depth conclusions use the analytical proofs.
The [verification guide](verification/README.md) describes sixteen exact checks and their committed JSON records. They cover full error-image identities, code and stabilizer properties, coefficient normalization, moment primal/dual certificates, sparse constructions, recursive response coverage, entanglers, and control phases. No floating-point tolerance is used. Finite certificates support the stated instances; the general and arbitrary-depth conclusions use the analytical proofs.

## Physical scope

Expand Down
2 changes: 2 additions & 0 deletions learning/MILESTONES.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ Dependencies point only to earlier milestones. The map connects the load-bearing
**Source pointers.** Anchor foundation: [Preskill §§7.4 and 7.10][p74]. Local bridge: [§9](PRESKILL_BRIDGE.md#9-the-same-code-in-a-syndrome-readout-experiment); [joint proof and witness](../science/gate_readout_tradeoff.md#2-joint-theorem).

<a id="m19"></a>
**Companion example.** Apply the same logic to the [rotated patch](../science/rotated_surface_patch.md): explain why odd intersections with a logical $X$ cut, together with the two-site moment constraints, raise the two-fault interaction order to at least $d+6$. Use [Preskill §§7.18.2–7.18.4](https://www.preskill.caltech.edu/ph219/chap7_26_6A.pdf) to connect the cut to the logical operator.

### M19: Concatenation preserves a parity obstruction to readout loss

**Central question.** Which code family avoids every equal-support stabilizer/logical collision?
Expand Down
6 changes: 5 additions & 1 deletion learning/PRESKILL_BRIDGE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# From Preskill's QEC foundations to error-transparent locality

Error-Transparent Locality and Syndrome Reversibility Distance share one educational anchor: John Preskill, *Quantum Information*, Chapter 7, updated March 2026. The [author's course index](https://preskill.caltech.edu/ph229/index.html) links the [complete chapter](https://www.preskill.caltech.edu/ph219/chap7_26_6A.pdf). Page numbers below are the chapter's printed numbers; PDF viewer numbers are six larger.
Error-Transparent Locality, Syndrome Reversibility Distance, and Coherent Syndrome Calibration share one educational anchor: John Preskill, *Quantum Information*, Chapter 7, updated March 2026. The [author's course index](https://preskill.caltech.edu/ph229/index.html) links the [complete chapter](https://www.preskill.caltech.edu/ph219/chap7_26_6A.pdf). Page numbers below are the chapter's printed numbers; PDF viewer numbers are six larger.

Preskill supplies the foundations of correctability, distance, CSS codes, stabilizers, and concatenation. The Hamiltonian, twirl, moment, coupling, and control arguments below are supplied locally. Sections 9–14 connect them to the separate syndrome-readout experiment, optimal concatenated families through three physical errors, sparse synthesis, and protected logical strings. Their complete statements and proofs are in the [scientific account](../science/README.md). The [milestone map](MILESTONES.md) organizes a progression through those dependencies.

Expand Down Expand Up @@ -469,6 +469,10 @@ e_{\rm opt}=\varepsilon_{\rm opt}

Here $e_{\rm opt}$ is optimal entanglement infidelity and $\varepsilon_{\rm opt}$ is optimal half-diamond error in that readout experiment. The known rotation can still cause information loss because the measurement is prescribed. This formula does not describe an unknown-time gate fault, and the two models do not automatically compose.

### The same rotated patch in all three experiments

After §§7.7 and 7.10.4, read §§7.18.2–7.18.4 for chains and loops on surface codes. In the [rotated patch proof](../science/rotated_surface_patch.md), a logical $X$ cut has odd intersection with every logical $Z$ support. A quadratic in the cut incidence gives a sharper two-fault order obstruction than total weight alone. Separate parity of stabilizers and logical operators explains reversible readout. Trusted signed biases on one logical $Z$ row then provide the sign class needed for informed recovery of a calibrated coherent drift.

## 10. Concatenation, parity, and one-error gates

Preskill §7.17 defines concatenation by replacing each qubit of an outer encoding with an inner encoded qubit. Applying that construction repeatedly to the five-qubit code gives
Expand Down
4 changes: 2 additions & 2 deletions learning/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ The central question is how demanding the same logical evolution before and afte

## One shared educational anchor

Error-Transparent Locality and Syndrome Reversibility Distance use one common educational anchor: **John Preskill, _Quantum Information_, Chapter 7, “Quantum Error Correction”**, in the author-hosted prepublication draft updated March 2026. The [official course index](https://preskill.caltech.edu/ph229/index.html) links the [complete chapter](https://www.preskill.caltech.edu/ph219/chap7_26_6A.pdf). The repositories link to that draft; they do not redistribute it.
Error-Transparent Locality, [Syndrome Reversibility Distance](https://github.com/GoGoKo699/Syndrome-Reversibility-Distance), and [Coherent Syndrome Calibration](https://github.com/GoGoKo699/Coherent-Syndrome-Calibration) use one common educational anchor: **John Preskill, _Quantum Information_, Chapter 7, “Quantum Error Correction”**, in the author-hosted prepublication draft updated March 2026. The [official course index](https://preskill.caltech.edu/ph229/index.html) links the [complete chapter](https://www.preskill.caltech.edu/ph219/chap7_26_6A.pdf). The repositories link to that draft; they do not redistribute it.

The common foundation is §§7.2–7.4 for exact correction, logical information leakage, reference decoupling, and distance; §§7.6–7.8 for classical linear codes and CSS codes; §§7.10–7.11 for stabilizers, encoded Pauli operators, and the five-qubit code; and §7.17 for concatenation. Section 7.9 supplies additional code-parameter context for the gate comparisons. This is a targeted route through one source. The research references remain attribution and comparison sources, rather than additional educational anchors.
The common foundation is §§7.2–7.4 for exact correction, logical information leakage, reference decoupling, and distance; §§7.6–7.8 for classical linear codes and CSS codes; §§7.10–7.11 for stabilizers, encoded Pauli operators, and the five-qubit code; and §7.17 for concatenation. Sections 7.18.2–7.18.4 introduce the homological surface-code setting for the [shared rotated-patch result](../science/rotated_surface_patch.md). Section 7.9 supplies additional code-parameter context for the gate comparisons. This is a targeted route through one source. The research references remain attribution and comparison sources, rather than additional educational anchors.

Begin with the [Preskill-to-project bridge](PRESKILL_BRIDGE.md). It translates the source's notation and assumptions, including its stabilizer convention for $Y$, into the repository's Hermitian Pauli basis. Its worked example explains why correcting a fault need not correct the angle accumulated during a gate. The later sections supply the additional moment, readout, sparse-synthesis, and tensor-lifting steps needed for the final results. The [bibliography](../references/references.bib) records the source version under `Preskill2026QEC`.

Expand Down
2 changes: 2 additions & 0 deletions llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

Start with [README](README.md) for the principal results and [scientific overview](science/README.md) for the complete theorem, construction, and proof map. Error correction repairs a recoverable error; exact error transparency additionally preserves the logical evolution despite its unknown arrival time. The project separates general all-code obstructions from attained, sharper optima on specified codes.

The [rotated surface-code patch](science/rotated_surface_patch.md) adds a geometric two-fault order lower bound and sharp distance-seven certificate. The two sister repositories treat known-product recovery and coherent sign calibration using the same original checks.

## General theorem route: which assumptions support the bounds?

- [Model](science/model.md): fixed encoding, detection distance d, full physical-space error-image identities, consistent scalar sector shifts, unknown fault time, and ideal final recovery.
Expand Down
4 changes: 4 additions & 0 deletions science/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ The earlier two-error construction uses uniform active promotions and correlated
| [Twenty-five-qubit three-error gate](three_error_gates.md) | Seven-class seed, forced outer logical branch, full three-error responses, and all-direction optimum |
| [Growing three-error optima](growing_three_error_gates.md) | Strict increment lifting, sign preservation, arbitrary-Hamiltonian block-moment dual, and all-depth exact costs |

## A calibratable surface-code patch

On an odd rotated planar patch, a [quadratic logical-cut certificate](rotated_surface_patch.md) forces native order at least $d+6$ for logical $Z$ through two faults. Exact rational certificates attain this bound at $d=5,7$. At distance seven, the optimal native coupling budget at order 13 is $25\omega$. The same original checks support known-product-unitary recovery and signed calibration of static coherent $Z$ drift.

## Protected entanglers and universal encoded control

Keep $M$ product blocks of $Q_m$ fixed, with $m\ge2$. For a prescribed nonidentity logical Pauli string $P$ of logical weight $p$, its target coset has minimum physical weight $D=pd$. The ordinary distance of the full product code is still $d$. The [pure-string theorem](protected_entangling_gates.md) gives
Expand Down
Loading
Loading