Synthesis of Quantum Circuits with an Island Genetic Algorithm.pdf

Synthesis of Quantum Circuits
with an Island Genetic Algorithm
Fernando T. Miranda, Pedro Paulo Balbi, and
Pedro C.S. Costa
Synthesis of Quantum Circuits with an Island Genetic Algorithm
● The focus of the paper is finding a unitary decomposition based on the
circuit model of computation.
● From a specific gate set, the goal of this work is to find an equivalent
circuit, through the evolutionary search, for a given unitary U.
Objective Function
Given a unitary matrix U we search for the quantum circuit that produces this
matrix with the greatest possible fidelity
Trace fidelity:
This function quantifies the fidelity of the quantum circuit with respect to the
target unitary.
Ua : unitary given
Ut : the target unitary
n: number of qubits needed to describe Ua
Tr(.): trace operation of a given matrix
However, by the Solovay-Kitaev theorem, we know that the ideal solution cannot be achieved
Notice: when Ua = Ut, f = 1.
f ∊ [0,1]
Chromosome Representation
Each item from left-to-right represents a column of the circuit.
({1: (‘H’, -1, None)}, {1: (‘X’, 0, None)}, {2: (‘X’, 1, None)}, {1: (‘X’, 0, None)})
Target qubit - Operation - Controlled-qubit - Parameter
Here, the absence of control is indicated by -1 and the absence of
parameter is indicated by None. The indices are mapped from top to
bottom, with 0 indicating the first qubit.
Chromosome Representation
Each chromosome is made up of B unitary blocks, each one being a
circuit itself.
Types of blocks
Non-controlled block: single column block (depth = 1) without any control
points.
Controlled-block: single column block (depth = 1) with 1 or more control
points.
Helper Block: predefined block with depth greater than 1.
Chromosome Representation (example)
Non-controlled Blocks Controlled Blocks Helper Block
Evolutionary Algorithm
Classical Genetic Algorithms present the problem of premature
convergence:
● Due to the lack of continuous parameters to guide search.
● The exchange of genetic material tends to make individuals too similar.
● Reaching almost always a local maximum.
To overcome this problem an Island Model concept was adopted.
Island Model
In this type of model, different populations (sets of individuals) evolve
independently at first. Later, they exchange genetic material in a process
called migration.
This model is a parallel version of an ordinary GA, where there is a exchange of
information among different populations.
● Each population may follow different evolutionary path.
● This increases diversity and the effectiveness of the search.
Island Model (first step)
● g : number of populations.
● p : number of chromosomes of each population.
● Individuals are created with a number of blocks between 4 and 15 by
randomly generating each one of its blocks.
○ First, a block type is randomly chosen. For non-controller and
controlled blocks, gates and their positions are chosen uniformly at
random.
○ For helper blocks, the type of helper and the control wire is chosen
uniformly at random.
After that, evolution will proceed in the following way:
The first step occurs in isolation within each population
● We pick the leader (individual with the highest fitness) of each population.
● For every individual in the population a new offspring is created:
offspring = leader[:nl] + individual[:ni]
● Then, a single mutation is applied to the offspring
○ if fitness(individual) < fitness(offspring):
replace individual by offspring
○ else:
discard(offspring)
nl = max(1, floor(Bl x rl))
ni = max(1, floor(Bi x ri))
number of blocks in
leader / individual
1st Crossover (example)
rl = 0.3
ri = 0.7
nl = max(1, floor(4 x rl)) = 1
ni = max(1, floor(3 x ri)) = 2
leader
individual
Crossover between Populations
● This operator has a vital role in providing genetic variability to the
evolutionary process. It happens as follow:
● For an individual l in population_i:
○ Pick individual m from population_j; { i ≠ j }
■ Create an offspring with min(B(l),B(m)) number of blocks
○ if fitness(l) < fitness(offspring):
replace individual by offspring
○ else:
discard(offspring)
number of blocks of l / m
Each block of the offspring will be
selected from the homologous
position of individuals l or m, with
equal probability.
Mutation
First, each individual will mutate but the block where the mutation happens is
randomly chosen.
The mutation mechanism for each type of block is described as follow:
● Non controlled block
● Controlled block
Random shuffling: randomly reassigns the control, target, and gates present to new positions
on the wire.
Removal of Control points: only available when there is more that one control point.
Gate change: pick a gate and change its operator.
If both random shuffling and gate change are available only one is applied.
replace the unitary by a random gate
● Random shuffling
● removal of control point
● gate change
Mutation
● Helper blocks
Examples of Mutation:
randomly pick a sub-block, and
mutate it according to its type
Stop Criterion
The algorithm is interrupted when the equation below is smaller or equal to 1x10^(-6). This
criterion is checked after the 2nd crossover process
Where f was defined previously as the trace fidelity function.
The whole process is
summarized in this
graph
Parameters for experiment
rl = 0.7
ri = 0.3
g = 20
p = 30
Maximum number of iterations: 10^4
Block sizes: 4 to 15
Quantum gate set available: {H,S,CNOT,X,X^(1/2),T} including the complex
conjugate of the gates T, S, and X^(1/2).
They also added extra gates like the one provided by IBM Quantum
Experience.
Results
Hadamard Coin for the Quantum Walker
ε < 1x10^(-6)
Found in less than 600 iterations
Eliminating redundancies like HH = I or ZZ = I
Results
Toffoli Gate
ε < 1x10^(-6)
Found in less than 1250 iterations
Eliminating redundancies like
Results
Fredkin Gate
ε < 1x10^(-16)
Found in less than 5000 iterations
Eliminating redundancies like
Conclusions
● The implementation was able to find the solutions in a number of iterations that
were either smaller or comparable to other analogous works.
● However, it doesn’t consider the cost of implementation for each gate.
● One important limitation of the present work relates to the maximum number of
qubits allowed: unitaries with 10 or more qubits will make the search considerably
slower, due to the exponential usage of memory. But this can be relatively easy
to remedy by making use of sparse data structures.
● The size of the unitary seems to affect the number of iterations until a solution is
found. The bigger the longer it takes.
● As we pointed out before, the solutions presented redundant circuit segments.
● A faster convergence can be achieved by introducing more high-level
components into the search space.
● This work provided the proof-of-principle that the island GA can be used for
circuit synthesis, regardless of the practical quantum device used.
1 de 21

