Skip to content

General-purpose SDKs

SwiftQuantumComputing

Maintained by indisoluble

Run this application to check the performance of this simulator in your computer.

SwiftApache-2.0
SwiftQuantumComputing illustration

Resource snapshot

Category

General-purpose SDKs

Stars

52

Last pushed

Mar 20, 2022Updated 4y ago

Open issues

0

What it is

SwiftQuantumComputing is maintained by indisoluble and sits in the Pulse and control lane of the open-source quantum map.

Run this application to check the performance of this simulator in your computer.

Last verified by Qtangl generator on May 27, 2026

Who it's for

Hardware-adjacent developers and researchers working closer to experiments, pulse schedules, or lab orchestration.

What you can build or learn

  • See how low-level control stacks differ from higher-level SDKs.
  • Understand where pulse sequencing and experiment orchestration fit in the stack.
  • Learn which projects matter when hardware control is part of the workflow.

License

Apache-2.0

SPDX identifier detected from the repository metadata or license files.

Repository README

Preview from the project README.

Rendered as Markdown inside a scrollable preview. Long READMEs stay contained; expand or open on GitHub for the full document.

~452 words · about 2 min readOpen on GitHub

Quantum circuit simulator in Swift

CI Status codecov Documentation

Usage

Circuit

Usage

Check code in Circuit.playground.

Circuit with noise

import SwiftQuantumComputing // for macOS
//: 1. Compose a list of quantum gates & noises
let quantumOperators: [QuantumOperatorConvertible] = [
    Gate.hadamard(target: 0),
    Noise.bitFlip(probability: 0.35, target: 0),
    Gate.phaseShift(radians: 0.25, target: 2),
    Noise.phaseDamping(probability: 0.75, target: 2),
    Gate.controlled(gate: .hadamard(target: 1), controls: [2, 0]),
    Noise.bitFlip(probability: 0.8, target: 1)
]
//: 2. Build a quantum circuit with noise using the list
let circuit = MainNoiseCircuitFactory().makeNoiseCircuit(quantumOperators: quantumOperators)
//: 3. Use the quantum circuit with noise
let result = try circuit.densityMatrix().get()
print("Density matrix: \(result)\n")
print("Probabilities: \(result.probabilities())\n")

Check code in NoiseCircuit.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 & LAPACK if running on Linux, more exactly, Ubuntu.

These dependencies are reflected in Package.swift with:

  • CBLAS-Linux, which in turn expects to find: /usr/include/x86_64-linux-gnu/cblas-netlib.h
  • CLapacke-Linux, which in turn expects to find: /usr/include/lapacke.h

So, after installing BLAS & LAPACK (in case they are not already there):

sudo apt-get install libblas-dev liblapacke-dev

Check cblas-netlib.h & lapacke.h are in the expected locations.

Read on GitHub

Activity

Latest release

—

Watchers

4

Python support

—

Learn digest

Get monthly updates when library entries change.

Monthly digest: new library entries, updated flagships, and one editorial pick.

Related resources

Keep exploring nearby tools.

quantumlib

Cirq

Python framework for creating, editing, and running Noisy Intermediate-Scale Quantum (NISQ) circuits.

PythonApache-2.0Flagship

4,971 stars · Updated 3mo ago

XanaduAI

pennylane

PennyLane is an open-source quantum software platform for quantum computing, quantum machine learning, and quantum chemistry.

PythonApache-2.0FlagshipQtangl relevant

3,229 stars · Updated 3mo ago

QISKit

qiskit

Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.

PythonApache-2.0FlagshipQtangl relevant

7,412 stars · Updated 3mo ago

Qiskit

qiskit-terra

Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.

PythonApache-2.0

7,412 stars · Updated 3mo ago

Microsoft

QuantumKatas

Tutorials and programming exercises for learning Q# and quantum computing

Jupyter NotebookMITFlagshipArchive

4,862 stars · Updated 2y ago

QuantumBFS

Yao.jl

Extensible, Efficient Quantum Algorithm Design for Humans.

JuliaApache-2.0Flagship

1,032 stars · Updated 3mo ago