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

qukit

v0.0.0-pre5

Published

[![Npm](https://badgen.net/npm/v/qukit)](https://www.npmjs.com/package/qukit) [![Crates](https://badgen.net/crates/v/qukit)](https://crates.io/crates/qukit) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/lice

Readme

Npm Crates License: MIT CI Latest Stable Latest Release

Qukit - Quantum Simulation Toolkit

Qukit is an open source quantum circuit simulator implemented in rust and compiled for wasm. Qukit is capable of running 20+ q-bit simulations in browser or at the server (rust and node.js). You can use it in your javascript program to run quantum simulations.

Features

  • [x] Rust API
  • [x] JS API (Wasm)
  • [x] Algorithm creation and simulation
  • [x] Execute an algoritm step wise
  • [x] Convert all supported gates into rotation to enable partial simulation
  • [ ] Python API
  • [ ] QASM Export
  • [ ] SVG Export
  • [ ] State Visulisations
  • [ ] Quiskit Export
  • [ ] QASM Import

Usage

TS/JS

npm install qukit

You should be able to import Qukit directly into Node, as normal, or into a browser using any bundler that supports ES modules & webassembly (e.g. Webpack v4 or v5).

The browser build supports both sync (v4 or v5 syncWebAssembly mode) and async (v5 asyncWebAssembly) builds. When imported in a browser build the module always exports a promise, not a fixed value, as this is a requirement for synchronous builds, and you will need to await this after import.

We also provide a parallel version via the Web Workers API, the implementation uses wasm-bindgen-rayon, for further information on setup visit the wasm-bindgen-rayon github page.

Rust

First of all, add this crate as a dependency to your Cargo.toml:

[dependencies]
qukit = "0.0.0-pre4"

To use this crate u need to use the nighty toolchain, since it heavily uses the latest nightly const fn features.

Feature Flags

  • std Links against std
  • parallel enables rayon usage

Api

TS/JS

const builder: GateBuilder = new GateBuilder();
const qbits: QBit[] = builder.qbits(hidden.length);
const bits: Bit[] = builder.bits(hidden.length);
const target: QBit = builder.qbit();

hadamard(target);
pauliZ(target);

hadamard(qbits);

hidden.forEach((active, index) => {
    if (active) {
        cPauliX(qbits[index], target);
    }
});

hadamard(qbits);
hadamard(target);

measurement(qbits, bits);

builder.intoAlgorithm().run(); // -> Executes the Algorithm

Rust

let algorithm = Algorithm::new(|gate_builder| {
    let a = gate_builder.qbit();
    let b = gate_builder.qbit();
    let c_a = gate_builder.bit();
    let c_b = gate_builder.bit();

    hadamard(a);
    controlled_pauli_x(a, b);

    measurement(a, c_a);
    measurement(b, c_b);

    gate_builder
});

algorithm.run() // -> Executes the Algorithm

Wasm Limitations

In wasm you are limited to 2GB/4GB of memory, thus your are only able to simulate up to 25 q-bits with this library. For a 25 q-bit system we need to keep track of 2^26 states. A state is described by a complex value, which is composed of 2 f64 values, which equates to 2 x 8 = 16 Bytes. This equates to a state vector of 2^26 x 16 = 1073731824 Bytes ≈ 1.07 GB. For each transformation we need one source and one target vector, this leads to a memory usage of 2.14 GB. With a future stabilisation of wasm64 we can simulate large vectors.