Skip to content

StealthyPanda/quantumcomputingsim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project logo

Quantum Computing Simulator

Status

License GitHub release (latest by date)


A python library to simulate quantum programs and circuits.

Getting Started

Prerequisites

This library is self contained, and optionally uses matplotlib for plotting graphs.

Installing

This library can be installed from pypi using pip:

$ pip install quantumcomputingsim

To make sure everything installed properly, import the main and only module in python:

from quantum import *

Usage

Go through example.ipynb for a comprehensive guide on using this library

Sample workflow:

entangler = qprogram(
    nqbits = 2,
    name = "Entangler"
)
entangler.addgates(0, [HGATE, CNOT0])
entangler.compile()

Compiler result:

Compiling Entangler...

Entangler
q0(0) ⮕  -----[ h ]--⌈ c0 c0 ⌉-------
q1(0) ⮕  ------------⌊ c0 c0 ⌋-------


Compilation of Entangler complete!

and to run the program:

entangler.run(graph = True)

graph

and view bloch spheres for qubits:

plotbloch(HGATE * [0, 1])

bloch

Authors

Foo