You are on page 1of 33

Quantum Information Processing (2019) 18:225

https://doi.org/10.1007/s11128-019-2326-2

Quantum circuit design for objective function maximization


in gate-model quantum computers

Laszlo Gyongyosi1,2,3 · Sandor Imre2

Received: 31 July 2018 / Accepted: 12 May 2019 / Published online: 30 May 2019
© The Author(s) 2019

Abstract
Gate-model quantum computers provide an experimentally implementable architec-
ture for near-term quantum computations. To design a reduced quantum circuit that
can simulate a high-complexity reference quantum circuit, an optimization should be
taken on the number of input quantum states, on the unitary operations of the quantum
circuit, and on the number of output measurement rounds. Besides the optimization
of the physical layout of the hardware layer, the quantum computer should also solve
difficult computational problems very efficiently. To yield a desired output system, a
particular objective function associated with the computational problem fed into the
quantum computer should be maximized. The reduced gate structure should be able
to produce the maximized value of the objective function. These parallel requirements
must be satisfied simultaneously, which makes the optimization difficult. Here, we
demonstrate a method for designing quantum circuits for gate-model quantum com-
puters and define the Quantum Triple Annealing Minimization (QTAM) algorithm.
The aim of QTAM is to determine an optimal reduced topology for the quantum cir-
cuits in the hardware layer at the maximization of the objective function of an arbitrary
computational problem.

Keywords Quantum computations · Quantum computers · Gate-model quantum


computers

B Laszlo Gyongyosi

1 School of Electronics and Computer Science, University of Southampton, Southampton


SO17 1BJ, UK
2 Department of Networked Systems and Services, Budapest University of Technology and
Economics, 1117 Budapest, Hungary
3 MTA-BME Information Systems Research Group, Hungarian Academy of Sciences,
1051 Budapest, Hungary

123
225 Page 2 of 33 L. Gyongyosi, S. Imre

1 Introduction

According to Moore’s law [1], traditional computer architectures will reach their phys-
ical limits in the near future. Quantum computers [2–24] provide a tool to solve
problems more efficiently than ever would be possible with traditional computers [2–
11,16]. The power of quantum computing is based on the fundamentals of quantum
mechanics. In a quantum computer, information is represented by quantum informa-
tion, and information processing is achieved by quantum gates that realize quantum
operations [2–11,16,25,26]. These quantum operations are performed on the quantum
states, which are then outputted and measured in a measurement phase. The mea-
surement process is applied to each quantum state where the quantum information
conveyed by the quantum states is converted into classical bits. Quantum computers
have been demonstrated in practice [2–9], and several implementations are currently
in progress [2–11,16–20].
In the physical layer of a gate-model quantum computer, the device contains quan-
tum gates, quantum ports (of quantum gates), and quantum wires for the quantum
circuit. (Note: The term quantum circuit, in general, refers to software, not hardware;
it is a description or prescription for what quantum operations should be applied and
when and does not refer to a physically implemented circuit analogous to a printed
electronic circuit. In our setting, it refers to the hardware layer.) In contrast to tradi-
tional automated circuit design [27–33], a quantum system cannot participate in more
than one quantum gate simultaneously. As a corollary, the quantum gates of a quan-
tum circuit are applied in several rounds in the physical layer of the quantum circuit
[2–11,16–20].
The physical layout design and optimization of quantum circuits have different
requirements with several open questions and currently represent an active area of
study [2–11,16–20]. Assuming that the goal is to construct a reduced quantum cir-
cuit that can simulate the original system, the reduction process should be taken on
the number of input quantum states, gate operations of the quantum circuit, and the
number of output measurements. Another important question is the maximization of
objective function associated with an arbitrary computational problem that is fed into
the quantum computer. These parallel requirements must be satisfied simultaneously,
which makes the optimization procedure difficult and is an emerging issue in present
and future quantum computer developments.
In the proposed QTAM method, the goal is to determine a topology for the quantum
circuits of quantum computer architectures that can solve arbitrary computational
problems such that the quantum circuit is minimized in the physical layer, and the
objective function of an arbitrary selected computational problem is maximized. The
physical layer minimization covers the simultaneous minimization of the quantum
circuit area (quantum circuit height and depth of the quantum gate structure, where
the depth refers to the number of time steps required for the quantum operations making
up the circuit to be run on quantum hardware), the total area of the quantum wires of the
quantum circuit, the maximization of the objective function, and the minimization of
the required number of input quantum systems and output measurements. An important
aim of the physical layout minimization is that the resulting quantum circuit should

123
Quantum circuit design for objective function maximization… Page 3 of 33 225

be identical to a high-complexity reference quantum circuit (i.e., the reduced quantum


circuit should be able to simulate a nonreduced quantum circuit).
The minimization of the total quantum wire length in the physical layout is also an
objective in QTAM. It serves to improve the processing in the topology of the quan-
tum circuit. However, besides the minimization of the physical layout of the quantum
circuit, the quantum computer also has to solve difficult computational problems very
efficiently (such as the maximization of an arbitrary combinatorial optimization objec-
tive function [17–20]). To achieve this goal in the QTAM method, we also defined an
objective function that provides the maximization of objective functions of arbitrary
computational problems. The optimization method can be further tuned by specific
input constraints on the topology of the quantum circuit (paths in the quantum circuit,
organization of quantum gates, required number of rounds of quantum gates, required
number of measurement operators, Hamiltonian minimization, entanglement between
quantum states, etc.) or other hardware restrictions of quantum computers, such as
the well-known no-cloning theorem [23]. The various restrictions on quantum hard-
ware, such as the number of rounds required to be integrated into the quantum gate
structure, or entanglement generation between the quantum states is included in the
scheme. These constraints and design attributes can be handled in the scheme through
the definition of arbitrary constraints on the topology of the quantum circuit or by
constraints on the computational paths.
The combinatorial objective function is measured on a computational basis, and an
objective function value is determined from the measurement result to quantify the
current state of the quantum computer. Quantum computers can be used for combina-
torial optimization problems. These procedures aim to use the quantum computer to
produce a quantum system that is dominated by computational basis states such that
a particular objective function is maximized.
Recent experimental realizations of quantum computers are qubit architectures [2–
20], and the current quantum hardware approaches focus on qubit systems (i.e., the
dimension d of the quantum system is two, d = 2). However, while the qubit layout
is straightforwardly inspirable by ongoing experiments, the method is developed for
arbitrary dimensions to make it applicable for future implementations. Motivated by
these assumptions, we therefore would avoid the term ‘qubit’ in our scheme to address
the quantum states and instead use the generalized term, ‘quantum states’ through-
out, which refers to an arbitrary-dimensional quantum system. We also illustrate the
results through superconducting quantum circuits [2–6]; however, the framework is
general and flexible, allowing a realization for near-term gate-model quantum com-
puter implementations.
The novel contributions of this paper are as follows:

• We define a method for designing quantum circuits for gate-model quantum com-
puters.
• We conceive the QTAM algorithm, which provides a quantum circuit minimization
on the physical layout (circuit depth and area), quantum wire length minimization,
objective function maximization, input size and measurement size minimization
for quantum circuits.

123
225 Page 4 of 33 L. Gyongyosi, S. Imre

• We define a multilayer structure for quantum computations using the hardware


restrictions on the topology of gate-model quantum computers.

This paper is organized as follows. In Sect. 2, the related works are summarized.
Section 3 proposes the system model. In Sect. 4, the details of the optimization method
are discussed, while Sect. 5 studies the performance of the model. Finally, Sect. 6
concludes the paper. Supplemental information is included in “Appendix.”

2 Related works

The related works are summarized as follows.


A strong theoretical background on the logical model of gate-model quantum com-
puters can be found in [17–19]. In [16], the model of a gate-model quantum neural
network model is defined. The gate-model quantum neural network refers to a quantum
neural network implemented on gate-model quantum computers.
In [34], the authors defined a hierarchical approach to computer-aided design of
quantum circuits. The proposed model was designed for the synthesis of permuta-
tion class of quantum logic circuits. The method integrates evolutionary and genetic
approaches to evolve arbitrary quantum circuit specified by a target unitary matrix.
Instead of circuit optimization, the work focuses on circuit synthesis.
In [35], the authors propose a simulation of quantum circuits by low-rank sta-
bilizer decompositions. The work focuses on the problem of simulation of quantum
circuits containing a few non-Clifford gates. The framework focuses on the theoretical
description of the stabilizer rank. The authors also derived the simulation cost.
A method for the designing of a T-count optimized quantum circuit for integer
multiplication with 4n + 1 qubits was defined in [36]. The T-count [37] measures the
number of T-gates and has relevance because of the implementation cost of a T-gate is
high. The aim of the T-count optimization is to reduce the number of T-gates without
substantially increasing the number of qubits. The method also applied for quantum
circuit designs of integer division [38]. The optimization takes into consideration both
the T-count and T-depth, since T-depth is also an important performance measure to
reduce the implementation costs. Another method for designing of reversible floating
point divider units was proposed in [39].
In [40], a methodology for quantum logic gate construction was defined. The main
purpose of the scheme was to construct fault-tolerant quantum logic gates with a
simple technique. The method is based on the quantum teleportation method [41].
A method for the synthesis of depth-optimal quantum circuits was defined in [42].
The aim of the proposed algorithm is to compute the depth-optimal decompositions
of logical operations via an application of the so-called meet-in-the-middle technique.
The authors also applied their scheme for the factorizations of some quantum logical
operations into elementary gates in the Clifford+T set.
A framework to the study the compilation and description of fault-tolerant, high-
level quantum circuits is proposed in [43]. The authors defined a method to convert
high-level quantum circuits consisting of commonly used gates into a form employing
all decompositions and ancillary protocols needed for fault-tolerant error correction.

