Skip to content

Latest commit

 

History

History
284 lines (197 loc) · 10.8 KB

README.md

File metadata and controls

284 lines (197 loc) · 10.8 KB

Contributors Forks Stargazers Issues MIT License


Logo

Qhoir

quantum circuit editing tool

Getting Started · Report Bug · Try it out!

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

screenshot-bell-state-full

Qhoir is a quantum circuit editing tool that allows users to construct and immediately evaluate simple quantum and classical circuits. Qhoir is built with its didactic value in mind, rather than focusing on efficiency. Using a statevector simulator in the background, it can run simple quantum algorithms accurately and supports the visualization of measurement results for further circuit inspection.

Using a large, scrollable workspace, the user can construct multiple quantum circuits next to each other to compare their outputs, and quickly extend any constructed circuits. For small problem instances, the simulator is called in real-time with any change made to the environment, so that new results are immediately observable.

In addition to more than 20 functional circuit components, Qhoir also supports several of UI components that can be used to organize and document complex circuits.

(back to top)

Built With

  • Next
  • React
  • Typescript

(back to top)

Getting Started

You can try out Qhoir on its Github Pages site.

To get a local copy up and running follow these simple steps.

Prerequisites

This project runs on a node.js backend. If you haven't already, please install npm to run it.

npm install npm@latest -g

Installation

  1. Clone the repo
    git clone https://github.com/DRovara/Qhoir.git
  2. Install NPM packages
    npm install

After completing these steps, the node server will be ready to be run locally.

Running the Project

You can run a development version of the project by running

    npm run dev

Alternatively, you can build and run Qhoir using

    npm run build
    npm run start

After running the development or release version of Qhoir, you can access it through your browser on localhost:3000.

(back to top)

Usage

Please refer to "Getting Started" to learn how to set up Qhoir and access it through your browser of choice.

After opening Qhoir, you will reach the main editor view. From here, click components in the toolbox on the left to select them and then place them anywhere in the workspace through an additional click.

screenshot-half-adder

A runnable circuit must include at least one classical or quantum source component. After placing a source component, you may set its initial state by clicking it in the circuit editor.

Components are connected to each other using wires through their sockets. To connect two components, first, click an output socket of any component, then click an input socket of any different component. Input sockets can be distinguished from output sockets by a small black dot in the middle. We further distinguish two socket types: classical sockets and quantum sockets. Only sockets of the same type can be connected. Quantum sockets are highlighted by a slight blue tint around their edges.

screenshot-sockets

To observe any circuit results, connect classical or quantum measurement components to your circuit. Classical measurement components will light up in green if their wire state is ON, otherwise, they will remain grey.

Quantum measurement components indicate the probability of $|0\rangle$ and $|1\rangle$ in the measurement result of the current qubit. By clicking a measurement, you can open a detailed result view, where you can assign the measurement to the "blue", "red", or "green" measurement group. Measurements of the same group will always be taken together. Following the basic rules of quantum information, these measurements will impact each other. The graph inside the measurement result details will also adapt to show the probabilities of all possible quantum states for the current system.

screenshot-measurement

Constructed circuits may be stored on your local device by pressing the "save" button in the toolbar above the editor. The circuits are stored in a .json format and may be loaded again in the future.

screenshot-all-bells screenshot-rtheta

(back to top)

Roadmap

  • Circuit Export
    • OpenQASM
    • qiskit
    • Q#

(back to top)

Contributing

Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Project Link: https://github.com/DRovara/Qhoir

(back to top)

Further Documentation

(back to top)