You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The algorithm maps the complete set of quantum gates T, Hadamard, CNOT, and their relative positions as a simple 'DNA', a generation of multiple random quantum algorithm 'DNA' are generated and compared to the desired output quantum state, the best members of this generation are bred (cut and joined together) and mutated (random 'DNA' changes) to create the next generation which is again evaluated.
Gate symbol key:
T: T
H: Hadamard
.- (+): CNOT
I: Identity (Blank)
Inputs and Targets
The required inputs and outputs for an algorithm are supplied as a series of probabilities, for instance a 2 qbit inversion gate could have the following inputs [[0, 0], [0, 1], [1, 0], [1, 1]] and following outputs [[1, 1], [1, 0], [0, 1], [0, 0]].
Scoring
Score = (-1 - mean square error) / (1 + number of blank rows)
Scoring is based on the absolute difference from the target probability and output probability of generated individual, divided by the number of possible eigenstates, this is then divided by the number of blank rows to promote simple algorithms. Python DEAP aims to minimise a negative score.
About
A Python program to both simulate a quantum computer and use parallel evolutionary techniques to design algorithms for it.