Code accompanying Automated discovery of high-dimensional multipartite entanglement with photons that never interacted (Arlt, Krenn, Gu), arXiv:2510.10707.
For every path-identity setup in the paper, this repo computes the post-selected quantum state directly from the PyTheus solution graph and reports its fidelity against the ideal target. Pure Python 3, no dependencies.
python run_all.pyThe script walks every figure panel and prints:
- the ideal target state, e.g.
1/√2 · (|00⟩ + |11⟩), - the state actually produced by the graph (numerical coefficients),
- the fidelity between them.
A summary table is printed at the end.
| Figure | Setup | Graph directory |
|---|---|---|
| Fig. 2 | GHZ_n (n=2,4,6,8) across A, B | graphs/fig2/ |
| Fig. 3 | W_n (n=2,4,6,8) across 2/3/4 nodes | graphs/fig3/ |
| Fig. 4 | SRV(4,2,2), 3 parties | graphs/fig4/ |
| Fig. 5 | [[4,1,2]] logical Bell | graphs/fig5/ |
| Appendix | [[3,1,2]]_3 and [[4,1]]_3 Bell pairs | graphs/appendix/ |
Each panel has a solution_*.json (the graph) and a matching config_*.json
(target basis kets and ancilla count).
A solution is a weighted colored multigraph. An edge keyed
"(u, v, c_u, c_v)" with real weight w represents a photon-pair source
emitting one photon at vertex u in mode c_u and one at vertex v in
mode c_v. Vertices are detector locations.
Under post-selection on one photon per detector (no number resolving), the state prepared at the system vertices is
|ψ⟩ = Σ_{M ∈ PM(G)} (∏_{e ∈ M} w_e) ⊗_v |c_v(M)⟩
restricted to matchings whose ancilla vertices all land in mode 0.
graph_to_state in graph_state.py implements this in ~30 lines on top of
a small perfect-matching enumerator. See the PyTheus paper (Krenn et al.,
Phys. Rev. X 11, 031044 (2021)) for the underlying graph-to-state
correspondence.
companion_repo/
├── README.md
├── graph_state.py # graph→state engine (load, enumerate PMs, fold into ket)
├── run_all.py # walks every figure panel, prints state + fidelity
└── graphs/
├── fig2/ # GHZ panels (a–d)
├── fig3/ # W panels (a–d)
├── fig4/ # SRV(4,2,2)
├── fig5/ # [[4,1,2]] logical Bell
└── appendix/ # qutrit logical Bell pairs