Next Article in Journal
Explainable Deep-Learning-Based Depression Modeling of Elderly Community after COVID-19 Pandemic
Next Article in Special Issue
Resources Relocation Support Strategy Based on a Modified Genetic Algorithm for Bike-Sharing Systems
Previous Article in Journal
An Exploration of Architectural Design Factors with a Consideration of Natural Aspects Based on Web Crawling and Text Mining
Previous Article in Special Issue
Speeding Up Semantic Instance Segmentation by Using Motion Information
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Development of Evolutionary Systems Based on Quantum Petri Nets

by
Tiberiu Stefan Letia
*,
Elenita Maria Durla-Pasca
,
Dahlia Al-Janabi
and
Octavian Petru Cuibus
Department of Automation, Technical University of Cluj-Napoca, 400114 Cluj-Napoca, Romania
*
Author to whom correspondence should be addressed.
Mathematics 2022, 10(23), 4404; https://doi.org/10.3390/math10234404
Submission received: 17 August 2022 / Revised: 12 November 2022 / Accepted: 16 November 2022 / Published: 22 November 2022
(This article belongs to the Special Issue Information Theory Applied in Scientific Computing)

Abstract

:
Evolutionary systems (ES) include software applications that solve problems using heuristic methods instead of the deterministic ones. The classical computing used for ES development involves random methods to improve different kinds of genomes. The mappings of these genomes lead to individuals that correspond to the searched solutions. The individual evaluations by simulations serve for the improvement of their genotypes. Quantum computations, unlike the classical computations, can describe and simulate a large set of individuals simultaneously. This feature is used to diminish the time for finding the solutions. Quantum Petri Nets (QPNs) can model dynamical systems with probabilistic features that make them appropriate for the development of ES. Some examples of ES applications using the QPNs are given to show the benefits of the current approach. The current research solves quantum evolutionary problems using quantum genetic algorithms conceived and improved based on QPN. They were tested on a dynamic system using a Quantum Discrete Controlled Walker (QDCW).

1. Introduction

The current research concerns applications, such as urban vehicle traffic, airplane traffic, weather, markets, electric power networks, fluids networks, telecommunications and data transmission, etc., that have stochastic behaviors. There are some entities that have to be controlled or managed to behave according to the required specifications.
Quantum computers have different capabilities compared to classical computers and their use should cover the domains where these differences would lead to significant benefits. The authors of [1] review the quantum algorithms that have been discovered and reveal their features that outperform classical algorithms.
According to [2], tools are needed to create and debug quantum computers and their programs. These tools can help to elucidate hidden issues and drive towards design with the best chance for overall success.
The current approach developed methods that can sustain the heuristic search of evaluated solutions that exceed specified thresholds. The previously conceived ES methods are modified according to the features provided by the quantum algorithms.
The general objective in simulating a quantum system is to determine its structure or behavior, given knowledge of its components and the environment in which it exists.
In [2] the quantum computers are partitioned in three categories:
  • Analogue quantum computers that directly manipulate the interactions between qubits without breaking the operations in logic gates.
  • Digital noisy intermediate-scale quantum computers that use primitive gate operations on physical qubits.
  • Fully error-corrected quantum computers that enable noisy physical qubits to emulate stable logical qubits.
The QPNs (Quantum Petri Nets) can be used to model the quantum software applications, to analyze their structure and to verify their behaviors [3]. After the simulations of the QPN models, the implementation of the quantum applications is expected to be achieved (compiled) without difficulties.
This article shows the links between quantum algorithms and their corresponding QPN models. These can sustain the quantum processor configuration and quantum program conception, verification and debugging.
The two directions for solving the problems concern the contraption of methods that use quantum computation methods implemented on classical computers and to create new concepts that allow the finding of the ES solutions using the quantum computers.

1.1. Current Research State of the Field

1.1.1. Quantum Algorithms

Quantum Computing (QC) is recommended to be used in applications where it outperforms the classical computation. Some reviews ([4,5]) present as main QC directions: breaking cryptosystems [6], unstructured search problems, finding accurate approximate solutions to optimization problems, finding the minimum of an unsorted list of integers, determining a graph connectivity, solving linear equations, quantum annealing, etc.
The search in an unstructured database is obtained in [7] using a function F ( x ) , x X = { 0 , 1 , , ( n 1 ) } , with F ( x ) = 0 , for x X , x j where F ( j ) = 1 . The problem consists of finding j. The exponential speedup of the search compared to the classical computation is an undoubted benefit.
Shor’s algorithm solves the factorization problem [8]. It is given F ( x ) = a x m o d N with a R , 1 < a < N . The request is the finding of the smallest integer r such that a r m o d N = 1 . Again, the algorithm’s exponential search determines its use in many applications, such as the use of QC in cryptography [6,9].
The inverse transform of a matrix introduced in [10] is used for solving linear equations of the form A · x = b , where A is a Hermitean N × N matrix and b a given unit vector. QC solves such problems that appear in many practical applications with exponential speedup.
Hybrid methods involving quantum and classical computers can be used as Variational Quantum Eigensolver [11,12]. The eigenvalues and eigenvectors of a Hamiltonian are used to transform a system iteratively to a desired specified one.
Quantum annealing is an optimization method for combinatorial problems where the superposition is used for avoiding the focalization in local minimums [13].
Quantum walk opens ways for algorithm construction that solves search problems on a graph [14].
According to [15], the classical random walk concept has been used as a computational framework for designing classical algorithms for complex problems, while quantum variants provide a speed-up in computational power for various algorithms with distinct elements in spatial search or graph connectivity. A quantum walker following a unitary operation for evolution is named a unitary quantum walker, while one that does not meet this condition is a non-unitary quantum walker. The non-unitary evolution of a quantum system is implemented/defined by adding some qubits to the quantum system followed by a unitary transformation. The result is obtained by discarding the extra qubits. Both kinds of walker have benefits in practical applications.
An example is the optimization of a search based on random walks that require the reduction of the number of necessary repetitions [16,17].
Some quantum walker approaches tackle the Quantum Discrete Random Walkers (QDRWs) in an infinite space or finite space [18]. Other researchers studied the quantum continuous random walkers (in an infinite space) [19,20]. They are widely used in practical applications [5]. An application of quantum discrete walker ranking in grid nodes is given in [21].
The reference [22] contains some variants of Quantum Discrete Walker (QRW) approaches and different variants of generalized coin tossing. In [23], two entangled coins were used to control the walker’s move in a one-dimension space.
One goal in walker problems is the reducing of the hitting time and the diminishing of mixing time [24].
Quantum walk can be used for search of element distinctness (e.g., find two equal elements) [25].
The comprehensive review [26] divides the quantum walker approaches as Schrodinger and combinatorial. To be noted is the decoherence definition as a physical phenomenon that typically arises from the interaction of quantum systems and their environment. This interaction can be used for quantum process control as it will be seen further for controlling the walker moves.
Quantum Approximate Optimization Algorithm (QAOA) uses the mapping of the objective function to Hamiltonian that brings the problem into Hilbert space [27,28,29]. The expectation value of the Hamiltonian is improved by using quantum mechanical techniques in the Hilbert space. QAOA can be extended by adding constraints. A relevant problem is the so called MaxCut where a graph G = ( V , E ) with V vertices and E edges has to be cut in such a manner that it maximizes the number of edges crossing the cut.
In conclusion, the main quantum walk research directions and their practical applications focus on the hitting times, the quantum amplification control and the marked element detection.

1.1.2. Evolutionary Systems

Evolutionary Algorithms (EAs) are applied to problems where pure stochastic algorithms fail or find it difficult to solve due to the high number of dimensions or function complexities [30]. Their main utilizations cover the domains of variable optimization, new structural design and improvement. EAs include: evolutionary strategies, genetic algorithms, genetic programming, genetic improvement, grammatical evolution, linear genetic programming, Cartesian genetic programming, differential evolution and gene expression evolution.
The evolutionary systems implemented on classical computers are often used for solving problems concerning:
  • Combinatorial requirements,
  • Optimization of system parameters,
  • Dynamic behavior optimizations,
  • Algorithm synthesis such as for controlling plants or for reacting to events produced by their environments.
Related to the use of QC in EA, some questions arise: What are the benefits of using QC in EA? What are the modifications required for application of QC in EA? Where and how can Quantum Evolutionary Algorithms (QEAs) be applied in practical applications? References [31,32] offer some answers to these.
The use of QC in EAs led to three main development directions: quantum inspired evolutionary algorithms ([33,34,35,36,37,38,39,40,41,42,43,44,45,46]), quantum evolutionary algorithms ([47,48,49,50,51,52,53]) and hybrid quantum-classic evolutionary algorithms ([54,55,56]).
Successfully detailed implementations at the Quantum Logic Circuit (QLC) level are developed and deeply analyzed in [57,58].
Some QEA used animal behaviors for searching the solutions [39,59,60]. Remarkable are the characteristics of the systems that can be approached: they could have various complexities, including non-linear, non-convex, multi-modality, non-differentiable functions and large-scale dimensionality.
Quantum control based on machine learning in an open quantum system is another direction of QC application development [61].
Closest to the view point of quantum state superposition, created by QC, is the Particle Swarm Optimization (PSO) method [62].
Analyzing the QEAs, it can be concluded that the genotypes are coded based on the quantum superposition fulfilling the Hilbert condition. The genotypes are initialized to meet some diversity requirements and covering the search domain. The individual (i.e., genotypes) are improved using unitary transformation matrix. The individual improvements can be based on a single (usually the best) individual or combining features from two individuals (i.e., crossover). Some evolution methods need genotype (or individual) repair mechanisms. There are improvements consisting of the search step adaptations, usually related to the generation iterations. It is difficult to prove the benefits of using the quantum vector representation instead of classical ones. There would be clear benefits if it can be proved that the number of searches and evaluations is smaller in the case of quantum description. The comparisons based on experiments of different QEA methods for solving particular problems can be supposed to be biased to particular characteristics.
The approaches of discrete oriented quantum random walker problems were used to show the benefits of the QPN models.
As our main contributions should be mentioned: the manner of QPN definition, their properties, analysis and verification methods. The Quantum Genetic Algorithms (QGAs) were adapted using the QPNs. They were experimented and tested on a dynamic system. A new kind of quantum discrete random walker model, based on QPN, was used for testing the QGAs. A new quantum fitness method was conceived for this purpose.

2. Materials and Methods

2.1. Quantum State versus Classical State

