A Quadratic Speedup in the Optimization of Noisy Quantum Optical Circuits

Linear optical quantum circuits with photon number resolving (PNR) detectors are used for both Gaussian Boson Sampling (GBS) and for the preparation of non-Gaussian states such as Gottesman-Kitaev-Preskill (GKP), cat and NOON states. They are crucial in many schemes of quantum computing and quantum metrology. Classically optimizing circuits with PNR detectors is challenging due to their exponentially large Hilbert space, and quadratically more challenging in the presence of decoherence as state vectors are replaced by density matrices. To tackle this problem, we introduce a family of algorithms that calculate detection probabilities, conditional states (as well as their gradients with respect to circuit parametrizations) with a complexity that is comparable to the noiseless case. As a consequence we can simulate and optimize circuits with twice the number of modes as we could before, using the same resources. More precisely, for an <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>M</mml:mi></mml:math>-mode noisy circuit with detected modes <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>D</mml:mi></mml:math> and undetected modes <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>U</mml:mi></mml:math>, the complexity of our algorithm is <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>O</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>M</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:munder><mml:mo>&amp;#x220F;</mml:mo><mml:mrow class="MJX-TeXAtom-ORD"><mml:mi>i</mml:mi><mml:mspace width="0.111em" /><mml:mo>&amp;#x2208;</mml:mo><mml:mspace width="0.111em" /><mml:mi>U</mml:mi></mml:mrow></mml:munder><mml:msubsup><mml:mi>C</mml:mi><mml:mi>i</mml:mi><mml:mn>2</mml:mn></mml:msubsup><mml:munder><mml:mo>&amp;#x220F;</mml:mo><mml:mrow class="MJX-TeXAtom-ORD"><mml:mi>i</mml:mi><mml:mspace width="0.111em" /><mml:mo>&amp;#x2208;</mml:mo><mml:mspace width="0.111em" /><mml:mi>D</mml:mi></mml:mrow></mml:munder><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math>, rather than <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>O</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>M</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:munder><mml:mo>&amp;#x220F;</mml:mo><mml:mrow class="MJX-TeXAtom-ORD"><mml:mspace width="0.111em" /><mml:mi>i</mml:mi><mml:mspace width="0.111em" /><mml:mo>&amp;#x2208;</mml:mo><mml:mspace width="0.111em" /><mml:mi>D</mml:mi><mml:mspace width="0.167em" /><mml:mo>&amp;#x222A;</mml:mo><mml:mspace width="0.167em" /><mml:mi>U</mml:mi></mml:mrow></mml:munder><mml:msubsup><mml:mi>C</mml:mi><mml:mi>i</mml:mi><mml:mn>2</mml:mn></mml:msubsup><mml:mo stretchy="false">)</mml:mo></mml:math>, where <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math> is the Fock cutoff of mode <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>i</mml:mi></mml:math>. As a particular case, our approach offers a full quadratic speedup for calculating detection probabilities, as in that case all modes are detected. Finally, these algorithms are implemented and ready to use in the open-source photonic optimization library MrMustard.