A Swift package to support quantum computing simulations and experiments. Some of its most relevant characteristics are:
- Simple, Swift-based API.
- High performance efficiency, based on sparse arrays to decrease memory use.
- Flexibility: It is possible to define custom quantum circuits and gates, which can be composed to create complex circuits or gates.
- I/O support: Circuits can be de/serialized from/to JSON documents.
Swift Quantum module has minimal dependencies on other projects, except for Swift Numerics.
Several use examples are available at Tests/SwiftQuantumTests.
To use Swift Quantum in a SwiftPM project:
- Add the following line to the dependencies in your Package.swiftfile:
.package(url: "https://github.com/crodriguezdominguez/swift-quantum", from: "1.0.0"),- Add SwiftQuantumas a dependency for your target:
.target(name: "MyTarget", dependencies: [
  .product(name: "SwiftQuantum", package: "swift-quantum"),
  "AnotherModule"
]),- Add import SwiftQuantumin your source code.
The Swift Quantum package is source stable; version numbers follow Semantic Versioning.