The classical bits take values in the domain { 0 , 1 } . They are used to compose the digital information. A number of r bits can cover a domain of 2 r values.
The quantum replacement of the classical bit is the qubit denoted here | b k : | b k = α k | 0 + β k | 1 where the complex numbers α k and β k satisfy the relation | α k | 2 + | β k | 2 = 1 and | 0 , | 1 represent their quantum state.
The qubit can be represented on Bloch sphere (Figure 1). It can be described using the angles by the relation:
| ψ = α | 0 + β | 1 = cos θ 2 | 0 + sin θ 2 e j ϕ | 1 ,
with θ [ 0 , π ] and ϕ [ 0 , 2 π ] .
Joining a number of g qubits leads to a quantum register modeled by qubit vectors of the form:
V = [ ( α 0 , β 0 ) , ( α 1 , β 1 ) , , ( α g 1 , β g 1 ) ] .
The initialization and measurement (i.e., collapse) in quantum computers are performed on qubits. These refer to the V vectors.
The qubits (similar to the bits) can be coded at the computational level by state vectors. The content of a register composed of g (length) qubits can store information using 2 g state vectors from the set Q = { | q 0 , | q 1 , , | q r 1 } with r = 2 g . These vectors compose a system of axes used for representing the data in quantum computation.
A quantum register content can be described by the superposed state vector | ψ in a Hilbert space ( H ) at the computational base:
| ψ = k = 0 r 1 c k | q k ,
with c k ; i = 0 , , r 1 complex numbers from the set C fulfilling the relation: k = 0 r 1 | c k | 2 = 1 . These coefficients are named amplitudes and they represent the probability distribution of the quantum state. The value | c k | 2 provides the probability of the quantum process to be in the quantum state | q k . This conception of storing the quantum information based on the quantum state amplitudes (i.e., the coefficients c i ) can sustain the opposite behavior manners named quantum interference.
In conclusion, the Hilbert space H q has the base | q i : i = 0 , 1 , , r 1 spanning in H q = s p a n { | q i : i = 0 , 1 , , r 1 } .
Let | ψ 1 = i = 0 r 1 c i 1 | q i and | ψ 2 be two vectors in Hilbert space. Then:
| ψ 2 = A | ψ 1 = A i = 0 r 1 c i 1 | q i = i = 0 r 1 c i 1 A | q i .
A is a matrix that generates transformation of superposed quantum state. A A = A A = I , where A is the conjugate transpose of A. A is a so-called unitary matrix. This property of A grants that the transformation C 2 T = A · C 1 T with C i = [ c 0 i , c 1 i , , c r i ] , ( i = 1 , 2 ) is a valid one.
While | ψ requires 2 g complex coefficients, V involves only 2 g complex coefficients. These coefficients are linked by the relations:
| q 0 = | 00 00 ; c 0 = α 0 α 1 α g 1 , | q 1 = | 00 01 ; c 1 = β 0 α 1 α g 1 , | q r 1 = | 11 11 ; c r 1 = β 0 β 1 β g 1 .
The conversion of V to Ψ can always be performed, while the reversal (i.e., from Ψ to V) can be done only for some particular (pure) states.

2.2. Quantum Systems versus Classic Dynamic Systems

Let | ψ x = k = 0 r 1 c k x | q k be a quantum vector and x = [ x 0 , x 1 , , x r 1 ] T a vector with real number elements in the classic system theory. The relation between the quantum vector and the classic vector is set in the current approach by | c k x | 2 = x k for all k = 0 , 1 , , r 1 . As it can be seen, the values x k ( k = 0 , 1 , , r 1 ) correspond to the system probabilities to be in the quantum states | q k ( k = 0 , 1 , , r 1 ).
Denoting with X ( τ ) = [ c 0 x , c 1 x , , c 7 x ] T the vector provided by | ψ x at a discrete time τ , a classic dynamic system can be described by X ( τ + 1 ) = U · X ( τ ) . If U is a unitary matrix, the walker’s position, provided by X, remains in Hilbert space (i.e., on the circle domain).
If | ψ o = k = 0 1 c k o | q k is a Hilbert vector, then | ψ x o = | ψ o | ψ x is a Hilbert vector as well that extends the position with the entity orientation.
A quantum system | ψ x ( τ + 1 ) = A · | ψ x ( τ ) can model an un-oriented walker, while ψ x o ( τ + 1 ) = A o · ψ x o ( τ ) can model an oriented one. The un-oriented walker has the state | ψ x equivalent to X, while the oriented walker has the state | ψ x o equivalent to ( c 0 o , c 1 o , X ) . The matrices A and A o have to be unitary for the walker system to remain in the Hilbert space.

2.3. Quantum Computation

Unlike the classical computation that uses logical gates, the processing of quantum information is performed by quantum processors composed of quantum logical gates. A quantum logic gate acting on a qubit is a 2 × 2 matrix. For example, the Hadamard (or diffusion) matrix:
H = 1 2 1 1 1 1 ,
acting on the qubit | b = α | 0 + β | 1 , provides | b = 1 2 ( α + β ) | 0 + 1 2 ( α β ) | 1 that verifies the quantum coefficients (i.e., Hilbert) condition.
A single quantum logic gate acts on a qubit, while multiple quantum gates, composing a quantum logic circuit act on a register (vector) of qubits, performing an operation of the form | ψ = A | ψ . Any such transformation of information has to fulfill the quantum coefficient condition that is met if the corresponding matrix A is unitary.
According to [63], a single qubit quantum gate can be applied to a register of r qubits on a single qubit of a quantum vector. If the qubit is in the k position, the full quantum gate matrix H is described by:
A k = j = 0 r 1 H , if j = k I , otherwise ,
where I is the identity matrix.
For g = 3 qubits ( | b 0 , | b 1 , | b 2 ), the application of H on the middle qubit leads to the matrix A 1 = I H I which is a matrix of 8 × 8 size.
Figure 2 represents a quantum logic circuit that acts on a vector, composed of 3 qubits, performing an increment operation detailed by the AND and exclusive OR operations.

2.4. Quantum Petri Nets

A quantum program involves modifications of the information stored in a set of quantum registers by the quantum gate circuits that link them. This can be modeled by Quantum Petri Nets (QPNs) [3]. Figure 3 shows an example of a QPN model that is used for their definition.
Other QPN formal definitions and modeling methods can be found in [64,65]. These show the connections between Petri nets, quantum physics and category theory. The monoidal categories are used for constructing a net theory. In [65], the definitions of QPNs were enriched with formal construction of the reachability graphs.
Figure 4 shows a QPN modeling a quantum logic circuit that sequentially applies the mappings (i.e., gate operations) A 1 , A 2 , A 3 to the qubits | b 0 , | b 1 and | b 2 , respectively, performing the operations | ψ 4 = A 3 · | ψ 3 = A 3 · A 2 · | ψ 2 = A 3 · A 2 · A 1 · | ψ 1 .
For the QPNs (see Figure 4), the following notations and concepts are used:
  • N = ( P , T , F ) is a net with two kinds of disjoint node sets,
  • a finite place set P = { p 0 , p 1 , . . . , p m 1 } , ( m 0 ) ,
  • a finite transition set T = { t 0 , t 1 , . . . , t n 1 } , ( n 0 ) ,
  • F P × T T × P is the flow relation,
  • t = { p P | ( p , t ) F } describes the transition t input place set,
  • t = { p P | ( t , p ) F } describes the transition t output place set.
QPN model shown in Figure 4 corresponds to QLC represented in Figure 2 if the following relations are added.
The Toffoli (CCNOT) gate that is applied to the 3 qubits has the correspondent matrix operator:
A 1 = 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 .
The matrix operator for CNOT gate applied to the two qubits is:
A 2 = 1 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 .
The NOT (Pauli-X) gate matrix operator, applied to last one qubit is:
A 3 = 0 1 1 0 .
The last two matrices are transformed, using the relation (7), resulting the mappings assigned to transitions:
A 2 = 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1
and
A 3 = 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 .
There are two referential systems denoted by V and Ψ that store in parallel the information in the QPN places. The quantum logic circuits (i.e., the mappings m a p V ) act on the V level (i.e., qubit registers) modifying the coefficient values V = [ ( α 0 , β 0 ) , ( α 1 , β 1 ) , , ( α g 1 , β g 1 ) ] , while the mappings m a p Ψ act at the Ψ (computational) level modifying the amplitudes [ c 0 , c 1 , , c r 1 ] . For each value V there is the transformation (5) denoted by T that converts the V vector in | ψ = T ( V ) vector. For some pure states of | ψ the transformation and the revers transformation (conversion) V = T 1 ( | ψ ) can be performed.
Some quantum algorithms use and have defined mapping m a p Ψ , even if at the low level they are implemented by mappings on quantum logic circuits (QLC). This requires the synthesis of QLCs that perform the mappings m a p Ψ . Other quantum algorithms have defined operations only at the qubit level. The conversion from V to Ψ is always defined by the transformation of the type T .
Related to QPN states, the following are specified:
  • Any place p s P has assigned a pair of natural numbers ( g s , r s ) , with r s = 2 g s specifying the dimensions of the tokens (i.e., vectors) | ψ s and V s , respectively,
  • Q = { | q 0 , | q 1 , , | q r 1 } is the place quantum state set,
  • | ψ s = l = 0 r 1 c l s | q l is the first part of the token that can be set in a place p s ;
  • V s = [ ( α 0 s , β 0 s ) , ( α 1 s , β 1 s ) , , ( α g 1 s , β g 1 s ) ] is the second part of the token set in the place  p s ,
  • The marking of a place p s is Q M ( p s ) = [ | ψ s , V s ] ,
  • When the token is missing in a place p, the place marking is Q M ( p ) = ϕ (i.e., the empty set meaning nothing or the lack of information);
  • The system quantum superposed state QS is
    Q S = [ Q M ( p 0 ) , Q M ( p 1 ) , , Q M ( p m 1 ) ]
    and it is given by
    Q S = [ | ψ 0 , | ψ 1 , , | ψ m 1 ] ,
    or
    Q S = [ V 0 , V 1 , , V m 1 ] .

2.5. Transition Admissibility and Execution

The QPN places can store two kinds of tokens (V token and Ψ token) and its transitions can execute two kinds of mappings ( m a p V and m a p Ψ ) depending on the available tokens in their input places.
Any output arc ( t k , p v ) F of a transition t k has assigned a mapping denoted m a p Ψ k v ( , | ψ j , ) , and a mapping m a p V k v ( , V j , ) with | ψ j and V j tokens in Q M ( p j ) , p j t k that transforms the information stored in its input places (i.e., Hilbert and V vectors) and sets the new token (i.e., | ψ and V vectors) in its output place p v t k according to:
| ψ v = m a p Ψ k v ( | ψ i , | ψ j ) ; p i , p j t k
or its counterpart
V v = m a p V k v ( V i , V j ) .
When one of them is missing, the Equation (5) is used for transformation.
A transition is enabled for the execution of its assigned m a p V and/or m a p Ψ mappings if and only if it has in its input places the corresponding V / Ψ tokens, respectively.
The execution of an enabled transition mapping involves the atomic logical extraction of the tokens from its input places and the injection of the tokens in its output places. When a m a p V mapping is executed, it is followed by the conversion and set of the | ψ = T ( V ) tokens in the output places if the m a p Ψ mapping is not available or allowed.
An enabled transition  t k is executed at a moment in the time interval ( 0 , d k ) with 0 and d k real numbers; where d k is a very short estimated (specified) moment in time.
The start and the end of a quantum program involve:
  • init, a method that initializes the places with quantum vectors with amplitudes from the matrix C S 0
    Q S 0 = i n i t ( C S 0 ) ,
    with C S 0 an environment matrix of QS size and complex elements fulfilling the Hilbert space condition;
  • end, a method that stops the quantum process by collapsing the current QS, extracts the information from places (i.e., the final state Q S f ) and sets it to an environment matrix C S f
    C S f = e n d ( Q S f ) ,
    where C S f is a matrix of g · m size with the elements in { 0 , 1 } .

2.6. Definition of QPNs

The definition of Q P N is:
Q P N = ( N , D , G , M a p , Q M 0 , i n i t , e n d , Q M f ) ,
where:
  • N = (P, T, F) is a net;
  • D = [ d 0 , d 1 , , d n 1 ] is a vector containing the maximum estimated delays assigned to transitions;
  • G = [ g 0 , g 1 , , g m 1 ] is a vector containing the sizes of the vectors ( V i , i = 0 , 1 , , m 1 ) set in the corresponding places;
  • M a p is the set of mappings (i.e., pair ( m a p Ψ k v ( ) , m a p V k v ( ) ) ) assigned to arcs linking the transitions with places; when one of them is missing, it is denoted by n u l l ,
  • Q M 0 is a matrix with initialized values (i.e., the initial quantum superposed states);
  • init is the initialization method;
  • end is the stop method;
  • Q M f is a matrix storing the values of the final quantum superposed state (i.e., the result matrix).
