> Just a quick follow-up, you wouldn't happen to have any problem with
> me being an incoming first-year undergrad, do you?? Thanks.

In theory I don't have any problem with this.  But I would ask some questions:

* How much experience do you have in coding?  With Python?  Other languages?
* How much Physics and Math have you taken?  Calc?  Linear algebra?  etc.
* Do you have any experience with solving PDEs numerically?

Even if you are weak in these areas, it might still be possible.  BUT,
you are going to have to work super hard on your application and learn
enough to convince us 1) that you really understand what you are
proposing and 2) have a realistic plan for getting it done.

Also, you should definitely start to look at the sympy code
(especially sympy.physics.quantum and networkx).  You will also need
to submit some sympy pull requests/patches before the application
deadline.

One thought.  If it seems like it is too much for this year, you could
aim for next summer.  That give you a year to start working with sympy
and learning about quantum.  There is *plenty* of interesting work to
do in sympy....

Let me know if you have other questions.

Cheers,

Brian

If you have the time

> --
> Regards,
> Vikram Dhillon
>
> ~~~
> To perceive is to suffer.
>
> On Tue, Apr 5, 2011 at 8:47 PM, Vikram Dhillon <dhillon...@gmail.com> wrote:
>> Sorry for top posting, anyhow, thanks a lot for your reply, I see that
>> this project requires me to study the code and then integrate
>> sympy.physics.quantum and networkx. From a mathematical perspective, I
>> have to say that if this project is mostly quantum mehcanics then it
>> should be a lot of fun!! However, Brian if I may ask you for a favor,
>> besides what you mentioned in this email, if there a formal write-up
>> of this somewhere I can find? Its a lot easier to "see" the
>> generealization of schrodinger's equations to graphs that way. It
>> could be an external link or so, I'll look around and see what I find
>> and get back to you. So since you already gave me a list of tasks that
>> you are looking forward to, should I just include those in the
>> proposal that I submit to GSoC? Thanks again.
>>
>> - Vikram
>>
>> On Tue, Apr 5, 2011 at 7:43 PM, Brian Granger <elliso...@gmail.com> wrote:
>>> Hi,
>>>
>>>>> I was looking on the ideas page of sympy for GSoC where the
>>>>> generalization of the laplacian to graphs was presented, I have a
>>>>> decent knowledge of graph theory and I am willing to learn new stuff
>>>>> if needed =) although this specific task that I am interested was
>>>>> vague in description and it reach Brian Granger for details. Can
>>>>> anyone please tell me how to reach him and get more details on this
>>>>> topic?
>>>
>>> The basic idea is to take the Schrodinger equation:
>>>
>>> H = -1/2 del^2 + V(x)
>>>
>>> H psi(x) = E psi(x)   OR
>>> I d/dt psi(x) = H psi(x)
>>>
>>> And generalize it to graphs.  We already have some infrastructure for
>>> handling the Schrodinger equation in sympy, so the idea would be to
>>> integrate that with networkx so make it possible to do solve things on
>>> a graph.  The generalization of H to a graph is pretty simple.  The
>>> usual differential operator del^2 gets replaced by the graph Laplacian
>>> and the potential V(x) if a function over the vertices of the graph
>>> V_ij = delta_ij V(x_i).
>>>
>>> You end up with a sparse matrix representation of H and can then 1)
>>> either find the eigenvalues or 2) solve the time dependent problem.
>>> The main way that the symbolic capabilities of sympy come into play
>>> are in allowing the potential to be specified symbolically.
>>>
>>> Other thoughts about this project:
>>>
>>> * The question of Boundary conditions is somewhat subtle.  I see how
>>> to handle standard Neumann and Dirichlet, but others are more
>>> difficult.
>>> * Much of the code would be in putting a nice API/UI on everything so
>>> that it integrates with sympy.physics.quantum and networkx in a
>>> natural manner.
>>> * The sparse matrices and solvers can be handled using scipy.sparse
>>> for performance.
>>> * I have a set of physically motivated interesting problems that could
>>> be used as test cases.
>>> * To approximate the continuous Schrodinger equation, it would be
>>> interesting to add code that takes a graph and sub divides the links.
>>> * The diffusion equation could also be solved on graphs in this
>>> manner, but that problem has been studied extensively before.  But, I
>>> would also probably include that as part of the project.
>>> * Most of the project is quantum mechanics.  The graph theory aspects
>>> are pretty simple (basically just getting the graph laplacian).
>>>
>>> Here is some simple code I wrote that explores these topics:
>>>
>>> import networkx as nx
>>> import numpy as np
>>> import scipy.sparse
>>>
>>>
>>> def sparse_laplacian(g, format='csr'):
>>>    """Construct the Laplacian matrix for the graph as s scipy.sparse 
>>> matrix."""
>>>    o = g.order()
>>>    A = nx.to_scipy_sparse_matrix(g)
>>>    diag = A.sum(axis=1)
>>>    diag.shape = (1,o)
>>>    D = scipy.sparse.spdiags(diag, (0,), o, o, format=format)
>>>    return D - A
>>>
>>>
>>> def kinetic(g, sparse=False):
>>>    """Construct the kinetic energy matrix for the graph.
>>>
>>>    This is -(1/2)*Laplacian. To impose Dirichlet boundary conditions at the
>>>    ith node, we need to zero out the ith row and ith column of the adjacency
>>>    matrix. I am not sure what the best way of doing that is. We may have to
>>>    use a different sparse storage format. We can use the neighbor method
>>>    of Graph and write our own laplacian function that looks at a custom
>>>    boundary condition attribute.
>>>    """
>>>    if sparse:
>>>        return 0.5*sparse_laplacian(g)
>>>    else:
>>>        return 0.5*nx.laplacian(g)
>>>
>>>
>>> def potential(g, attr, sparse=True):
>>>    o = g.order()
>>>    diag = np.array([g.node[i][attr] for i in range(g.order())])
>>>    if sparse:
>>>        return scipy.sparse.spdiags(diag, (0,), o, o, format='csr')
>>>    else:
>>>        return np.diag(diag)
>>>
>>>
>>> def hamiltonian(g, attr, sparse=True):
>>>    return kinetic(g, sparse) + potential(g, attr, sparse)
>>>
>>>
>>> def set_node_attr(g, name, values):
>>>    for i in range(g.order()):
>>>        g.node[i][name] = values[i]
>>>
>>>
>>> Let me know if you have other questions.
>>>
>>> Cheers,
>>>
>>> Brian
>>>
>>>> I have to run off to a meeting, but I will reply later.  The basic
>>>> gist of this proposal is to use the graph laplacian to build
>>>> generalizations of the Schrodinger equation on graphs.  The idea is
>>>> that many solid state systems (carbon nanotubes, graphene, etc) are
>>>> just graphs.    I have some sample code I can send you.  In the
>>>> meantime, I would start to have a look at networkx:
>>>>
>>>> http://networkx.lanl.gov/
>>>>
>>>> Cheers,
>>>>
>>>> Brian
>>>>
>>>>> Thanks,
>>>>> Vikram
>>>>>
>>>>> PS. I am not subscribed to the list so please CC me the emails.
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google Groups 
>>>>> "sympy" group.
>>>>> To post to this group, send email to sympy@googlegroups.com.
>>>>> To unsubscribe from this group, send email to 
>>>>> sympy+unsubscr...@googlegroups.com.
>>>>> For more options, visit this group at 
>>>>> http://groups.google.com/group/sympy?hl=en.
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Brian E. Granger
>>>> Cal Poly State University, San Luis Obispo
>>>> bgran...@calpoly.edu and elliso...@gmail.com
>>>>
>>>
>>>
>>>
>>> --
>>> Brian E. Granger
>>> Cal Poly State University, San Luis Obispo
>>> bgran...@calpoly.edu and elliso...@gmail.com
>



-- 
Brian E. Granger
Cal Poly State University, San Luis Obispo
bgran...@calpoly.edu and elliso...@gmail.com

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

Reply via email to