Recomendados

Monte Carlo Berkeley.pptxMonte Carlo Berkeley.pptx
Monte Carlo Berkeley.pptxHaibinSu2
11 visualizações61 slides
Genetic algorithmGenetic algorithm
Genetic algorithmgarima931
61.9K visualizações40 slides
Genetic algorithmsGenetic algorithms
Genetic algorithmsguest9938738
2.9K visualizações63 slides
F0422052058F0422052058
F0422052058ijceronline
350 visualizações7 slides

Mais conteúdo relacionado

Similar a Synthesis of Quantum Circuits with an Island Genetic Algorithm.pdf(20)

Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
SHIMI S L2.6K visualizações
ML.pptML.ppt
ML.ppt
butest505 visualizações
Ga for shortest_pathGa for shortest_path
Ga for shortest_path
DrBaljitSinghKhehra93 visualizações
ATPG of reversible circuitsATPG of reversible circuits
ATPG of reversible circuits
Rahul Krishnamurthy865 visualizações
OutliersOutliers
Outliers
Xuan Le1.2K visualizações
Transportation winstonTransportation winston
Transportation winston
Kinshook Chaturvedi1.9K visualizações
Cuckoo Search Algorithm: An IntroductionCuckoo Search Algorithm: An Introduction
Cuckoo Search Algorithm: An Introduction
Xin-She Yang218 visualizações
Variational Bayes: A Gentle IntroductionVariational Bayes: A Gentle Introduction
Variational Bayes: A Gentle Introduction
Flavio Morelli454 visualizações
Higgs Boson Machine Learning Challenge ReportHiggs Boson Machine Learning Challenge Report
Higgs Boson Machine Learning Challenge Report
Chamila Wijayarathna784 visualizações

Último(20)