123
Quantum circuit design for objective function maximization… Page 5 of 33 225

The method also represents a useful tool for quantum hardware architectures with
topological quantum codes.
An optimization algorithm for quantum computers is defined in [18]. The optimiza-
tion algorithm is called Quantum Approximate Optimization Algorithm (QAOA). The
goal of QAOA is to output approximate solutions for combinatorial optimization prob-
lems fed into the quantum computer. The algorithm is implementable via gate-model
quantum computers. It also has been found in this work that the depth of the quantum
circuit grows linearly with a particular control parameter. The authors also studied the
performance of the algorithm in function of the control parameters.
In [44], the authors studied the attributes of the QAOA algorithm. As they concluded,
at some particular setting and conditions the objective function values could become
concentrated. As a result, the number of running sequences of the quantum computer
can be reduced.
In [45], the authors analyzed the performance, working mechanism, and the exper-
imental implementation of the QAOA algorithm on near-term gate-model quantum
devices. The work also defined a parameter optimization procedure for the QAOA
and evaluated the performance of QAOA and compared it with quantum annealing.
As the authors found, the QAOA can learn via optimization to utilize non-adiabatic
mechanisms.
The implementation of QAOA with parallelizable gates is studied in [46]. The work
defines a scheme to parallelize the QAOA for arbitrary all-to-all connected problem
graphs in a layout of qubits. The proposed method is defined by single-qubit operations,
and the interactions are set by pair-wise CNOT gates among nearest neighbors. As the
work concluded, this structure allows for a parallelizable implementation in quantum
devices with a square lattice geometry.
In [47], the performance of QAOA is studied on different problems. The analysis
covers the MaxCut combinatorial optimization problem and the problem of quan-
tum circuit optimizations on a classical computer using automatic differentiation and
stochastic gradient descent. The work also revealed that QAOA can exceed the per-
formance of a classical polynomial time algorithm (Goemans–Williamson algorithm
[48]) with modest circuit depth. The work also concluded that the performance of
QAOA with fixed circuit depth is insensitive to problem size.
In [49], the authors studied the problem of ultrafast state preparation via the QAOA
with long-range interactions. The works provide an application for the QAOA in
near-term gate-model quantum devices. As the authors concluded, the QAOA-based
approach leads to an extremely efficient state preparation, for example the method
allows us to prepare Greene–Horne–Zeilinger (GHZ) states with O (1) circuit depth.
The results were also demonstrated by several other examples.
Another experimental approach for the implementation of qubit entanglement and
parallel logic operations with a superconducting circuit was presented in [50]. In
this work, the authors generated entangled GHZ states with up to 10 qubits connect-
ing to a bus resonator in a superconducting circuit. In the proposed implementation,
the resonator-mediated qubit–qubit interactions are used to control the entanglement
between the qubits and to operate on different pairs in parallel.
A review on the noisy intermediate-scale quantum (NISQ) era and its technological
effects and impacts on quantum computing can be found in [51].

123
225 Page 6 of 33 L. Gyongyosi, S. Imre

Fig. 1 The QTAM method for quantum computers. The quantum gate (QG) circuit computation model
consists of an input array of n quantum states (depicted by the green box), layers of quantum gates integrated
into a quantum circuit (depicted by the purple box), and a measurement phase (depicted by the orange box).
The quantum gates that act on the quantum states formulate a quantum circuit with a given circuit height and
depth. The area of the quantum circuit is minimized by objective function F1 , while the total quantum wire
area of the quantum circuit is minimized by F2 (F1 ∧ F2 is referred via the quantum circuit minimization).
The result of the minimization is a quantum circuit of quantum gates with minimized quantum circuit area,
minimized total quantum wire length, and a minimized total Hamiltonian operator. The maximization of a
corresponding objective function of arbitrary selected computational problems for the quantum computer
is achieved by F3 (referred via the objective function maximization). Objective functions F4 and F5 are
defined for the minimization of the number of quantum states (minimization of input size), and the total
number of measurements (minimization of measurements) (Color figure online)

The subject of quantum computational supremacy (tasks and problems that quantum
computers can solve but are beyond the capability of any classical computer) and its
practical implications are discussed in [52]. For a work on the complexity-theoretic
foundations of quantum supremacy, see [53].
A comprehensive survey on quantum channels can be found in [11], while for a
survey on quantum computing technology, see [54].

3 System model

The simultaneous physical layer minimization and the maximization of the objec-
tive function are achieved by the Quantum Triple Annealing Minimization (QTAM)
algorithm. The QTAM algorithm utilizes the framework of simulated annealing (SA)
[27–33], which is a stochastic point-to-point search method.
The procedure of the QTAM algorithm with the objective functions are depicted
in Fig. 1. The detailed descriptions of the methods and procedures are included in the
next sections.

3.1 Computational model

By theory, in an SA-based procedure a current solution s A is moved to a neighbor s B ,


which yields an acceptance probability [27–33]

123
Quantum circuit design for objective function maximization… Page 7 of 33 225

1
Pr ( f (s A ) , f (s B )) = 
f (s A )− f (s B )
, (1)
1+e T f (s A )

where f (s A ) and f (s B ) represent the relative performances of the current and neigh-
bor solutions, while T is a control parameter, T (t) = Tmax exp (−R (t/k)), where R
is the temperature decreasing rate, t is the iteration counter, k is a scaling factor, while
Tmax is an initial temperature.
Since SA is a probabilistic procedure it is important to minimize the acceptance
probability of unfavorable solutions and avoid getting stuck in a local minima.
Without loss of generality, if T is low, (1) can be rewritten in function of f (s A )
and f (s B ) as 
1, if f (s A ) > f (s B )
Pr ( f (s A ) , f (s B )) = (2)
0, if f (s A ) ≤ f (s B )
In the QTAM algorithm, we take into consideration that the objectives, constraints,
and other functions of the method, by some fundamental theory, are characterized
by different magnitude ranges [27–33]. To avoid issues from these differences in
the QTAM algorithm, we define three annealing temperatures, T f (t) for objectives,
Tg (t) for constraints and Tc (t) for the probability distribution closeness (distance of
the output distributions of the reference quantum circuit and the reduced quantum
circuit).
In the QTAM algorithm, the acceptance probability of a new solution s B at a current
solution s A is as

1
Pr (s A , s B ) = , (3)
1 + ed̃( f )T f (t) ed̃(g)Tg (t) ed̃(c)Tc (t)

where d̃ ( f ), d̃ (g) and d̃ (c) are the average values of objective, constraint and distri-
bution closeness domination, see Algorithm 1.
The aim of the QTAM algorithm is to minimize the cost function

min f (x) = α1 F1 (x) + · · · + α Nobj FNobj (x) + Fs , (4)

where x is the vector of design variables, while α is the vector of weights, while Nobj
is the number of primarily objectives. Other i secondary objectives (aspect ratio of the
quantum circuit, overlaps, total net length, etc.) are minimized simultaneously via the
single-objective function Fs in (4) as

Fs = αi Fi (x) . (5)
i

3.2 Objective functions

We defined Nobj = 5 objective functions for the QTAM algorithm. Objective functions
F1 and F2 are defined for minimization of QG quantum circuit in the physical layer.

123
225 Page 8 of 33 L. Gyongyosi, S. Imre

The aim of objective function F1 is the minimization of the A QG quantum circuit area
of the QG quantum gate structure,
    
F1 : min A QG = min H QG · D QG , (6)


where H QG is the optimal circuit height of QG, while D QG is the optimal depth of
QG.
Focusing on superconducting quantum circuits [2–6], the aim of F2 is the physical
layout minimization of the w QG total quantum wire area of QG, as
⎛ ⎞

h p 
q
 
F2 : w QG = min ⎝ i j · δi j ψi j ⎠ , (7)
k=1 i=1 j=1

where h is the number of nets of the QG circuit, p is the number of quantum ports of the
QG quantum circuit considered as sources of a condensate wave function amplitude
[2–6], and q the number of quantum ports considered as sinks of a condensate wave
function amplitude, i j is the length of the quantum wire i j, δi j is the effective width
of the quantum wire i j, while ψi j is the (root-mean-square) condensate wave function
amplitude [2–6] associated with the quantum wire i j.
Objective function F3 is defined for the maximization of the expected value of an
 as
objective function C L ()

 = max |C|
F3 : max C L ()  , (8)

 is a collection of L parameters
where C is an objective function, 

 = 1 , . . . ,  L
 (9)

 is evaluated as
such that with L unitary operations, state |

 = U L ( L ) , . . . , U1 (1 ) |ϕ ,
| (10)

where Ui is an ith unitary that depends on a set of parameters i , while |ϕ is an


 [see (9)] such
initial state. Thus the goal of F3 is to determine the L parameters of 
 
that |C| is maximized.
Objective functions F4 and F5 are defined for the minimization of the number of
input quantum states and the number of required measurements. The aim of objective
function F4 is the minimization of the number of quantum systems on the input of the
QG circuit,
F4 : min (n) . (11)
The aim of objective function F5 is the minimization of the total number of measure-
ments in the M measurement block,

