Commit graph

17 commits

Author SHA1 Message Date
a2d9120960 Add OVERVIEW.md for each plan: thematic summaries of the [[4,2,2]] magic state pipeline
Each overview distills the plan's building blocks into a narrative
centered on magic state creation as a tunable, optimizable process
for Toffoli gate scalability.
2026-04-23 19:07:54 +02:00
18a7dc87be Remove pre-commit hooks, focus on local validation via app.sh
All quality checks (ruff, mypy, tests) run through app.sh validate.
No external CI or hook infrastructure needed.
2026-04-16 10:27:18 +02:00
e7b8b02a88 Remove GitHub Actions CI — validate locally with app.sh validate
CI ran on every push and generated failure emails. For a single-developer
project, local validation is sufficient and less noisy.
2026-04-16 10:23:11 +02:00
e7674ee5c0 Sync docs: clarify background behavior, complete command list
- README: command table now says "in background (survives terminal close)"
  and explains foreground alternative
- THE_STORY Part 5: all 13 app.sh commands listed, background/foreground
  behavior explained, JupyterManager reference added
- THE_STORY Part 7.1: recommend app.sh bootstrap as primary setup path
2026-04-16 09:52:24 +02:00
d4ca5f99dc Clarify background/foreground behavior in app.sh start output
Users now see explicit messages about whether Jupyter runs in
background or foreground, what happens when the terminal closes,
and how to stop the server.
2026-04-16 09:28:10 +02:00
1ec0a5e2ad Add JupyterManager lifecycle reference to README
Link to the new JupyterManager project that provides the cross-project
Jupyter lifecycle specification this project follows.
2026-04-16 09:10:25 +02:00
a16f99e2ed Harden Jupyter lifecycle and enhance E2E browser UX tests
app.sh: full Jupyter env isolation (CONFIG_DIR, DATA_DIR, RUNTIME_DIR,
IPYTHONDIR), auto port allocation, foreground mode, restart command,
graceful stop (SIGTERM → wait → SIGKILL), orphan detection, stale
runtime JSON cleanup, reset-state command.

test_browser_ux.py: add TestNavigationClickThrough (click Plan A link,
verify target opens; click forward-link in Plan D), TestWidgetInteraction
(run all cells, verify output areas, click quiz Submit and verify feedback),
TestProgressPersistence (kernel API session, progress file schema validation).

.gitignore: add Jupyter isolation directories.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 21:20:34 +02:00
55237d5f73 Sync all documentation with current project ground truth
README: rewrite with Quick Start (app.sh), 335-test count, teaching layer
narrative, testing/validation section, CI/CD docs, pre-commit hooks.
THE_STORY: add Part 4 (teaching layer), Part 5 (app.sh consumer experience),
update file map with all 13 test files and teaching/notebook/paper entries.
compendium.tex: update notebook count (8→12), add Plan D cross-references.
autoresearch_quantum.tex: update test counts (21→335), add app.sh validate.
learning_objectives.md: add entry point reference and assessment type glossary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 20:55:02 +02:00
29caba3a1a Add professional toolchain: mypy strict, CI pipeline, Playwright UX tests, pedagogy validation
Infrastructure:
- Configure mypy strict mode in pyproject.toml; fix all 53 type errors across 8 source files
- Add .pre-commit-config.yaml (ruff, mypy, nbstripout, trailing whitespace)
- Add .github/workflows/ci.yml: lint + type check, unit tests (Python 3.11/3.12), notebook execution
- Add scripts/app.sh consumer lifecycle manager (bootstrap, start, stop, status, validate, logs, reset)

Testing:
- Add tests/test_browser_ux.py: Playwright end-to-end UX tests covering JupyterLab launch,
  notebook rendering, navigation links, widget rendering, and full consumer walkthrough
- Add tests/test_pedagogy.py: 130 pedagogical structure tests validating prose quality
  (word counts, markdown ratio), section structure, assessment density and variety,
  Bloom's taxonomy coverage, checkpoint presence, tracker integration, key insight
  callouts, and cross-plan concept consistency

Quality:
- Fix ruff E741 (ambiguous variable name) across all builder scripts
- Add Key Insight callouts to plan_a/01_encoded_magic_state.ipynb
- Add pytest 'browser' marker for selective UX test runs
- Expand .gitignore with .logs/ and build artifacts

319 tests pass, 85% coverage, mypy strict clean, ruff clean.
2026-04-15 20:00:19 +02:00
18f5bef127 Add foolproof course navigation: central entry point and inter-notebook links
- Create notebooks/00_START_HERE.ipynb as the single entry point with plan
  descriptions, audience guidance, and links to all 4 plans
- Add navigation footer cells to all 11 content notebooks with Next/Previous
  links and back-link to Start Here
- Terminal notebooks (plan endings) offer cross-plan links to explore other plans
- Plan C dashboard gets explicit recommended reading order (Track A → B → C)
- Add test_start_here_exists_and_links_all_plans and
  test_every_notebook_has_navigation_footer to test suite