There are some differences concerning the QPNs related to classical PNs:
  • The same token set in a place can be used for enabling and execution of more than one transition.
  • There are non-reversible transitions (that correspond to non-reversible quantum logic circuit) and reversible transitions that correspond to reversible quantum logic gates.
  • Once a non-reversible transition is executed (it extracts the tokens from its input place set), no further transition can be enabled with the extracted tokens.
  • The transition assessment is performed in iterations that have no duration.
  • When some transitions are enabled, they are executed even if the tokens from their input place sets have already disappeared.
  • If more than one transition set tokens concurrently (simultaneously) in a place, this situation leads to conflict and has to be avoided.

2.7. Analysis and Verification of QPN Models

The need of the analysis and the verification of the quantum programs behaviors is obviously in the development process, as it is known from many procedures. Petri nets can sustain these by some popular methods. In the current approach, Petri nets-based language and the reachability graphs are used.

2.7.1. Petri Net Based Language

Using the notations: ‘*’ for sequence, ‘+’ for alternative, ‘&’ for concurrence and ‘#’ for closing a loop, the behavior of a PN can be described. For example:
  • t 1 t 2 describes the sequential execution of the transitions t 1 and t 2 ;
  • t 1 + t 2 describes the alternative for execution of the transition t 1 or t 2 ;
  • t 1 & t 2 = t 1 t 2 + t 2 t 1 describes the concurrent execution;
  • ( t 1 t 2 ) # t 3 describes a loop σ = ( t 1 t 2 t 3 ) σ .
Details of their use are provided in [3].

2.7.2. Reachability Graphs

In [3] were used the reachabilty graphs that include the states and the transitions that lead to them. Some transitions are concurrently executed, changing the system states simultaneously. Some examples of their use are provided further.

2.8. QPN Model Examples

2.8.1. Reversible Transitions and Entangled Places

Figure 5 displays a QPN model that could execute a sequence σ = t 1 t 2 of two reversible transitions. A reversible transition should be accepted to become initially enabled even if the token in one of its input places is missing (denoted here by ϕ ).
The transition t 1 concurrently executes the relations:
| ψ 2 = A 1 | ψ 1 , | ψ 1 = | ψ 1 , if Q M ( p 2 ) = ϕ , A 1 1 | ψ 2 , otherwise ,
where the unitary matrices A 1 and A 1 1 fulfill the relation A 1 · A 1 1 = I .
After t 1 , the transition t 2 concurrently executes the relations:
| ψ 3 = A 2 | ψ 2 , | ψ 2 = | ψ 2 , if Q M ( p 3 ) = ϕ , A 2 1 | ψ 3 , otherwise ,
where the unitary matrices A 2 and A 2 1 fulfill the relation A 2 · A 2 1 = I .
The places p 1 and p 3 are entangled, if the transitions t 1 and t 2 are assigned with d 1 = 0 and d 2 = 0 (i.e., zero delays). These lead to instantaneous maintenance of the relations | ψ 3 = A 2 · A 1 | ψ 1 and | ψ 1 = A 1 1 · A 2 1 | ψ 3 .

2.8.2. Qubit Rotations and While Loops

The QPN shown in Figure 6 describes the rotation of the qubit | q 0 stored in the place p 0 by the mapping assigned to t 0 . The rotation with an angle θ can be determined using the circle representation displayed on Figure 7. Supposing that the rotation angle is given by a qubit | q = α | 0 + β | 1 , the angle θ is given by θ = arcsin ( β ) = arccos ( α ) . Performing this calculus offline, the mapping assigned to t 0 that achieves the rotation is:
A 1 ( θ ) = c o s ( θ ) s i n ( θ ) s i n ( θ ) c o s ( θ ) .
The repetition of the loop until a specified state is achieved, is a more difficult task. In the current proposal the method introduced by [66] is considered to be used. As a consequence, it is supposed that a loop can be admittedly executed with a specified robustness. The measurement performed at each iteration, for predicate condition of exiting the loop, diminishes the qubits state with a value smaller than a specified and accepted one.
The QPN model displayed in Figure 6 executes the sequence:
σ = t 0 ( t 1 & t 2 ) σ .
The while loop is determined by t 1 that executes:
t 1 : IF Q M ( p 1 ) > ϵ THEN | ψ 0 = A 1 | ψ 1 END .
This involves the weak measurement of | ψ 1 (see details in [66]) that ends the loop execution when the condition is not met.
The QPN example displayed in Figure 8 corresponds to a mapping that rotates the qubit | q o = α o | 0 + β o | 1 stored in the place p 0 with an angle given by the control qubit | q c = α c | 0 + β c | 1 stored in the place p 1 , resulting the qubit | q r = α r | 0 + β r | 1 injected in the place p 2 . This requires the synthesis of a QLC that performs the unitary transformation ( α r , β r ) = m a p ( ( α 0 , β 0 ) , ( α c , β c ) ) .
Let be the above m a p ( . , . ) given by A 1 ( θ ) defined in (21) with θ = arctan ( β c α c ) . This sets in p 2 the result of the rotation of | q 0 according to the amplitudes of | q c .
Another possibility to implement the model displayed in Figure 8 is to assign the vectors | ψ 0 , | ψ 1 and | ψ 2 to the QPN places. If the mapping assigned to transition t 0 is | ψ 2 = | ψ 0 | ψ 1 , this manner of multiplication leads to increasing the dimension of the vector set in p 2 to 2 g 2 = 2 g 0 · 2 g 1 .
If g 1 = 1 , then the mapping can be correctly defined by | ψ 2 = M + · ( A 1 ( θ ) I · | ψ 0 ) , where I is the corresponding identity matrix. M + can be defined to perform an increment circular shift:
M + = 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 · · · · · · · · · · · · · · 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 .
Similarly, a matrix M can be defined, which performs a decrement circular shift.
The problem can be extended for the case when g 1 = 2 and the previous places model vectors of qubits. If A 1 ( θ 0 ) and A 1 ( θ 1 ) ) perform the rotations of two independent qubits, the matrix:
A 2 ( θ 0 , θ 1 ) = A 1 ( θ 0 ) 0 0 A 1 ( θ 1 ) ,
achieves the rotation of a quantum vector (i.e., register) of two qubits.

2.8.3. Quantum Discrete Random Walker on a Circle

