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 🙏

© 2025 – Pkg Stats / Ryan Hefner

qole

v2.1.0

Published

The Quantum Operations Lazy Evaluator is a simulator for executing Quantum Circuits, leveraging the memory-compactness of QMDDs.

Readme

QOLE

The Quantum Operations Lazy Evaluator is an easy-to-use Software Development Kit for executing quantum circuits in JavaScript. Behind its simplistic, Qiskit-like interface, lies a simulation backend based on Quantum Multiple-Valued Decision Diagrams (QMDDs).

Whether you need to incorporate reversible/quantum algorithmic functionality to your JS project, or you want to benchmark the performance of QMDDs, QOLE is the tool for you.

Usage

As previously stated, QOLE's interface employs a pattern very similar to Qiskit:

    const qc = new QuantumCircuit(5);
    
    qc.initialize('01111');
    qc.h(0);
    qc.cx(0, 1);
    qc.cswap(3, 2, 1, '0');

The declarative style and index-based qubit logic remains intact, while also introducing new compact, quality-of-life syntactic sugars, like method-chaining:

    const qc = new QuantumCircuit(3)
        .h(0)
        .cx(0, 1)
        .cx(1, 2);

QOLE currently supports the following gate set:

X, Y, Z, H, S, T, CX, CY, CZ, CH, CS, CCX, CCS, SWAP, CSWAP, MCX

notably allowing for both reversible and universal quantum computation. More gates to come.

Output can be extracted in two ways; the full statevector can be parsed iteratively through a lazy Generator object:

    // lazy parsing
    for (const { state, re, im } of qc.statevector())
        ...

    // can also be force-loaded in memory
    const sv = [...qc.statevector()];

which circumvents the exponential overhead of representing a full statevector in-memory. A shot-based method returning counts by sampling the internal QMDD diagram is also offered:

    const counts = qc.sample(10_000);
    console.log(counts.get('11010')?.occurrences);  // counts for |11010>
    console.log(counts.get('11010')?.re);  // also the amplitude of |11010>
    console.log(counts.get('11010')?.im);  // received for free

Shot-based sampling also yields the theoretical amplitudes of the occurred basis states "for free".

Installation

To use QOLE in your JavaScript project, you can install it directly from NPM:

npm install qole

From there, you can access the QuantumCircuit class directly and get to work. QOLE currently supports only the CommonJS module type:

const { QuantumCircuit } = require('qole');

Import pulls type information for QOLE-specific classes, making it viable for TypeScript-based projects as well.

Interested users can also access implementation-level functions as sub-directories:

const { X } = require('qole/gates');
const { QMDD } = require('qole/qmdd');
const { Complex } = require('qole/complex');

Local Installation

To install the project locally, paste the following in your IDE bash:

git clone https://github.com/asimakiskydros/QOLE.git
cd QOLE
npm install
npm run build

QMDD Backend

The actual simulation is done through these Decision Diagrams. For an initial introduction to QMDDs, please refer to Zulehner and Wille, arXiv:1707.00865 (2017).

This project acts as a mini-review of the topic, merging together implementation details scattered throughout the literature. Specifically, the main sources followed are:

while also consulting the rest of the bibliography, as well as the implementation in MQT, for further optimization techniques. A full documentation explaining the entire QMDD implementation is in the works.

Contributing

Please refer to CONTRIBUTING.md.

Citation

If you use this project in your research, kindly consider citing it as:

Asimakis Kydros. (2025). QOLE: A QMDD-based Quantum Circuit Simulator (Version 2.1.0) [Computer software]. https://github.com/asimakiskydros/QOLE

Licence

This project is licensed under the Mozilla Public License 2.0. You are free to use, modify, and distribute this code as long as any modifications to MPL-licensed files are also distributed under the same license.