Re: [sympy] Should Bra and Ket be subclasses of State?

2010-07-17 Thread Øyvind Jensen
fr., 16.07.2010 kl. 13.25 -0700, skrev Brian Granger: > Hi, > > Currently in secondquant and quantum we are making Bra and Ket > subclasses of State: > > class State(Expr): > class Bra(State): > class Ket(State): > > the other option would be to make the ket/bra-ness an option: > > bra = State(

[sympy] Should Bra and Ket be subclasses of State?

2010-07-16 Thread Brian Granger
Hi, Currently in secondquant and quantum we are making Bra and Ket subclasses of State: class State(Expr): class Bra(State): class Ket(State): the other option would be to make the ket/bra-ness an option: bra = State('alpha', bra=True) The advantage of this approach is that things like dagger