2
creative quantum circuits. All scripts used in this work
are available in the GitHub repository [54].
This paper is organized as follows. In Section II we in-
troduce the GA applied to quantum circuits. Section III
is dedicated to a simple application of the GA, demon-
strating its capabilities within a well-understood context.
Next, we apply the tools of evolution to the search for
QECCs in Section IV. We conclude with a brief discus-
sion and outlook.
II. GENETIC ALGORITHM
For about 4.28 billion years [55], millions of living
species go through a continuous optimization process,
what Darwin termed the evolution of species [56]. The
evolutionary process occurs through the interaction of
populations of species with their habitat, whose function
is to select individuals with a greater aptitude to grow,
thrive, and reproduce. Mathematically, one can allude to
the environment as a fitness function whose domain and
codomain are individuals of a population and a measure-
ment of how well an individual is adapted to its habitat,
respectively. The fitness function then becomes a cost
function of the natural selection optimization problem.
A key point of evolution is its robustness to noise, an
often missing feature in standard optimization methods
[57]. The environment is not static: through natural un-
predictable events, it transforms in a chaotic fashion lead-
ing to an ever-changing fitness landscape. Inspired by the
evident success of life in thriving through evolution in dy-
namic, noisy environments, researchers have been using
algorithms simulating natural selection to solve mathe-
matical optimization problems as early as 1957 [58–64],
broadly termed evolutionary algorithms [65].
In this section we make a brief introduction to the
biological evolutionary process emphasizing its genetic
point of view. Next, GAs to evolve Clifford quantum
circuits are introduced.
A. The evolutionary process
Given a population of individuals belonging to the
same species, one may divide its evolution process into
four stages [57]: reproduction, mutation, competition,
and selection. In broad terms, reproduction is the trans-
mission of genetic material from parents to their off-
spring. Mutations are minute stochastic errors that oc-
cur during the transmission of genes. Competition and
selection drift the population towards individuals better
adapted to the environment, where the fittest individuals
reproduce passing along their genes to future generations,
while the unfitted perish removing their genes from the
gene pool. An evolutionary algorithm aims at emulating,
to some extent, this cycle for a population of potential
solutions to an optimization problem until a threshold is
reached.
The evolution process hinges on the representation of
individuals as their genetic material, commonly referred
to as the genotype, and a screening method that favors
certain genotypes over others. Further, the genotype is
a collection of DNA strands made of elementary build-
ing blocks from a finite set of possibilities, namely the
four nucleotides adenine, thymine, guanine, and cyto-
sine [66]. Considering sexual reproduction, the geno-
type design naturally leads to the genetic operations of
crossover and mutation. Crossover is a recombination
of the parent’s DNA, where whole segments of DNA are
interpolated to form the offspring’s DNA at conception.
Crossover promotes the dispersion of good DNA blocks
among the population, as natural selection gradually re-
moves bad blocks, and mutation enables the search for
new solutions not reachable through recombination.
Given the genetic operators, we have only an aimless,
random walk through the genotype sample space due to
their stochastic nature. Natural selection is responsible
for drifting the walk in the direction of genotypes that
beget fitter individuals. Natural selection results from
the interplay between the environment’s restrictions on
the individuals and the phenotype each one displays. The
phenotype is the genetic expression of the genotype, i.e.,
the set of physical attributes displayed by the individual
[67] — this set determines the individual’s probability of
reproduction.
A helpful way of visualizing the evolutionary optimiza-
tion process is with a fitness landscape [68,69]. The fit-
ness landscape is a mathematical construct that maps
genotypes to reproduction rates. The environment de-
fines a function in which the domain is the space of all
possible genotypes and whose codomain is the reproduc-
tion rate. Distances on the landscape are defined as the
closeness of two genotypes, i.e., how similar are the phe-
notypes they spawn. Figure 1exemplifies a representa-
tion of an arbitrary fitness landscape. The rationale is
that, at an initial time, the population genotype set is
centered at some point in the landscape. As the genera-
tions go by, the population stochastically drifts towards
the surface peaks due to natural selection and the genetic
operators. Naturally, the fitness landscape in Figure 1is
a schematic representation, as actually producing such a
graph may be impossible due to the complex nature of
the problem at hand.
B. Genetic algorithms applied to Clifford circuits
We now describe how we mimic nature’s evolutionary
process in a GA applied to Clifford quantum circuits.
We note three main aspects we need to cover to build a
GA that simulates nature: (1) a genetic representation
of the tentative solutions, (2) a method to implement
the genetic operators of crossover and mutation, (3) a
selection mechanism that distinguishes between solutions
regarding the optimization problem.
To illustrate how we genetically represent quantum cir-