Hi, On Tue, Jun 7, 2011 at 3:20 PM, [email protected] < [email protected]> wrote:
> That remark is quite important. In the same spirit I would like to know if > there are any arguments for using an expression for the representation > instead of a function (the use of x_1 or x_dummy or whatever seems awkward > (personal opinion!)). > > I agree wholeheartedly as well. As for your question about expressions vs. functions, I don't think an explicit decision was really made one way or the other because so far representations have really been thought of in terms of matrices (stuff for spin operators and gates) rather than continuous functions. I did not write the classes in cartesian.py, which are the first ones which return expressions, so perhaps whoever made that decision can comment. > Maybe one such argument is that using a function instead of an expression > breaks the (possible) reuse of code between the implementation for discreet > and continuous bases. (I'm really shooting in the dark here!) > > Anyhow, I would like to know what the others think about that. Using > functions seems more natural to me (no x_dummies for one). > I also believe that functions seem a bit more natural as well, and I'm interested to hear what others think. I think the ultimate goal of this endeavor is to be able to take an equation, like the Schrodinger equation, written as just operators and kets of some known system (H|psi> = E|psi> for a system), and then call represent() on it, with a specified basis, and get the complete functional form of that equation (with derivatives, etc.). So, in that case, it seems to make sense to have representations return functions. It might even be nice to just have a Wavefunction class for this purpose. I'd be interested to hear more thoughts on implementation. > > Stefan > > > On 7 June 2011 21:41, Øyvind Jensen <[email protected]> wrote: > >> I haven't dived into the quantum module, so I don't know how to answer >> your question. But I think maybe it will be easier to find a good >> solution if you look at it from the other end. What is it that you >> ultimately want to do? What is the intended use of the function you >> are implementing? >> >> Øyvind >> >> -- >> 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. >> >> > -- > 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. > -- Tomo Lazovich Harvard College '11 278 Winthrop House Mail Center Cambridge, MA 02138 -- 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.
