Qiskit for JavaScript.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
circuits
dist
packages
utils-test
.eslintignore
.eslintrc.json
.gitignore
.prettierignore
.prettierrc.json
.travis.yml
CHANGELOG.md
CONTRIBUTING.md
LICENSE.txt
README.md
lerna.json
package-lock.json
package.json

README.md

Qiskit.js

experimental License lerna Build Status code style: prettier

⚛️ Quantum Information Science Kit for JavaScript. 💡 This project born as a clone (in JS) of its big brother.

beta: Until v1 breaking changes could be included.

Philosophy

📙 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

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

Qiskit for the browser

📥 You can find a bundled version with the same stuff ready to be used in the browser with each release.

  • qiskit-cloud.js: The same for the @qiskit/cloud component, also the same API and the global is QiskitCloud.
  • qiskit-devs.js: The same for the @qiskit/devs component, also the same API and the global is qiskitDevs.
  • qiskit-qasm.js: Only the @qiskit/qasm component, also the same API that for node.js. The global qiskitQasm is exposed.
  • qiskit-sim.js: The same for the @qiskit/sim component, also the same API and the global is qiskitSim.

If you need a new version of the bundled files, please run:

npm run bundle

Once bundled, visit this this one to see the JS version in action. You can use next command for a quick run:

npm run browser

Install

☕️ Install last Node.js stable version (or LTS) and then:

npm i -g @qiskit/sdk

Use

CLI

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

qiskitjs --help

Programatically

📝 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/sdk');

console.log('Simulator version');
console.log(qiskit.sim.version);

API

👀 Full specification.

version

The actual version of the library.

  • version (string) - Version number.

qasm

A wrapper fot the qiskit-qasm project.

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

sim

A wrapper fot the qiskit-sim project.

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

Cloud

A wrapper fot the qiskit-cloud project.

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

utils

A wrapper fot the qiskit-utils project.

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

devs

A wrapper fot the qiskit-devs project.

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

Authors

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

Original code (Python) authors here.

Other Qiskit projects

🎒

License

🐧 Qiskit is released under the Apache license, v2.0.

Do you want to help?

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