mqc

    Quantum computing library for MoonBit.

    quantum
    qubits
    quantum-simulation
    state-vector
    quantum-computing
    Download zip
    Author
    Version
    0.1.1
    License
    MIT
    Last updated
    15 hours ago
    Downloads
    8

    No dependencies

    #MQC

    Quantum computing library for MoonBit.

    #Getting Started

    Installation:
    moon add Arcelyth/mqc

    See examples here.

    Channel

    Circuit

    Represent a quantum circuit which shares the operation sequence.

    Complex

    A complex number. Components are immutable.

    Effect

    A quantum action on an ordered local wire shape such as Gate, Channel, and Program.

    An effect describes an operation independently of the physical wires it is applied to. Its local wire indices are mapped onto the enclosing operation's target wires when it is added to a program or circuit.

    ExecutionResult

    A backend's result for one or more experiments, in submission order.

    ExecutionStatus

    Completion of one experiment or a whole batch.

    ExperimentResult

    One execution's result.

    Gate

    An immutable unitary effect.

    Instruction

    A checked binding to ordered local wire indices.

    Operation

    An effect bound to distinct, ordered quantum IDs.

    Program

    Qid

    using @Arcelyth/mqc/circuit { trait Qid }

    Identifies a quantum object. Equal IDs must have the same, fixed dimension. Dimensions must be at least two.

    QuantumError

    QubitId

    A logical qubit ID with no device position.

    QuditId

    Identifies a qudit, a quantum system with a finite-dimensional state space. The levels field specifies the dimension of its local Hilbert space.

    ResultData

    Named output data from one experiment. Only requested outputs are stored.

    SamplerResult

    StateVector

    A quantum state represented by a complex state vector.

    For example, a two-qubit state |ψ⟩ = (|00⟩ + |11⟩) / √2:

    shape = [2, 2] re = [1/√2, 0, 0, 1/√2] im = [0, 0, 0, 0]

    The entries are stored in basis-state order: |00⟩, |01⟩, |10⟩, |11⟩.

    StateVectorSimulator

    UnitaryKernel

    A pure, linear, unitary map on a local state vector.

    Source Files