On Thu, Jan 12, 2012 at 9:50 PM, smichr <[email protected]> wrote:
> Two questions:
>
> 1) Why do FockStateKet and FockStateBra print as FockState?
>
>>>> BKet((n,))
> FockState((n,))
>>>> BBra((n,))
> FockState((n,))

I think these were created as shorthand aliases.   Probably not the
best decision.

> The Bra and Ket derive from FockState, so sympification of these
> (misrepr-s) will fail to give the original object and are misleading
> as to what one is dealing with, e.g.
>
>>>> a,b=AnnihilateBoson(0), BKet((n,))
>>>> a,b
> (AnnihilateBoson(0), FockState((n,)))
>>>> a.apply_operator(b)
> sqrt(n)*FockStateBosonKet((n - 1,))
>
>>>> a.apply_operator(S(repr(b)))
> AnnihilateBoson(0)*FockState((n,))
>
> 2) Why, though class FockStateBosonKet is defined in secondquant, does
> importing everything not give access to that, but only to the alias
> that is defined?

Bad design decision.  This entire module needs to be rewritten though,
so I wouldn't spend too much time worrying about these things.  But we
should probably avoid aliasing like this.

>>>> from sympy.physics.secondquant import *
>>>> FockStateBosonKet
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
> NameError: name 'FockStateBosonKet' is not defined
>>>> BKet # the line BKet = FockStateBosonKet appears in the file
> <class 'sympy.physics.secondquant.FockStateBosonKet'>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/sympy?hl=en.
>



-- 
Brian E. Granger
Cal Poly State University, San Luis Obispo
[email protected] and [email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to