The chosen examples concern the Quantum Discrete Random Walker (QDRW) that moves on a circle or on a sphere (see Figure 9). They can be oriented or un-oriented. The specified 8 discrete positions on the circle can be coded with three qubits composing a vector V = [ ( α 0 , β 0 ) , ( α 1 , β 1 ) , ( α 2 , β 2 ) ] or by referring to the quantum states for each position | ψ X = k = 0 7 c k x | q k .
The walker random moves are decided by throwing a coin that can be modeled by Hadamard matrix (Equation (6)).
The QDRW model on a circle can be described in the Hilbert space H = H X 8 by the equation:
| ψ x ( τ + 1 ) = S H ( H I · | ψ x ( τ ) )
where S H ( . . . ) denotes the shift operator applied to its argument and τ is the clock tick. SH moves the walker to the right if the decision operator (i.e., the coin) provides “+” and to the left if the result is negative. SH is implemented by a permutation matrix (that has only one ‘1’ on each column or line) that performs the walker evolution. S H + achieves a positive move (i.e., increase the position), while S H determines a negative move (decrease the position value).
Denoting by ϱ = 1 2 , the application of H to a qubit provides:
H · | q 0 = ϱ | 0 + ϱ | 1 H · | q 1 = ϱ | 0 ϱ | 1
Denoting with X = [ c 0 x , c 1 x , , c 7 x ] T , the probability of the QDRW to be in the position x = k , ( 0 k 7 ) at a moment τ is π k ( τ ) = | c k ( τ ) | 2 .
The probability that QDRW follows a trajectory described by the sequence σ = i j k is Π σ = π i ( τ ) π j ( τ + 1 ) π k ( τ + 2 ) .
The probability that QDRW hits a target x = k during a discrete time interval θ = [ a , b ] is given by Π x = k ; θ = τ = a b | c k ( τ ) | 2 .
The oriented Quantum Discrete Random Walker (QDRW) QPN model is represented in Figure 10. Its state W = ( O , X ) is described in the Hilbert space H = H O H X 8 by the equation:
| ψ w ( τ ) = ( α ( τ ) | 0 + β ( τ ) | 1 ) k = 0 7 c k ( τ ) | q k
with α ( τ ) and β ( τ ) the complex coefficients needed for orientation fulfilling the Hilbert condition, and c k , i = 0 , , r complex numbers from the set C fulfilling the relation: k = 0 r 1 ( | α ( τ ) c k ( τ ) | 2 + | β ( τ ) c k ( τ ) | 2 ) = 1 in any moment τ .
The place p 2 models the QDRW oriented toward increasing the position (i.e., state X 0 , while the place p 5 corresponds to its orientation toward decreasing the position (i.e., X 1 ). Throwing the coin (i.e., applying the operator H) determines the change of orientations that affect the moves performed by shift operators. The QDRW dynamics is achieved by the mappings assigned to transitions.
The model executes the sequence: σ = ( ( t 1 & t 2 ) ( t 3 & t 4 ) ) k . The implementation requires three qubits for the walker’s position and one for the orientation.
The mappings assigned to transitions are:
  • t 1 _ 3 : X 0 ( τ + 1 ) = ϱ · X 0 ( τ )
  • t 1 _ 4 : X ( τ + 1 ) = ϱ · X 0 ( τ )
  • t 2 _ 6 : X 1 ( τ + 1 ) = ϱ · X 1 ( τ )
  • t 2 _ 7 : X 0 ( τ + 1 ) = ϱ · X 1 ( τ )
  • t 3 : X 0 ( τ + 1 ) = S H + ( X 0 ( τ + 1 ) + X 0 ( τ + 1 ) )
  • t 4 : X 1 ( τ + 1 ) = S H ( X 1 ( τ + 1 ) + X 1 ( τ + 1 ) )
The probability that QDRW be in a specified position x k at a time moment is given by the sum of the probabilities given by values stored in the places p 2 and p 5 :
π k ( τ ) = | c k 0 | 2 + | c k 1 | 2 ,
where c k 0 and c k 1 are the elements of the vectors X 0 and X 1 , respectively. These probabilities are displayed in Figure 11.
For the QPN analysis of oriented QDRW on a circle its reachability graph is constructed as can be seen in Table 1. Instead of the quantum state, QRS is used here.

2.8.4. Quantum Random Walker on a Sphere

Figure 9 represents the sphere (like the Earth globe) used for the walker’s move and Figure 12 shows its surface displayed on two dimensions. The walker initial position is ( x 0 , y 0 ) .
The system composed of oriented QDRW moving on a sphere is described in the Hilbert space:
H = H O 4 H X 8 H Y 8
with the vectors | ψ X = k = 0 7 c k x · | q k and | ψ Y = k = 0 7 c k y · | q k describing the position on axes X and Y, respectively. The walker state is extended with its orientation on the both axes: | ψ X O = ( α 0 | 0 + β 0 | 1 ) k = 0 7 c k x · | q k and | ψ Y O = ( α 1 | 0 + β 1 | 1 ) k = 0 7 c k y · | q k .
The action of the coin vector | ψ K = k = 0 3 c k C · | q k that modifies the walker orientation is given by the matrix G (according to [67]):
G = 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 .
The oriented QDRW movements are given by the formula:
[ | ψ X O ( τ + 1 ) , | ψ Y O ( τ + 1 ) ] T = S H ( G · [ | ψ X O ( τ ) , | ψ Y O ( τ ) ] T ) ,
where the square brackets are used for describing the construction of vectors.
For this problem is conceived the QPN model displayed in Figure 13. The places p 0 , p 1 , p 2 and p 3 model walkers states ( ( X 0 , Y 0 ) , ( X 1 , Y 1 ) , ( X 2 , Y 2 ) , ( X 3 , Y 3 ) ) oriented to the right, left, up and down, respectively.
The place meanings are displayed in Table 2. The initial state is: X 0 = Y 0 = [ ( ϱ , ϱ ) , ( 0 , 0 ) , ( 0 , 0 ) , ( 0 , 0 ) , ( 0 , 0 ) , ( 0 , 0 ) , ( 0 , 0 ) , ( 0 , 0 ) ] .
The model executes the sequence: σ = t 0 ( ( t 0 & t 1 & t 2 & t 3 ) ( t 0 & t 1 & t 2 & t 3 ) ) k . The implementation requires three qubits for X walker’s position, another three qubits Y and two qubits for the walker orientations on X and Y.
The mappings assigned to the transitions are:
  • t 0 : X 00 = 1 2 X 0 ; Y 00 = 1 2 Y 0 ; X 01 = 1 2 X 0 ; Y 01 = 1 2 Y 0 ; ; X 03 = 1 2 X 0 ; Y 03 = 1 2 Y 0 ;
  • t 1 : X 10 = 1 2 X 1 ; Y 10 = 1 2 Y 1 ; X 11 = 1 2 X 1 ; Y 11 = 1 2 Y 1 ; ; X 13 = 1 2 X 1 ; Y 13 = 1 2 Y 0 ;
  • t 2 : X 20 = 1 2 X 2 ; Y 20 = 1 2 Y 2 ; X 21 = 1 2 X 2 ; Y 21 = 1 2 Y 2 ; ; X 23 = 1 2 X 2 ; Y 23 = 1 2 Y 2 ;
  • t 3 : X 30 = 1 2 X 3 ; Y 30 = 1 2 Y 3 ; X 31 = 1 2 X 3 ; Y 31 = 1 2 Y 3 ; ; X 33 = 1 2 X 3 ; Y 33 = 1 2 Y 3 ;
  • t 0 : X 0 = S H + ( X 00 + X 10 + X 20 + X 30 ) ; Y 0 = S H + ( Y 00 + Y 10 + Y 20 + Y 30 ) ;
  • t 1 : X 1 = S H ( X 01 + X 11 + X 21 + X 31 ) ; Y 1 = S H + ( Y 01 + Y 11 + Y 21 + Y 31 ) ;
  • t 2 : X 2 = S H + ( X 02 + X 12 + X 22 + X 32 ) ; Y 2 = S H ( Y 02 + Y 12 + Y 22 + Y 32 ) ;
  • t 3 : X 3 = S H ( X 03 + X 13 + X 23 + X 33 ) ; Y 3 = S H ( Y 03 + Y 13 + Y 23 + Y 33 ) ;
For the QPN analysis of oriented QDRW on a sphere, its reachability graph is displayed in Table 3.
The probability of the oriented QDRW to be at the moment τ in the position X = x i and Y = y j is given by the coefficients of the vectors | ψ X ( τ ) and | ψ Y ( τ ) at the moment τ :
π X ( τ ; i ) = | c i X 0 ( τ ) | 2 + | c i X 1 ( τ ) | 2 + | c i X 2 ( τ ) | 2 + | c i X 3 ( τ ) | 2 ,
π Y ( τ ; j ) = | c j Y 0 ( τ ) | 2 + | c j Y 1 ( τ ) | 2 + | c j Y 2 ( τ ) | 2 + | c j Y 3 ( τ ) | 2 ,
π X Y ( τ ; i , j ) = π X ( τ ; i ) · π Y ( τ ; j ) .
The needed information required for these calculations is stored in the places p 0 , p 1 , p 2 and p 3 . The results of simulation can be seen in Figure 14.

2.9. Quantum Discrete Controlled Walker (QDCW)

The previous oriented walker’s randomness (given by the generalized coin) is replaced by a matrix denoted by Γ that influences its move directions. The QDCW move equation becomes:
[ | ψ X O ( τ + 1 ) , | ψ Y O ( τ + 1 ) ] = S H ( G · Γ ( τ ) [ | ψ X O ( τ ) , | ψ Y O ( τ ) ] )
with
Γ ( τ ) = A ( θ 1 , θ 2 )
and G the previous diffusion matrix. The angles θ 1 and θ 2 determine the move directions. Again, the shift operator SH determines the QDCW moves toward these angles.
The control problem consists of the application of Γ that leads the QDCW from a given initial state (i.e., position and orientation) to some specified target points or region.

2.10. Classic and Quantum Computers Connection

The quantum algorithms are not executed independently, but in collaboration with classic implemented algorithms.
Figure 15 shows a composition of an Object Enhanced Time Petri Net (OETPN, see [68]) model that interacts with a QPN model. OETPN receives demands from operator through the classic place c p 2 and interacts with QPN through the interface (classic-quantum place) c q p . This provides the information used for the first steps of the quantum program. OETPN receives the quantum computation results through the interface (quantum-classic place)  q c p .
According to [32] a qubit | x = α | 0 + β | 1 observation or measurement can be modeled by the wave function collapse as:
x = 0 , if | α | 2 p r ( x ) , x = 1 , if | α | 2 > p r ( x ) ,
where p r ( x ) is a random number in the range [ 0 , 1 ) used for the assessing of x.
QPN is initialized by the transition q t 1 in the pure state | 00 0 that is switched by q t 2 in the desired initial state V or | ψ state in q p 3 using the information provided by c q p . The mapping(s) of q t 3 applies the QLC operations. If the exit condition is not fulfilled, the quantum calculations are repeated after the reaching of the q p 3 inserted by the transition q t 4 . When the exit condition is reached, the transition q t 5 sets the measured value of q p 4 by collapsing on specified axis.
Approximately 1 / ϵ 2 measurements are required to get the results with the precision ϵ . This means to repeat the quantum process with the same initialization values. OETPN can request to repeat the QPN execution by reloading the initial condition, until the expected statistical results are obtained.
The  Q P N places do not necessarily independently represent the quantum processor qubits that are described by the entire QPN marking. The QPN places describe the quantum program state. All the transitions’ mappings are implemented at the lower level by QLCs.

2.11. Quantum Evolutionary Systems (QES)

The extension of classical ES to Quantum Evolutionary Systems (QES) concerns the replacing of the genes of classical genomes with qubits. This makes the description of an infinite number of individuals in the same instantiation of the model possible. The classical genetic operators have to be adapted to the new form of information encryption.
The individual evaluation, which in the classical computation requires the separate simulation of each of them, can be performed simultaneously. The reading of evaluations performed with different parameters can extract the information for individual selection and further on for their improvement.
Quantum control is an effective tool to drive the quantum system to a given target state and thus manipulate the dynamics of a quantum system [61]. The main goal is to control a multilevel system from an initial state to a given target state. This can solve problems related to quantum control strategies based on supervised machine learning to suppress the quantum noise in an open quantum system.
Quantum approach can be used in GA by:
  • Quantum Inspired Genetic Algorithms (QIGA) where the simulation and improvement are implemented on classical computers;
  • Hybrid Classic Quantum GA (HCQGA) where the simulations are performed by QC, but the improvements are determined by tasks implemented on classical computers;
  • CQGA (Complete Quantum Genetic Algorithm) where the individual simulations and improvements are performed by tasks implemented completely on QC.

2.12. Quantum Genetic Algorithms

Genetic Algorithms contain:
  • The genome specification that is used for construction of the genotypes,
  • The individual evaluation that consists of modeling the individual behaviors and assessing their performances,
  • The individual selection for reproduction,
  • The individual improvements that are performed randomly based on the previous generation performance and the use of some genetic operators,
  • The stopping criteria that uses either a number of tested generations reaching a performances over a desired threshold, or just the execution is exceeding a specified duration or a specified number of generations without relevant improvements.
Figure 16 shows the evolutionary process performed by a GA. It executes the sequence σ = t 0 ( ( ( t 1 t 2 ) & t 4 ) # ( t 3 t 5 ) ) K t 6 where K represents the number of iterations performed until the result is obtained.
Generally, the ESs need to properly solve the evaluations of individuals and their improvement. Both of them should be adapted to the problems, otherwise the targets are not reached. Due to the problem complexities, there are no clear and proven rules for the general construction of fitness functions and individual evolution operators. There are two main approaches for individual evolution (i.e., improvements) of QGAs: one uses only the mutation and the other uses the crossover before performing the mutation. The first approach uses the best individual from the previous generation as a target for random genotype improvement, while the second selects the individuals for evolution according to their performances and randomly interchanges the two individual genotypes.
For achieving the solution, in [69], the authors propose a QGA implementation that does not need the crossover involving two individuals. The justification is that all the individuals are simulated simultaneously. More recently, [57] includes and justifies the use of crossover.
The current approach concerns the control of the Quantum Discrete Walker with the model shown in Figure 13. The individuals of GA determine the mappings assigned to transitions t 0 , t 1 , t 2 , t 3 , t 0 , t 1 , t 2 , and t 3 . The Classic GA (CGA) problem usually involves the finding in each intersection (node and/or time) of the walker directions such that it reaches the targets avoiding the traps. Due to the fact that the walker can start from different initial points, the search should be repeated from all of them.
For the Quantum Discrete Controlled Walker (QDCW), the problem can be defined in two manners: one solves only the change of direction and the other performs the move length (i.e., 0 , 1 , 2 , ) in the chosen direction.
The efficiency of QGA is significantly better than the conventional genetic algorithm [49]. The classic Genetic Algorithm (CGA) has to execute (simulate) many individuals for their assessment one by one. QC (quantum computing) has the advantage that it can simulate simultaneously a large number of individuals. QC uses quantum variables that can cover by superposition the entire search domain. QGAs (Quantum Genetic Algorithms) have to represent the individuals by quantum vectors. The individual modifications fulfill the Hilbert condition by using mappings involving unitary matrices.
The transition t 0 of the model shown in Figure 16 creates in the place p 1 the genotypes pool using the initial information stored in the place p 0 . The genotype V is used for the construction of the individual ψ . For the walker control problem, the solution is obtained by replacing the previous G matrix (Equation (30)) with G · Γ , where Γ is a unitary matrix ( Γ = [ γ j , k ] j , k = 0 , 1 , 2 , 3 ) that has the role to diminish the randomness and to lead the walker toward the targets. The genes are | γ 0 = α 0 | q 0 + β 0 | q 1 and | γ 1 = α 1 | q 0 + β 1 | q 1 that, for implementation reasons, are changed in the vector V j = [ ( α 0 j , β 0 j ) , ( α 1 j , β 1 j ) ] describing the quantum individual genotype.
The execution of the mapping assigned to transition t 2 evaluates the individuals using the model displayed in Figure 13. The walkers described by [ ψ o , ψ x , ψ y ] are equally initialized V 0 w = [ ( ϱ , ϱ ) ( ϱ , ϱ ) ] to occupy the entire walker’s space:
H = H O 4 H X 8 H Y 8
The individual performances are set in the place p 3 . The transition t 3 selects the individuals for evolution setting them in p 4 , linking their genotypes with the performances. For improvement, the best individuals from the previous generation are stored in p 5 . The transition t 5 performs the individual improvement (i.e., population evolution). The evolution continues until a stop condition is fulfilled, and then the transition t 6 is executed, providing the final results in the place p 8 .
In conclusion, all the possible initial states of the controlled system are evaluated simultaneously based on the walker’s superposition. The transitions t 1 , t 2 , t 3 and t 5 can perform their activities in parallel for the current population.
Problems of optimal control of the QDCW can be defined in two manners. One consists of the application of control signals at each tick for direction modification, and the other one involves the syntheses of an environment that leads to a kind of deflectors set in each intersection. The deflectors direct the QDCW towards the desired targets avoiding the undesired traps. The current approach concerns the first manner.
The QPN model of the QDCW that solves the first approach is shown in Figure 17. As can be seen, the parallel simulations of QDCW, the controller (replacing in each moment of time the former Γ ) and the individual evaluation (i.e., fitness) is governed by the Clepsydra ticks that will stop the execution when the experiment duration expires.
QDCW can discretely move on a sphere with the above presented structure. It has to reach some target points T g = { ( x g a , y g a ) , ( x g b , y g b ) , } avoiding some trap points T p = { ( x p a , y p a ) , ( x p b , y p b ) , } .
Figure 18 shows the QDCW problem with initial walker state ( 1 , 1 ) , T g = { ( 5 , 5 ) } and T p = { ( 2 , 4 ) , ( 3 , 3 ) , ( 4 , 2 ) } . The sequence 0 1 2 3 4 5 6 7 represents an obtained (by CGA) optimal trajectory.
The walker state is described by superposition of the composed vectors:
[ | ψ o ( τ ) , | ψ x ( τ ) , | ψ y ( τ ) ] T .
QDCW movement for 8 clock ticks is represented by the sequence:
M = [ | ψ o ( 0 ) , | ψ x ( 0 ) , | ψ y ( 0 ) ] T [ | ψ o ( 1 ) , | ψ x ( 1 ) , | ψ y ( 1 ) ] T [ | ψ o ( 8 ) , | ψ x ( 8 ) , | ψ y ( 8 ) ] T .

2.12.1. Fitness Functions

For the classic GA, an efficient fitness function is constructed based on assessing the trajectory cost on each point. When QDCW reaches a point ( i , j ) with the probability π i j , the cost to be in that position is:
C o s t ( i , j , τ ) = 20 · π i j , if   ( i , j ) T g , 20 · π i j , if   ( i , j ) T p , π i j , otherwise .
The cost of the QDCW at a moment of time τ is:
C o s t ( | ψ x ( τ ) , | ψ y ( τ ) , τ ) ) = 0 i 7 0 j 7 C o s t ( i , j , τ )
The move performance is assessed with the formula:
J p = [ | ψ o ( τ ) , | ψ x ( τ ) , | ψ y ( τ ) ] σ τ 15 ; [ | q k X , | q k Y ] T g ; | c k X ( τ ) | 2 η ; | c k Y ( τ ) | 2 η ; C o s t ( | ψ x ( τ ) , | ψ y ( τ ) , τ ) )
with η a specified real value considered acceptable for the walker to be in a target point.
As a consequence, if the sequence σ includes points [ | ψ x ( τ i ) , | ψ y ( τ i ) ] T g and [ | ψ x ( τ i ) , | ψ y ( τ j ) ] T p such that τ i < τ j (i.e., τ i is precedent to τ j ), then
C o s t ( [ | ψ x ( τ i ) , | ψ y ( τ i ) ] ) = 0 .
Moreover, when the walker hits a target point with a probability greater than η , its move is not assessed further.
For a quantum approach of QGA, the current research used the following quantum fitness function. Let ψ x y = | ψ x | ψ y be the composed vector providing the information related to the walker’s position (i.e., the amplitude to be there) and Ψ x y = | ψ x y ψ x y | its density matrix. The diagonal elements of this matrix Ψ x y [ k , k ] = c i x ( τ ) 2 c j y ( τ ) 2 ; k = 0 , , 15 ; i = 0, , 7 ; i = 0 , , 7 ; provide the probability of the walker to be in the position  ( i , j ) .
The set T n is used to denote the positions when the walker is not on T g or T p , while T d (meaning degenerated) denotes the case when the positions are simultaneously target and trap.
Let the values Ψ n ( τ ) , Ψ g ( τ ) , Ψ p ( τ ) and Ψ d ( τ ) be calculated by the formulas:
Ψ n ( τ ) = ( i , j ) T n Ψ x y [ i , j ]
Ψ g ( τ ) = ( i , j ) T g Ψ x y [ i , j ]
Ψ p ( τ ) = ( i , j ) T p Ψ x y [ i , j ]
Ψ d ( τ ) = ( i , j ) T d Ψ x y [ i , j ]
They will be used to assess the probabilities of QDCW to be in the mentioned partition. Obviously Ψ n ( τ ) + Ψ g ( τ ) + Ψ p ( τ ) + Ψ d ( τ ) = 1 evaluates the probability of QDCW to be in the current moment of time in the mentioned partition, but the individual evaluation needs the assessment of its entire trajectory. The evaluation is given by a dynamic quantum fitness function Φ composed of two parts ( Φ 0 , Φ 1 ) moving toward positive and negative (respectively) depending on the superposition of QDCW. Φ has orientation (stored by one qubit) and position (stored by 16 qubits).
The orientation is given by:
| O Φ ( τ + 1 ) = A 1 ( θ ) · H · | O Φ ( τ )
where A 1 ( θ ) is given by the formula (21) with the angle θ = arcsin ( Ψ g Ψ p ) , and H is the Hadamard matrix.
Denoting by a 0 = ρ ( cos ( θ ) sin ( θ ) ) and a 1 = ρ ( cos ( θ ) + sin ( θ ) ) , the quantum fitness function is calculated by:
Φ 0 ( τ + 1 ) = S H + ( a 0 · Φ 0 ( τ ) + a 1 · Φ 1 ( τ ) )
Φ 1 ( τ + 1 ) = S H ( a 1 · Φ 0 ( τ ) a 0 · Φ 1 ( τ ) )
It can be seen that:
  • If Ψ g = Ψ p , Φ moves equally toward positive and negative,
  • If Ψ g > Ψ p , Φ moves more toward positive than negative,
  • If Ψ g < Ψ p , Φ moves more toward negative than positive.
