qole

An easy-to-use simulator for Quantum Circuits for JavaScript, based on Quantum Multiple-Valued Decision Diagrams.

https://github.com/asimakiskydros/qole

Science Score: 57.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 22 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.9%) to scientific vocabulary

Keywords

javascript qmdd quantum-circuit-simulator quantum-computing quantum-multiple-valued-decision-diagrams reversible-computation typescript
Last synced: 6 months ago · JSON representation ·

Repository

An easy-to-use simulator for Quantum Circuits for JavaScript, based on Quantum Multiple-Valued Decision Diagrams.

Basic Info
  • Host: GitHub
  • Owner: asimakiskydros
  • License: mpl-2.0
  • Language: TypeScript
  • Default Branch: main
  • Homepage:
  • Size: 231 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
javascript qmdd quantum-circuit-simulator quantum-computing quantum-multiple-valued-decision-diagrams reversible-computation typescript
Created over 1 year ago · Last pushed 8 months ago
Metadata Files
Readme Contributing License Code of conduct Citation

README.md

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:

```JavaScript 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:

JavaScript 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:

```JavaScript // 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:

JavaScript 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 (NOTE: Not yet operational)

You can install QOLE as a standalone package through NPM:

npm install qole From here, you can access the QuantumCircuit class directly and get to work

JavaScript import { QuantumCircuit } from 'qole';

or you can peer into the implementation details through the modules 'qole.gates', 'qole.qmdd' and 'qole.complex'.

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.0.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.

Owner

  • Name: Asimakis Kydros
  • Login: asimakiskydros
  • Kind: user
  • Location: Thessalonica, Greece

I study Computer Science at the Aristotle University of Thessalonica

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
title: "QOLE: A QMDD-based Quantum Circuit Simulator"
authors:
  - name: "Asimakis Kydros"
    orcid: "0009-0009-5278-5480"
    affiliation: "Aristotle University of Thessaloniki"
date-released: "2025-01-20"
version: "2.0.0"
repository-code: "https://github.com/asimakiskydros/QOLE"
license: "MPL-2.0"

GitHub Events

Total
  • Push event: 1
  • Public event: 1
Last Year
  • Push event: 1
  • Public event: 1

Dependencies

.github/workflows/test.yml actions
  • actions/checkout v3 composite
  • actions/setup-node v3 composite
package-lock.json npm
  • 291 dependencies
package.json npm
  • @types/jest ^29.5.14 development
  • @types/node ^22.9.0 development
  • jest ^29.7.0 development
  • ts-jest ^29.2.5 development
  • ts-node ^10.9.2 development
  • typescript ^5.6.3 development