Beispiel #1
0
def _test_sho1d():
    ad = RaisingOp('a')
    assert pretty(ad) == u' \u2020\na '
    assert latex(ad) == 'a^{\\dag}'
Beispiel #2
0
def _test_sho1d():
    ad = RaisingOp('a')
    assert pretty(ad) == u' \N{DAGGER}\na '
    assert latex(ad) == 'a^{\\dagger}'
Beispiel #3
0
from sympy.functions.special.tensor_functions import KroneckerDelta
from sympy.physics.quantum.hilbert import ComplexSpace
from sympy.physics.quantum.represent import represent
from sympy.external import import_module
from sympy.testing.pytest import skip

from sympy.physics.quantum.sho1d import (
    RaisingOp,
    LoweringOp,
    SHOKet,
    SHOBra,
    Hamiltonian,
    NumberOp,
)

ad = RaisingOp("a")
a = LoweringOp("a")
k = SHOKet("k")
kz = SHOKet(0)
kf = SHOKet(1)
k3 = SHOKet(3)
b = SHOBra("b")
b3 = SHOBra(3)
H = Hamiltonian("H")
N = NumberOp("N")
omega = Symbol("omega")
m = Symbol("m")
ndim = Integer(4)

np = import_module("numpy")
scipy = import_module("scipy", import_kwargs={"fromlist": ["sparse"]})
Beispiel #4
0
from sympy.physics.quantum import Dagger
from sympy.physics.quantum.constants import hbar
from sympy.physics.quantum import Commutator
from sympy.physics.quantum.qapply import qapply
from sympy.physics.quantum.innerproduct import InnerProduct
from sympy.physics.quantum.cartesian import X, Px
from sympy.functions.special.tensor_functions import KroneckerDelta
from sympy.physics.quantum.hilbert import ComplexSpace
from sympy.physics.quantum.represent import represent
from sympy.external import import_module
from sympy.testing.pytest import skip

from sympy.physics.quantum.sho1d import (RaisingOp, LoweringOp, SHOKet, SHOBra,
                                         Hamiltonian, NumberOp)

ad = RaisingOp('a')
a = LoweringOp('a')
k = SHOKet('k')
kz = SHOKet(0)
kf = SHOKet(1)
k3 = SHOKet(3)
b = SHOBra('b')
b3 = SHOBra(3)
H = Hamiltonian('H')
N = NumberOp('N')
omega = Symbol('omega')
m = Symbol('m')
ndim = Integer(4)

np = import_module('numpy')
scipy = import_module('scipy', __import__kwargs={'fromlist': ['sparse']})
Beispiel #5
0
def _test_sho1d():
    ad = RaisingOp("a")
    assert pretty(ad) == u" \N{DAGGER}\na "
    assert latex(ad) == "a^{\\dagger}"