F5 : min (m) = min (N M |M|), (12)

123
Quantum circuit design for objective function maximization… Page 9 of 33 225

where m = N M |M|, where N M is the number of measurement rounds, |M| is the


number of measurement gates in the M measurement block.

3.3 Constraint violations

The optimization at several different objective functions results in different Pareto


fronts [27–30] of placements of quantum gates in the physical layout. These Pareto
fronts allow us to find feasible tradeoffs between the optimization objectives of the
QTAM method. The optimization process includes diverse objective functions, con-
straints, and optimization criteria to improve the performance of the quantum circuit
and to take into consideration the hardware restrictions of quantum computers. In the
proposed QTAM algorithm, the constraints are endorsed by the modification of the
Pareto dominance [27–30] values by the different sums of constraint violation values.
We defined three different constraint violation values.

3.3.1 Distribution closeness dominance

In the QTAM algorithm, the Pareto dominance is first modified with the sum of dis-
tribution closeness violation values, denoted by cs (·). The aim of this iteration is to
support the closeness of output distributions of the reduced quantum circuit QG to
the output distribution of the reference quantum circuit QG R .
Let PQG R the output distribution after the M measurement phase of the reference
(original) quantum circuit QG R to be simulated by QG, and let Q QG be the out-
put distribution of the actual, reduced quantum circuit QG. The distance between
the quantum circuit output distributions PQG R and Q QG (distribution closeness) is
straightforwardly yielded by the relative entropy function, as

   PQG R (i)
D PQG R Q QG = PQG R (i) log2 . (13)
Q QG (i)
i

For two solutions x and y, the dx,y (c) distribution closeness dominance function is
defined as
dx,y (c) = cs (x) − cs (y) , (14)
where cs (·) is evaluated for a given solution z as


Nv
cs (z) = vic , (15)
i=1

where vic is an ith distribution closeness violation value, Nv is the number of distri-
bution closeness violation values for a solution z.
In terms of distribution closeness dominance, x dominates y if the following relation
holds:
((cs (x) < 0) ∧ (cs (y) < 0) ∧ (cs (x) > cs (y)))
(16)
∨ ((cs (x) = 0) ∧ (cs (y) < 0)) ,

123
225 Page 10 of 33 L. Gyongyosi, S. Imre

thus (16) states that x dominates y if both x and y are unfeasible, and x is closer to
feasibility than y, or x is feasible and y is unfeasible.
By similar assumptions, y dominates x if

((cs (x) < 0) ∧ (cs (y) < 0) ∧ (cs (x) < cs (y)))
(17)
∨ ((cs (x) < 0) ∧ (cs (y) = 0)) .

3.3.2 Constraint dominance

The second modification of the Pareto dominance is by the sum of constraint violation
values,
dx,y (g) = gs (x) − gs (y) , (18)
where gs (·) is the sum of all constraint violation values, evaluated for a given solution
z as
Ng
 g
gs (z) = vi , (19)
i=1
g
vi
where is an ith constraint violation value, N g is the number of constraint violation
values for a solution z.
Similar to (16) and (17), in terms of constraint dominance, x dominates y if the
following relation holds:

((gs (x) < 0) ∧ (gs (y) < 0) ∧ (gs (x) > gs (y)))
(20)
∨ ((gs (x) = 0) ∧ (gs (y) < 0)) ,

thus (16) states that x dominates y if both x and y are unfeasible, and x is closer to
feasibility than y, or x is feasible and y is unfeasible.
By similar assumptions, y dominates x with respect to gs (·) if

((gs (x) < 0) ∧ (gs (y) < 0) ∧ (gs (x) < gs (y)))
(21)
∨ ((gs (x) < 0) ∧ (gs (y) = 0)) .

3.3.3 Objective dominance

Let x and y refer to two solutions, then, by theory, the dx,y ( f ) objective dominance
function is defined as
Nobj
| f i (x) − f i (y)|
dx,y ( f ) = , (22)
Ri
i=1, f 1 (x) = f 1 (y)

where Nobj is the number of objectives (in our setting Nobj = 5), Ri is the range of
objective i, while x dominates y if f i (x) ≤ f i (y) for ∀i = 1, . . . , Nobj , and for at
least one i the relation f i (x) < f i (y) holds.

123
Quantum circuit design for objective function maximization… Page 11 of 33 225

3.4 Objective function maximization

The quantum circuit QG executes operations in the H Hilbert space. The dimension
of the H space is
dim (H) = d n , (23)
where d is the dimension of the quantum system (d = 2 for a qubit system), while n
is the number of quantum states.
Using the formalism of [17–19], let assume that the computational problem fed into
the quantum circuit QG is specified by n bits and m constraints. Then, the objective
function is defined as
m
C (z) = Cα (z) , (24)
α=1

where
z = z1 . . . zn (25)
is an n-length bitstring, and Cα (z) = 1 if z satisfies constraint α, and Cα (z) = 0
otherwise [17–19].
Assuming a Hilbert space of n qubits, dim (H) = 2n , using the computational basis
vectors |z, operator C (z) in (24) is a diagonal operator in the computational basis
[17–19]. Then, at a particular angle γ , γ ∈ [0, π ], unitary U (C, γ ) is evaluated as


m
U (C, γ ) = e−iγ C = e−iγ Cα , (26)
α=1

such that all terms in the product are diagonal in the computational basis.
Then, for the μ dependent product of commuting operators, μ ∈ [0, π ] [17–19], a
unitary U (B, μ) is defined as


n
j
U (B, μ) = e−iμB = e−iμσx , (27)
j=1


where B = i X i , X i = σx , σx is the Pauli X -operation, while μ is a control
i

parameter [17–20], μ ∈ [0, π ]. For a qubit setting, the |s initial state of the quantum
computer is the uniform superposition over computational basis states,

1 
|s = √ |z . (28)
2n z

Let us assume that the G k,r


QG multilayer structure of the QG quantum circuit contains
n quantum ports of several quantum gates, and edge set

S E = { jk} (29)

123
225 Page 12 of 33 L. Gyongyosi, S. Imre

of size m. Then, the aim of the optimization is to identify a string z (25) that the
maximizes the objective function

C= C jk , (30)
 jk

where
1 
C jk = 1 − zi z j , (31)
2
where z i = ±1.
In G k,r
QG different unitary operations can be defined for the single quantum ports
(qubits) and the connected quantum ports, as follows.
Let Uqs μ j be a unitary operator on a qs single port (qubits) in G k,r
QG , be defined
such that for each quantum ports a μ j parameter is associated as
 
Uqs μ j = e−iμ j X j . (32)

For the collection


 = (μ1 , . . . , μn ) ,
μ (33)

the resulting unitary is  


Uqs (μ)
 = Uq s μ j . (34)
j

The unitary Uqs (μ)


 therefore represents the applications of the unitary operations
at once in the quantum ports
 of  the QG quantum circuit.
Then, let unitary Uq jk γ jk be defined for connected quantum ports q jk in G k,r
QG ,
as  
Uq jk γ jk = eiγ jk Z j Z k , (35)

where Z i = σzi , where σz is the Pauli Z -operation. Since the eigenvalues of X i and
Z j Z k are ±1, it allows us to restrict the values [17–19] of parameters γ and μ to the
range of [0, π ].
Then, defining collection
γ = (γ jk
1
, . . . , γ jk
h
), (36)

where h is the number of individual γ jk parameters, the unitary Uq jk (γ ) is yielded as

 
Uq jk (γ ) = Uq jk γ jk . (37)
 jk∈G k,r
QG

Assuming that there exists a set Sμu of u collections of μ’s




 (1) , . . . , μ
Sμu : μ  (u) (38)

123
Quantum circuit design for objective function maximization… Page 13 of 33 225

and a set Sγu of u collections of γ ’s,

Sγu : γ (1) , . . . , γ (u) , (39)

a |φ system state of the QG quantum circuit is evaluated as


 

|φ = Sμu , Sγu , C
        (40)
= Uq s μ  (u) Uq jk γ (u) . . . Uqs μ (1) Uq jk γ (1) |s ,

where |s is given in (28).


The maximization of objective function (24) in the multilayer G k,r
QG structure is
therefore analogous to the problem of finding the parameters of sets Sμu (38) and Sγu
(39) in the system state |φ (40) of the QG quantum circuit.

3.5 The QTAM algorithm

Theorem 1 The QTAM algorithm utilizes annealing temperatures T f (t), Tg (t) and
Tc (t) to evaluate the acceptance probabilities, where T f (t) is the annealing temper-
ature for the objectives, Tg (t) is the annealing temperature for the constraints, and
Tc (t) is the annealing temperature for the distribution closeness.
Proof The detailed description of the QTAM procedure is given in Algorithm 1.
The related steps are detailed in sub-procedures 1–4. In Step 3 of sub-procedure 1,
the best As solutions refer to those solutions from A that have the largest values of
the crowding distance [30]. Particularly, in this step, the solutions are also sorted and
compared by a crowded comparison operator to find the best solution.


3.5.1 Computational complexity of QTAM

Following the complexity analysis of [27–30], the computational complexity of QTAM


is evaluated as   
O Nd Nit |P| Nobj + log2 (|P|) , (54)
where Nd is the number of dominance measures, Nit is the number of total iterations,
|P| is the population size, while Nobj is the number of objectives.

4 Wiring optimization and objective function maximization

4.1 Multilayer quantum circuit grid

