Research
MerLin: A Discovery Engine for Photonic and Hybrid Quantum Machine Learning
Overview Research area: Quantum machine learning, specifically photonic and hybrid quantum-classical machine learning, with an emphasis on benchmarking and reproducibility. Technical level: Intermedia

- arXiv
- 2602.11092
- Published
- 2026-02-11
- Authors
- Cassandre Notton, Benjamin Stott, Philippe Schoeb, Anthony Walsh, Grégoire Leboucher, Vincent Espitalier, Vassilis Apostolou, Louis-Félix Vigneux, Alexia Salavrakos, Jean Senellart
AI summary
Overview
Research area: Quantum machine learning, specifically photonic and hybrid quantum-classical machine learning, with an emphasis on benchmarking and reproducibility.
Technical level: Intermediate. The paper assumes familiarity with machine learning workflows (PyTorch, scikit-learn) and basic notions of quantum circuits, but it is a software framework paper rather than a theory paper.
Scope (1 sentence): MerLin is an open-source PyTorch- and scikit-learn-compatible framework for photonic quantum machine learning that combines Perceval's strong linear-optical simulation with a reproduction suite covering eighteen published photonic and hybrid QML works.
What This Paper Is About
Photonic quantum machine learning research is fragmented: each published algorithm typically relies on its own ad-hoc software stack, and no existing framework combines efficient simulation, integration with machine learning workflows, noise or detector models, and hardware access. The authors present MerLin to close that gap, embedding differentiable photonic quantum layers directly into standard PyTorch and scikit-learn pipelines. Rather than proposing a single new algorithm, the paper positions the framework as a "discovery engine," demonstrated by reproducing eighteen state-of-the-art photonic and hybrid QML papers within one controlled software environment.
The authors motivate this benchmark-first stance with a survey finding: photonic contributions account for roughly 6% of QML publications, with most being simulator-based. An independent arXiv abstract search cited in the paper found 188 photonic QML papers against 3,592 QML papers, while lens.org yields 6.1%. The paper also reports that code availability hovers around 27% for gate-based and 43% for photonic QML papers, which limits independent verification.
Key Contributions
-
A differentiable photonic QML framework. MerLin builds on Perceval's Strong Linear Optical Simulation (SLOS) and integrates it into PyTorch and scikit-learn, enabling end-to-end differentiable training of parametrized linear-optical circuits whose trainable parameters correspond to physical components such as phase shifters and beam splitters.
-
A reproduction suite of eighteen QML papers. The authors reproduce state-of-the-art photonic and hybrid QML works spanning kernel methods, reservoir computing, convolutional and recurrent architectures, generative models, and modern training paradigms, released as reusable modular experiments.
-
Hardware-aware design and cross-modality bridging. The MerlinProcessor abstraction connects quantum layers to cloud-accessible photonic processors, while the QuantumBridge provides a differentiable interface between qubit and photonic representations, supporting general qubit-qudit mappings following the QLOQ scheme and dual-rail encodings.
-
A validated photon-native substitute for gate-based models. For algorithms originally formulated in a gate-based setting and reformulated photon-natively, the authors report that learning performance and qualitative behavior remained very similar, suggesting photon-native models may substitute gate-based models in many hybrid architectures.
Main Findings
-
Photonic expressivity scales with photon number. The reproduction of Fock-state-enhanced expressivity work confirmed that, under the proposed encoding scheme, increasing the number of photons increases the expressivity of the variational quantum circuit. The paper notes the accessible frequency spectrum grows linearly with the number of input photons, without additional encoding gates or deeper circuits.
-
Improved photonic QCNN accuracy. Through systematic hyperparameter optimization, the authors improved reported binary classification accuracies on the photonic QCNN with adaptive state injection from 92.7 ± 2.1% to 98.2 ± 2.2% on Custom BAS, and from 93.1 ± 3.6% to 98.8 ± 1.0% on MNIST (0 vs 1). Elsewhere the paper describes this as improving reported test accuracy on two datasets by 4–5%.
-
Quantum self-supervised learning beats Qiskit in speed and accuracy. The MerLin implementation reached 49.2% accuracy on the first five CIFAR-10 classes after two epochs with eight modes, compared with 48.4% for Qiskit and 48.1% for the classical baseline.
-
Faster photonic GAN training. The MerLin reproduction of the photonic quantum GAN reproduced the original Perceval SSIM results while reducing training time by up to a factor of 15, switching from SPSA-based optimization to a PyTorch stochastic gradient descent optimizer.
-
Quantum LLM fine-tuning result did not separate from classical. Whereas the original paper reports up to a 3.14% accuracy gain for the quantum-enhanced model, the reproduction found that the best quantum and classical models all reached approximately 89% accuracy, with no clear separation. The authors note the binary classification setting on SST2 appears too simple to draw definitive conclusions about quantum utility.
-
Hybrid quantum neural networks remain parameter-efficient. The authors confirmed that the HQNN achieves at least 90% accuracy on the noisy spiral dataset with fewer parameters than a classical neural network across feature dimensions ranging from 5 to 60.
-
Distributed quantum neural networks reproduced with caveats. The reproduction matched parameter-efficiency gains from using boson sampling to approximate CNN parameters, with training accuracy within approximately 2%, test accuracy within approximately 4%, and a fourfold reduction in required epochs, with faster training under ADAM than COBYLA; however, ablation results differed from the source paper.
-
Adversarial vulnerability depends on encoding. On MNIST, the quantum adversarial machine learning reproduction obtained approximately 98% clean accuracy, 15% BIM adversarial accuracy at ε = 0.1, and 95% adversarial accuracy after adversarial training. Separately, the authors find amplitude encoding highly vulnerable to small perturbations, while angle encoding is substantially more robust; combining amplitude encoding with dimensionality reduction offers moderate protection but sacrifices representational benefits.
-
Reservoir computing scale-up confirmed. The quantum optical reservoir computing reproduction confirmed the reported scalability, with performance improving as the number of modes increases, and the model can be executed on QPU hardware.
-
Quantum memristors improve time-series performance. The reproduction of experimental neuromorphic computing with a quantum memristor confirmed that adding a quantum memristor enhances the nonlinearity of the quantum reservoir, improving performance on time-series tasks.
-
Transfer learning shows limited sensitivity. The reproduction of transfer learning in hybrid quantum-classical neural networks obtained comparable accuracy across transfer settings and observed limited sensitivity to photon count.
-
Speedups from porting Perceval to MerLin. Implementations ported from Perceval to MerLin consistently benefited from substantial improvements in simulation speed, reaching up to several order-of-magnitude speedups in some cases.
Methodology in Plain English
The authors take an existing simulation engine for linear-optical circuits (SLOS, from Perceval) and wrap it in the standard machine learning tooling that practitioners already use. Concretely, they expose quantum circuits as a torch.nn.Module called QuantumLayer, so that the trainable phases and reflectivities of an optical circuit are optimized by ordinary PyTorch gradient descent, exactly like weights in a neural network. A CircuitBuilder API assembles circuits from entangling layers and data-encoding layers, and separate abstractions handle how the quantum state is represented, how it is measured (for example with photon-number-resolving or threshold detectors), and how classical data is loaded in.
To make this fast, MerLin precomputes a sparse transition graph describing which Fock-state configurations can contribute to which others as photons are added through the circuit. This structure depends only on the input state and circuit topology, not on the unitary entries, so it is built once and reused across training iterations while only the unitary-dependent coefficients are recomputed.
The benchmarking side is a reproduction pipeline: for each of eighteen published papers, the authors reimplement the model within MerLin, run it multiple times to report statistically sound results with variance, and compare against the original reported claims. The stated goal is not only to find positive performance gains but to disentangle improvements coming from data preprocessing, model engineering, or optimization strategies from those arising from genuinely new representational mechanisms.
The framework is explicitly simulator-first but hardware-aware. A processor abstraction connects layers to cloud-accessible photonic QPUs, and a bridge abstraction translates between qubit-style and photonic Fock-space representations for hybrid workflows.
Why This Matters
Impact on research. The paper argues that progress in photonic QML depends on scalable, benchmark-driven experimentation rather than isolated algorithmic proposals. MerLin provides a shared experimental baseline, consistent with empirical benchmarking methodologies widely adopted in modern AI, and lowers the barrier to reproducing published results. The demonstration that photon-native reformulations of gate-based algorithms preserve learning performance suggests a practical route for translating existing gate-based QML literature onto photonic platforms and for building cross-modality models.
Real-world applications:
- Time-series and sequential prediction through photonic reservoir computing and recurrent architectures such as the QLSTM and QRNN, which the paper validates for temporal processing.
- Image classification and computer vision through photonic convolutional neural networks and quantum self-supervised learning for visual features.
- Image generation through photonic quantum generative adversarial networks trained with a patch-based approach on reduced-dimension MNIST data.
- Adversarial robustness in security-sensitive deployments, where the paper studies how encoding strategy affects vulnerability to direct and transferred adversarial attacks.
Industry relevance. The framework targets practitioners who want to test whether quantum structure offers practical benefit without leaving their existing tooling. Hardware-aware features allow parts of a hybrid model to be offloaded to available quantum hardware, and the co-design framing positions simulation insights as inputs to the design of future photonic quantum processors. The involvement of authors affiliated with Quandela and academic institutions in Canada and France, and the open-source release of both the framework and the reproduction repository, indicate a strategy of building an ecosystem around photonic quantum computing.
Future Directions
-
Closing the parameter-efficiency and performance gaps. The authors observed that classical models remain more parameter-efficient in the QCNN reproduction, though they argue this metric is of limited relevance in photonic implementations where trainable parameters are bounded by the number of phase shifters in the interferometer. How to set meaningful comparison budgets between classical and photonic models remains open.
-
Extending beyond the range of strong simulation. SLOS requires memory to store the complete state vector, limiting practical use to approximately n ≲ 20 photons on standard hardware. The paper argues that simulability can extend to larger-scale systems when additional structure or noise is present, as exemplified by results in Gaussian boson sampling and noisy linear-optical models, and treats pushing simulation as far as possible as a deliberate choice.
-
Broadening the reproduction corpus. The eighteen reproduced works are described as an initial contribution and a starting point for future contributions, leaving open how the community will extend, adapt, and contest these baselines.
-
Refining quantum advantage claims. The failure to reproduce the reported quantum LLM fine-tuning gain, and the observation that the binary classification setting appears too simple to draw definitive conclusions, points to a need for harder tasks and for disentangling gains due to preprocessing or optimization from genuinely quantum mechanisms.
-
Hardware co-design. As quantum hardware evolves, the framework's modular architecture is intended to support emerging paradigms, including photonic quantum memristors that introduce memory and nonlinearity through feedback loops based on detection statistics.
Target Audience
This paper is most useful to QML researchers and engineers who want to implement, train, and benchmark photonic or hybrid quantum-classical models within standard machine learning tooling; to machine learning practitioners curious about whether quantum layers can be dropped into PyTorch or scikit-learn pipelines; and to reviewers and methodologists interested in reproducibility in quantum machine learning. Readers looking for a new quantum algorithm or a theoretical advantage proof will not find one here, as the paper explicitly positions itself as infrastructure and empirical benchmarking rather than an algorithmic contribution.
Authors’ abstract
Identifying where quantum models may offer practical benefits in near term quantum machine learning (QML) requires moving beyond isolated algorithmic proposals toward systematic and empirical exploration across models, datasets, and hardware constraints. We introduce MerLin, an open-source framework designed as a discovery engine for photonic and hybrid quantum machine learning. MerLin integrates optimized strong simulation of linear optical circuits into standard PyTorch and scikit learn workflows, enabling end-to-end differentiable training of quantum layers. MerLin is designed around systematic benchmarking and reproducibility. As an initial contribution, we reproduce eighteen state-of-the-art photonic and hybrid QML works spanning kernel methods, reservoir computing, convolutional and recurrent architectures, generative models, and modern training paradigms. These reproductions are released as reusable, modular experiments that can be directly extended and adapted, establishing a shared experimental baseline consistent with empirical benchmarking methodologies widely adopted in modern artificial intelligence. By embedding photonic quantum models within established machine learning ecosystems, MerLin allows practitioners to leverage existing tooling for ablation studies, cross-modality comparisons, and hybrid classical-quantum workflows. The framework already implements hardware-aware features, allowing tests on available quantum hardware while enabling exploration beyond its current capabilities, positioning MerLin as a forward-looking co-design tool linking algorithms, benchmarks, and hardware.