Evolving Quantum Circuits Daniel Tandeitnik1and Thiago Guerreiro1y 1Department of Physics Pontical Catholic University of Rio de Janeiro Rio de Janeiro 22451-900 Brazil

2025-04-27 0 0 4.03MB 15 页 10玖币
侵权投诉
Evolving Quantum Circuits
Daniel Tandeitnik1, and Thiago Guerreiro1,
1Department of Physics, Pontifical Catholic University of Rio de Janeiro, Rio de Janeiro 22451-900, Brazil
We develop genetic algorithms for searching quantum circuits, in particular stabilizer quantum
error correction codes. Quantum codes equivalent to notable examples such as the 5-qubit perfect
code, Shor’s code, and the 7-qubit color code are evolved out of initially random quantum circuits.
We anticipate evolution as a promising tool in the NISQ era, with applications such as the search
for novel topological ordered states, quantum compiling, and hardware optimization.
I. INTRODUCTION
Natural selection is a unifying idea in biology [1].
Through evolution and competition, systems can nav-
igate the complexity landscape [2] from small-sized
molecules and molecule sets [3] to complex molecular
machines [4] to living organisms [5]. Through natural
selection, complex designs such as eyes and brains can
come into existence in the universe [6], and artificial evo-
lution has been employed in the laboratory to produce
molecules with desired optical response properties [7].
In view of that, an interesting engineering question is
whether one can exploit evolution as a design tool for
complex technology where human intuition and the stan-
dard deductive method might encounter difficulties or
perhaps even fail.
A natural field in which human intuition often encoun-
ters difficulties is quantum information science. Devising
innovative means of producing complex quantum states
and algorithms [8] outside the scope of known quantum
information primitives [9] is a challenging task [10], espe-
cially under the limitations imposed by present-day quan-
tum hardware [11]. This motivates the main question of
this work: Can artificial selection be employed as an ef-
fective tool to design useful quantum circuits?
Computer-assisted searches for new physical phenom-
ena [12] and laws of nature [1315] comprise a very
timely research topic, with notable examples including
the search for new quantum optics experiments [1618],
resourceful states in quantum metrology [1921], ground
states in condensed matter systems [22], the study of non-
locality [23], entanglement and Bell inequalities [24,25]
and the automated discovery of autonomous quantum
error correction systems [26] . Closely related to these
developments, tools from artificial intelligence, genetic
algorithms and competition have also been employed in
chemistry, on the search for new pathways to organic
molecules and closed autocatalytic reaction sets [27], the
efficient training of neural networks for image classifica-
tion [28] and the evolution of deep learning algorithms
through competition [29]. Here, we propose harvesting
some of these tools and ideas within the context of quan-
tum computing and quantum algorithms.
tandeitnik@aluno.puc-rio.br
barbosa@puc-rio.br
Hilbert space is large [3032] and – similarly to the
vast and complex landscape of the biosphere – evolution
may offer an efficient path to navigate its complexity.
To test this idea, we apply genetic algorithms (GA) to
the search for quantum circuits. As much as these ideas
could benefit from a full scale quantum computer, there
are not many such devices readily available for use at the
present time [3336]. We therefore focus on stabilizer
circuits [37], which are efficiently simulable on classical
computers [38,39]. The stabilizer formalism is the natu-
ral language of quantum error correction [37], leading us
to evolve quantum error correction codes (QECCs) [40].
Within the framework of stabilizer QECCs, we will
demonstrate that evolution, given the appropriate fit-
ness landscape, can successfully produce known exam-
ples of error correcting codes, notably the Perfect 5-qubit
code [41], Shor’s 9-qubit code [42], the 7-qubit color code
[43,44] and novel examples of QECCs. These are ar-
guably simple textbook examples but, as we will point
out, the sample space (modulo equivalences) of circuits
in which such codes live is so large that random search
becomes prohibitive, thus proving the principle that evo-
lution efficiently drives the search.
Artificial selection might offer valuable opportunities
in the current era of NISQ devices [45] in which elemen-
tary quantum gates are costly and noisy. Generically,
random stabilizer circuits are capable of generating good
codewords for QECCs [46], but evolution can go beyond
typicality in guiding the search for simple, low-depth cir-
cuits more amenable to noisy devices. Device specificity
can also be taken into account by devising fitness land-
scapes in terms of the complexity geometry metric [47],
which penalizes gates according to hardware characteris-
tics [48].
At present, our artificial selection algorithm can be
compared to the evolution of simple bacteria in controlled
laboratory conditions where the fitness landscape is sim-
ple and well understood [49]. With more complex fit-
ness functions and the addition of quantum hardware
we anticipate improvements and systematic means of de-
vising complex quantum circuits in various applications
beyond stabilizer circuits and QECCs including but not
limited to learning unitaries [50], quantum compiling [51
53], and hardware specific tailor-made circuits [33,48].
We highlight that while evolution may be complemen-
tary to known circuit optimisation schemes [52], its main
strength relies on the possibility of creating novel and
arXiv:2210.05058v1 [quant-ph] 11 Oct 2022
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 [5864],
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-
3
FIG. 1: Illustration of three distinct populations climb-
ing a hypothetical fitness landscape. At an initial time,
each population starts at some low point of the land-
scape (colored circles) and stochastically rises towards
the peaks. The mutation rate regulates the size of each
step. The height of the surface represents the reproduc-
tion rate of a given genotype.
01
02
03
04
05
H
PX
Y
Z
H
P
C
X
Y
C
Z
1
3
54
3
4
12
1
FIG. 2: A random quantum circuit and its genotype.
Each row of the genotype is a gate in ascending order
(from top to bottom) of application, with the columns
storing the operator and the indices of the target qubits.
The CNOT is abbreviated as C.
cuits in this work, consider the random circuit depicted
in Figure 2(a) and its genetic expression in Figure 2(b).
We genetically represent a circuit composed of tgates as
at×3 array whose rows are gates in ascending order of
application. The first column stores the operator, and
the second and third the indices of the affected qubits.
If the gate is a CNOT, the second (third) column is the
control (target) qubit index. For single-qubit gates the
third column is ignored.
Crossovers and mutations naturally become row oper-
ations by expressing quantum circuits as a matrix. There
is a freedom of choice in defining how each genetic opera-
tor works. The most appropriate option often arises from
experimentation since the efficiency of a GA is strongly
dependent on the optimization problem itself [65]. For
instance, the crossover can be performed at one-point or
at multiple points [57,65,70]. Additionally, we may use
more than two parents at the reproduction step, thus
having more than two genotypes to crossover [71,72].
For simplicity, we worked solely with one-point crossovers
3
1
2
H
H
H
H
H
C
C
C
C
P
P
P
3
2
2 1
4
4
2
3
1
3
5
53
H
P
P 3
1
3
3
H
C
P
2
4
4
H
C 2 1
2
1
2
H
H
C
C3
5
53
Parent A Parent B Offspring A Offspring B
FIG. 3: Example of a crossover between two genotypes.
The parents’ genotypes are divided at randomly chosen
points and their offspring are built by stacking the pieces.
Offspring Mutaded
offspring
H
P
P 3
1
3
3
H
C
P
2
4
4
H
P
H 2
1
3
3
C
P
2
4
H1
FIG. 4: Illustration of the three types of mutation that
may occur to a circuit. From top to bottom: the first
gate is replaced by a Hadamard gate on qubit 2, a new
row in inserted between the second and third rows, and
an identity replaces the fifth gate, hence deleting it.
between the genotypes of two parents. Hence, given two
arbitrary parents A and B, their genotypes are divided
at split points randomly selected according to a uniform
probability distribution. Offspring A(B) is formed by
stacking the top portion of parent A(B) on top of the
bottom portion of parent B(A). Figure 3shows an exam-
ple of the crossover operation.
Mutations happen to the offspring’s genotype after a
crossover procedure. With equal probabilities, it is cho-
sen whether (a) the mutation modifies an existing gate
or (b) it inserts a new gate into the circuit. Then,
If (a): a random row of the genotype is uniformly
selected to be altered. The row contents are over-
written by a new gate uniformly selected between
{I, H, P, CNOT}. If the identity is picked, the en-
tire row is deleted;
If (b): a random insertion point on the genotype
is uniformly selected. A new row with a new uni-
formly selected gate chosen between {H, P, CNOT}
is inserted at the chosen point.
Figure 4shows an example displaying the three kinds of
mutations that can happen to an offspring genotype.
Just as in nature, we also consider that each genotype
gives rise to a phenotype in GAs. We regard the pheno-
摘要:

EvolvingQuantumCircuitsDanielTandeitnik1,andThiagoGuerreiro1,y1DepartmentofPhysics,Ponti calCatholicUniversityofRiodeJaneiro,RiodeJaneiro22451-900,BrazilWedevelopgeneticalgorithmsforsearchingquantumcircuits,inparticularstabilizerquantumerrorcorrectioncodes.Quantumcodesequivalenttonotableexamplessuc...

展开>> 收起<<
Evolving Quantum Circuits Daniel Tandeitnik1and Thiago Guerreiro1y 1Department of Physics Pontical Catholic University of Rio de Janeiro Rio de Janeiro 22451-900 Brazil.pdf

共15页,预览3页

还剩页未读, 继续阅读

声明:本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。玖贝云文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知玖贝云文库,我们立即给予删除!
分类:图书资源 价格:10玖币 属性:15 页 大小:4.03MB 格式:PDF 时间:2025-04-27

开通VIP享超值会员特权

  • 多端同步记录
  • 高速下载文档
  • 免费文档工具
  • 分享文档赚钱
  • 每日登录抽奖
  • 优质衍生服务
/ 15
客服
关注