An ith quantum gate of QG is denoted by gi , a kth port of the quantum gate gi is


referred to as gi,k . Due to the hardware restrictions of gate-model quantum computer
implementations [17–20], the quantum gates are applied in several rounds. Thus, a

123
225 Page 14 of 33 L. Gyongyosi, S. Imre

Algorithm 1 Quantum Triple Annealing Minimization (QTAM)


Step 1. Define an archive A with random solutions, and select a ξ random solution from A.
Step 2. Define ν as ν =  (ξ ), where  (·) is a moving operator. Determine the dominance relation
between ξ and ν via D P (ξ, ν), where function D P (·) is the constrained Pareto dominance checking
function.
Step 3. Evaluate acceptance probabilities based on D P (ξ, ν).
(a) If D P (ξ, ν) = ν∠ξ (ξ dominates ν, where ∠ is the Pareto dominance operator), then ξ = ν,
with probability

1
Pr ( ξ = ν| ν∠ξ ) = , (41)
1 + ed̃( f )T f (t) ed̃(g)Tg (t) ed̃(c)Tc (t)

where d̃ ( f ), is the average objective dominance, evaluated as


 
k
i=1 di,ν ( f ) + dξ,ν ( f )
d̃ ( f ) = , (42)
k+1

where dx,y ( f ) is the objective dominance function as given in (22), while d̃ (g) average constraint
dominance as
 
− k
i=1 dν,i (g) − dν,ξ (g)
d̃ (g) = , (43)
k+1

where dx,y (g) is the constraint dominance function as given in (18), and d̃ (c) is average distribution
closeness dominance as
 
− k
i=1 dν,i (c) − dν,ξ (c)
d̃ (c) = , (44)
k+1

where dx,y (c) is the distribution closeness dominance function as given in (14), while T f (t) is the
annealing temperature for the objectives
 
−R kt
T f (t) = T f max e , (45)
where R is the temperature decreasing rate, T f max is a maximum (initial) value for annealing the
objectives factor, Tg (t) is the annealing temperature for the constraints
 
−R kt
Tg (t) = Tgmax e , (46)
where Tgmax is a maximum (initial) value for annealing the constraint factor, and Tc (t) is the
annealing temperature for the distribution closeness
 
−R kt
Tc (t) = Tcmax e , (47)
where Tcmax is a maximum (initial) value for annealing the distribution closeness factor, respectively.

123
Quantum circuit design for objective function maximization… Page 15 of 33 225

Algorithm 1 Quantum Triple Annealing Minimization (QTAM), cont.


(b) If D P (ξ, ν) = (ν¬∠ξ ) ∧ (ξ ¬∠ν) (ν and ξ are non-dominating to each other) such that ν is
dominated by k ≥ 1 points in A, D P (ξ, ν) = ν∠ (A)k , then ξ = ν, with probability
 
Pr ξ = ν| (ν¬∠ξ ) ∧ (ξ ¬∠ν) , ν∠ (A)k
1 (48)
= ,
1 + ed̃( f )k T f (t) ed̃(g)k Tg (t) ed̃(c)k Tc (t)

where

d̃ ( f )k = d̃ ( f ) − dξ,ν ( f ) , (49)

where d̃ ( f ) is as in (42),

d̃ (g)k = d̃ (g) + dν,ξ (g) , (50)

where d̃ (g) is as in (43), while

d̃ (c)k = d̃ (c) + dν,ξ (c) , (51)

where d̃ (c) is as in (43).


(c) If D P (ξ, ν) = (ν¬∠ξ ) ∧ (ξ ¬∠ν), and D P (ν, A) = (A¬∠ν), thus ν is non-dominating with
respect to A, then apply sub-procedure 1.  
(d) If D P (ξ, ν) = (ν¬∠ξ ) ∧ (ξ ¬∠ν), and D P (ν, A) = (A)k ∠ν , thus ν dominates k ≥ 1 points
in A, then apply sub-procedure 2.  
(e) If D P (ξ, ν) = ξ ∠ν such that D P (ν, A) = ν∠ (A)k , thus ν is dominated by k ≥ 1 points in
A, then set ξ = ν, with probability

  1
Pr ξ = ν| ξ ∠ν, ν∠ (A)k = , (52)
1 + e−d̃(min)

where d̃ (min) is evaluated as


  
d̃ (min) = min dν,k ( f ) − dk,ν (g) + dk,ν (c) . (53)
∀k

Using (53), apply sub-procedure 3. To evaluate the D P (ν, A) relations between ν and the elements
of A at D P (ξ, ν) = ξ ∠ν, apply sub-procedure 4.
Step 4. Apply Steps 2–3, until i < Nit , where i is the actual iteration, Nit is the total number of
iterations.

Sub-procedure 1
Step 1. Set ξ = ν, and add ν to A.
Step 2. If |A| > As , where |A| is the number of elements in A, As is the maximal archive size, then
assign cr (A) to A, where cr (·) is the crowding distance.
Step 3. Select the best As elements.

Sub-procedure 2
Step 1. Set ξ = ν, and add ν to A.
Step 2. Remove all the k dominated points from A.

123
225 Page 16 of 33 L. Gyongyosi, S. Imre

Sub-procedure 3
Step 1. Set ξ = kd̃(min) , where kd̃(min) is a point of A that corresponds to d̃ (min) (see (53)) with
 
probability Pr ξ = ν| ξ ∠ν, ν∠ (A)k (see (52)).
Step 2. Otherwise set ξ = ν.

Sub-procedure 4
Step 1. If D P (ν, A) = A¬∠ν, i.e., ν is non-dominating with respect to A, then set ξ = ν, and add
ν to A. If |A| > As , then
 assign cr (A) to A, and select the best As elements.
Step 2. If D P ν, (A)k = (A)k ∠ν, i.e., ν dominates k points in A, then set ξ = ν, and add ν to A.
Remove the k points from A.

multilayer, k-dimensional (for simplicity we assume k = 2), n-sized finite square-


lattice grid G k,r
QG can be constructed for QG, where r is the number of layers, l z ,
l
z = 1, . . . , r . A quantum gate gi in the zth layer l z is referred to as gi z , while a kth
l lz
port of gi z is referred to as gi,k .

4.2 Method

Theorem 2 There exists a method for the parallel optimization of quantum wiring
in physical layout of the quantum circuit and for the maximization of an objective
function Cα (z).
Proof The aim of this procedure (Method 1) is to provide a simultaneous physical layer
optimization and Hamiltonian minimization via the minimization of the wiring lengths
in the multilayer structure of QG and the maximization of the objective function (see
also Sect. 3.4). Formally, the aim of Method 1 is the F2 ∧ F3 simultaneous realization
of the objective functions F2 and F3 .
Using the G k,r
QG multilayer grid of the QG quantum circuit determined via F1 and F2 ,
the aim of F3 maximization of the objective function C (z), where z = z 1 . . . z n in an
n-length input string, where each z i is associated with an edge of G k,r
QG connecting two
quantum ports. The objective function C (z) associated with an arbitrary computational
problem is defined as 
C (z) = Ci, j (z) , (55)
i, j∈G k,r
QG

where Ci, j is the objective function for an edge of G k,r


QG that connects quantum ports
i and j.
The C ∗ (z) maximization of objective function (55) yields a system state  for the
quantum computer [17–20] as
   
 = γ , μ, C ∗ (z) C ∗ (z) γ , μ, C ∗ (z) , (56)

where    
γ , μ, C ∗ (z) = U (B, μ) U C ∗ (z) , γ |s, (57)

123
Quantum circuit design for objective function maximization… Page 17 of 33 225

while   ∗
U C ∗ (z) , γ |z = e−iγ C (z) |z , (58)
where γ is a single parameter [17–20].
The objective function (55) without loss of generality can be rewritten as

C (z) = Cα (z) , (59)
α

where Cα each act on a subset of bits, such that Cα ∈ {0, 1}. Therefore, there exists a
 in (9) such that (59) picks up a maximized value C ∗ (z),
selection of parameters of 
which yields system state ϒ as

ϒ = |C 
 ∗ (z)|. (60)

Therefore, the resulting Hamiltonian H associated with the system state (60) is mini-
mized via F2 [see (72)] as

 = min |H
E L ()  |,
 (61)

since the physical layer optimization minimizes the i j physical distance between the
 of the Hamiltonian associated with 
quantum ports; therefore, the energy E L ()  is
reduced to a minima.
The steps of the method F2 ∧ F3 are given in Method 1. The method minimizes the
number of quantum wires in the physical layout of QG and also achieves the desired
system state  of (56).


The steps of Method 1 are illustrated in Fig. 2, using the G k,r


QG multilayer topology
of the QG quantum gate structure, li refers to the ith layer of G k,r
QG .

4.3 Quantum circuit minimization

For objective function F1 , the area minimization of the QG quantum circuit requires
the following constraints. Let Sv (Pi ) be the vertical symmetry axis of a proximity
group Pi [27–29] on QG, and let x Sv (Pi ) refer to the x-coordinate of Sv (Pi ). Then,
by some symmetry considerations for x Sv (Pi ) ,

1 1 
x Sv (Pi ) = xi + xi2 + κi , (62)
2
where xi is the bottom-left x coordinate of a cell σi , κi is the width of σi , and

hi hi
yi1 + = yi2 + , (63)
2 2
where yi is the bottom-left y coordinate of a cell σi , h i is the height of σi .