- Skip navigation-only notebooks in code-cell and assessment tests
2026-04-15 19:25:39 +02:00
5d0c28f939 Harden teaching layer, add notebook execution tests, fix repo hygiene
Quality fixes:
- Add deprecation warnings to 5 silent no-op legacy wrappers in assess.py
- Remove dead code in tracker.py score_by_section (unused first loop)
- Remove unused variable in assess.py _check_order
- Fix .gitignore: add progress JSONs, checkpoints, .coverage, .DS_Store, LaTeX aux
- Fix "all three plans" → "all four plans" in learning_objectives.md
- Add teaching/ package to README project tree
- Add compendium to README paper tree

Testing:
- Add 43 unit tests for teaching/assess.py and tracker.py (quiz, predict_choice,
  reflect, order, checkpoint_summary, legacy wrapper deprecation warnings,
  tracker scoring, persistence, mastery calculation)
- Add notebook execution test suite (nbclient): all 11 notebooks execute without
  errors in a fresh kernel, structural validation (valid JSON, has code cells,
  has assessments, section parameters, learning objectives document)
- Overall test count: 185 passing (was 107), coverage: 85% (was ~25% in tests)

Toolchain:
- Add pytest-cov, ruff, nbclient, nbformat to dev dependencies
- Add ruff config (E, F, W, I, UP, B, SIM rules)
- Add coverage config with term-missing output
- Fix all ruff lint issues across src/ and tests/ (import sorting, unused imports)
- Fix Plan D notebook paths (configs/rungs → ../../configs/rungs)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 15:34:37 +02:00
5f8b584210 Add Plan D: three claim-driven experiment notebooks
Plan D structures the material as a scientific argument chain:
- Experiment 1: Can the [[4,2,2]] code protect a magic state? (W=1.0, 12/12 errors)
- Experiment 2: How much magic survives noise? (scoring, parameter sweeps)
- Experiment 3: Can a ratchet learn to optimise? (monotonic improvement, transfer)

Each notebook follows Hypothesis → Claim → Experiment → Proof → Next Hypothesis.
Includes builder script, updated learning objectives, README, and compendium cross-ref.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 19:13:43 +02:00
90c3094f98 Add companion compendium (36-page textbook) and rewrite learning objectives
- paper/compendium.tex + compendium.pdf: gentle textbook covering all
  background for the notebook series — qubits, gates, magic states,
  [[4,2,2]] code, stabilisers, error detection, ancilla measurement,
  witness formula, noise, transpilation, scoring, ratchet optimisation,
  lesson extraction, transfer evaluation. Includes glossary, math
  appendix, and notebook cross-reference table.
- notebooks/learning_objectives.md: rewritten with balanced per-section
  tables for all three plans (Plans B and C were previously stubs).
2026-04-07 17:32:45 +02:00
e13a3268c2 Add teaching notebooks, widget-based quizzes, bug fixes, and expanded tests
- 8 Jupyter notebooks across 3 learning plans (A: bottom-up, B: spiral, C: parallel tracks)
- Teaching toolkit (src/autoresearch_quantum/teaching/) with ipywidgets-based
  quiz, predict_choice, reflect, and order widgets — visually distinct from code cells
- Fix spectator_z operator: was {1:'Z',2:'Z'} (IZZI, expectation=0), now {1:'Z',3:'Z'}
  (ZIZI, expectation=+1 for ideal T-state, commutes with logical operators)
- Fix u_magic seed: swap phase arguments to match h_p and ry_rz preparations
- Fix double-display bug: widgets rendered twice when function returned the box
- Fix CLI override parser for negative integers and missing '=' validation
- Fix stabilizer detection quiz: ZZZZ detects X errors, not Z errors
- Add ties parameter to order() for questions with interchangeable items
- Expand test suite from 21 to 107 tests
- Update README with notebook instructions and project tree
2026-04-07 17:14:37 +02:00
2cce5af994 Fix README: replace absolute local paths with relative links
The two links to hardware.py and four_two_two.py pointed at
/Users/oho/... which GitHub cannot resolve, causing the 404
Octocat page to render on top. Also updated the project tree
to reflect new files (strategies.py, feedback.py, transfer.py,
rung5.yaml, paper/).
2026-04-05 12:37:39 +02:00
51d0e5f26b Add technical paper: 19-page LaTeX document with compiled PDF
Covers the quantum mechanics (stabilisers, witness function, scoring),
the autoresearch engine (ratchet, strategies, lesson feedback, propagation),
all 21 test claims with falsification conditions, and a standalone usage guide.
2026-04-05 12:37:39 +02:00
f9b8f3457f Initial commit: autoresearch-quantum — automated magic-state preparation ratchet
Karpathy-style autoresearch engine for encoded magic-state preparation
on the [[4,2,2]] quantum error-detecting code using Qiskit Aer simulation.

Five-rung progressive search: baseline -> stability -> transfer -> factory -> Rosenfeld.
Smart challenger generation (neighbor walk + random combo + lesson-guided).
Machine-readable lesson feedback with per-dimension effects, interaction detection,
and cross-rung propagation. Factory throughput scoring. Resumable execution.
21 tests, all passing.
2026-04-05 12:37:39 +02:00