Make quantum operators and algebras native in python
Project description
QOP
Make quantum operators and algebras native in python
Behold, the power of qop.
- Boson
from qop.boson import *
assert (b0.D*b0)**3 == b0.D*b0+3*b0.D**2*b0**2+b0.D**3*b0**3
- Fermion
from qop.fermion import *
assert (c0.D*c0)**3 == c0.D*c0
- Hardcore Boson
from qop.hardcoreboson import *
assert (hb0.D*hb0)**2 ==hb0.D*hb0
assert hb0*hb1 == hb1*hb0
- Spin
from qop.spin import *
assert s0.x*s0.y == 1j/2*s0.z
assert s0.z*s1.x == -2j*s1.x*s0.x*s0.y
- Grassmann numbers
from qop.grassmann import *
assert (1+g(0)*g(1))**2 == 1+2*g(0)*g(1)
- Quaternion numbers
from qop.quaternion import *
assert (1-qi)/(1-qj) == 0.5*(1-qi+qj-qk)
- Quantum states
from qop.fermion import *
from qop.state import *
assert Sf("1").D | c1.D * c1 | c1.D | Sf() == 1.0
See more examples in tests.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
qop-0.0.1.tar.gz
(9.2 kB
view hashes)
Built Distribution
qop-0.0.1-py3-none-any.whl
(15.8 kB
view hashes)