Swiftpack.co -  WowbaggersLiquidLunch/Quantum as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
A library that enables quantum mechanical behaviours for variables; no complex vector space involved.
.package(url: "https://github.com/WowbaggersLiquidLunch/Quantum.git", from: "0.0.2")


This package allows variables to behave in a quantum mechanical way.

A quantum mechanical variable can be created in 2 ways:

  1. Via Quantum's initialiser directly.

    var quantumText = Quantum("Schrödinger")
  2. Via the @Quantum annotation.

    var quantumNumber = 0

Variables governed by quantum mechanics behave differently from those governed by classical mechanics. For a classical mechanical system, it is possible to predict the present state if its past states and movements are known (determinism), and vice versa (reversibility). On the contrary, for a quantum mechanical system, it is impossible to predict its state at any point in time; its present state is unknown until observed.

quantumNumber = 1
quantumNumber = 2
quantumNumber = 3

//	Prints "[0: 0.125, 1: 0.125, 2: 0.25, 3: 0.5]".

//	Prints "0", "1", "2", or "3".
//	All for values are possible.

Please see the project's wiki for detailed documentation.

This library, and everything included in this directory is released both to the public domain (through the Unlicense license) and under the MIT license. The user is free to choose either license. In general, public domain is preferred, unless the circumstance dictates otherwise. For more information, see LICENSE.

Unlicense icon


Stars: 0
Last commit: 6 weeks 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.

Release Notes

12 weeks ago

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