The performance is given by:
| Φ 0 ( 15 ) = k = 0 15 c k Φ 0 · | q k J p = [ c 0 Φ 0 , c 1 Φ 0 , , c 15 Φ 0 ]
with c k Φ 0 ( k = 0 , 1 , , 15 ) the amplitudes of Φ 0 .
All the individuals and their assessments are simulated simultaneously during the specified time horizon (see the model represented in Figure 17). It continues with Grover’s algorithm that provides the best individual and its fitness.

2.12.2. Controller Genome

Regarding Figure 17, the first manner has to find the value of Γ ( 0 ) and the unitary matrix U that modify the control signals according to the formula:
Γ ( τ + 1 ) = U · Γ ( τ )
The matrix U = A 2 ( θ 0 u , θ 1 u ) is constructed based on the relation (25).
The controller’s genome is: [ | q b 0 u , | q b 1 u , | q b 0 γ , | q b 1 γ ] where the vectors | q b 0 γ and | q b 1 γ correspond to the value of Γ ( 0 ) .
Γ changes the QDCW orientation according to the relation:
| ψ o ( τ + 1 ) = G · Γ ( τ ) · | ψ o ( τ )
In conclusion, the GA has the task of finding the angles θ 0 γ , θ 1 γ , θ 0 u , θ 1 u that lead to maximum performance. For the current problem, an individual genome V i is denoted by
V i = ( θ 0 γ , θ 1 γ , θ 0 u , θ 1 u ) i
The population P w of the generation w is:
P w = [ V i ] i = 0 , 1 , , p d 1
where p d is the population dimension. The individual implementation requires 2 + 2 qubits, allowing the simultaneous simulation of the entire population. Another 8 qubits are needed for implementing the QDCW.

2.12.3. Genetic Operators

The individual (genotype) improvement introduced in [49] is used for the purpose of avoiding the premature convergence problem that leads to loss of individual diversity in early generations. For the gene improvement the direction (i.e., positive or negative) and the amplitude should be found. The direction can be chosen by comparing the best performance from the previous generation with the current individual performance. The amplitude of the search in [49] is dynamically adapted by diminishing it at each new generation.
The rotation direction is chosen based on a determinant A k = α k b α k j β k b β k j , where the elements are provided by a qubit from the previous generation best individual q b k b = ( α k b , β k b ) and the current individual that has to be improved q b k j = ( α k j , β k j ) The direction of the rotation angle for improvement toward the best individual is given by s i g n ( A k ) . The direction is not determined if A k = 0 .
Let V b be the best individual from the previous generation and V j an individual of the current generation. If their fitness functions are J p b and J p j , respectively, the improvement of V j consists of applying the rotation improvement vector Θ = [ θ 0 , θ 1 , , θ g 1 ] . Let θ m a x and θ m i n be the maximum and minimum accepted rotation angle, respectively.
If an adaptation of the rotation angle in the generation w of the maximum z generations is used, the function for an individual improvement becomes as in Algorithm 1.
Algorithm 1 Function I m p r o v e ( V j , J p j , V b , J p b , θ m a x , θ m i n , z , w , v )
Require:  V j , J p j , V b , J p b , θ m a x , θ m i n , z , w , v
Ensure:  V j is improved
   Δ θ w θ m a x θ m a x θ m i n z · w · v
  for all q b k V j  do
    if  ( J p b > J p j ) ( A k = α k b α k j β k b β k j 0 )  then
       θ k j s i g n ( A k ) · Δ θ w
    else
       θ k j ( 0.5 r a n d o m ( ) ) · Δ θ w
    end if
     q b k j A ( θ k j ) · q b k j
  end for
  return V j
The coefficient v was added for convergence adjustment.
The quantum crossover operator introduced in [57] was developed and applied in the current research. It works simultaneously on the entire population P w of dimension p d (assumed even) at the generation w. It is split into two equal parts, P 0 w and P 1 w . After ordering P w according to the chosen fitness function, it is randomly copied in P 0 w and P 1 w . The crossover operator (consisting of swapping the second parts of two individuals’ genotypes) is applied simultaneously to all the individuals, and so the population P w + 1 is given by Algorithm 2.
Algorithm 2 Function C r o s s o v e r ( P w , p d )
Require:  P w , p d
Ensure:  P w + 1 is genetically improved
  * parallel J p w s i m u l a t e ( P w )
   s o r t ( P w )
  * randomly  ( P 0 w , P 1 w ) P w
  for all V j P w  do
      * swap the last halves of V j and V p d 1 j
  end for
  return P w + 1 P 0 w P 1 w
The classical mutation operator acts on a genotype, randomly choosing a gene and randomly switching its value. The quantum mutation operator acts on the entire population, simultaneously rotating all the qubits with random angles.

2.12.4. Quantum Inspired Genetic Algorithms

QIGA needs a different kind of genome [48] that can be stored in the vector V according to Equation (4). Usually, all the individuals j ; j = 0 , 1 , , p d 1 have the initial genotypes:
V j 0 = [ ( ϱ , ϱ ) , ( ϱ , ϱ ) , , ( ϱ , ϱ ) ] T
The individual genotype modification is performed by a unitary transformation A 1 ( θ ) (given by (21)) with θ = r a n d o m ( ) · 2 π , where r a n d o m ( ) ( 0 , 1 ) is a function that generates random values. The transformation A 1 ( θ ) in an iteration k acts on a qubit q b i of V:
q b i j = A 1 ( θ k ) · q b i j 1 .
The individual’s qubits can be rotated with the same θ or using different rotation angles for each qubit. The individual is obtained by a transformation Γ j = T ( V j ) .
The individual assessment is performed by the simulation of the QPN model. Their selection for reproduction is performed by the classical roulette wheel.
Based on Figure 16, the QIGA is constructed by detailing the mappings (as in Algorithm 3). The following notations are used:
  • z is the maximum accepted number of generation/iterations,
  • w is the current iteration,
  • p d the population dimension,
  • P w is the population in the generation w,
  • V b , J p b are the best individual of the previous generation and its fitness function.