123
225 Page 18 of 33 L. Gyongyosi, S. Imre

Method 1 Quantum Wiring Optimization and Objective Function Maximization


Step 1. Construct the G k,r
QG multilayer grid of the QG quantum circuit, with r layers l1 , . . . , lr .
Determine the

C (z) = Ci, j (z)
i, j∈G k,r
QG

objective function, where each Ci, j refers to the objective function for an edge in G k,r
QG connecting
quantum ports i and j, defined as

1 
Ci, j (z) = 1 − zi z j ,
2
where z i = ±1.
Step 2. Find the optimal assignment of separation point  in G k,r
QG = (V , E, f ) at a physical layer
blockage β via a minimum-cost tree in G k,r QG containing at least one port from each quantum gate gi ,
i = 1, . . . , |V |. For all pairs of quantum gates gi , g j , minimize the f p,c path cost (L1 distance)
between a source quantum gate gi and destination quantum gate g j and then maximize the
overlapped L1 distance between gi and .
Step 3. For the s found assignments of  in Step 2, evaluate the objective functions Cαi ,
k = 1, . . . , s, where Cα0 is the initial value. Let the two paths P1 and P2 between quantum ports
gi,1 , g j,1 , g j,2 be given as P1 : gi,1 →  → g j,1 , and P2 : gi,1 →  → g j,2 . Evaluate objective
functions Cg , (z), C,g  (z) and C,g  (z).
i,1 j,1 j,2
Step 4. Select that kth solution, for which

(k)  (z) + C (k)  (z) + C (k)


Cαk (z) = C  (z)
gi,1 , ,g j,1 ,g j,2

(k)
is maximal, where Ci, j is the objective function associated with a kth solution between quantum
ports gi,1 , g j,1 , and gi,1 , g j,2 in G k,r ∗
QG . The resulting C α (z) for P1 and P2 is as
 
Cα∗ (z) = max Cαk (z) .
k

Step 5. Repeat steps 2–4 for all paths of G k,r


QG .

 
Let σ 1 , σ 2 be a symmetry pair [27–29] that refers to two matched cells
 
placed symmetrically in relation to Sv (Pi ), with bottom-left coordinates σ 1 , σ 2 =
 1 1   2 2 
xi , yi , xi , yi . Then, x Sv (Pi ) can be rewritten as

x Sv (Pi ) = xi1 − xi = xi2 + xi + κi , (64)

with the relation yi1 = yi2 = yi .


 
Let σ S = xiS , yiS be a cell which is placed centered [27–29] with respect to
Sv (Pi ). Then, x Sv (Pi ) can be evaluated as

κi
x Sv (Pi ) = xiS + , (65)
2

123
Quantum circuit design for objective function maximization… Page 19 of 33 225

(a) (b)

(c) (d)
Fig. 2 The aim is to find the optimal wiring in G k,r
QG for the QG quantum circuit (minimal path length with
maximal overlapped path between gi,1 and g j,1 ,g j,2 ) such that the Cα objective function associated with
the paths P1 : gi,1 → g j,1 , and P2 : gi,1 → g j,2 is maximal. a The initial objective function value is Cα0 .
A physical layer blockage β in the quantum circuit allows no to use paths P1 and P2 . b The wire length is
optimized via the selection point . The path cost is f p,c = 11 + 3 fl , where fl is the cost function of the
path between the layers l1 and l2 (depicted by the blue vertical line), and the path overlap from gi,1 to  is
τo = 5 + fl . The objective function value is Cα1 . c The path cost is f p,c = 10; the path overlap from gi,1
to  is τo = 4. The objective function value is Cα2 . d The path cost is f p,c = 12; the path overlap from
gi,1 to  is τo = 6. The objective function value is Cα3 . The selected connection topology from (b–d) is
that which yields the maximized objective function Cα∗ (Color figure online)

along with yiS = yi . Note that it is also possible that for some cells in QG there is no
symmetry requirements, and these cells are denoted by σ 0 .
As can be concluded, using objective function F1 for the physical layer minimization
of QG, a d-dimensional constraint vector xdF1 can be formulated with the symmetry
considerations as follows:

  
xdF1 = (xi , yi , ri ) + (yi , ri ) + (xi , yi , ri ) , (66)
N
( σ 1 ,σ 2 ) Nσ S Nσ 0

123
225 Page 20 of 33 L. Gyongyosi, S. Imre

 
where N(σ 1 ,σ 2 ) is the number of σ 1 , σ 2 symmetry pairs, Nσ S is the number of σ S -
type cells, Nσ 0 is the number of σ 0 -type cells, while ri is the rotation angle of an ith
cell σi , respectively.

4.3.1 Quantum wire area minimization

Objective function F2 provides a minimization of the total quantum wire length of


the QG circuit. To achieve it, we define a procedure that yields the minimized total
quantum wire area, w QG , of QG as given by (7). Let δi j be the effective width of the
quantum wire i j in the QG circuit, defined as

ψi j
δi j =   , (67)
Jmax Tr e f h nom
 
where ψi j is the (root-mean-square) condensate wave function amplitude, Jmax Tr e f
is the maximum allowed current density at a given reference temperature Tr e f , while
h nom is the nominal layer height. Since drops in the condensate wave function phase
ϕi j also could present in the QG circuit environment, the δi j effective width of the
quantum wire i j can be rewritten as
 
ψi j e f f r0 Tr e f
δi j = , (68)
χϕi j

where χϕi j is a maximally allowed value for the phase drops, e f f is the effective length
     
of the quantum wire, e f f ≤ χϕi j δi j /ψi j r0 Tr e f , while r0 Tr e f is a conductor
sheet resistance [2–6].
In a G k,r
QG multilayer topological representation of QG, the i j distance between
the quantum ports is as
     
i j = xi − x j  +  yi − y j  + z i − z j  fl , (69)

where fl is a cost function between the layers of the multilayer structure of QG.
During the evaluation, let w QG (k) be the total quantum wire area of a particular
net k of the QG circuit,


p 
q
 
w QG (k) = i j · δi j ψi j , (70)
i=1 j=1

where q quantum ports are considered as sources of condensate wave function ampli-
tudes, while p of QG are sinks, thus (7) can be rewritten as


h
F2 : w QG = min w QG (k). (71)
k=1

123
Quantum circuit design for objective function maximization… Page 21 of 33 225

 
Since ψi j is proportional to δi j ψi j , (71) can be simplified as


h
F2 : w QG = min w QG (k), (72)
k=1

where

p 
q
w QG (k) = i j · ψi j , (73)
i=1 j=1

where i j is given in (69).


In all quantum ports of a particular net k of QG, the source quantum ports are
denoted by positive sign [27–29] in the condensate wave function amplitude, ψi j
assigned to quantum wire i j between quantum ports i and j, while the sink ports
are depicted by negative sign in the condensate wave function amplitude, −ψi j with
respect to a quantum wire i j between quantum ports i and j.
Thus the aim of w QG (k) in (70) is to determine a set of port-to-port connections
in the QG quantum circuit, such that the number of long connections is reduced in a
particular net k of QG as much as possible. The result in (71) therefore extends these
requirements for all nets of QG.

Wave function amplitudes With respect to a particular quantum wire i j between


quantum ports i and j of QG, let ψi→ j refer to the condensate wave function amplitude
in direction i → j, and let ψ j→i refer to the condensate wave function amplitude in
direction j → i in the quantum circuit. Then, the let be φi j defined for the condensate
wave function amplitudes of quantum wire i j as
   
φi j = min ψi→ j  , ψ j→i  , (74)

with a residual condensate wave function amplitude

ξi→ j = φi j − ψi→ j , (75)

where ψi→ j is an actual amplitude in the forward direction i → j. Thus, the maximum
amount of condensate wave function amplitude injectable to of quantum wire i j in the
forward direction i → j at the presence of ψi→ j is ξi→ j [see (75)]. The following
relations holds for a backward direction, j → i, for the decrement of a current wave
function amplitude ψi→ j as
ξ̄ j→i = −ψi→ j , (76)
with residual quantum wire length

 j→i = −δi j , (77)

where δi j is given in (67).


By some fundamental assumptions, the N R residual network of QG is therefore
a network of the quantum circuit with forward edges for the increment of the wave

123
225 Page 22 of 33 L. Gyongyosi, S. Imre

function amplitude ψ and backward edges for the decrement of ψ. To avoid the
problem of negative wire lengths, the Bellman–Ford algorithm [27–29] can be utilized
in an iterative manner in the residual directed graph of the QG topology.
To find a path between all pairs of quantum gates in the directed graph of the
QG quantum circuit, the directed graph has to be strongly connected. The strong
connectivity of the h nets with the parallel minimization of the connections of the
QG topology can be achieved by a minimum spanning tree method such as Kruskal’s
algorithm [27–29].
Lemma 1 The objective function F2 is feasible in a multilayer QG quantum circuit
structure. 

Proof The procedure defined for the realization of objective function F2 on a QG
quantum circuit is summarized in Method 2. The proof assumes a superconducting
architecture.

Method 2 Implementation of Objective Function F2


Step 1. Assign the ψi j condensate wave function amplitudes for all i j quantum wires of QG via
sub-method 2.1.
Step 2. Determine the residual network of QG via sub-method 2.2.
Step 3. Achieve the strong connectivity of QG via sub-method 2.3.
Step 4. Output the QG quantum circuit topology such that w QG (7) is minimized.

