
In this paper, we introduce PyTheus2, a
highly-efficient, open-source, automated design
and discovery framework for quantum optics ex-
periments. At the core, PyTheus uses a much
extended graph-based representation of quantum
optics, which allows us not only to represent en-
tanglement and quantum gates, but lets us de-
sign quantum measurements, quantum commu-
nication protocols, optimize experimental prop-
erties, and discover quantum systems that in-
volve single-photon sources, mixed states, and
states entangled in the photon-number basis. Be-
sides the advances of the scientific scope, we note
that PyTheus is written in Python, and there-
fore can readily be combined with machine learn-
ing frameworks such as TensorFlow and Py-
Torch, and allows for immediate parallelization
in computer clusters.
To showcase the applicability of PyTheus,
we demonstrate the discovery of 100 previously
unknown or advanced implementations of quan-
tum optics experiments, ranging from exciting
new systems for entanglement research to quan-
tum states from condensed matter physics that
are interesting for quantum simulation purposes,
new ways of performing quantum communication
tasks such as entanglement swapping, new quan-
tum state measurements, and quantum gates.
The experiments can involve both probabilistic
photon sources and deterministic single-photon
sources, and many of them are readily imple-
mentable in today’s modern quantum optics labs.
In the GitHub repository, we present the instruc-
tions for PyTheus that discover each of the ex-
amples. We hope that PyTheus’s efficiency, gen-
erality, and low entry barrier kick-starts the ap-
plication of computer-discovered quantum setups
in experimental laboratories worldwide, and in-
spires new exciting computer-inspired ideas and
directions for fundamentals and applications of
photonic quantum physics research.
While the goal of this paper was to demon-
strate the discovery capability of PyTheus, in
several cases, it was impossible not to see clear
generalizations and reasons why the solutions
work. We show this in some cases below. One
of the exceptionally interesting concepts we dis-
2GitHub:
https://github.com/artificial-scientist-lab/
PyTheus
covered was a new quantum multiphoton interfer-
ence effect that can simulate probabilistic multi-
pair sources just with photon pairs. We describe
this new physics concept and its application in a
parallel paper [39].
The article is structured in the following way:
In section 2, we introduce the graph-based rep-
resentation of quantum optics, which lies at the
heart of PyTheus. In section 3, we introduce the
idea of the computational PyTheus framework,
which we then apply to the discovery of 100 new
quantum experiments in section 4. In section 5,
we explain some future(istic) ideas that might lie
ahead of us.
1.1 Related Work
The first automated and artificial-intelligence-
driven design methods for new quantum exper-
iments were introduced in 2016 (for a more de-
tailed review on the topic see [24,40]). One
of them, Melvin , was focused on specific pho-
tonic quantum information tasks such as quan-
tum state generation and quantum transforma-
tions, using discrete learning techniques [25]. The
second one, Tachikoma, focused on the discovery
of new experimental setups for quantum metrol-
ogy tasks and used genetic algorithms for discrete
optimization [41]. Tachikoma has been expanded
to incorporate neural network surrogate models
to speed up the search process for new quantum-
enhanced measurements [42,43]. At the same
time, the ideas of Melvin have led to numerous
implementations of experiments in various labo-
ratories [26–29] and the extraction of new ideas
and concepts in quantum physics [30,31]. Auto-
mated design tools have helped to build new ways
to perform quantum information tasks such as
quantum cloning [44]. Compared to these tools,
PyTheus does not work on the discrete search
space. Discrete spaces are very challenging to
navigate as gradients cannot be used. Rather,
PyTheus uses domain knowledge in the form of
a new physics-inspired representation that is en-
tirely continuous.
These ideas have later been expanded by using
reinforcement-learning [45,46], for quantum com-
munication [47,48], recurrent neural networks
[49], and deep generative models such as varia-
tional autoencoders [50] or logical AI [51]. Com-
pared to these tools, PyTheus uses direct opti-
mization on the outputs of a physical simulator
Accepted in Quantum 2023-12-03, click title to verify. Published under CC-BY 4.0. 3