Algorithm 3 QIGA
Require:  p d , z , θ m a x , θ m i n , v , V 0 , J p 0 the initial best individual and its performance
Ensure:  V b , J p b the best individual of the last population and its performance
   P 0 [ V j 0 ] j = 0 , 1 , , p d 1
   V b V 0
   J p b J p 0
   w 0
  while ( w z ) do
    for all V j P w  do
       J p j w s i m u l a t e ( Q P N , V j w ) (Figure 17)
    end for
    for all V j w P w  do
       V j w + 1 I m p r o v e ( V j w , J p j w , V b , J p b , θ m a x , θ m i n , z , w , v )
    end for
    Find ( V b , J p b ) max J p i ; V i w P w { ( V j w , J p j w ) }
     w w + 1
  end while
  return V b , J p b
The crossover operation can lead the GA search to conserve a part of the path if and where some individuals perform better [59]. This involves the modification of the previous algorithm by replacing I m p r o v e m e n t with C r o s s o v e r and M u t a t i o n .

2.12.5. Hybrid Classic Quantum Genetic Algorithms (HCQGAs)

HCQGAs perform the individual improvement implemented in CC and the individual evaluations in QC using an architecture similar to those presented in Figure 15.
The algorithm implemented on CC constructs the population and sends it for the evaluation on QC. QC parallelly and simultaneously evaluates all the individuals and provides the best individual with its score.
The individuals evaluation is performed by partitioning the QDCW positions related to the partitions: T n , T g , T p and T d corresponding to the case when the positions ( i , j ) are neutral (i.e., neither on target or trap) zone, on target zone, on trap zone and on degenerated zone if it is on a target and a trap (simultaneously) zone, respectively. The inclusions in these four sets can be coded by two qubits, and the degree of walker inclusion is proposed to be assessed by three qubits. The QDCW simulation, its control (i.e., Γ ) and assessment (i.e., Φ ) are run simultaneously.
The quantum system evolves in the Hilbert space:
H = H Γ 4 H O 4 H X 8 H Y 8 H J 2 H Φ 12
where H J 2 provides the information related to the performance given by the current QDCW position. Similar to the walker state (i.e., orientation and position on X and Y), the individual assessment is given by the position inclusion in an assessment partition and the corresponding degrees.
The HCQGA is composed of two parts: Classic Component of GA and Quantum Component of GA. The algorithms they execute are presented in Algorithm 4 and Algorithm 5.
Algorithm 4 Classic Component of GA
Require:  p d , z , θ m a x , w , θ m i n , v
Ensure:  V b , Φ b the best individual of population and its performance
   P 0 [ V j 0 ] j = 0 , 1 , , p d 1
   w 0
  while ( w z ) do
     set ( P w [ V j w ] j = 0 , 1 , , p d 1 )
     get ( Φ w , V b , Φ b )
     w w + 1
    if w<z then
      for all V j P w  do
         V j w I m p r o v e ( V j w 1 , Φ j w 1 , V b , Φ b , θ m a x , θ m i n , z , w , v )
      end for
    end if
  end while
  return V b , Φ b
Algorithm 5 Quantum Component of GA
Require:  o ( 0 ) , x ( 0 ) , y ( 0 ) , w , z and Q D C W model
Ensure:  Φ w , V b , Φ b the best individual of population and its performance
   w 0
  while ( w z ) do
     P w get ( P w )
    for all V j P w  do
       Φ j w s i m u l a t e ( Q D C W , V j )
    end for
    Find  ( V b , Φ b ) b u b b l e _ S o r t i n g ( V j , Φ j )
    set ( Φ w [ Φ j ] j = 0 , 1 , , p d 1 , V b , Φ b )
     w w + 1
  end while
The methods set and get were used for the description of communication between classic and quantum computers.
For QDCW simulation, another 3 qubits are required for the clepsydra.
The QLC has to be endowed with the necessary quantum gates for the mappings implementation.
The use of the quantum genetic operators C r o s s o v e r and M u t a t i o n would lead to complete quantum genetic algorithm.

2.12.6. Complete Quantum Genetic Algorithm (CQGA)

This is implemented completely on a quantum computer that executes Algorithm 6.
Algorithm 6 CQGA
Require:  p d , z
Ensure:  V 0 is the best found solution
   P 0 [ V j 0 ] j = 0 , 1 , , p d 1 ;
   w 0
  while ( w z ) do
    parallel J p w s i m u l a t e ( Q P N ) (Figure 17)
     s o r t ( P w )
     P w + 1 C r o s s o v e r ( P w , p d )
     P w + 1 M u t a t i o n ( P w + 1 , p d )
     w w + 1
  end while
  return measure V 0

3. Results

The QDRW models were tested on a software company simulator, but all the genetic algorithms were tested by simulation using Java language. For QPN, a framework can be found at “https://github.com/dahliajanabi/QPN”.
For experimentation of the proposed methods, the previously presented QDRW was modified to the move control of a Quantum Discrete Controlled Walker (QDCW).

3.1. Classic GA Solution of Walker Move Control

The quantum QDCW model is similar to the QPN displayed in Figure 13. The classic walker model has the same graph (Figure 13), but the guards and mappings have to be modified according to Object Enhanced Time Petri Nets (see reference [68] for details). For this case, the transitions t 0 , t 1 , t 2 and t 3 perform the rotations and the transitions t 0 , t 1 , t 2 and t 3 perform the move to the next positions. Unlike the quantum case, the classic walker can be in only one place p 0 , p 1 , p 2 or p 3 , because the superposition is not used in the classic computation.
The classic computation deterministic walker has the model:
o x ( τ + 1 ) o y ( τ + 1 ) = c o s ( θ ) s i n ( θ ) s i n ( θ ) c o s ( θ ) · o x ( τ ) o y ( τ )
x ( τ + 1 ) y ( τ + 1 ) = x ( τ ) y ( τ ) + o x ( τ + 1 ) o y ( τ + 1 )
with o x ( τ ) and o y ( τ ) describing the orientation on axes X and Y, respectively. The initial condition is [ o x ( 0 ) , o y ( 0 ) , x ( 0 ) , y ( 0 ) ] T . The control matrix has the argument θ = γ ( τ ) · π / 2 with γ ( τ ) { 0 , 1 , 2 , 3 } .
The GA genome Γ is a vector of rotations γ ( τ ) for 0 τ < 15 .
The usual mutation and crossover genetic operations were performed and the obtained results are presented in Figure 18 for the initial state [ 1 , 1 ] , with orientation [ 0 , 0 ] , T a r g e t P o i n t = { ( 5 , 5 ) } and T r a p P o i n t s = { ( 2 , 4 ) , ( 3 , 3 ) , ( 4 , 2 ) } . The best individual genotype is Γ = [ 2 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , , , , , ] , and the resulting best trajectory is: ( 1 , 1 ) ( 2 , 1 ) ( 3 , 1 ) ( 4 , 1 ) ( 5 , 1 ) ( 5 , 2 ) ( 5 , 3 ) ( 5 , 4 ) ( 5 , 5 ) .

3.2. Application of QIGA for QDCW

For QDCW model, the mappings assigned to transitions t 0 , t 1 , t 2 and t 3 (that correspond to generalized coin throw) in the QDRW model have to be replaced with control values applied to qubit registers. The qubit register is composed of two qubits for orientation, three qubits for X and another three qubits for Y.
The probabilities of the best individual obtained by QIGA are represented in Figure 19.
The evolution of the solution search is given in Table 4. The maximum values Ψ g and Ψ p were obtained at different moments on time.

3.3. Application HQCGA for QDCW Control

The values provided by the quantum fitness function where transformed into classic values using the formula:
J p = ( Φ 10 2 16 ) · 10 4
where Φ 10 represents the conversion in the base 10 of Φ .
The probabilities of the best individual obtained by HCQGA are represented in Figure 20.
The evolution of the solution search is given in Table 5.

3.4. Complete Implemented QGA for QDCW Control

The probabilities of the best individual obtained by CQGA are represented in Figure 21.
The evolution of the solution search is given in Table 6.

4. Discussion

Modeling with QPNs can sustain all the phases of quantum software development. They help the understanding of the quantum complex problems and their use facilitate the quantum software conception. QPN can be used for description at the qubit level, or at a higher-level modeling complex mappings. The Petri net-based language can be used for analysis of classic programs as well as quantum programs. Because quantum programs are expected to be used in tandem with classic programs, the Petri nets are useful for constructing a bridge between quantum computers and classic computers, successfully showing their concurrent cooperation. The reachability graph can be used for the classic program and for the quantum program as well. The development based on QPN provides the mappings that lead to the QLC structure required for quantum program implementation. The QPN places show the necessary quantum registers and their dimensions. The transitions have assigned matrices that have to be implemented by QLCs.
The current approach concerns the control of dynamic systems where statistic features are relevant. This kind of applications require fitness functions assessing the temporal behaviors as they were introduced here.
The classic discrete walker has a deterministic behavior, so its optimal control leads to a deterministic solution. QDCW has a stochastic behavior described by superposition and so its optimal control is described by superposition too. Both walkers are controlled by changing their orientations.
The classic controller genome is a time variable vector Θ , while the quantum controller genome is composed of the initial orientation function Γ ( 0 ) and a matrix U for this function correction.
QIGA and HCQGA use similar individual evolution algorithms (genotypes improvement). Their results are close to each other. CQGA uses quantum crossover and mutation and these lead to a different solution, slightly with lower performance than the previous GAs.

Author Contributions

Conceptualisation, T.S.L.; Experiments design, O.P.C.; Test and verification, E.M.D.-P.; Implementation, D.A.-J. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
QCQuantum Computation or Computer
CCClassic Computation or Computer
PNPetri Net
OETPNObject Enhanced Time Petri Net
QPNQuantum Petri Net
QDRWQuantum Discrete Random Walker
MEMobile Entity
EAEvolutinary Algorithm
QEAQuantum Evolutionary Algorithm
PSOParticle Swarm Optimization
QMEQuantum Mobile Entity
GAGenetic Algorithm
CGAClassic Genetic Algorithm
QGAQuantum Genetic Algorithm
QIGAQuantum Inspired Genetic Algorithm
HCQGAHybrid Classic Quantum Genetic Algorithm
CQGAComplete Quantum Genetic Algorithm
QAOAQuantum Approximate Optimization Algorithm
ESEvolutionary System
QESQuantum Evolutionary System

