I disabled the failing doctest and pushed a commit to the branch wick3
in my repo.  

I am also extremely busy, so I am afraid I cannot spend much more time
on this right now.  It seems though, that from a user perspective, the
missing documentation strings are not that important.  And from a
hacking perspective most the methods are either standard sympy methods
or quite short and self explaining.

Since it appears nobody has time to spend right now, let's look into
Brians suggestions in a later revision of the module.  At least the
current implementation provides something to compare with for future
iterations.

Øyvind

to., 22.10.2009 kl. 13.31 -0700, skrev Ondrej Certik:
> Hi,
> 
> I don't have time to finish the doctests myself, but on the other hand
> I don't want to hold this anymore either. The current status is:
> 
> $ bin/coverage_doctest.py sympy/physics/secondquant.py
> ----------------------------------------------------------------------
> sympy/physics/secondquant.py
> 
> Missing documentation:
>        * canonize(cls, arg)
>        * eval(cls, arg)
>        * wrap_tuples(*args, **kw_args)
>        * symbol(self)
>        * upper(self)
>        * lower(self)
>        * doit(self, **kw_args)
>        * eval(cls, i, j)
>        * indices_contain_equal_information(self)
>        * is_symbolic(self)
>        * apply_operator(self, state)
>        * apply_operator(self, state)
>        * apply_operator(self, state)
>        * apply_operator(self, state)
>        * apply_operator(self, state)
>        * up(self, i)
>        * down(self, i)
>        * split_commutative_parts(m)
>        * canonize(cls, bra, ket)
>        * eval(cls, bra, ket)
>        * bra(self)
>        * ket(self)
>        * index(self, state)
>        * state(self, i)
>        * index(self, state)
>        * state(self, i)
>        * doit(self,**hints)
>        * doit(self, **kw_args)
>        * iter_q_annihilators(self)
>        * iter_q_creators(self)
> 
> 
> Missing doctests:
>        * eval(cls,symbol, upper, lower)
>        * doit(self,**kw_args)
>        * apply_Mul(m)
>        * apply_operators(e)
>        * matrix_rep(op, basis)
>        * move(e, i, d)
>        * eval(cls, a,b)
>        * eval(cls,arg)
> 
> SCORE sympy/physics/secondquant.py: 44% (31 of 69)
> ----------------------------------------------------------------------
> 
> 
> All tests pass except:
> 
> _______________________ sympy.physics.secondquant.wicks 
> ________________________
> File "/home/ondrej/repos/sympy/sympy/physics/secondquant.py", line
> 2569, in sympy.physics.secondquant.wicks
> Failed example:
>     wicks(Fd(p)*(F(q)+F(r)), keep_only_fully_contracted=True)
> Expected:
>     KroneckerDelta(_i, _r)*KroneckerDelta(_p, _r) + KroneckerDelta(_i,
> _q)*KroneckerDelta(_p, _q)
> Got:
>     KroneckerDelta(_i, _q)*KroneckerDelta(_p, _q) + KroneckerDelta(_i,
> _r)*KroneckerDelta(_p, _r)
> 
> ============= tests finished: 341 passed, 1 failed in 6.34 seconds 
> =============
> 
> 
> So this has to be fixed. Rebased patches are in my "wick3" branch at github.
> 
> Let's get these patches in.
> 
> Ondrej
> 
> On Sun, Oct 18, 2009 at 2:09 PM, jegerjensen <jensen.oyv...@gmail.com> wrote:
> >
> > And another push... I overlooked the substitution Wicks -> wicks.
> >
> > Øyvind
> >
> > On 18 Okt, 22:51, jegerjensen <jensen.oyv...@gmail.com> wrote:
> >> I just pushed some of the trivial fixes to github, please pull.
> >>
> >> Ondrej, I fixed the 'str' variable as well.
> >>
> >> Øyvind
> >>
> >> On 15 Okt, 18:54, Brian Granger <ellisonbg....@gmail.com> wrote:
> >>
> >> > On Thu, Oct 15, 2009 at 2:26 AM, Øyvind Jensen 
> >> > <jensen.oyv...@gmail.com>wrote:
> >>
> >> > > Brian, thanks for your input!
> >>
> >> > > I will make that Exception baseclass, and raise those
> >> > > NotImplementedErrors.  I'll do it the coming weekend.
> >>
> >> > > I really like your idea of implementing the particle/hole stuff on a
> >> > > higher level, and creating algorithms independent of boson/fermi
> >> > > formalism.  That is a great suggestion.  However, I think it should be
> >> > > done in such a way that the user still has a readily available
> >> > > particle/hole formalism.  Let's not sacrifice practical usefulness for
> >> > > programming aesthetics.
> >>
> >> > > Right now the above/below fermi checks take care of a mixture of 
> >> > > things.
> >> > > At least:
> >> > >  1) Test if two indices have overlapping ranges in the KroneckerDelta
> >> > > implementation + possibly elsewhere (maybe even implicitly!)
> >> > >  2) Normal ordering, contractions
> >> > >  3) Hole/Particle stuff in FermionState
> >> > >  4) Maybe I forget about something
> >>
> >> > > I'm curious to how we could leverage the new assumption system to 
> >> > > factor
> >> > > out the particle/hole stuff.  At least 1) seems like a good candidate
> >> > > for that.
> >>
> >> > > I don't think 3) is that important, as the calculations are usually
> >> > > applied to operators, not the states directly.
> >>
> >> > > This leaves 2).  The algorithms could be made boson/fermion agnostic by
> >> > > implementing normal ordering and contractions as methods of
> >> > > FermionicOperator and BosonicOperator.  Then particle/holes would still
> >> > > be low-level, but completely encapsulated in FermionicOperator.  What 
> >> > > do
> >> > > you think?
> >>
> >> > I think I would love to think about this more today but I have a big
> >> > deadline at 5 pm ;-)
> >>
> >> > I will try to get back to this F, Sat or Sun.
> >>
> >> > Cheers,
> >>
> >> > Brian
> >>
> >> > > Øyvind
> >>
> >> > > on., 14.10.2009 kl. 12.08 -0700, skrev Brian Granger:
> >> > > > Thanks for putting a github branch up.
> >>
> >> > > > I am crazy busy, but I did glance though things a bit...
> >>
> >> > > > * Can you create a base class for all exceptions in secondquant, like
> >>
> >> > > > class SecondQuantError(Exception):
> >> > > >   pass
> >>
> >> > > > and make all other exceptions subclasses of this.
> >>
> >> > > > * Also, what happens if you pass bosonic operators to the new
> >> > > > functions like NO, Wicks.  If they don't work for Bosons, they should
> >> > > > raise a NotImplementedError (unless you want to make them work for
> >> > > > Bosons ;-))
> >>
> >> > > > * It looks like the idea of the fermi surface is built into the
> >> > > > fermion operators and states at the lowest level.  I have thought
> >> > > > about this for a few days, and I am not sure this is the best way of
> >> > > > handling it.  I realize the using particles and holes is extremely
> >> > > > useful for practical calculations, but...
> >>
> >> > > > There are many situations where you want to work with the fermion
> >> > > > operators, but don't want to think about particles and holes.  The
> >> > > > formalism of second quantization for fermions doesn't need to assume
> >> > > > anything about particles and holes.
> >>
> >> > > > Having particles and holes built in to the lowest level of the
> >> > > > fermionic implementation means that we can't easily implement things
> >> > > > like wicks theorem in a general boson/fermion independent manner.
> >>
> >> > > > Do you think it would be possible to implement the fermionic stuff in
> >> > > > a way that didn't assume the particle/hole stuff up front, but that
> >> > > > stuff could be added in a high-level.  The situation is similar for
> >> > > > bosons where you have to do tricks to handle the population of the
> >> > > > ground state.
> >>
> >> > > > Cheers,
> >>
> >> > > > Brian
> >>
> >> > > > Cheers,
> >>
> >> > > > Brian
> >>
> >> > > > On Tue, Oct 13, 2009 at 10:58 AM, jegerjensen
> >> > > > <jensen.oyv...@gmail.com> wrote:
> >>
> >> > > >         I implemented lots of doctests, and pushed to my new github
> >> > > >         account:
> >>
> >> > > >         git://github.com/jegerjensen/sympy.git
> >>
> >> > > >         There is still some doctests missing, but I think all the
> >> > > >         important
> >> > > >         stuff is covered.
> >>
> >> > > >         Øyvind
> >>
> >>
> > >
> >
> 
> > 


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

Reply via email to