Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/llens/QuantumComputingEvolutionaryAlgorithmDesign
A Python program to both simulate a quantum computer and use parallel evolutionary techniques to design algorithms for it.
https://github.com/llens/QuantumComputingEvolutionaryAlgorithmDesign
Last synced: about 2 months ago
JSON representation
A Python program to both simulate a quantum computer and use parallel evolutionary techniques to design algorithms for it.
- Host: GitHub
- URL: https://github.com/llens/QuantumComputingEvolutionaryAlgorithmDesign
- Owner: llens
- License: gpl-3.0
- Created: 2017-07-21T08:08:31.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-09-03T02:07:41.000Z (over 2 years ago)
- Last Synced: 2024-02-15T09:31:47.592Z (11 months ago)
- Language: Python
- Homepage:
- Size: 134 KB
- Stars: 18
- Watchers: 4
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-quantum-software - QCEAD - C++ program to both simulate a quantum computer and use parallel evolutionary techniques to design algorithms. (Quantum simulators)
README
## QuantumComputingEvolutionaryAlgorithmDesign
# Description
Uses evolutionary algorithms and python-quintuple to automatically design quantum computing algorithms. Inspired by the ideas in the following PhD thesis, but implemented entirely originally, http://theses.ucalgary.ca/jspui/bitstream/11023/2780/3/ucalgary_2016_zahedinejad_ehsan.pdf.
The Quantum Computer implementation itself is from this project https://github.com/corbett/QuantumComputing, the file QuantumComputer.py, is unmodified in any way from the original.# Operation.
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.