References

  1. Bacon, D.; van Dam, W. Recent Progress in Quantum Algorithms. Commun. ACM 2010, 53, 84–93. [Google Scholar] [CrossRef] [Green Version]
  2. Grumbling, E.; Horowitz, M. (Eds.) Quantum Computing. Progress and Prospects. A Consensus Study Report of The National Academies of Sciences, Engineering, and Medicine; The National Academies Press: Washington, DC, USA, 2019. [Google Scholar] [CrossRef]
  3. Letia, T.S.; Durla Pasca, E.M.; Al-Janabi, D.M. Quantum Petri Nets. In Proceedings of the 25th International Conference on System Theory, Control and Computing (ICSTCC), Iasi, Romania, 20–23 October 2021. [Google Scholar] [CrossRef]
  4. Cho, C.-H.; Chen, C.-Y.; Chen, K.-C.; Huang, T.-W.; Hsu, M.-C.; Cao, N.-P.; Zeng, B.; Tan, S.-G.; Chang, C.-R. Quantum computation: Algorithms and Applications. Chin. J. Phys. 2021, 72, 248–269. [Google Scholar] [CrossRef]
  5. Montanaro, A. Quantum algorithms: An overview. npj Quantum Phys. 2015, 2, 15023. [Google Scholar] [CrossRef]
  6. Mavroeidis, V.; Vishi, K.; Zych, M.D.; Jøsang, A. The Impact of Quantum Computing on Present Cryptography. Int. J. Adv. Comput. Sci. Appl. 2018, 9, 3. [Google Scholar] [CrossRef] [Green Version]
  7. Grover, L.K. Quantum mechanics helps in searching for a needle in a haystack. Phys. Rev. Lett. 1997, 79, 325–328. [Google Scholar] [CrossRef] [Green Version]
  8. Shor, P.W. Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer. SIAM J. Comput. 1997, 26, 1484–1509. [Google Scholar] [CrossRef] [Green Version]
  9. Rossi, M.; Asproni, L.; Caputo, D.; Rossi, S.; Cusinato, A.; Marini, R.; Agosti, A.; Magagnini, M. Using Shor’s algorithm on near term Quantum computers: A reduced version. arXiv 2021, arXiv:2112.12647v1. [Google Scholar] [CrossRef]
  10. Harrow, A.W.; Hassidim, A.; Lloyd, S. Quantum algorithm for linear systems of equations. Phys. Rev. Lett. 2009, 103, 150502. [Google Scholar] [CrossRef] [PubMed]
  11. McClean, J.R.; Romero, J.; Babbush, R.; Aspuru-Guzik, A. The theory of variational hybrid quantum-classical algorithms. arXiv 2015, arXiv:1509.04279v1. [Google Scholar] [CrossRef]
  12. Jethwani, D.; Le Gall, F.; Singh, S.K. Quantum-Inspired Classical Algorithms for Singular Value Transformation. arXiv 2012, arXiv:1910.05699. [Google Scholar] [CrossRef]
  13. Titiloye, O.; Crispin, A. Quantum annealing of the graph coloring problem. Discret. Optim. 2011, 8, 376–384. [Google Scholar] [CrossRef] [Green Version]
  14. Apers, S.; Gilyén, A.; Jeffery, S. A Unified Framework of Quantum Walk Search. arXiv 2019, arXiv:1912.04233v1. [Google Scholar] [CrossRef]
  15. Kadian, K.; Garhwal, S.; Kumar, A. Quantum walk and its application domains: A systematic review. Comput. Sci. Rev. 2021, 41, 100419. [Google Scholar] [CrossRef]
  16. Shenvi, N.; Julia Kempe, J.; Whaley, K.B. Quantum random-walk search algorithm. Phys. Rev. A 2003, 67, 052307. [Google Scholar] [CrossRef] [Green Version]
  17. Potocek, V.; Gabris, A.T.; Kiss, T.; Jex, I. Optimized quantum random-walk search algorithms on the hypercube. Phys. Rev. A 2008, 79, 012325. [Google Scholar] [CrossRef] [Green Version]
  18. Godsil, C.; Zhan, H. Discrete-time quantum walks and graph structures. J. Comb. Theory Ser. A 2019, 167, 181–212. [Google Scholar] [CrossRef] [Green Version]
  19. Portugal, R. Quantum Walks and Search Algorithms; Springer: Berlin/Heidelberg, Germany, 2013. [Google Scholar] [CrossRef] [Green Version]
  20. Kendon, V. How to Compute Using Quantum Walks. In Proceedings of the QSQW 2020, EPTCS 315, Marseille, France, 20–24 January 2020; pp. 1–17. [Google Scholar] [CrossRef]
  21. Chawla, P.; Roopesh Mangal, R.; Chandrashekar, C.M. Discrete-time quantum walk algorithm for ranking nodes on a network. Quantum Inf. Process. 2020, 19, 158. [Google Scholar] [CrossRef] [Green Version]
  22. Li, M.; Liu, C.; Li, K.; Liao, X.; Li, K. Multi-task allocation with an optimized quantum particle swarm method. Appl. Soft Comput. J. 2020, 96, 106603. [Google Scholar] [CrossRef]
  23. Panahiyan, S.; Fritzsc, S. One-dimensional quantum walks driven by two-entangled-qubit coins. Phys. Lett. A 2020, 384, 126673. [Google Scholar] [CrossRef]
  24. Zhou, W. Review on Quantum Walk Algorithm. J. Phys. Conf. Ser. 2021, 1748, 032022. [Google Scholar] [CrossRef]
  25. Ambainis, A. Quantum walk algorithm for element distinctness. SIAM J. Comput. 2007, 37, 210–239. [Google Scholar] [CrossRef] [Green Version]
  26. Venegas-Andraca, S.E. Quantum walks: A comprehensive review. Quantum Inf. Process. 2012, 11, 1015–1106. [Google Scholar] [CrossRef] [Green Version]
  27. Choi, J.; Kim, J. A Tutorial on Quantum Approximate Optimization Algorithm (QAOA): Fundamentals and Applications. In Proceedings of the International Conference on Information and Communication Technology Convergence (ICTC), Jeju Island, Korea, 19–21 October 2019. [Google Scholar] [CrossRef]
  28. Dong, Y.; Meng, X.; Lin, L.; Kosut, R.; Whaley, K.B. Robust Control Optimization for Quantum Approximate Optimization Algorithms. IFAC PapersOnLine 2020, 53, 242–249. [Google Scholar] [CrossRef]
  29. Bengtsson, A.; Vikstål, P.; Warren, C.; Svensson, M.; Gu, X.; Kockum, A.F.; Krantz, P.; Križan, C.; Shiri, D.; Svensson, I.M.; et al. Improved success probability with greater circuit depth for the quantum approximate optimization algorithm. Phys. Rev. Appl. 2020, 14, 034010. [Google Scholar] [CrossRef]
  30. Sloss, A.N.; Gustafson, S. 2019 Evolutionary Algorithms Review, Neural and Evolutionary Computing (cs.NE). arXiv 2019, arXiv:1906.0887. [Google Scholar] [CrossRef]
  31. Sofge, D.A. Prospective algorithms for quantum evolutionary computation. In Proceedings of the Second Quantum Interaction Symposium (QI-2008), Saarbrcken, Germany, 22–30 November 2008. [Google Scholar] [CrossRef]
  32. Lahoz-Beltra, R. Quantum Genetic Algorithms for Computer Scientists. Computers 2016, 5, 24. [Google Scholar] [CrossRef] [Green Version]
  33. Han, K.-H.; Kim, J.-W. Quantum-Inspired Evolutionary Algorithm for a Class of Combinatorial Optimization. IEEE Trans. Evol. Comput. 2002, 6, 6. [Google Scholar] [CrossRef] [Green Version]
  34. Patvardhan, C.; Bansal, S.; Srivastav, A. Quantum-Inspired Evolutionary Algorithm for difficult knapsack Problems. Memetic Comp. 2015, 7, 135–155. [Google Scholar] [CrossRef]
  35. Zhang, R.; Wang, Z.; Zhang, H. Quantum-Inspired Evolutionary Algorithm for Continuous Space Optimization Based on Multiple Chains Encoding Method of Quantum Bits, Hindawi. Math. Probl. Eng. 2014, 2014, 620325. [Google Scholar] [CrossRef] [Green Version]
  36. Kuo, S.-Y.; Chou, Y.-H. Entanglement-Enhanced Quantum-Inspired Tabu Search Algorithm for Function Optimization; IEEE: Piscataway, NJ, USA, 2017. [Google Scholar] [CrossRef]
  37. Konara, D.; Sharma, K.; Sarogi, V.; Bhattacharyya, S. A Multi-Objective Quantum-Inspired Genetic Algorithm (Mo-QIGA) for Real-Time Tasks Scheduling in Multiprocessor Environment; Elsevier: Amsterdam, The Netherlands, 2018. [Google Scholar]
  38. Agrawal, R.K.; Kaur, B.; Agarwal, P. Quantum inspired Particle Swarm Optimization with guided exploration for function optimization. Appl. Soft Comput. J. 2021, 102, 107122. [Google Scholar] [CrossRef]
  39. Zamani, H.; Nadimi-Shahraki, M.H.; Gandomi, A.H. QANA: Quantum-based avian navigation optimizer algorithm. Eng. Appl. Artif. Intell. 2021, 104, 104314. [Google Scholar] [CrossRef]
  40. Vaze, R.; Deshmukh, N.; Kumar, R.; Saxena, A. Development and application of Quantum Entanglement inspired Particle Swarm Optimization. Knowl.-Based Syst. 2021, 219, 106859. [Google Scholar] [CrossRef]
  41. Zouache, D.; Abdelaziz, F.B. A cooperative swarm intelligence algorithm based on quantum-inspired and rough sets for feature selection. Comput. Ind. Eng. 2017, 115, 26–36. [Google Scholar] [CrossRef]
  42. Ganesan, V.; Sobhana, M.; Anuradha, G.; Yellamma, P.; Devi, O.R.; Prakash, K.B.; Naren, J. Quantum inspired meta-heuristic approach for optimization of genetic algorithm. Comput. Electr. Eng. 2021, 94, 107356. [Google Scholar] [CrossRef]
  43. Dey, S.; Siddhartha Bhattacharyya, S.; Maulik, U. Quantum inspired genetic algorithm and particle swarm optimization using chaotic map model based interference for gray level image thresholding. Swarm Evol. Comput. 2014, 15, 38–57. [Google Scholar] [CrossRef]
  44. Nezamabadi-pour, H. A quantum-inspired gravitational search algorithm for binary encoded optimization problems. Eng. Appl. Artif. Intell. 2015, 40, 62–75. [Google Scholar] [CrossRef]
  45. Cao, B.; Fan, S.; Zhao, J.; Yangd, P.; Muhammade, K.; Tanveer, T. Quantum-enhanced multiobjective large-scale optimization via parallelism. Swarm Evol. Comput. 2020, 57, 100697. [Google Scholar] [CrossRef]
  46. Bhatia, M.; Sood, S.K.; Kaurc, S. Quantum-based predictive fog scheduler for IoT applications. Comput. Ind. 2019, 111, 51–67. [Google Scholar] [CrossRef]
  47. Li, M.; Shang, Y. Generalized exceptional quantum walk search. New J. Phys. 2020, 22, 123030. [Google Scholar] [CrossRef]
  48. Han, K.-H.; Kim, J.-H. Genetic quantum algorithm and its application to combinatorial optimization problem. In Proceedings of the Congress on Evolutionary Computation, Kraków, Poland, 16–19 July 2000; pp. 1354–1360. [Google Scholar]
  49. Wang, H.; Liu, J.; Zhi, J.; Fu, C. The Improvement of Quantum Genetic Algorithm and Its Application on Function Optimization. Math. Probl. Eng. 2013, 2013, 730749. [Google Scholar] [CrossRef] [Green Version]
  50. Haipeng, K.; Ni, L.; Yuzhong, S. Adaptive double chain quantum genetic algorithm for constrained optimization problems. Chin. J. Aeronaut. 2015, 28, 214–228. [Google Scholar] [CrossRef] [Green Version]
  51. Rizk, Y.; Awad, M. A quantum genetic algorithm for pickup and delivery problems with coalition formation. Procedia Comput. Sci. 2019, 159, 261–270. [Google Scholar] [CrossRef]
  52. Ajagekar, A.; You, F. Quantum computing for energy systems optimization: Challenges and opportunities. Energy 2019, 179, 76–89. [Google Scholar] [CrossRef]
  53. Hilali-Jaghdam, I.; Ishak, A.B.; Abdel-Khalek, S.; Jamal, A. Quantum and classical genetic algorithms for multilevel segmentation of medical images: A comparative study. Comput. Commun. 2020, 162, 83–93. [Google Scholar] [CrossRef]
  54. Kaveh, M.; Kamalinejad, H.; Arzani, H. Quantum evolutionary algorithm hybridized with Enhanced colliding bodies for optimization. Structures 2020, 28, 1479–1501. [Google Scholar] [CrossRef]
  55. Ajagekar, A.; Humble, T.; You, F. Quantum computing based hybrid solution strategies for large-scale discrete-continuous optimization problems. Comput. Chem. Eng. 2020, 132, 106630. [Google Scholar] [CrossRef]
  56. Wang, L.; Tang, F.; Wu, H. Hybrid genetic algorithm based on quantum computing for numerical optimization and parameter estimation. Appl. Math. Comput. 2005, 171, 1141–1156. [Google Scholar] [CrossRef]
  57. Ibarrondo, R.; Gatti, G.; Sanz, M. Quantum Algorithm with Individuals in Multiple Registers. arXiv 2022, arXiv:2203.15039v1. [Google Scholar]
  58. Ardelean, S.M.; Udrescu, M. Graph coloring using the reduced quantum genetic algorithm. PeerJ Comput. Sci. 2022, 8, e836. [Google Scholar] [CrossRef]
  59. Zhang, J.; Kang, M.; Li, X.; Liu, G. Bio-Inspired Genetic Algorithms with Formalized Crossover Operators for Robotic Applications. Front. Neurorobot. 2017, 11, 56. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  60. Ghosh, M.; Dey, N.; Mitra, D.; Chakrabarti, A. A Novel Quantum Algorithm for Ant Colony Optimization. IET Res. J. 2021, 3, 13–29. [Google Scholar] [CrossRef]
  61. Zeng, Y.X.; Shen, J.; Hou, S.C.; Gebremariam, T.; Li, C. Quantum control based on machine learning in an open quantum system. Phys. Lett. A 2020, 384, 126886. [Google Scholar] [CrossRef]
  62. Wang, D.; Tan, D.; Liu, L. Particle swarm optimization algorithm: An overview. Soft. Comput. 2017, 22, 387–408. [Google Scholar] [CrossRef]
  63. Kelly, A. Simulating Quantum Computers Using OpenCL. arXiv 2018, arXiv:1805.00988. [Google Scholar]
  64. Abramsky, S. Petri Nets, Discrete Physics, and Distributed Quantum Computation. In Concurrency, Graphs and Models; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2008; Volume 5065. [Google Scholar] [CrossRef]
  65. Schmidt, H.W. How to Bake Quantum into Your Pet Petri Nets and Have Your Net Theory Too, Computer Science > Software Engineering. arXiv 2021, arXiv:2106.03539. [Google Scholar] [CrossRef]
  66. Anres-Martinez, P.; Heunen, C. Weakly measured while loops: Peeking at quantum states. Quantum Sci. Technol. 2022, 7, 025007. [Google Scholar] [CrossRef]
  67. Kempe, J. Quantum random walks—An introduction overview. arXiv 2003, arXiv:quant-ph/0303081v1. [Google Scholar]
  68. Letia, T.S.; Al- Janabi, D. Object Enhanced Time Petri net models. In Proceedings of the 2018 IEEE International Conference on Automation, Quality and Testing, Robotics (AQTR), Cluj-Napoca, Romania, 24–26 May 2018. [Google Scholar] [CrossRef]
  69. Udrescu, M.; Prodan, L.; Vladutiu, M. Implementing Quantum Genetic Algorithms: A Solution Based on Grover’s Algorithm. In Proceedings of the 3rd Conference on Computing Frontiers, Ischia, Italy, 3–5 May 2006; pp. 71–82. [Google Scholar]
