Hilbert spaces for quantum mechanics.
Authors: * Brian Granger * Matt Curry
An abstract Hilbert space for quantum mechanics.
In short, a Hilbert space is an abstract vector space that is complete with inner products defined [R286].
References
[R286] | (1, 2) http://en.wikipedia.org/wiki/Hilbert_space |
Examples
>>> from sympy.physics.quantum.hilbert import HilbertSpace
>>> hs = HilbertSpace()
>>> hs
H
Finite dimensional Hilbert space of complex vectors.
The elements of this Hilbert space are n-dimensional complex valued vectors with the usual inner product that takes the complex conjugate of the vector on the right.
A classic example of this type of Hilbert space is spin-1/2, which is ComplexSpace(2). Generalizing to spin-s, the space is ComplexSpace(2*s+1). Quantum computing with N qubits is done with the direct product space ComplexSpace(2)**N.
Examples
>>> from sympy import symbols
>>> from sympy.physics.quantum.hilbert import ComplexSpace
>>> c1 = ComplexSpace(2)
>>> c1
C(2)
>>> c1.dimension
2
>>> n = symbols('n')
>>> c2 = ComplexSpace(n)
>>> c2
C(n)
>>> c2.dimension
n
The Hilbert space of square integrable functions on an interval.
An L2 object takes in a single sympy Interval argument which represents the interval its functions (vectors) are defined on.
Examples
>>> from sympy import Interval, oo
>>> from sympy.physics.quantum.hilbert import L2
>>> hs = L2(Interval(0,oo))
>>> hs
L2([0, oo))
>>> hs.dimension
oo
>>> hs.interval
[0, oo)
The Hilbert space for second quantization.
Technically, this Hilbert space is a infinite direct sum of direct products of single particle Hilbert spaces [R287]. This is a mess, so we have a class to represent it directly.
References
[R287] | (1, 2) http://en.wikipedia.org/wiki/Fock_space |
Examples
>>> from sympy.physics.quantum.hilbert import FockSpace
>>> hs = FockSpace()
>>> hs
F
>>> hs.dimension
oo