Swiftpack.co -
indisoluble/SwiftQuantumComputing as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.

indisoluble/SwiftQuantumComputing

Quantum circuit simulator in Swift

.package(url: "https://github.com/indisoluble/SwiftQuantumComputing.git", from: "24.5.1")
Check code in Circuit.playground.

```
~/SwiftQuantumComputing % swift run sqc-measure-performance
```

Run this application to check the performance of this simulator in your computer. Execute `swift run sqc-measure-performance -h`

to see all available options.

Check code in SQCMeasurePerformance/main.swift.

- 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.

Documentation for the project can be found here.

- Automatic Quantum Computer Programming: A Genetic Programming Approach
- Continued Fractions and the Euclidean Algorithm
- Decomposition of unitary matrices and quantum gates
- Decomposition of unitary matrix into quantum gates
- IBM Qiskit
- qHiPSTER: The Quantum High Performance Software Testing Environment
- Quantum Computing for Computer Scientists
- Shor's Quantum Factoring Algorithm

- CBLAS-Linux (only for Linux)
- Swift Argument Parser
- Swift Numerics

This package depends on BLAS if running on Linux, more exactly, Ubuntu.

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
```

Check `cblas-netlib.h`

is in the expected location.

link |

Stars: 34 |

Last commit: 1 week ago |

Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API