npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

quantum-forge

v2.6.1

Published

Quantum Forge WASM loader, property manager, and Vite plugin for quantum game development (Qutrit Edition d3n12 + Qubit Edition d2n20).

Readme

quantum-forge

Real quantum mechanics for game developers. Superposition, entanglement, and interference powered by a compiled C++ quantum simulator running via WebAssembly.

This is the core package — WASM loader, quantum property manager, and Vite plugin. For the full game framework (engine, rendering, input, audio, etc.), install quantum-forge-engine instead.

Install

npm install quantum-forge

Quick Start

1. Configure Vite

// vite.config.ts
import { defineConfig } from "vite";
import { quantumForgeVitePlugin } from "quantum-forge/vite-plugin";

export default defineConfig({
  plugins: [quantumForgeVitePlugin()],
});

ESM note: If using vite.config.js (not .ts or .mjs), add "type": "module" to your package.json.

2. Use Quantum Mechanics

import { ensureLoaded, QuantumPropertyManager } from "quantum-forge/quantum";

// Initialize WASM (call once at startup)
await ensureLoaded();

// Create a property manager
const qpm = new QuantumPropertyManager({ dimension: 2 });

// Create a qubit and put it in superposition
const qubit = qpm.acquireProperty();
qpm.hadamard(qubit);

// Read probabilities (no collapse)
const probs = qpm.probabilities(qubit); // [~0.5, ~0.5]

// Measure (collapses to 0 or 1)
const [value] = qpm.measureProperties([qubit]);

// Recycle for reuse
qpm.releaseProperty(qubit, value);

3. Entanglement

const a = qpm.acquireProperty();
const b = qpm.acquireProperty();

qpm.hadamard(a);
qpm.iSwap(a, b); // Entangle — measuring one determines the other

const [va, vb] = qpm.measureProperties([a, b]);
// va and vb are always anti-correlated

Editions

Two WASM builds are included:

| Edition | Dimensions | Max Qudits | Use Case | |---------|-----------|------------|----------| | Qutrit (default) | 2–3 | 12 | Games using qutrits (3-state quantum digits) | | Qubit | 2 | 20 | Games needing more qubits at dimension 2 |

To use the Qubit Edition:

import { useQuantumForgeBuild, ensureLoaded } from "quantum-forge/quantum";

useQuantumForgeBuild("qubit"); // Call before ensureLoaded()
await ensureLoaded();

Package Exports

| Export | Contents | |--------|----------| | quantum-forge/quantum | ensureLoaded, QuantumPropertyManager, QuantumRecorder, useQuantumForgeBuild | | quantum-forge/logging | Logger | | quantum-forge/vite-plugin | quantumForgeVitePlugin |

Gates

| Gate | Qudits | Description | |------|--------|-------------| | hadamard | 1 | Equal superposition | | cycle | 1 | Deterministic rotation: |0⟩→|1⟩→|2⟩→|0⟩ | | clock (Z) | 1 | Phase rotation | | shift (X) | 1 | Value shift | | y | 1 | Y gate (qubit-only) | | iSwap | 2 | Entangling swap | | swap | 2 | Value swap |

All gates support fractional application and conditional predicates.

Documentation

License

TypeScript source: MIT (see LICENSE.md). WASM binaries: proprietary — free for apps under $100K annual revenue with attribution. See dist/LICENSE-BINARY.md for binary terms.