Andy,

On Sun, Feb 13, 2011 at 11:34 AM, Andy Ray Terrel <[email protected]> wrote:
> I'm collaborating with some people on generating kernels for opencl
> and nvidia.  Probably the big issue is not getting code that runs but
> finding the right systems that run faster, most code will actually
> slow down on a gpu.  If people are really interested in this I can
> start pulling things back into the sympy repo.
>
> I don't know which systems the quantum people are solving but my guess
> would be that it would be easier to grab some libraries that does
> dense linear algebra well rather than put a good generator in SymPy.
> If there was a description of the system that needs to be solved, I
> could spend some cycles helping people speed it up.


We have a number of different problems we are solving using the
quantum stuff.  Here is an overview:

1.  We have long sequences of extremely large, but extremely sparse
unitary matrices.  We simply need to do sparse matrix-vector
multiplies, but many times.  We have written specialized functions
that do this logic using sympy and we also have a scipy.sparse
version, but it is still slow.  Our next step is to autogenerate the C
code.  The sparse matrices are small enough that we will probably
hardcode their elements in the C code.

2.  The next class is algorithms that use sympy's symbolic
manipulation capabilities.  This will be extremely difficult to code
up using C as it uses *all* of sympys internal symbolic logic.  This
will probably need specialized code in python/cython *or* simply
optimizing the critical paths in sympy.

3.  For time dependent problems we need matrix exponentials of both
sparse and dense matrices.  Again, here, we can do this using
numpy/scipy.sparse, but lack a symbolic equivalent.

But, overall, you are right that using numpy/scipy.sparse for most of
our heavy lifting is the way to go.  Also, other users may have
completely different usage cases for the quantum stuff.

Cheers,

Brian

> -- Andy
>
> On Sun, Feb 13, 2011 at 1:12 PM, Vinzent Steinberg
> <[email protected]> wrote:
>> On 12 Feb., 16:43, william ratcliff <[email protected]>
>> wrote:
>>> One of our thoughts was that we should autogenerate C code that could be run
>>> on a GPU....I hope to be able to be able to explore this later in the year.
>>
>> This should be quite possible with a modified C printer and pyopencl
>> [1].
>>
>> Vinzent
>>
>>
>> [1] http://mathema.tician.de/software/pyopencl
>>
>> --
>> 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.
>
>



-- 
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
[email protected]
[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