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")

Quantum circuit simulator in Swift

CI Status codecov platforms Documentation

Usage

Usage

Check code in Circuit.playground.

Performance

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

Algorithms

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

Other algorithms

More examples

Documentation

Documentation for the project can be found here.

References

SwiftPM dependencies

Linux

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.

GitHub

link
Stars: 34
Last commit: 1 week ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
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