All Projects → adgt → pyQuirk

adgt / pyQuirk

Licence: Apache-2.0 license
A Python widget for Quirk to be used in Jupyter notebooks, JupyterLab, and the IPython kernel.

Programming Languages

HTML
75241 projects
python
139335 projects - #7 most used programming language
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to pyQuirk

IBM-Quantum-QCE20-Tutorials
Repository of code notebooks for tutorials at IEEE Quantum Week (QCE20) https://qce.quantum.ieee.org/tutorials/
Stars: ✭ 38 (+111.11%)
Mutual labels:  quantum-computing
quilc
The optimizing Quil compiler.
Stars: ✭ 413 (+2194.44%)
Mutual labels:  quantum-computing
pulsemaker
A Python widget library for designing pulses and pulse schedules for quantum computing hardware. Can be used in Jupyter notebooks, JupyterLab, and the IPython kernel.
Stars: ✭ 19 (+5.56%)
Mutual labels:  quantum-computing
qcor
C++ compiler for heterogeneous quantum-classical computing built on Clang and XACC
Stars: ✭ 78 (+333.33%)
Mutual labels:  quantum-computing
UniversalQCompiler
Synthesizing arbitrary quantum computations
Stars: ✭ 53 (+194.44%)
Mutual labels:  quantum-computing
neural-decoder
Neural Network Decoders for Quantum Error Correcting Codes
Stars: ✭ 19 (+5.56%)
Mutual labels:  quantum-computing
public research
Publicly available research done by BOHR.TECHNOLOGY.
Stars: ✭ 16 (-11.11%)
Mutual labels:  quantum-computing
pennylane-lightning
The PennyLane-Lightning plugin provides a fast state-vector simulator written in C++ for use with PennyLane
Stars: ✭ 28 (+55.56%)
Mutual labels:  quantum-computing
QuantumCircuitOpt.jl
A Julia/JuMP Package for Optimal Quantum Circuit Design
Stars: ✭ 45 (+150%)
Mutual labels:  quantum-computing
qcl
Quantum Computation Language port from http://tph.tuwien.ac.at/~oemer/qcl.html
Stars: ✭ 29 (+61.11%)
Mutual labels:  quantum-computing
A-quantum-inspired-genetic-algorithm-for-k-means-clustering
Implementation of a Quantum inspired genetic algorithm proposed by A quantum-inspired genetic algorithm for k-means clustering paper.
Stars: ✭ 28 (+55.56%)
Mutual labels:  quantum-computing
avaloni
Interpreter of the Avalon programming language.
Stars: ✭ 14 (-22.22%)
Mutual labels:  quantum-computing
Interlin-q
A Quantum Interconnect Simulator for Distributed Quantum Algorithms
Stars: ✭ 32 (+77.78%)
Mutual labels:  quantum-computing
Tutorials
This repository contains study material that EPFL, Harvard, MIT Quantum Computing associations and others provide to the students as training and practice.
Stars: ✭ 34 (+88.89%)
Mutual labels:  quantum-computing
quantumcat
quantumcat is a platform-independent, open-source, high-level quantum computing library, which allows the quantum community to focus on developing platform-independent quantum applications without much effort.
Stars: ✭ 18 (+0%)
Mutual labels:  quantum-computing
feynman path
Visualization tool for the Feynman Path Integral applied to quantum circuits
Stars: ✭ 33 (+83.33%)
Mutual labels:  quantum-computing
QuantumResources
A collection of resources for Quantum Computing
Stars: ✭ 43 (+138.89%)
Mutual labels:  quantum-computing
QI
Quantum information mathematica package
Stars: ✭ 26 (+44.44%)
Mutual labels:  quantum-computing
cirq-on-iqm
Cirq adapter for IQM's quantum computers
Stars: ✭ 21 (+16.67%)
Mutual labels:  quantum-computing
qram
Library for Q# implementing various qRAM proposals
Stars: ✭ 46 (+155.56%)
Mutual labels:  quantum-computing

pyQuirk

pypi

A Python widget for Quirk to be used in Jupyter notebooks, JupyterLab, and the IPython kernel.

Example

Getting Started

Installation

To install use pip (JupyterLab 3 recommended):

$ pip install pyQuirk

If you are wanting to use this with JupyterLab 2 or a classical Jupyter notebook install (i.e. not the one included with JupyterLab 3), then you can try following the development install instructions below, but YMMV.

Example

Take a look at example.ipynb for a simple example.

Otherwise, you can simply run:

from pyQuirk import Quirk
quirk = Quirk()
quirk

API

Quirk()

  • width: display width of the widget
  • height: display height of the widget
  • scale: scale of the inner Quirk display (default 0.5)
  • value: circuit in Quirk format
  • circuit_qasm: read-only property to get the qasm of the current circuit
  • update_circuit(circuit): convenience function for passing a Qiskit circuit
  • update_from_qasm(qasm): replace the current circuit with qasm (not all gates supported, currently)

Development

For a development installation (requires Node.js and Yarn version 1),

$ git clone https://github.com/adgt/pyQuirk.git
$ cd pyQuirk
$ pip install -e .

If you are working with Jupyter notebook, then run these commands:

$ jupyter nbextension install --py --symlink --overwrite --sys-prefix pyQuirk
$ jupyter nbextension enable --py --sys-prefix pyQuirk

If you are working with JupyterLab 3, run the command:

$ jupyter labextension develop --overwrite pyQuirk

Then you need to rebuild the JS when you make a code change:

$ cd js
$ yarn run build

You then need to refresh the JupyterLab page when your javascript changes.

Project repository created with the widget-cookiecutter template

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].