Figure 1. Qubit representation on Bloch sphere.
Figure 1. Qubit representation on Bloch sphere.
Mathematics 10 04404 g001
Figure 2. Representation of a quantum vector and quantum operations.
Figure 2. Representation of a quantum vector and quantum operations.
Mathematics 10 04404 g002
Figure 3. Quantum Petri net model.
Figure 3. Quantum Petri net model.
Mathematics 10 04404 g003
Figure 4. Quantum Petri net model of Figure 2 representation.
Figure 4. Quantum Petri net model of Figure 2 representation.
Mathematics 10 04404 g004
Figure 5. QPN model of a sequence of reversible transitions.
Figure 5. QPN model of a sequence of reversible transitions.
Mathematics 10 04404 g005
Figure 6. QPN model of a while loop.
Figure 6. QPN model of a while loop.
Mathematics 10 04404 g006
Figure 7. Polar plot for representation of qubit.
Figure 7. Polar plot for representation of qubit.
Mathematics 10 04404 g007
Figure 8. QPN model of a qubit rotation depending on another one.
Figure 8. QPN model of a qubit rotation depending on another one.
Mathematics 10 04404 g008
Figure 9. QDRW movement space.
Figure 9. QDRW movement space.
Mathematics 10 04404 g009
Figure 10. QPN of oriented QDRW on a circle.
Figure 10. QPN of oriented QDRW on a circle.
Mathematics 10 04404 g010
Figure 11. Probabilities of oriented QDRW on a circle.
Figure 11. Probabilities of oriented QDRW on a circle.
Mathematics 10 04404 g011
Figure 12. Sphere surface deployment on two dimensions.
Figure 12. Sphere surface deployment on two dimensions.
Mathematics 10 04404 g012
Figure 13. QPN model of oriented QDRW on a sphere.
Figure 13. QPN model of oriented QDRW on a sphere.
Mathematics 10 04404 g013
Figure 14. Probability representation of oriented QDRW moves on a sphere.
Figure 14. Probability representation of oriented QDRW moves on a sphere.
Mathematics 10 04404 g014
Figure 15. Classic-quantum application structure.
Figure 15. Classic-quantum application structure.
Mathematics 10 04404 g015
Figure 16. OETPN model of an evolutionary process.
Figure 16. OETPN model of an evolutionary process.
Mathematics 10 04404 g016
Figure 17. Quantum individual evaluation.
Figure 17. Quantum individual evaluation.
Mathematics 10 04404 g017
Figure 18. Representation of the targets and traps of the QDCW problem solved by a classic GA.
Figure 18. Representation of the targets and traps of the QDCW problem solved by a classic GA.
Mathematics 10 04404 g018
Figure 19. The representation of the probabilities of the best individual for QIGA.
Figure 19. The representation of the probabilities of the best individual for QIGA.
Mathematics 10 04404 g019
Figure 20. The representation of the probabilities of the best individual for HCQGA.
Figure 20. The representation of the probabilities of the best individual for HCQGA.
Mathematics 10 04404 g020
Figure 21. The representation of the probabilities of the best individual for CQGA.
Figure 21. The representation of the probabilities of the best individual for CQGA.
Mathematics 10 04404 g021
Table 1. Reachability graph of QPN from Figure 10.
Table 1. Reachability graph of QPN from Figure 10.
p 1 p 2 p 3 p 4 p 5 p 6 p 7 Transition
* X 0 ϕ ϕ ϕ ϕ ϕ t 1
ϕ ϕ X 0 X 1 ϕ ϕ ϕ t 3 & t 4
* X 0 ϕ ϕ X 1 ϕ ϕ t 1 & t 2
ϕ ϕ X 0 X 1 ϕ X 1 X 0 t 3 & t 4
Table 2. Place meanings of QPN from Figure 13.
Table 2. Place meanings of QPN from Figure 13.
p 0 p 1 p 2 p 3 Place Array p 4
( X 0 , Y 0 ) ( X 1 , Y 1 ) ( X 2 , Y 2 ) ( X 3 , Y 3 ) ( X 00 , Y 00 ) . ( X 01 , Y 01 ) , , ( X 33 , Y 33 )
Table 3. Reachability graph of QPN from Figure 13.
Table 3. Reachability graph of QPN from Figure 13.
p 0 p 1 p 2 p 3 p 4 Transition
( X 0 , Y 0 ) ϕ ϕ ϕ ϕ t 0
ϕ ϕ ϕ ϕ ( X 00 , Y 00 ) ( X 03 , Y 03 ) t 0 & t 1 & t 2 & t 3
( X 0 , Y 0 ) ( X 1 , Y 1 ) ( X 2 , Y 2 ) ( X 3 , Y 3 ) ϕ t 0 & t 1 & t 2 & t 3
ϕ ϕ ϕ ϕ ( X 00 , Y 00 ) ( X 33 , Y 33 ) t 0 & t 1 & t 2 & t 3
Table 4. Search evolution of QIGA.
Table 4. Search evolution of QIGA.
wJp θ 0 γ θ 1 γ θ 0 u θ 1 u Ψ g Ψ p
1 5.184191 1.970711 0.172057 5.517499 3.816113 0.3276860.252499
20 6.151463 5.105799 2.803489 4.184666 5.264229 0.58960.173016
50 25.99559 0.098936 0.117976 5.426092 3.997787 0.736560.261046
100 26.98992 1.604711 0.136218 5.446864 3.971793 0.8838180.094816
20030.266431.6224951.6752340.008871.5542620.9482570.296517
40030.405331.506281.5158216.2774521.5752740.9711440.26478
Table 5. Search evolution of HCQGA.
Table 5. Search evolution of HCQGA.
wJp θ 0 γ θ 1 γ θ 0 u θ 1 u Ψ g Ψ p
1−0.25914.3279664.3551294.6919255.2859350.323190.249785
200.96944.692210.9264911.7522134.3159060.481800.201644
501.00635.7851323.2128693.0692241.5798190.590340.172353
1001.19242.8412704.0737051.1634012.0247260.717030.205691
2001.32481.5336091.7035174.71557210.0479020.910050.2772
4001.34261.5336091.5453084.7155726.2794990.98910.261999
Table 6. Search evolution of CQGA.
Table 6. Search evolution of CQGA.
wJp θ 0 γ θ 1 γ θ 0 u θ 1 u Ψ g Ψ p
1−0.21694.7187261.8262850.8688925.2095610.3725340.149553
201.04276.1331671.1754524.3496685.188270.5604290.1686
501.22306.1331670.1.1429144.2470115.188270.7498760.178494
1001.24086.1331671.4566580.8688922.2696250.8593240.18782
2001.26316.1331671.4566580.8688922.254550.8886080.198289
4001.32206.2313081.5156130.8554292.2664280.9302390.197465
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Letia, T.S.; Durla-Pasca, E.M.; Al-Janabi, D.; Cuibus, O.P. Development of Evolutionary Systems Based on Quantum Petri Nets. Mathematics 2022, 10, 4404. https://doi.org/10.3390/math10234404

AMA Style

Letia TS, Durla-Pasca EM, Al-Janabi D, Cuibus OP. Development of Evolutionary Systems Based on Quantum Petri Nets. Mathematics. 2022; 10(23):4404. https://doi.org/10.3390/math10234404

Chicago/Turabian Style

Letia, Tiberiu Stefan, Elenita Maria Durla-Pasca, Dahlia Al-Janabi, and Octavian Petru Cuibus. 2022. "Development of Evolutionary Systems Based on Quantum Petri Nets" Mathematics 10, no. 23: 4404. https://doi.org/10.3390/math10234404

APA Style

Letia, T. S., Durla-Pasca, E. M., Al-Janabi, D., & Cuibus, O. P. (2022). Development of Evolutionary Systems Based on Quantum Petri Nets. Mathematics, 10(23), 4404. https://doi.org/10.3390/math10234404

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop