Ondrej,

(Apologies for the length...)

Here's my larger plan. It's strictly a night-and-weekends thing, but I'd be 
interested in working with you (or anyone else here) who thinks this is fun.

I'd like to get better at generating expressions for correlated wave functions. 
Both to evaluate and optimize their energy using programs like PyQuante, Pyscf, 
Psi4, or whatever, and to generate quantum circuits (i.e. sequences of Clifford 
group operators in a quantum circuit) to run on quantum emulators like ProjectQ 
and others.

Hirata's tensor contraction engine is really impressive, and it's written in 
Python, although it doesn't make use of a lot of tools like Sympy that I think 
could substantially simplify it. I'm not as interested in generating optimized, 
parallel code (yet), mostly just with generating correct code right now.

There are two sympy paths to this: first, using the sympy.physics.secondquant 
operators to generate expressions. I'm getting up to speed on this as quickly 
as I can.

My post in this thread is for the second path, which is more of a first 
quantization approach, where we create operators that are terms of the energy 
expression. A lot of my thesis work took simple MC-SCF energy expressions:

E = sum_i f(i)I1(i,i) + sum_ij a(i,j)I2(i,i,j,j) + b(i,j)I2(i,j,i,j)

And creating expressions to optimize the corresponding set of equations, 
essentially using variational calculus (i.e. j <- j + dj). Sympy should be able 
to do this automatically, provided we can generate I1 and I2 operators that can 
simplify expressions in the right way.

I think the little toy code I posted will work for the above expressions. But 
it doesn't use any of the substantial power of the sympy tensor operators, 
which I'm only just now learning about. I'd be interested in seeing whether 
using something more powerful than my little sympy objects that simplify in the 
right way could open up new avenues, again, with the goal of generating 
something like TCE in python.

Sorry for the long post, trying to give you context. I think there's a real 
opportunity here for sympy, and I'd be willing to get together for an offline 
discussion with you or anyone else who would be interested in this.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/ce7d905f-5871-42cc-bd2a-13997d0397dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to