Skip to content

Swift package to support quantum computing simulations and experiments

License

Notifications You must be signed in to change notification settings

crodriguezdominguez/swift-quantum

Repository files navigation

Swift Quantum

Swift Package Manager compatible

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.

Using Swift Quantum in your project

To use Swift Quantum in a SwiftPM project:

  1. Add the following line to the dependencies in your Package.swift file:
.package(url: "https://github.com/crodriguezdominguez/swift-quantum", from: "1.0.0"),
  1. Add SwiftQuantum as a dependency for your target:
.target(name: "MyTarget", dependencies: [
  .product(name: "SwiftQuantum", package: "swift-quantum"),
  "AnotherModule"
]),
  1. Add import SwiftQuantum in your source code.

Source stability

The Swift Quantum package is source stable; version numbers follow Semantic Versioning.

About

Swift package to support quantum computing simulations and experiments

Resources

License

Stars

Watchers

Forks

Packages

No packages published