kickmix: `Circuit.reaction_depth()` materialises every op (≈ 135–170 B/op transient), limiting verifiable circuit size
Los mantenedores suelen responder en 3 días
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Área
- backend, performance
Línea de trabajo
Start in kickmix/src/kickmix/circuit/circuit.cc at Circuit::reaction_depth() and trace how iter_ops feeds compute_reaction_depth. The issue reports that depth can be computed in order without retaining every operation; compare the result and verifier output with the current behavior on a large circuit. Done means reaction depth stays identical while transient memory no longer scales with operation count.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happens
Circuit::reaction_depth() (kickmix/src/kickmix/circuit/circuit.cc) builds a std::vector<Op> of every operation
via iter_ops and then calls compute_reaction_depth on it. Op is a fairly wide struct (it carries a 128-bit angle
and a string_view), and the vector grows by doubling, so the transient is several times the circuit's own in-memory
size.
Measurements (macOS arm64, kickmix at c58703d, process physical footprint)
- Peak footprint of a process that loads a synthetic circuit and calls
reaction_depth(): 0.82 GiB at 5 M ops,
3.36 GiB at 20 M, 7.73 GiB at 55 M (≈ 135–170 bytes per op of transient; the loaded circuit itself is ≈ 8.6 B/op). - Extrapolated:
reaction_depth()alone exceeds 16 GiB at roughly 95–118 M ops and 30 GiB at roughly 180–220 M. - In the Kaggle DQI verifier on a 55 M-op circuit, the call comes after the shot pool and sets the peak of the whole
verification: 7.8 GiB at 1 worker and 9.0 GiB at 6 workers, versus 2.0 and 5.6 GiB when depth is computed without
materialising the ops (identical depth and identical verifier output).
Why it matters
All three competition verifiers call it (DQI, invsqrt, and dfthcsos summed over its circuit family), so it bounds the
largest circuit a participant — or the hosted grader — can verify on a given machine, independently of
max_workers.
Possible direction (no patch attached)
compute_reaction_depth only needs each op once, in order, so it could consume ops as iter_ops yields them, making
the memory cost depend on the number of qubits and bits rather than the number of ops.
Related, verifier-side: _circuit_sha256 serialises the whole circuit into a BytesIO before hashing; on the
55 M-op circuit that buffer is 504 MB but adds ≈ 1.4 GiB to the footprint and is not returned to the OS afterwards.
Hashing the serialisation in chunks would avoid it.
Numbers and an implementation
The measurements are summarised in a public Kaggle post: https://www.kaggle.com/competitions/google-verifiable-quantum-circuit-compilation/discussion/753230 . A streaming implementation (same results, checked against upstream in CI) is in an openly AI-assisted, Apache-2.0 fork: https://github.com/manwithacat/kickmix-macos (patches/stream-reaction-depth.patch). You're welcome to use any of it, or to treat this purely as a bug report.
Disclosure: the measurements and the fork's code were produced by AI coding agents (Claude) at my direction.
- Lenguaje dominante
- Python
- Estrellas
- 397
- Forks
- 127
- Merge medio
- 2 d 19 h
- PR fusionados (30 d)
- 4
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de quantumlib/Qualtran
-
`show_bloq` not workingAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
quantumlib/Qualtran#2007 ·
Los mantenedores suelen responder en 3 días
-
Addition call_graph inconsistent with decomposition for registers with unequal bitsizesQuizá libre de nuevo @rupasri118 la tomó hace 56 días y no hay ningún pull request abierto. Abiertokind/bug-report
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
quantumlib/Qualtran#1818 · 2 comentarios ·
Los mantenedores suelen responder en 3 días
-
Dificultad 3/5 1-2 días Aptitud para principiantes 75/100
quantumlib/Qualtran#2008 ·
Los mantenedores suelen responder en 3 días
-
Windows wheel (or source) for kickmix library needed for Kaggle quantum compilation challengeAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
quantumlib/Qualtran#1991 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
quantumlib/Qualtran#1989 · 1 comentario ·
Los mantenedores suelen responder en 3 días
Todos los issues de quantumlib/Qualtran
Issues similares
-
flaky: test_fire_returns_thread_per_http_entry_on_head waits 5 s per dispatch worker on busy shardsAbiertostatus/accepted type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
microsoft/apm#5309 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug vector-store
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
EverMind-AI/Raven#1413 ·
Los mantenedores suelen responder en 1 día
-
Tests: parallel pyinstallcheck runs oversubscribe the machine through nested TBB and BLAS poolsPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
ACCESS-NRI/containerised-environments-infra#143 ·
Los mantenedores suelen responder en 2 días