Solar PVSolar PV
Solar PV
Iwiss Tools Co.,Ltd11 visualizações
SICTECH CORPORATE PRESENTATIONSICTECH CORPORATE PRESENTATION
SICTECH CORPORATE PRESENTATION
SiCtechInduction16 visualizações
Sanitary Landfill- SWM.pptxSanitary Landfill- SWM.pptx
Sanitary Landfill- SWM.pptx
Vinod Nejkar5 visualizações
CHI-SQUARE ( χ2) TESTS.pptxCHI-SQUARE ( χ2) TESTS.pptx
CHI-SQUARE ( χ2) TESTS.pptx
ssusera597c514 visualizações
Electronic Devices - Integrated Circuit.pdfElectronic Devices - Integrated Circuit.pdf
Electronic Devices - Integrated Circuit.pdf
booksarpita10 visualizações
What is Unit TestingWhat is Unit Testing
What is Unit Testing
Sadaaki Emura21 visualizações
Dynamics of Hard-Magnetic Soft MaterialsDynamics of Hard-Magnetic Soft Materials
Dynamics of Hard-Magnetic Soft Materials
Shivendra Nandan13 visualizações
Stone Masonry and Brick Masonry.pdfStone Masonry and Brick Masonry.pdf
Stone Masonry and Brick Masonry.pdf
Mohammed Abdullah Laskar19 visualizações
Paper 3.pdfPaper 3.pdf
Paper 3.pdf
Javad Kadkhodapour6 visualizações
IWISS Catalog 2022IWISS Catalog 2022
IWISS Catalog 2022
Iwiss Tools Co.,Ltd23 visualizações
String.pptxString.pptx
String.pptx
Ananthi Palanisamy47 visualizações
performance uploading.pptxperformance uploading.pptx
performance uploading.pptx
SanthiS107 visualizações
Electrical CrimpingElectrical Crimping
Electrical Crimping
Iwiss Tools Co.,Ltd19 visualizações
Pointers.pptxPointers.pptx
Pointers.pptx
Ananthi Palanisamy62 visualizações
Object Oriented Programming with JAVAObject Oriented Programming with JAVA
Object Oriented Programming with JAVA
Demian Antony D'Mello58 visualizações
LFA-NPG-Paper.pdfLFA-NPG-Paper.pdf
LFA-NPG-Paper.pdf
harinsrikanth40 visualizações
Codes and Conventions.pptxCodes and Conventions.pptx
Codes and Conventions.pptx
IsabellaGraceAnkers6 visualizações