The sub-procedures of Method 2 are detailed in sub-methods 2.1, 2.2 and 2.3.

Sub-method 2. 1
Step 1. Create a M QG multilayer topological map of the network N of QG with the quantum gates
and ports.
Step 2. From M QG determine the L c connection list of N in QG.
Step 3. Determine the δi j the effective width of the quantum wire i j via (67), for ∀i j wires.
Step 4. Determine φi j via (74) for all quantum wires i j of the QG circuit.
Step 5. For a kth net of QG, assign the wave function amplitude values ψi j to ∀i j quantum wires
such that w QG (k) in (70) is minimized, with quantum wire length i j (69).

These conclude the proof. 


4.3.2 Processing in the multilayer structure

The G k,z
QG grid consists of all gi quantum gates of QG in a multilayer structure, such
lz
that the gi,k appropriate ports of the quantum gates are associated via an directed graph
l
G = (V , E, f c ), where V is the set of ports, gi,k
z
⊆ V , E is the set of edges, and f c is
a cost function, to achieve the gate-to-gate connectivity.
As a hardware restriction, we use a constraint on the quantum gate structure, and it
is assumed in the model that a given quantum system cannot participate in more than
one quantum gate at a particular time.

123
Quantum circuit design for objective function maximization… Page 23 of 33 225

Sub-method 2. 2
Step 1. Create a M̄ QG multilayer topological map of the N R residual network of QG.
Step 2. From M̄ QG determine the L̄ c connection list of the N R residual network of QG.
Step 3. For ∀i → j forward edges of M̄ QG of N R , compute the ξi→ j residual condensate wave
function amplitude (75), and for ∀ j → i backward edges of M̄ QG , compute the quantity ξ̄ j→i via
(76).
Step 4. Compute the residual negative quantum wire length  j→i via (77), using δi j from (67).
Step 5. Determine the C̄ negative cycles in the M̄ QG of the N R residual network of QG via the
A B F Bellman–Ford algorithm [27–29].
Step 6. If NC̄ > 0, where NC̄ is the number of C̄ negative cycles in M̄ QG , then update the ψi j wave
function amplitudes of the quantum wires i j in the to cancel out the negative cycles.
Step 7. Re-calculate the values of (75), (76) and (77) for the residual edges of N R .
Step 8. Repeat steps 5-7, until NC̄ > 0.

Sub-method 2. 3
Step 1. For an ith sn k,i subnet of a net k of the QG quantum circuit, set the quantum wire length to
zero, δi j = 0 between quantum ports i and j, for all ∀i.
Step 2. Determine the L2 (Euclidean) distance between the quantum ports of the subnets sn k,i (from
each quantum port of a subnet to each other quantum port of all remaining subnets [27]).
Step 3. Weight the δi j > 0 nonzero quantum wire lengths by the calculated L2 distance between the
connections of the subnets of the QG quantum circuit [2–6,27–29].
Step 4. Determine the minimum spanning tree T QG via the A K Kruskal algorithm [27].
Step 5. Determine the set ST QG of quantum wires with δi j > 0 from T QG . Calculate
 
δ ST = max δi j , δi j , δ0 , where δ0 is the minimum width can be manufactured, while δi j and
QG
δi j are given in (67) and (68).
Step 6. Add the quantum wires of ST QG to the M QG multilayer topological map of the network N
of QG.
Step 7. Repeat steps 4–6 for ∀k nets of the QG quantum circuit, until M QG is not strongly
connected.

The distance in the rectilinear grid G k,z


QG of QG is measured by the dL1 (·) L1-
distance function. Between two network ports x, y ∈ V , x = ( j, k), y = (m, o),
dL1 (·) is as

dL1 (x, y) = dL1 (( j, k) , (m, o)) = |m − j| + |o − k| . (78)

The quantum port selection in the G k,r QG multilayer structure of QG, with r layers l z ,
z = 1, . . . , r , and k = 2 dimension in each layers is illustrated in Fig. 3.
Algorithm

Theorem 3 The Quantum Shortest Path Algorithm finds shortest paths in a multilayer
QG quantum circuit structure.

Proof The steps of the shortest path determination between the ports of the quantum
gates in a multilayer structure are included in Algorithm 2.


123
225 Page 24 of 33 L. Gyongyosi, S. Imre

(a) (b) (c)


Fig. 3 The method of port allocation of the quantum gates in the G k,r
QG multilayer structure, with r layers l z ,
z = 1, . . . , r , and k = 2 dimension in each layers. The aim of the multiport selection is to find the shortest
path between ports of quantum gates gi (blue rectangle) and g j (green rectangle) in the G 2,r QG multilayer
structure. a The quantum ports needed to be connected in QG are port gi,1 in quantum gate gi in layer
l1 , and ports g j,1 and g j,2 of quantum gate g j in layer l3 . b Due to a hardware restriction on quantum
computers, the quantum gates are applied in several rounds in the different layers of the quantum circuit
l l
QG. Quantum gate g j is applied in two rounds in two different layers that is depicted g j3 and g j2 . For
l l
the layer-l3 quantum gate g j3 , the active port is g j,1
3 (red), while the other port is not accessible (gray) in

l3
l3 . The g j,1 port, due to a physical layer blockage β in the quantum circuit of the above layer l2 does not
l3 l3
allow to minimize the path cost between ports gi,1 and g j,1 . The target port g j,1 is therefore referred to
l3 l3
as a blocked port (depicted by pink), and a new port of is g j selected for g j,1 (new port depicted by red).
l l2
c For the layer-l2 quantum gate g j2 , the active port is g j,2 (red), while the remaining port is not available
(gray) in l2 . The white dots (vertices) represent auxiliary ports in the grid structure of the quantum circuit.
In G 2,r
QG , each vertices could have a maximum of 8 neighbors; thus, for a given port g j,k of a quantum gate
 
g j , deg g j,k ≤ 8 (Color figure online)

Complexity analysis The complexity analysis of Algorithm 2 is as follows. Since


the QSPA algorithm (Algorithm 2) is based on the A∗ search method [27–29], the
complexity is trivially yielded by the complexity of the A∗ search algorithm.

5 Performance evaluation

In this section, we compare the performance of the proposed QTAM method with a
multiobjective evolutionary algorithm called NSGA-II [55]. We selected this multiob-
jective evolutionary algorithm for the comparison, since the method can be adjusted
for circuit designing.  
The computational complexity of NSGA-II is proven to be O Nit Nobj |P|2 in gen-
eral, while at an optimized non-dominated procedure, the complexity can be reduced to

123
Quantum circuit design for objective function maximization… Page 25 of 33 225

Algorithm 2 Quantum Shortest Path Algorithm (QSPA)


Step 1. Create the G k,r
QG multilayer structure of QG, with r layers l z , z = 1, . . . , r , and k dimension
in each layers. From G k,r
QG generate a list L P ∈QG of the paths between each start quantum gate port
to each end quantum gate port in the G k,r
QG structure of QG quantum circuit.
Step 2. Due to the hardware restrictions of quantum computers, add the decomposed quantum gate
port information and its layer information to L P ∈QG . Add the β physical layer blockage
information to L P ∈QG .
Step 3. For a quantum port pair (x, y) ∈ G k,r
QG define the f c (x, y) cost function, as

f c (x, y) = γ (x, y) + dL1 (x, y) ,

where γ (x, y) is the real path size from x to y in the multilayer grid structure G k,r
QG of QG, while
dL1 (x, y) is the L1 distance in the grid structure as given by (78).
Step 4. Using L P ∈QG and cost function f c (x, y), apply the A∗ parallel search [27–29] to determine
the lowest cost path P ∗ (x, y).

 
O Nit Nobj |P| log2 |P| . We take into consideration both situations for a comparison.
The complexity of QTAM is given in (54).
The complexity of the methods in terms of the number of iterations, N O , is compared
in Fig. 4. The performance of QTAM is depicted in Fig. 4a, while b, c illustrate the
performances of the NSGA-II and optimized NSGA-II, respectively.
For the comparison, the Nobj parameter is set to Nobj = 5, while for the QTAM
method, Nd is set to Nd = 3.
In the analyzed range, the maximized values of N O are N O (QTAM) ≈ 2 ·
106 , N O (NSGA-II) ≈ 1.25 · 108 , and for the optimized NSGA-II scenario,
N O (NSGA-II) ≈ 2.25 · 106 , respectively. In comparison with NSGA-II, the com-
plexity of QTAM is significantly lower. Note, while the performance of QTAM and
the optimized NSGA-II is closer, QTAM requires no any optimization of the com-
plexity of the non-dominated procedure.

6 Conclusions

The algorithms and methods presented here provide a framework for quantum cir-
cuit designs for near-term gate-model quantum computers. Since our aim was to
define a scheme for present and future quantum computers, the developed algorithms
and methods were tailored for arbitrary-dimensional quantum systems and arbitrary
quantum hardware restrictions. We demonstrated the results through gate-model quan-
tum computer architectures; however, due to the flexibility of the scheme, arbitrary
implementations and input constraints can be integrated into the quantum circuit min-
imization. The objective function that is the subject of the maximization in the method
can also be selected arbitrarily. This allows a flexible implementation to solve any
computational problem for experimental quantum computers with arbitrary hardware
restrictions and development constraints.

123
225 Page 26 of 33 L. Gyongyosi, S. Imre

(a) (b)

