Table of Contents
Fetching ...

Optyx: A ZX-based Python library for networked quantum architectures

Mateusz Kupper, Richie Yeung, Boldizsár Poór, Alexis Toumi, William Cashman, Giovanni de Felice

TL;DR

Optyx presents a ZX/ZW-based, open-source Python framework that unifies qubit and discrete-variable photonic modalities into a single diagrammatic language for networked quantum architectures. It combines a functional front-end with a tensor-network semantics, enabling classical control, mid-circuit feedback, and differentiable backends that include exact tensor-network contractions and permanent-based paths. The system supports conversion of external circuits, loss and distinguishability modeling, and rapid prototyping of hybrid experiments, demonstrated through boson sampling with entangled states, distributed entanglement generation, and a Bose-Hubbard variational solver. This approach offers scalable simulation and rapid exploration of distributed, heterogeneous quantum hardware, providing a practical platform for testing new ideas in quantum communication, distributed error correction, and light-mmatter interfacing.

Abstract

Distributed, large-scale quantum computing will need architectures that combine matter-based qubits with photonic links, but today's software stacks target either gate-based chips or linear-optical devices in isolation. We introduce Optyx, an open-source Python framework offering a unified language to program, simulate, and prototype hybrid, networked systems: users create experiments that mix qubit registers, discrete-variable photonic modes, lossy channels, heralded measurements, and real-time feedback; Optyx compiles them via ZX/ZW calculus into optimised tensor-network forms, and executes with state-of-the-art contraction schedulers based on Quimb and Cotengra. Benchmarking on exact multi-photon circuit simulations shows that, versus permanent-based methods, tensor network contraction can deliver speedups of orders of magnitude for low-depth circuits and entangled photon sources, and natively supports loss and distinguishability -- establishing it as both a high-performance simulator and a rapid-prototyping environment for next-generation photonic-network experiments.

Optyx: A ZX-based Python library for networked quantum architectures

TL;DR

Optyx presents a ZX/ZW-based, open-source Python framework that unifies qubit and discrete-variable photonic modalities into a single diagrammatic language for networked quantum architectures. It combines a functional front-end with a tensor-network semantics, enabling classical control, mid-circuit feedback, and differentiable backends that include exact tensor-network contractions and permanent-based paths. The system supports conversion of external circuits, loss and distinguishability modeling, and rapid prototyping of hybrid experiments, demonstrated through boson sampling with entangled states, distributed entanglement generation, and a Bose-Hubbard variational solver. This approach offers scalable simulation and rapid exploration of distributed, heterogeneous quantum hardware, providing a practical platform for testing new ideas in quantum communication, distributed error correction, and light-mmatter interfacing.

Abstract

Distributed, large-scale quantum computing will need architectures that combine matter-based qubits with photonic links, but today's software stacks target either gate-based chips or linear-optical devices in isolation. We introduce Optyx, an open-source Python framework offering a unified language to program, simulate, and prototype hybrid, networked systems: users create experiments that mix qubit registers, discrete-variable photonic modes, lossy channels, heralded measurements, and real-time feedback; Optyx compiles them via ZX/ZW calculus into optimised tensor-network forms, and executes with state-of-the-art contraction schedulers based on Quimb and Cotengra. Benchmarking on exact multi-photon circuit simulations shows that, versus permanent-based methods, tensor network contraction can deliver speedups of orders of magnitude for low-depth circuits and entangled photon sources, and natively supports loss and distinguishability -- establishing it as both a high-performance simulator and a rapid-prototyping environment for next-generation photonic-network experiments.

Paper Structure

This paper contains 39 sections, 15 equations, 7 figures, 4 tables.

Figures (7)

  • Figure 1: Diagram of the teleportation protocol in ZX-calculus. We discuss quantum teleportation using fusion measurements in the Appendix \ref{['sec:teleportation-fusion']}.
  • Figure 2: A UML class diagram booch2005uml of the tensor-conversion logic: channels depend on diagrams for the definition of their Kraus maps, during evaluation these Kraus maps are used to construct a tensor network by doubling the Kraus maps and converting them to tensors.
  • Figure 3: If we double the teleportation protocol diagram from Figure \ref{['fig:teleportation-protocol-zx']}, we obtain a ZX diagram which can be converted into a tensor network for evaluation or, for example, to PyZX for simplification. In this example, the diagram can be simplified and is equal to the identity channel on a qubit.
  • Figure 4: Exact evaluation of boson sampling observables on linear cluster states: we scale the degree of the monomial observable linearly with the number of photons ($\lfloor 1.5n \rfloor$). The depth (number of ansatz layers) is scaled linearly ($l = \lfloor n/2 + 1 \rfloor$), logarithmically ($l = \lfloor \log_2(7n/5) \rfloor$), or kept constant ($l=2$). Error bars indicate the inter-quantile range (IQR) over 5 random instances.
  • Figure 5: Distributed entanglement generation via photonic fusion with an internal degree of freedom: two Bell pairs are prepared; the middle qubits are dual-rail encoded with internal states $\ket{s_1}$ and $\ket{s_2}$, fused, and we post-select on the standard success outcome. Plotted is the post-selected fidelity $F=\bra{\Phi^+}\rho_{\text{out}}\ket{\Phi^+}$ (equal to the channel fidelity, given the target state is pure) of the surviving pair $(A_0,A_3)$ versus the internal-state overlap $x=\braket{s_1 | s_2}$. Fidelity approaches $1$ for indistinguishable internal states ($x\to 1$) and decreases smoothly as $x$ is reduced.
  • ...and 2 more figures