package qcaml

  1. Overview
  2. Docs
Experimental OCaml library for quantum computing simulation

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1.7.tar.gz
md5=d7eb2f035e630f64250607f08bf1aa51
sha512=7b4e637016793f5ef3370e39f021a50cd9cda24a31a125d1bcbb45bb214140b0b4f4038bea41d3b0361f54f642439cde845f055afe9a67435049d4672df3dbf6

doc/qcaml/Quantum/Qubit/index.html

Module Quantum.QubitSource

  • author Elias GAUTHIER

file : qubit.mli date : 2025-10-02 license : Apache-2.0 description : Implementation of qubits with quantum state representation and operations.

Sourcetype q = {
  1. mutable alpha : Complex.complex;
  2. mutable beta : Complex.complex;
}

Type representing a qubit

Sourceval zero : unit -> q

The qubit |0⟩

Sourceval one : unit -> q

The qubit |1⟩

Sourceval plus : unit -> q

Superposition |+⟩

Sourceval minus : unit -> q

Superposition |-⟩

Sourceval get_alpha : q -> Complex.complex

Alpha getter

Sourceval get_beta : q -> Complex.complex

Beta getter

Sourceval print : unit -> q -> string

Print the values of a qubit

  • parameter q

    The qubit to print

  • returns

    A string representation of the qubit