(c)
Fig. 4 a The computational complexity (N O : number of operations) of QTAM in function of Nit and |P|,
Nit ∈ [1, 100], |P| ∈ [1, 500]. b The computational complexity of the NSGA-II method in function of
Nit and |P|, Nit ∈ [1, 100], |P| ∈ [1, 500]. c The computational complexity of the optimized NSGA-II in
function of Nit and |P|, Nit ∈ [1, 100], |P| ∈ [1, 500]

Acknowledgements Open access funding provided by Budapest University of Technology and Economics
(BME). This work was partially supported by the European Research Council through the Advanced Fellow
Grant, in part by the Royal Society’s Wolfson Research Merit Award, in part by the Engineering and
Physical Sciences Research Council under Grant EP/L018659/1, by the Hungarian Scientific Research
Fund—OTKA K-112125, and in part by the Engineering and Physical Sciences Research Council under
Grant EP/L018659/1.

Author contributions LGY designed the protocol and wrote the manuscript. LGY and SI analyzed the
results. All authors reviewed the manuscript.

Compliance with ethical standards

Conflict of interest We have no competing financial interests.

Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 Interna-
tional License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution,

123
Quantum circuit design for objective function maximization… Page 27 of 33 225

and reproduction in any medium, provided you give appropriate credit to the original author(s) and the
source, provide a link to the Creative Commons license, and indicate if changes were made.

A Appendix

A.1 Abbreviations

EDA Electronic design automation


IC Integrated circuit
QG Quantum gate
QSPA Quantum shortest path algorithm
QTAM Quantum Triple Annealing Minimization
SA Stimulated annealing
VLSI Very large scale integration

A.2 Notations

The notations of the manuscript are summarized in Table 1.

Table 1 Summary of notations

Notation Description

d Dimension of the quantum system, d = 2 for a qubit system


H Hamiltonian operator
QG Reduced quantum circuit
QG R Reference (non-reduced) quantum circuit
PQG Output distribution of QG
PQG R Output distribution of QG R
n Number of input quantum systems
Fi An ith objective function
s A solution
f (s) The relative performance of a solution s
T Control parameter in the SA method
R Temperature decreasing rate in SA
t Iteration counter for the SA method
k Scaling factor
Tmax Initial temperature in the SA framework
d ( f ), d (g), d (c) Objective, constraint and distribution closeness domination
functions
d̃ ( f ), d̃ (g), d̃ (c) Average values of objective, constraint and distribution
closeness domination functions

123
225 Page 28 of 33 L. Gyongyosi, S. Imre

Table 1 continued
Notation Description

x A vector of design variables


α A vector of weights
Nobj Number of objectives in the optimization procedure
Fs A single-objective function
A QG Quantum circuit area of the QG quantum gate structure

H QG Optimal circuit height of QG
D QG Optimal depth of QG
w QG Total quantum wire area of QG
h Number of nets of the QG circuit
p Number of quantum ports of the QG quantum circuit
considered as sources of a condensate wave function
amplitude
q Number of quantum ports considered as sinks of a condensate
wave function amplitude
i j Length of the quantum wire i j
δi j Effective width of the quantum wire i j
ψi j Condensate wave function amplitude associated with the
quantum wire i j

  = 1 , . . . ,  L
A collection of L parameters 

| A system state of the quantum computer,
 = U L ( L ) , . . . , U1 (1 ) |ϕ, where Ui is an ith unitary
|
that depends on a set of parameters i , while |ϕ is an initial
state
m Total number of measurements in the M measurement block,
m = N M |M|, where N M is the number of measurement
rounds, |M| is the number of measurement gates in the M
measurement block
cs (·) Sum of distribution closeness violation values
D ( · ·) Relative entropy function
dx,y (c) Distribution closeness dominance function for solutions x and y
vic An ith distribution closeness violation value
Nv The number of distribution closeness violation values for a
solution z
gs (·) Sum of all constraint violation values
g
vi An ith constraint violation value
Ng Number of constraint violation values for a solution z
dx,y ( f ) Objective dominance function
Ri Range of an objective i
A Archive
ξ A random solution from A

123
Quantum circuit design for objective function maximization… Page 29 of 33 225

Table 1 continued

Notation Description

ν Parameter, ν =  (ξ ), where  (·) is a moving operator


D P (·) Constrained Pareto dominance checking function
∠ Pareto dominance operator; for ν∠ξ , ξ dominates ν
Nit Total number of iterations
Nd Number of dominance measures
|P| Population size
Nobj Number of objectives
gi An ith quantum gate of QG
gi,k A kth port of the quantum gate gi of the quantum circuit
G k,r
QG A multilayer, k-dimensional n-sized finite square-lattice
base-graph rectilinear grid, where r is the number of layers,
l z , z = 1, . . . , r
l
gi z A quantum gate gi in the zth layer l z of G k,r
QG
l l
z
gi,k A kth port of gi z in G k,r
QG
C (z) Objective function of a computational problem, z is a bitstring
that encodes the state of the quantum circuit
Ci, j Objective function for an edge of G k,r
QG that connects quantum
ports i and j
zi Parameter, z i = ±1
C ∗ (z) Maximized objective function
U Unitary operation of the quantum computer
σx Pauli X -operation
μ Control parameter
γ Single parameter
i j Distance between the quantum ports in G k,r
QG
   

EL  Energy E L   of the Hamiltonian at a system state 


 Separation point in G k,r


QG of the quantum circuit
β A physical layer blockage in the actual layer of the quantum
circuit
P A path between the quantum ports of the quantum circuit
Sv (Pi ) A vertical symmetry axis of a proximity group Pi on QG
x Sv ( Pi ) The x-coordinate of Sv (Pi ).
σi A cell in the grid of the quantum circuit
xi A bottom-left x coordinate of a cell σi in the grid of the
quantum circuit
κi Width of a cell σi in the grid of the quantum circuit
 
σ 1, σ 2 Symmetry pair

123
225 Page 30 of 33 L. Gyongyosi, S. Imre

Table 1 continued

Notation Description

xdF A d-dimensional constraint vector with the symmetry


1
considerations
 
Nσ 1 ,σ 2  Number of σ 1 , σ 2 symmetry pairs in G k,r
QG

Nσ S Number of σ S -type cells in G k,r


QG
Nσ 0 Number of σ 0 -type cells in G k,r
QG
ri Rotation angle of an ith cell σi in G k,r
QG
δi j Effective width of the quantum wire i j in the QG circuit
 
Jmax Tr e f Maximum allowed current density at a given reference
temperature Tr e f
h nom A nominal layer height
δi j Effective width of the quantum wire i j
χϕi j Maximally allowed value for the phase drops
e f f Effective length
 of the quantum wire,
   
e f f ≤ χϕi j δi j /ψi j r0 Tr e f , where r0 Tr e f is a
conductor sheet resistance
i j Distance between the quantum ports in G k,r
QG , where fl is a cost
function between the layers of the multilayer structure of QG
w QG (k) Total quantum wire area of a particular net k of the QG circuit
ψi→ j Condensate wave function amplitude in direction i → j
between the quantum ports
ψ j→i Condensate wave function amplitude in direction j → i
between the quantum ports
ξi→ j Residual condensate wave function amplitude,
   
ξi→ j = φi j − ψi→ j , where φi j = min ψi→ j  , ψ j→i 
ξ̄ j→i Decrement of a current wave function amplitude ψi→ j for a
backward direction, j → i, ξ̄ j→i = −ψi→ j
 j→i A residual quantum wire length for ξ̄ j→i
N Network of QG quantum circuit
NR Residual network of QG quantum circuit
M QG Topological map of the network N
Lc Connection list of N in QG
M̄ QG Topological map of the N R residual network of QG
L̄ c Connection list of the N R residual network of QG
NC̄ Number of C̄ negative cycles in M̄ QG
sn k,i An ith subnet of a net k of the QG quantum circuit
AB F Bellman–Ford algorithm
AK Kruskal algorithm

123
Quantum circuit design for objective function maximization… Page 31 of 33 225

Table 1 continued

Notation Description

T QG Minimum spanning tree


ST QG Set of quantum wires with δi j > 0
δ0 Minimum width can be manufactured physically
dL1 (·) L1-distance function
f c (x, y) A cost function, for a quantum port pair (x, y) ∈ G k,r
QG , defined
as f c (x, y) = γ (x, y) + dL1 (x, y), where γ (x, y) is the real
path size from x to y in the multilayer grid structure G k,r
QG of
QG, while dL1 (x, y) is the L1 distance in the grid structure
A∗ A∗ search algorithm
P ∗ (x, y) A lowest cost path between quantum ports (x, y) ∈ G k,r
QG

