Programmable photonic circuits are a natural platform for physical learning, where hardware parameters are trained directly from measured feedback. We propose a physical learning algorithm and architecture for continuous-variable quantum systems where a photonic circuit is trained in situ to invert an unknown lossless Gaussian quantum operation. We prove that a generic symplectic matrix $S\in\mathrm{Sp}(2N,\mathbb{R})$ admits a decomposition into a triangular array of two-mode symplectic gates on neighboring modes, followed by single-mode symplectic gates. We then introduce the symplectic Reck mesh, which physically realizes this factorization, generalizing the unitary Reck mesh widely used in optical neural networks. When placed after an unknown Gaussian unitary, the mesh is trained in situ by nulling local response blocks one at a time using optical probes and measurements. We identify a local condition number that quantifies the squeezing required for a nulling step and its sensitivity to measurement error. We numerically demonstrate finite-shot training and robustness to systematic gate-calibration errors. Our work extends self-configuring optical networks from unitary to symplectic transformations, bringing physical learning to continuous-variable quantum photonic hardware.
Programmable photonic circuits are a natural platform for physical learning, where hardware parameters are trained directly from measured feedback. We propose a physical learning algorithm and architecture for continuous-variable quantum systems where a photonic circuit is trained in situ to invert an unknown lossless Gaussian quantum operation. We prove that a generic symplectic matrix S∈Sp(2N,R) admits a decomposition into a triangular array of two-mode symplectic gates on neighboring modes, followed by single-mode symplectic gates. We then introduce the symplectic Reck mesh, which physically realizes this factorization, generalizing the unitary Reck mesh widely used in optical neural networks. When placed after an unknown Gaussian unitary, the mesh is trained in situ by nulling local response blocks one at a time using optical probes and measurements. We identify a local condition number that quantifies the squeezing required for a nulling step and its sensitivity to measurement error. We numerically demonstrate finite-shot training and robustness to systematic gate-calibration errors. Our work extends self-configuring optical networks from unitary to symplectic transformations, bringing physical learning to continuous-variable quantum photonic hardware.
Bosonic Gaussian unitaries are fundamental building blocks of central continuous-variable quantum technologies such as quantum-optic interferometry and bosonic error-correction schemes. In this work, we present the first time-efficient algorithm for learning bosonic Gaussian unitaries with a rigorous analysis. Our algorithm produces an estimate of the unknown unitary that is accurate to small worst-case error, measured by the physically motivated energy-constrained diamond distance. Its runtime and query complexity scale polynomially with the number of modes, the inverse target accuracy, and natural energy parameters quantifying the allowed input energy and the unitary's output-energy growth. The protocol uses only experimentally friendly photonic resources: coherent and squeezed probes, passive linear optics, and heterodyne/homodyne detection. We then employ an efficient classical post-processing routine that leverages a symplectic regularization step to project matrix estimates onto the symplectic group. In the limit of unbounded input energy, our procedure attains arbitrarily high precision using only 2m+2 queries, where m is the number of modes. To our knowledge, this is the first provably efficient learning algorithm for a multiparameter family of continuous-variable unitaries.
Continuous-variables (CV) quantum optics is a natural formalism for neural networks (NNs) due to its ability to reproduce the information processing of such trainable interconnected systems. In quantum optics, Gaussian operators induce affine mappings on the quadratures of optical modes while non-Gaussian resources (the challenging piece for physical implementation) originate the nonlinear effects, unlocking quantum analogs of an artificial neuron. This work presents a novel experimentally-feasible framework for continuous-variable quantum optical neural networks (QONNs) developed with available photonic components: coherent states as input encoding, a general Gaussian transformation followed by multi-mode photon subtractions as the processing layer, and homodyne detection as outputs readout. The closed-form expressions of such architecture are derived demonstrating the family of adaptive activations and the quantum-optical neurons that emerge from the amount of photon-subtracted modes, proving that the proposed design satisfies the Universal Approximation Theorem within a single layer. To classically simulate the QONN training, the high-performance QuaNNTO library has been developed based on Wick-Isserlis expansion and Bogoliubov transformations, allowing multi-layer exact expectation values of non-Gaussian states without truncating the infinite-dimensional Hilbert space. Experiments on supervised learning and state-preparation tasks show balanced-resource efficiency with strong expressivity and generalization capabilities, illustrating the potential of the architecture for scalable photonic quantum machine learning and for quantum applications such as complex non-Gaussian gate synthesis.
We propose a framework to design and optimize generic photonic quantum circuits composed of Gaussian objects (pure and mixed Gaussian states, Gaussian unitaries, Gaussian channels, Gaussian measurements) as well as non-Gaussian effects such as photon-number-resolving measurements. In this framework, we parametrize a phase space representation of Gaussian objects using elements of the symplectic group (or the unitary or orthogonal group in special cases), and then we transform it into the Fock representation using a single linear recurrence relation that computes the Fock amplitudes of any Gaussian object recursively. We also compute the gradient of the Fock amplitudes with respect to phase space parameters by differentiating through the recurrence relation. We can then use Riemannian optimization on the symplectic group to optimize M M -mode Gaussian objects, avoiding the need to commit to particular realizations in terms of fundamental gates. This allows us to “mod out” all the different gate-level implementations of the same circuit, which now can be chosen after the optimization has completed. This can be especially useful when looking to answer general questions, such as bounding the value of a property over a class of states or transformations, or when one would like to worry about hardware constraints separately from the circuit optimization step. Finally, we make our framework extendable to non-Gaussian objects that can be written as linear combinations of Gaussian ones, by explicitly computing the change in global phase when states undergo Gaussian transformations. We implemented all of these methods in the freely available open-source library MrMustard, which we use in three examples to optimize the 216-mode interferometer in Borealis, and 2- and 3-modes circuits (with Fock measurements) to produce cat states and cubic phase states.
Fourier representations play a central role in operator learning methods for partial differential equations and are increasingly being explored in quantum machine learning architectures. The classical fast Fourier transform (FFT), particularly in its Cooley--Tukey decomposition, exhibits a structure that naturally matches continuous-variable quantum circuits. This correspondence establishes a direct structural isomorphism between the Cooley-Tukey butterfly network and Gaussian photonic gates, enabling the FFT to be realized as a native optical computation in continuous-variable quantum computing. Building on this observation, we introduce a continuous-variable Quantum Fourier Layer (CV--QFL) based on a bipartite Gaussian encoding and a Cooley-Tukey quantum Fourier transform, enabling exact two-dimensional spectral processing within a Gaussian photonic circuit. We test the CV--QFL on two representative tasks: spectral low-pass filtering and Fourier-domain integration of the heat equation. In both cases, the results match the classical reference to machine precision. Beyond these examples, our method naturally extends to optical-input settings in which the signal is already available as a Gaussian optical field. In such scenarios, coherent light coupled into single-mode waveguides can be processed directly by the CV--QFL, bypassing the need for an explicit classical-to-quantum encoding stage. This enables native spectral processing of light and lays the groundwork for new approaches to quantum scientific machine learning, in particular for future neural operator architectures within the CV framework.
Quantum operations on pure states can be fully represented by unitary matrices. Variational quantum circuits, also known as quantum neural networks, embed data and trainable parameters into gate-based operations and optimize the parameters via gradient descent. The high cost of training and low fidelity of current quantum devices, however, restricts much of quantum machine learning to classical simulation. For few-qubit problems with large datasets, training the matrix elements directly, as is done with weight matrices in classical neural networks, can be faster than decomposing data and parameters into gates. We propose a method that trains matrices directly while maintaining unitarity through a single regularization term added to the loss function. A second training step, circuit alignment, then recovers a gate-based architecture from the resulting soft-unitary. On a five-qubit supervised classification task with 1000 datapoints, this two-step process produces a trained variational circuit in under four minutes, compared to over two hours for direct circuit training, while achieving lower binary cross-entropy loss. In a second experiment, soft-unitaries are embedded in a hybrid quantum-classical network for a reinforcement learning cartpole task, where the hybrid agent outperforms a purely classical baseline of comparable size.
A limiting factor to the exploitation of continuous variables in quantum computing, in particular in the field of quantum machine learning, has been the hindrances of computing the derivatives of a model. The constraint occurs when applying the parameter-shift rule to a photonic circuit, and the number of non-Gaussian gates exceeds a logarithmic trend with respect to the length of the circuit. This condition occurs when dealing with most nonlinear functions. Indeed, it hampers subroutines, such as backpropagation, which are paramount for machine learning and, most significantly, the computation of the derivatives of the model itself. To overcome this hurdle, we propose a method to compute derivatives of functions, implemented by continuous variable circuits, directly through photonic quantum circuits. Unlike the parameter-shift rule, this method does not fail when the number of non-Gaussian gates scales more than logarithmically against the depth of the circuit. We exploit the fact that computing the derivative of a wave function is equivalent to applying the momentum operator, which in the position basis acts as its derivative. The action of this operator is physically embodied by photon-added coherent states. We prove that, up to the second order of derivation, the number of operations does not scale with the depth of the circuit, but only with the order of derivation. We showcase numerical examples of derivatives of elementary functions parametrized on simulated photonic quantum circuits. Thanks to this method, we unleash an embodiment of quantum neural networks on photonic quantum computing platforms.