Quantum circuit simulator in Swift.
Check code in Circuit.playground.
- Use a genetic algorithm to automatically generate a quantum circuit - Check example in Genetic.playground.
- Two-level decomposition: Decompose any gate into an equivalent sequence of not gates and fully controlled phase shifts, z-rotations, y-rotations & not gates - Check example in TwoLevelDecomposition.playground.
- Euclidean Algorithm: Find greatest common divisor of two integers - Check example in EuclideanAlgorithm.playground.
- Continued Fractions: Find an approximation to a given rational number - Check example in ContinuedFractions.playground.
- Gaussian Elimination: Solve a system of XOR equations - Check example in XorGaussianElimination.playground.
- Bernstein–Vazirani algorithm - Check code in BernsteinVaziraniAlgorithm.playground.
- Deutsch's algorithm - Check code in DeutschAlgorithm.playground.
- Deutsch-Jozsa algorithm - Check code in DeutschJozsaAlgorithm.playground.
- Grover's algorithm - Check code in GroverAlgorithm.playground.
- Shor's Algorithm - Check code in ShorAlgorithm.playground.
- Simon's periodicity algorithm - Check code in SimonPeriodicityAlgorithm.playground.
This dependency is reflected in
Package.swift with CBLAS-Linux, which in turn expects to find the following file:
/usr/include/x86_64-linux-gnu/cblas-netlib.h. So, after installing BLAS (in case it is not already there):
sudo apt-get install libblas-dev
cblas-netlib.h is in the expected location.