Table of Contents
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.
You can try out Qhoir on its Github Pages site.
To get a local copy up and running follow these simple steps.
This project runs on a node.js backend. If you haven't already, please install npm
to run it.
npm install npm@latest -g
- Clone the repo
git clone https://github.com/DRovara/Qhoir.git
- Install NPM packages
npm install
After completing these steps, the node server will be ready to be run locally.
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
.
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.
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.
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
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.
- Circuit Export
- OpenQASM
- qiskit
- Q#
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!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Project Link: https://github.com/DRovara/Qhoir