R&D BioTech Alaska research program

QELM — Quantum-Enhanced Language Model

Build and study compact language models around trainable quantum channels, amplitude-and-phase features, the QSA 0.2 exact runtime, and inspectable local tools.

Windows build · July 30, 2026 QSA runtime 0.2.0 SHA-256 published

QELM Current State

Updated August 2026
01 QELM Core

The working public model framework.

QELM can create, train, save, load, and run compact language models with quantum attention and feed-forward paths. The public release includes dataset preparation, a trainer, model serialization, token maps, a lightweight chat UI, and local or IBM-compatible backend routes.

Available now

  • PyPI package and public source
  • Scalar and sub-bit encoding
  • Parameter-shift, SPSA, and Adam training
  • Trainer GUI and saved-model chat UI

Active work

  • Full sequential multi-block execution
  • Independent amplitude and phase learning
  • Faster GPU and larger-model paths
  • QSA 0.2 estimator and execution integration
Open QELM source →
Q

Inside a QELM Forward Path

The public model path from text input to next-token logits.

  1. 01

    Tokens

    Text is prepared as token IDs with a stored token map and configurable vocabulary.

  2. 02

    Embeddings

    Token and optional context, position, memory, or knowledge features enter the sequence path.

  3. 03

    Quantum attention

    Query, key, value, and output parameters drive multi-head channel processing and optional data reuploading.

  4. 04

    Quantum feed-forward

    Trainable channels encode amplitude and phase features, entangle states, and return decoded features.

  5. 05

    Residual and norm

    Classical residual combination and RMS normalization preserve the end-to-end language path.

  6. 06

    Vocabulary logits

    The output projection produces next-token logits for cross-entropy, perplexity, training, or generation.

CPUSupported

Local circuit and statevector processing.

Qiskit AerSupported

Local quantum simulation and comparison work.

IBM RuntimeSupported path

Credentialed hardware experiments with shot and runtime limits.

GPUExperimental

Accelerated simulation where the selected path is compatible.

Cubit / HybridExperimental

Alternate logical-qubit and emulator routes.

QSA 0.2Active integration

Exact native execution for eligible structured workloads.

Install & Downloads

Download the current Windows build or install the Python package.

>_
Python package

QELM 0.1.4

Install the trainer, model framework, and local tools through PyPI.

Python 3.9+WindowsLinuxmacOS
pip install qelm
Open on PyPI → View source
Distributed compute

Qubit Node

Desktop, mobile, and research node packages are not yet available for public deployment.

Desktop plannedMobile planned
View public foundation

QELM / Quantum Lab

|0⟩|1⟩

QSA Exact Runtime

Compiled structural execution, tensor plans, estimators, gradients, and QSC state transport.

0.2.0 released
Open ↗

QELM Core

Quantum channels, sub-bit features, training, inference, and local tooling.

0.1.4 public
Open ↗

Qubit Network

Temporary channel architecture built on public local qubit foundations.

Runtime pre-release
Open ↗

Brain Integration

Governed memory, learning, recovery, and QELM model authority.

Protected · active
Private

Measured Evidence

Configuration-bound results, not universal speedup claims.

QELM public package 0.1.4

Inspectable end-to-end framework

PyPI and the public source contain dataset preparation, quantum attention and feed-forward layers, next-token training, saved-model tools, backend routing, and local interfaces. Availability is not a performance claim.

QSA 0.2 numerical core 4.52x-7.96x

Fused native kernels

Recorded real, complex, and 2x2 batch workloads ran faster than matched NumPy work with preallocated outputs. This is not a general BLAS comparison.

Reusable exact tensor plan 36.4x

Repeated 100-qubit amplitude queries

The compiled bounded-width plan outpaced rebuilding and direct contraction on the recorded workload while preserving exact execution.

Exact adjoint gradient 364x

100-qubit structured gradient workload

The best execution ratio was measured against matched exact Aer MPS parameter shift; setup plus first execution measured 4.51x.

Public benchmark record

Exact structured-state results behind QELM

Open benchmark source ↗
4.52x-7.96x
Fused numerical runtimePersistent bounded CPU workers, deterministic reductions, fused arithmetic, inner products, and small complex matrix batches.
Matched hosted-CPU work
32.6x / 36.4x
Reusable exact tensor queriesRepeated 18-qubit and 100-qubit amplitude queries after compiling the bounded contraction plan once.
Bounded contraction width
about 29x
18-qubit estimator sweepParameterized exact estimator execution compared with the matched Aer parameter sweep.
Compile once, rebind parameters
161x-239x
100-qubit estimator sweepRecorded exact structured sweeps versus matched Aer MPS with truncation disabled.
Exact MPS reference
96.2x / 364x
Exact adjoint gradientsBest execution ratios for the recorded 18-qubit and 100-qubit gradient workloads, with causal and static term pruning.
Workload-specific gradients

These are exact, reproducible results for the named structures and workloads. They are not a claim of universal quantum advantage; arbitrary dense states remain dense.

Resources

Support QELM Research

R&D BioTech Alaska · 501(c)(3)

Direct donation

Help keep independent research and public tools moving

QELM is developed through R&D BioTech Alaska, a charitable and scientific nonprofit. Donations support research infrastructure, testing, documentation, education, and public releases. PayPal processes the transaction; this site never receives card details.

$ USD
QELM LAB

Two-Qubit State Explorer

This browser-only circuit demonstrates the state math behind QSA’s simplest operations. It does not run a trained QELM model or contact a quantum computer.

  1. Apply H to q0.
  2. Apply CX to entangle q0 and q1.
  3. Compare the |00⟩ and |11⟩ probabilities.
0.50π
Local statevector
q0
q1

|00⟩

|00⟩
100%
|01⟩
0%
|10⟩
0%
|11⟩
0%