All Projects → stewdio → Q.js

stewdio / Q.js

Licence: other
Quantum computing in your browser.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Q.js

Pyepr
Powerful, automated analysis and design of quantum microwave chips & devices [Energy-Participation Ratio and more]
Stars: ✭ 81 (-48.73%)
Mutual labels:  quantum-computing, quantum
Math Php
Powerful modern math library for PHP: Features descriptive statistics and regressions; Continuous and discrete probability distributions; Linear algebra with matrices and vectors, Numerical analysis; special mathematical functions; Algebra
Stars: ✭ 2,009 (+1171.52%)
Mutual labels:  matrix, algebra
Quantum Learning
This repository contains the source code used to produce the results presented in the paper "Machine learning method for state preparation and gate synthesis on photonic quantum computers".
Stars: ✭ 89 (-43.67%)
Mutual labels:  quantum-computing, quantum
Learnquantum
Repo of resources to help learn about quantum computing.
Stars: ✭ 143 (-9.49%)
Mutual labels:  quantum-computing, quantum
Teach Me Quantum
⚛ 10 week Practical Course on Quantum Information Science and Quantum Computing - with Qiskit and IBMQX
Stars: ✭ 118 (-25.32%)
Mutual labels:  quantum-computing, quantum
Quantum Benchmarks
benchmarking quantum circuit emulators for your daily research usage
Stars: ✭ 70 (-55.7%)
Mutual labels:  quantum-computing, quantum
Awesome Quantum Machine Learning
Here you can get all the Quantum Machine learning Basics, Algorithms ,Study Materials ,Projects and the descriptions of the projects around the web
Stars: ✭ 1,940 (+1127.85%)
Mutual labels:  quantum-computing, quantum
Strawberryfields
Strawberry Fields is a full-stack Python library for designing, simulating, and optimizing continuous variable (CV) quantum optical circuits.
Stars: ✭ 505 (+219.62%)
Mutual labels:  quantum-computing, quantum
Qmlt
The Quantum Machine Learning Toolbox (QMLT) is a Strawberry Fields application that simplifies the optimization of variational quantum circuits (also known as parametrized quantum circuits).
Stars: ✭ 106 (-32.91%)
Mutual labels:  quantum-computing, quantum
Awesome Quantum Computing
A curated list of awesome quantum computing learning and developing resources.
Stars: ✭ 1,350 (+754.43%)
Mutual labels:  quantum-computing, quantum
Qpga
Simulations of photonic quantum programmable gate arrays
Stars: ✭ 68 (-56.96%)
Mutual labels:  quantum-computing, quantum
Qpanda 2
QPanda 2 is an open source quantum computing framework developed by OriginQC that can be used to build, run, and optimize quantum algorithms.
Stars: ✭ 128 (-18.99%)
Mutual labels:  quantum-computing, quantum
Qutip
QuTiP: Quantum Toolbox in Python
Stars: ✭ 985 (+523.42%)
Mutual labels:  quantum-computing, quantum
Qrack
Comprehensive, GPU accelerated framework for developing universal virtual quantum processors
Stars: ✭ 79 (-50%)
Mutual labels:  quantum-computing, quantum
Pennylane
PennyLane is a cross-platform Python library for differentiable programming of quantum computers. Train a quantum computer the same way as a neural network.
Stars: ✭ 800 (+406.33%)
Mutual labels:  quantum-computing, quantum
Algebra
means completeness and balancing, from the Arabic word الجبر
Stars: ✭ 92 (-41.77%)
Mutual labels:  matrix, algebra
Qcgpu
High Performance Tools for Quantum Computing
Stars: ✭ 380 (+140.51%)
Mutual labels:  quantum-computing, quantum
Quantumcomputingbook
Companion site for the textbook Quantum Computing: An Applied Approach
Stars: ✭ 386 (+144.3%)
Mutual labels:  quantum-computing, quantum
Q
Quantum Computation Simulator written in golang
Stars: ✭ 99 (-37.34%)
Mutual labels:  quantum-computing, quantum
Quantum Nc
Microsoft Quantum Computing Libraries for noncommercial use
Stars: ✭ 126 (-20.25%)
Mutual labels:  quantum-computing, quantum

Quantum JavaScript (Q.js)

Quantum JavaScript (Q.js)