References
1. Moore, G.E.: Cramming more components onto integrated circuits. Electronics (1965)
2. Ofek, N., et al.: Extending the lifetime of a quantum bit with error correction in superconducting
circuits. Nature 536, 441–445 (2016)
3. Debnath, S., et al.: Demonstration of a small programmable quantum computer with atomic qubits.
Nature 536, 63–66 (2016)
4. Barends, R., et al.: Superconducting quantum circuits at the surface code threshold for fault tolerance.
Nature 508, 500–503 (2014)
5. Monz, T., et al.: Realization of a scalable Shor algorithm. Science 351, 1068–1070 (2016)
6. DiCarlo, L., et al.: Demonstration of two-qubit algorithms with a superconducting quantum processor.
Nature 460, 240–244 (2009)
7. Higgins, B.L., Berry, D.W., Bartlett, S.D., Wiseman, H.M., Pryde, G.J.: Entanglement-free Heisenberg-
limited phase estimation. Nature 450, 393–396 (2007)
8. Vandersypen, L.M.K., et al.: Experimental realization of Shor’s quantum factoring algorithm using
nuclear magnetic resonance. Nature 414, 883–887 (2001)
9. Gulde, S., et al.: Implementation of the Deutsch–Jozsa algorithm on an ion-trap quantum computer.
Nature 421, 48–50 (2003)
10. IBM.: A new way of thinking: the IBM quantum experience. http://www.research.ibm.com/quantum
(2017)
11. Gyongyosi, L., Imre, S., Nguyen, H.V.: A survey on quantum channel capacities. IEEE Commun. Surv.
Tutorials 99, 1 (2018). https://doi.org/10.1109/COMST.2017.2786748
12. Biamonte, J., et al.: Quantum machine learning. Nature 549, 195–202 (2017)
13. Lloyd, S., Mohseni, M., Rebentrost, P.: Quantum principal component analysis. Nat. Phys. 10, 631
(2014)
14. Sheng, Y.B., Zhou, L.: Distributed secure quantum machine learning. Science 62, 1025–2019 (2017)
15. Kimble, H.J.: The quantum Internet. Nature 453, 1023–1030 (2008)
16. Farhi, E., Neven, H.: Classification with Quantum Neural Networks on Near Term Processors.
arXiv:1802.06002v1 (2018)
17. Farhi, E., Goldstone, J., Gutmann, S., Neven, H.: Quantum Algorithms for Fixed Qubit Architectures.
arXiv:1703.06199v1 (2017)
18. Farhi, E., Goldstone, J., Gutmann, S.: A Quantum Approximate Optimization Algorithm.
arXiv:1411.4028 (2014)
19. Farhi, E., Goldstone, J., Gutmann, S.: A Quantum Approximate Optimization Algorithm Applied to a
Bounded Occurrence Constraint Problem. arXiv:1412.6062 (2014)
20. Farhi, E., Harrow, A.W.: Quantum Supremacy Through the Quantum Approximate Optimization Algo-
rithm. arxiv:1602.07674 (2016)

123
225 Page 32 of 33 L. Gyongyosi, S. Imre

21. Lloyd, S., Shapiro, J.H., Wong, F.N.C., Kumar, P., Shahriar, S.M., Yuen, H.P.: Infrastructure for the
quantum Internet. ACM SIGCOMM Comput. Commun. Rev. 34, 9–20 (2004)
22. Van Meter, R.: Quantum Networking. Wiley (2014). ISBN 1118648927, 9781118648926
23. Gyongyosi, L., Imre, S.: Advanced Quantum Communications—An Engineering Approach. Wiley-
IEEE Press, Hoboken (2012)
24. Lloyd, S. Mohseni, M., Rebentrost, P.: Quantum algorithms for supervised and unsupervised machine
learning. arXiv:1307.0411 (2013)
25. Pirandola, S., Laurenza, R., Ottaviani, C., Banchi, L.: Fundamental limits of repeaterless quantum
communications. Nat. Commun. 8, 15043 (2017)
26. Pirandola, S., Braunstein, S.L., Laurenza, R., Ottaviani, C., Cope, T.P.W., Spedalieri, G., Banchi, L.:
Theory of channel simulation and bounds for private communication. Quantum Sci. Technol. 3, 035009
(2018)
27. Martins, R., Lourenco, N., Horta, N.: Analog Integrated Circuit Design Automation. Springer (2017).
ISBN 978-3-319-34059-3, ISBN 978-3-319-34060-9
28. Martins, R., Lourenco, N., Horta, N.: Multi-objective optimization of analog integrated circuit place-
ment hierarchy in absolute coordinates. Expert Syst. Appl. 42(23), 9137–9151 (2015)
29. Martins, R., Povoa, R., Lourenco, N., Horta, N.: Current-flow & current-density-aware multiobjective
optimization of analog IC placement. Integr. VLSI J. (2016)
30. Bandyopadhyay, S., Saha, S., Maulik, U., Deb, K.: A simulated annealing-based multiobjective opti-
mization algorithm: AMOSA. IEEE Trans. Evol. Comput. 12(3), 269–283 (2008)
31. Suman, B., Kumar, P.: A survey of simulated annealing as a tool for single and multiobjective opti-
mization. J. Oper. Res. Soc. 57, 1143–1160 (2006)
32. Jiang, I., Chang, H.Y., Chang, C.L.: WiT: optimal wiring topology for electromigration avoidance.
IEEE Trans. Very Large Scale Integr. Syst. 20(4), 581–592 (2012)
33. Rocha, F.A.E.R.M., Martins, F., Lourenco, N.C.C., Horta, N.C.G.: Electronic Design Automation of
Analog ICs, Combining Gradient Models with Multi-Objective Evolutionary Algorithms. Springer,
Heidelberg (2014)
34. Perkowski, M., Lukac, M., Kerntopf, P., Pivtoraiko, M., Folgheraiter, M., Choi, Y.W., Jung-wook,
K., Lee, D., Hwangbo, W., Kim, H.: A hierarchical approach to computer-aided design of quantum
circuits. Electrical and Computer Engineering Faculty Publications and Presentations 228 (2003)
35. Bravyi, S., Browne, D., Calpin, P., Campbell, E., Gosset, D., Howard, M.: Simulation of quantum
circuits by low-rank stabilizer decompositions. arXiv:1808.00128 (2018)
36. Munoz-Coreas, E., Thapliyal, H.: Quantum circuit design of a T-count optimized integer multiplier.
IEEE Trans. Comput. (2018). https://doi.org/10.1109/TC.2018.2882774
37. Gosset, D., Kliuchnikov, V., Mosca, M., Russo, V.: An algorithm for the t-count. Quantum Inf. Comput.
14(15–16), 1261–1276 (2014)
38. Thapliyal, H., Munoz-Coreas, E., Varun, T.S.S., Humble, T.S.: Quantum circuit designs of integer
division optimizing T-count and T-depth. arXiv:1809.09732 (2018)
39. Jamal, L., Babu, H.M.H.: Efficient approaches to design a reversible floating point divider. In: 2013
IEEE International Symposium on Circuits and Systems (ISCAS2013), pp. 3004–3007 (2013)
40. Zhou, X., Leung, D.W., Chuang, I.L.: Methodology for quantum logic gate construction. Phys. Rev.
A 62, 052316 (2000)
41. Gottesman, D., Chuang, I.L.: Quantum teleportation is a universal computational primitive. Nature
402, 390–393 (1999)
42. Amy, M., Maslov, D., Mosca, M., Roetteler, M.: A meet-in-the middle algorithm for fast synthesis of
depth-optimal quantum circuits. IEEE Trans. Comput. Aided Des. Integr. Circuits Syst. 32(6), 818–830
(2013)
43. Paler, A., Polian, I., Nemoto, K., Devitt, S.J.: Fault-tolerant, high level quantum circuits: form, com-
pilation and description. Quantum Sci. Technol. 2(2), 025003 (2017)
44. Brandao, F.G.S.L., Broughton, M., Farhi, E., Gutmann, S., Neven, H.: For fixed control parameters
the quantum approximate optimization algorithm’s objective function value concentrates for typical
instances. arXiv:1812.04170 (2018)
45. Zhou, L., Wang, S.-T., Choi, S., Pichler, H., Lukin, M.D.: Quantum approximate optimization algo-
rithm: performance, mechanism, and implementation on near-term devices. arXiv:1812.01041 (2018)
46. Lechner, W.: Quantum approximate optimization with parallelizable gates. arXiv:1802.01157v2 (2018)
47. Crooks, G.E.: Performance of the quantum approximate optimization algorithm on the maximum cut
problem. arXiv:1811.08419 (2018)

123
Quantum circuit design for objective function maximization… Page 33 of 33 225

48. Goemans, M.X., Williamson, D.P.: Improved approximation algorithms for maximum cut and satisfi-
ability problems using semidefinite programming. J. ACM 42, 1115 (1995)
49. Ho, W.W., Jonay, C., Hsieh, T.H.: ultrafast state preparation via the quantum approximate optimization
algorithm with long range interactions. arXiv:1810.04817 (2018)
50. Song, C., et al.: 10-Qubit entanglement and parallel logic operations with a superconducting circuit.
Phys. Rev. Lett. 119(18), 180511 (2017)
51. Preskill, J.: Quantum computing in the NISQ era and beyond. Quantum 2, 79 (2018)
52. Harrow, A.W., Montanaro, A.: Quantum computational supremacy. Nature 549, 203–209 (2017)
53. Aaronson, S., Chen, L.: Complexity-theoretic foundations of quantum supremacy experiments. In:
Proceedings of the 32nd Computational Complexity Conference, CCC ’17, pp. 22:1–22:67 (2017)
54. Gyongyosi, L., Imre, S.: A survey on quantum computing technology. In: Computer Science Review.
Elsevier (2018). https://doi.org/10.1016/j.cosrev.2018.11.002. ISSN: 1574-0137
55. Deb, K., Pratap, A., Agarwal, S., Meyarivan, T.: A fast and elitist multiobjective genetic algorithm:
NSGA-II. IEEE Trans. Evol. Comput. 6(2), 182–197 (2002)

Publisher’s Note Springer Nature remains neutral with regard to jurisdictional claims in published maps
and institutional affiliations.

123

You might also like