Code Monkey home page Code Monkey logo

quantum_circuit's Introduction

Build Status

Quirk is a toy quantum circuit simulator, intended to help people in learning about quantum computing.

If you want to quickly explore the behavior of a small quantum circuit, Quirk is the tool for you. There's no installing or configuring or scripting: just go to algassert.com/quirk, drag gates onto the circuit, and the output displays will update in real time.

(If you're still trying to understand what a quantum circuit even is, then I recommend the video series Quantum Computing for the Determined. Quirk assumes you already know background facts like "each wire represents a qubit".)

Defining features:

  • Runs in web browsers.
  • Drag-and-drop circuit editing.
  • Reacts, simulates, and animates in real time.
  • Inline state displays.
  • Bookmarkable / linkable circuits.
  • Up to 16 qubits.

Notable limitations:

Examples

Basic usage demo:

Demo

Grover search circuit with chance and sample displays (showing that the chance of success increases):

Grover search

Quantum teleportation circuit with Bloch sphere displays (showing that the qubit at the top has ended up at the bottom):

Quantum teleportation

Building

If you want to modify Quirk, this is how you get the code and turn your changes into working html/javascript.

  1. Clone the repository.

    git clone https://github.com/KimleangSama/quantum_circuit.git

  2. Install the dev dependencies.

    cd Quirk

    npm install

  3. (Optional) Make your changes. Run the tests.

    npm run test-chrome

  4. Build the output.

    npm run build

  5. Confirm the output works by opening out/quirk.html with a web browser.

  6. Copy out/quirk.html to wherever you want.

Disclaimer

This version of Quirk is not an official code.

quantum_circuit's People

Contributors

kimchhor avatar

Watchers

Kimleang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.