Synthesis of Quantum Circuits with an Island Genetic Algorithm.pdf

  • 1. Synthesis of Quantum Circuits with an Island Genetic Algorithm Fernando T. Miranda, Pedro Paulo Balbi, and Pedro C.S. Costa
  • 2. Synthesis of Quantum Circuits with an Island Genetic Algorithm ● The focus of the paper is finding a unitary decomposition based on the circuit model of computation. ● From a specific gate set, the goal of this work is to find an equivalent circuit, through the evolutionary search, for a given unitary U. Objective Function Given a unitary matrix U we search for the quantum circuit that produces this matrix with the greatest possible fidelity
  • 3. Trace fidelity: This function quantifies the fidelity of the quantum circuit with respect to the target unitary. Ua : unitary given Ut : the target unitary n: number of qubits needed to describe Ua Tr(.): trace operation of a given matrix However, by the Solovay-Kitaev theorem, we know that the ideal solution cannot be achieved Notice: when Ua = Ut, f = 1. f ∊ [0,1]
  • 4. Chromosome Representation Each item from left-to-right represents a column of the circuit. ({1: (‘H’, -1, None)}, {1: (‘X’, 0, None)}, {2: (‘X’, 1, None)}, {1: (‘X’, 0, None)}) Target qubit - Operation - Controlled-qubit - Parameter Here, the absence of control is indicated by -1 and the absence of parameter is indicated by None. The indices are mapped from top to bottom, with 0 indicating the first qubit.
  • 5. Chromosome Representation Each chromosome is made up of B unitary blocks, each one being a circuit itself. Types of blocks Non-controlled block: single column block (depth = 1) without any control points. Controlled-block: single column block (depth = 1) with 1 or more control points. Helper Block: predefined block with depth greater than 1.
  • 6. Chromosome Representation (example) Non-controlled Blocks Controlled Blocks Helper Block
  • 7. Evolutionary Algorithm Classical Genetic Algorithms present the problem of premature convergence: ● Due to the lack of continuous parameters to guide search. ● The exchange of genetic material tends to make individuals too similar. ● Reaching almost always a local maximum. To overcome this problem an Island Model concept was adopted.
  • 8. Island Model In this type of model, different populations (sets of individuals) evolve independently at first. Later, they exchange genetic material in a process called migration. This model is a parallel version of an ordinary GA, where there is a exchange of information among different populations. ● Each population may follow different evolutionary path. ● This increases diversity and the effectiveness of the search.
  • 9. Island Model (first step) ● g : number of populations. ● p : number of chromosomes of each population. ● Individuals are created with a number of blocks between 4 and 15 by randomly generating each one of its blocks. ○ First, a block type is randomly chosen. For non-controller and controlled blocks, gates and their positions are chosen uniformly at random. ○ For helper blocks, the type of helper and the control wire is chosen uniformly at random.
  • 10. After that, evolution will proceed in the following way: The first step occurs in isolation within each population ● We pick the leader (individual with the highest fitness) of each population. ● For every individual in the population a new offspring is created: offspring = leader[:nl] + individual[:ni] ● Then, a single mutation is applied to the offspring ○ if fitness(individual) < fitness(offspring): replace individual by offspring ○ else: discard(offspring) nl = max(1, floor(Bl x rl)) ni = max(1, floor(Bi x ri)) number of blocks in leader / individual
  • 11. 1st Crossover (example) rl = 0.3 ri = 0.7 nl = max(1, floor(4 x rl)) = 1 ni = max(1, floor(3 x ri)) = 2 leader individual
  • 12. Crossover between Populations ● This operator has a vital role in providing genetic variability to the evolutionary process. It happens as follow: ● For an individual l in population_i: ○ Pick individual m from population_j; { i ≠ j } ■ Create an offspring with min(B(l),B(m)) number of blocks ○ if fitness(l) < fitness(offspring): replace individual by offspring ○ else: discard(offspring) number of blocks of l / m Each block of the offspring will be selected from the homologous position of individuals l or m, with equal probability.
  • 13. Mutation First, each individual will mutate but the block where the mutation happens is randomly chosen. The mutation mechanism for each type of block is described as follow: ● Non controlled block ● Controlled block Random shuffling: randomly reassigns the control, target, and gates present to new positions on the wire. Removal of Control points: only available when there is more that one control point. Gate change: pick a gate and change its operator. If both random shuffling and gate change are available only one is applied. replace the unitary by a random gate ● Random shuffling ● removal of control point ● gate change
  • 14. Mutation ● Helper blocks Examples of Mutation: randomly pick a sub-block, and mutate it according to its type
  • 15. Stop Criterion The algorithm is interrupted when the equation below is smaller or equal to 1x10^(-6). This criterion is checked after the 2nd crossover process Where f was defined previously as the trace fidelity function.
  • 16. The whole process is summarized in this graph
  • 17. Parameters for experiment rl = 0.7 ri = 0.3 g = 20 p = 30 Maximum number of iterations: 10^4 Block sizes: 4 to 15 Quantum gate set available: {H,S,CNOT,X,X^(1/2),T} including the complex conjugate of the gates T, S, and X^(1/2). They also added extra gates like the one provided by IBM Quantum Experience.
  • 18. Results Hadamard Coin for the Quantum Walker ε < 1x10^(-6) Found in less than 600 iterations Eliminating redundancies like HH = I or ZZ = I
  • 19. Results Toffoli Gate ε < 1x10^(-6) Found in less than 1250 iterations Eliminating redundancies like
  • 20. Results Fredkin Gate ε < 1x10^(-16) Found in less than 5000 iterations Eliminating redundancies like
  • 21. Conclusions ● The implementation was able to find the solutions in a number of iterations that were either smaller or comparable to other analogous works. ● However, it doesn’t consider the cost of implementation for each gate. ● One important limitation of the present work relates to the maximum number of qubits allowed: unitaries with 10 or more qubits will make the search considerably slower, due to the exponential usage of memory. But this can be relatively easy to remedy by making use of sparse data structures. ● The size of the unitary seems to affect the number of iterations until a solution is found. The bigger the longer it takes. ● As we pointed out before, the solutions presented redundant circuit segments. ● A faster convergence can be achieved by introducing more high-level components into the search space. ● This work provided the proof-of-principle that the island GA can be used for circuit synthesis, regardless of the practical quantum device used.