The Wayback Machine - https://web.archive.org/web/20201205221749/https://github.com/marcoradic/QCpy
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

README.md

Build status

qc.py - A Quantum Computer Simulator in Python

Simplistic Simulator for a Quantum Computer using the gate-based model. Supports several standard and parametrized single qubit gates and measurements in the standard basis.

Example usage

test_circuit = Circuit(3)
test_circuit.add_layer([gates.hadamard, gates.identity, gates.identity])
test_circuit.add_layer([gates.identity, gates.identity, gates.identity])
test_circuit.build_unitary()
test_circuit.run()

Output:

Running Circuit
Circuit._apply_unitary took 0.00027895s
== measurement probabilities ==
|000> 0.50000
|001> 0.00000
|010> 0.00000
|011> 0.00000
|100> 0.50000
|101> 0.00000
|110> 0.00000
|111> 0.00000

More info on Quantum Computers: Nielsen and Chuang - Quantum Computation and Quantum Information

About

Simplistic Quantum Computer Simulator in Python

Topics

Resources

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.