Quantum, made easy.
Q is a quantum circuit simulator, drag-and-drop circuit editor, and powerful JavaScript library that runs right here in your web browser. There’s nothing to install and nothing to configure, so jump right in and experiment! Fire up the Q editor, then tap and drag the pieces around to get a feel for how it works. It’s easy to use on both desktop and mobile devices. Made a mistake? Just tap the Undo button.

Q editor demo

Free and open-source

Q is free to use, our code is open-source, and our API is heavily documented. Still a quantum novice? Each page of API documentation includes simple explanations of basic quantum concepts to get you up to speed quickly. This makes Q ideal for the classroom as well as autodidacts at home. Q just might be the most accessible quantum circuit suite in the world. Join our project on GitHub at https://github.com/stewdio/q.js and drop a link to Q’s website https://quantumjavascript.app on social media with the hashtag #Qjs. Let’s make quantum computing accessible!

Quantum JavaScript

What does coding a quantum circuit look like? Let’s recreate the above Bell state using three separate circuit authoring styles to demonstrate Q’s flexibility. For each of the three examples we’ll create a circuit that uses 2 qubit registers for 2 moments of time. We’ll place a Hadamard gate at moment 1 on register 1. Then we’ll place a Controlled-Not gate at moment 2, with its control component on register 1 and its target component on register 2.

1. Text as input
Q’s text-as-input feature directly converts your text into a functioning quantum circuit. Just type your operations out as if creating a text-only circuit diagram (using “I” for identity gates in the spots where no operations occur) and enclose your text block in backticks (instead of quotation marks). Note that parentheses are not required to invoke the function call when using backticks.

Q`
    H  X#0
    I  X#1
`

2. Python-inspired
Folks coming to Q from Python-based quantum suites may find this syntax more familiar. Here the Q function expects the number of qubit registers to use, followed by the number of moments to use. Afterward, each single-letter quantum gate label is also a function name. For these functions the first argument is a moment index and the second is a qubit register index or array of qubit register indices.

Q( 2, 2 )
    .h( 1, 1 )
    .x( 2, [ 1, 2 ])

3. Verbose for clarity
Under the hood, Q is making more verbose declarations. You can also make direct declarations like so. (And what are those dollar signs about?)

new Q.Circuit( 2, 2 )
    .set$( Q.Gate.HADAMARD, 1, 1 )
    .set$( Q.Gate.PAULI_X, 2, [ 1, 2 ])

More variations
There are many ways to build a quantum circuit with Q. What feels right for you? To learn more about Q’s text syntax and other convenience tricks, see “Writing quantum circuits.”

Clear, legible output

Whether you use Q’s drag-and-drop circuit editor interface, text syntax, Python-inspired syntax, or prefer to type out every set$ command yourself, Q makes inspecting and evaluating your circuits easy.

Let’s add two commands which could directly follow any of the three examples above. Hey—deciding what to name a circuit can sometimes be difficult, so we’ll let Q choose a random name for us. Then we’ll generate an outcome probabilities report. Just add the following two lines to any of the above examples:

.setName$( Q.getRandomName$ )
.evaluate$()

And that combination will yield something like the following:

Beginning evaluation for “Red kangaroo”

         m1    m2   
        ┌───┐╭─────╮
r1  |0⟩─┤ H ├┤ X#0 │
        └───┘╰──┬──╯
             ╭──┴──╮
r2  |0⟩───○──┤ X#1 │
             ╰─────╯

██████████░░░░░░░░░░  50%   1 of 2
████████████████████ 100%   2 of 2


Evaluation completed for “Red kangaroo”
with these results:

1  |00⟩  ██████████░░░░░░░░░░  50% chance
2  |01⟩  ░░░░░░░░░░░░░░░░░░░░   0% chance
3  |10⟩  ░░░░░░░░░░░░░░░░░░░░   0% chance
4  |11⟩  ██████████░░░░░░░░░░  50% chance

Import and export

Q plays well with everyone. Export your circuits as plain text, ASCII diagrams, interactive graphic-user-interfaces, LaTeX code, and more! Visit the Q playground to experiment with converting circuits between various formats. As always, new features are in the works. Join our project on GitHub and help us build bridges to everywhere.

Give Q a try right now at https://quantumjavascript.app.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].