Skip to content

QCHackers/SymboliQ

Repository files navigation

SymboliQ: A python framework for Symbolic Quantum computation

SymboliQ is an extension of Sympy's Quantum Mechanics subpackage. It's the only Python package we know of that allows for simulation of quantum circuits via Dirac Notation. See the poster for an in-depth explanation.

Installation

The SymboliQ package is available via pip and can be installed in your current Python environment with the command:

pip install symboliq

Getting started

from sympy.physics.quantum import TensorProduct
from symboliq.dirac_notation import DiracNotation, cx, h, i, x, ket_0,  ket_1

print(DiracNotation(ket_0))
# prints
#|0>

print(DiracNotation(x * ket_1))
# prints
# (|0><1| + |1><0|)*|0>

bell_state = DiracNotation(
        cx * TensorProduct(h, i) * TensorProduct(ket_0, ket_0)
    )
print(bell_state.operate_reduce())
# prints
# sqrt(2)*|0>x|0>/2 + sqrt(2)*|1>x|1>/2

Feature requests / Bugs / Questions

If you have questions, feature requests or you found a bug, please file them on Github.

About

A python framework for Symbolic Quantum computation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages