On Wed, Oct 7, 2009 at 3:46 PM, Brian Granger <ellisonbg....@gmail.com> wrote:
> Øyvind,
>
> It will take me a while to go through everything, but I just read through
> some of it quickly.  It all looks quite
> powerful and nice.  One minor thing and one question:
>
> * In various places you use the variable "str."  This is dangerous as str is
> a builtin type (a string).
>
> * It is a little awkward to have the occupation #'s stored differently for
> bosons and fermion.  For bosons
> it looks like you store the list of occupation #'s (dense format) but for
> fermions, the indices of occupied states
> (sparse format).  Did you do this for performance/algorithmic reasons?  For
> states with a few particles but many states the sparse
> structure of your fermionic approach would be better, but as the number of
> particles approaches the number
> of states, I think the sparse format doesn't give any advantage.  I am
> wondering if we can use the same
> storage format for both bosons and fermions.  Sparse for both?  Dense for
> both?
>
> * Am I correct that you are using assumptions to keep track of whether or
> not an index is above or
> below the fermi surface.  Are you using the new assumptions system?  I
> haven't followed this very
> closely - Ondrej can you comment on which should be used?

Currently the old system, and once we finish the new system, the new
system should be used.

However, this:

+    @property
+    def is_above_fermi(self):
+        """
+        Does the index of this FermionicOperator allow values above fermi?
+        """
+        return not self.args[0].assumptions0.get("below_fermi")


will cause problems, because the new assumption system doesn't store
the assumptions within the symbols. One could use global assumptions,
or remember them locally in the instance though and the new system
should allow to create new assumptions easily.

Why not to store this information in the FermionicOperator(SqOperator)
instance itself? (And not use assumptions at all?)

>
> I will look at this more and play with it all.

I'll play with it in the evening.

Ondrej

--~--~---------~--~----~------------~-------~--~----~
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