Skip to content

Compilers and languages

qiskit-js

Maintained by Qiskit

:atom_symbol: Qiskit (Quantum Information Science Kit) for JavaScript

JavaScriptApache-2.0Archive
qiskit-js illustration

Resource snapshot

Category

Compilers and languages

Stars

116

Last pushed

Sep 8, 2019Updated 7y ago

Open issues

20

What it is

qiskit-js is maintained by Qiskit and sits in the Compilers and languages lane of the open-source quantum map.

:atom_symbol: Qiskit (Quantum Information Science Kit) for JavaScript

Last verified by Qtangl generator on May 27, 2026

Who it's for

Developers who want to understand the representations and compilers that sit between high-level code and runnable circuits.

What you can build or learn

  • Compare IRs, DSLs, transpilers, and compiler assumptions across ecosystems.
  • Understand how high-level code becomes something a backend can execute.
  • Spot tools that matter when interoperability and compilation quality are important.

License

Apache-2.0

SPDX identifier detected from the repository metadata or license files.

Repository README

Preview from the project README.

Rendered as Markdown inside a scrollable preview. Long READMEs stay contained; expand or open on GitHub for the full document.

~879 words · about 4 min readOpen on GitHub

Qiskit.js

Build Status

:atom_symbol: Quantum Information Science Kit for JavaScript, I was born as a clone of my big brother.

<p>
<img src="https://diego-plan9.github.io/_static/qiskit-logo-white-no-margin.gif" alt="logo">
</p>
<p>
	<sub>:gift: Follow us on <a href="https://twitter.com/qiskit"><code>Twitter</code></a> if you like this project</sub>
</p>

Alpha: Until v1 breaking changes could be included.

Philosophy

:orange_book: The basic concept of our quantum program is an array of quantum circuits. The program workflow consists of three stages: Build, Compile, and Run. Build allows you to make different quantum circuits that represent the problem you are solving. Compile allows you to rewrite them to run on different backends (simulators/real chips of different quantum volumes, sizes, fidelity, etc); and Run launches the jobs. After the jobs have been run, the data is collected. There are methods for putting this data together, depending on the program. This either gives you the answer you wanted or allows you to make a better program for the next instance.

If you want to learn more about Quantum Computing, you're invited to visit our Quamtum Experience project.

Structure

:handbag: The components of this repository are exposed as these libraries:

Qiskit for the browser

:inbox_tray: All components are compatible with browserify.

Install

:coffee: Install lastest Node.js stable version (or LTS) and then:

npm i -g qiskit

Use

CLI

:rocket: The command line client allows to play with the circuits without having to use any programming language API.

qiskitjs --help
qiskitjs <command>

Commands:
  backend [name] - Get latest calibration stats for a backend  [aliases: b]
  backends [onlySims] - Get latest calibration stats for a backend  [aliases: bs]
  calibration [backend] - Get latest calibration stats for a backend  [aliases: c]
  circuit <circuit> [backend] [shots] [name] [seed] [maxCredits] - Send the circuit to be run in the Quantum
  	Experience (https://quantumexperience.ng.bluemix.net)  [aliases: ci]
  credits - Information about your credits  [aliases: cr]
  factor <number> - Calculate a factor of a number  [aliases: f]
  job <id> - Get the info of a specific job  [aliases: j]
  jobs [limit] [offset] - Get all your jobs. Ordered by creation date  [aliases: js]
  login [printToken] - Use an API key to get a token to make requests  [aliases: l]
  params [backend] - Get latest parameter stats for a backend  [aliases: p]
  parse <circuit> - Parse the circuit to our IR (intermediate representation - JSON format)  [aliases: p]
  queue [backend] - Get the status of a backend queue  [aliases: q]
  random [engine] [length] [format] [backend] - Generate a true random number among 0 and 1  [aliases: r]
  result <jobId> - Get the result of a background job generated by an algorithm method. The engine is ommited
  	because IBM Q is the unique which uses background jobs for now  [aliases: re]

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]

Programatically

:pencil: As you can see in the next section, we have to use it like in the rest of independent modules. The only difference is we need to select the proper field of the main object before.

const qiskit = require('qiskit');

console.log('True random numbers\n');

qiskit.algo.random().then(rand => console.log(`JavaScript: ${rand}`));

const cloud = new qiskit.Cloud();
cloud.login('YOUR_PERSONAL_TOKEN_HERE').then(() => {
  cloud.backends().then(data => {
    console.log('(IBM Backends');
    console.log(data);
  });

  qiskit.algo.random({
    engine: 'ibm',
    custom: cloud,
    // default: simulator
    // engine: "ibmqx4"
  }).then(rand => console.log(`IBM Cloud: ${rand}`))
});

qiskit.algo.random({
  engine: 'anu',
  length: 8,
}).then(rand => console.log(`ANU Server: ${rand}`));

API

:eyes: Full specification.

version

The actual version of the library.

  • version (string) - Version number.

qasm

A wrapper for the qiskit-qasm project.

  • qasm (object) - The same object provided in the original library.

sim

A wrapper for the qiskit-sim project.

  • sim (object) - The same object provided in the original library.

Cloud

A wrapper for the qiskit-cloud project.

  • Cloud (object) - The same constructor provided in the original library.

utils

A wrapper for the qiskit-utils project.

  • utils (object) - The same object provided in the original library.

algo

A wrapper for the qiskit-algo project.

  • algo (object) - The same object provided in the original library.

Authors

:alien: https://github.com/Qiskit/qiskit-js/graphs/contributors

Original code (Python) authors here.

Other Qiskit projects

:school_satchel:

License

:penguin: Qiskit is released under the Apache license, v2.0.

Do you want to help?

:sunglasses: If you'd like to help please take a look to our contribution guidelines.

Read on GitHub

Activity

Latest release

—

Watchers

0

Python support

—

Learn digest

Get monthly updates when library entries change.

Monthly digest: new library entries, updated flagships, and one editorial pick.

Related resources

Keep exploring nearby tools.

NVIDIA

cuda-quantum

C++ and Python support for the CUDA Quantum programming model for heterogeneous quantum-classical workflows

C++Apache-2.0Flagship

1,048 stars · Updated 3mo ago

QISKit

openqasm

Quantum assembly language for extended quantum circuits

PythonApache-2.0

1,468 stars · Updated 3mo ago

Quantomatic

pyzx

Python library for quantum circuit rewriting and optimisation using the ZX-calculus

OpenQASMApache-2.0Flagship

524 stars · Updated 3mo ago

QISKit

qiskit

Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.

PythonApache-2.0FlagshipQtangl relevant

7,412 stars · Updated 3mo ago

Microsoft

QuantumKatas

Tutorials and programming exercises for learning Q# and quantum computing

Jupyter NotebookMITFlagshipArchive

4,862 stars · Updated 2y ago

CQCL

tket

Source code for the TKET quantum compiler, Python bindings and utilities

C++Apache-2.0FlagshipQtangl relevant

308 stars · Updated 3mo ago