New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spin x/y/z bases representation #431

Merged
merged 1 commit into from Jun 23, 2011

Conversation

Projects
None yet
4 participants
@flacjacket
Member

flacjacket commented Jun 16, 2011

Provides improved functionality in moving between Jx, Jy and Jz spin bases. Implements logic for using represent, rewrite and InnerProducts between arbitrary states in any basis. See the docstrings for usage. Also implements some tests and documentation for things in the spin module. Let me know if you have any questions or comments.

Note that there are still bugs in the Rotation.d function that will effect results from this work, see [1]. Some of the cases that need to be resolved are in an XFAIL test.

[1] http://code.google.com/p/sympy/issues/detail?id=2423

@certik

This comment has been minimized.

Show comment
Hide comment
@certik

certik Jun 16, 2011

Member

Hi Sean, thanks for the pull request! Can you rebase it on top of the latest master? It can't be merged currently.

Member

certik commented Jun 16, 2011

Hi Sean, thanks for the pull request! Can you rebase it on top of the latest master? It can't be merged currently.

@certik

This comment has been minimized.

Show comment
Hide comment
@certik

certik Jun 16, 2011

Member

Test results html report: http://pastehtml.com/view/axdgv94h2.html

Automatic review by sympy-bot.

Member

certik commented Jun 16, 2011

Test results html report: http://pastehtml.com/view/axdgv94h2.html

Automatic review by sympy-bot.

@flacjacket

This comment has been minimized.

Show comment
Hide comment
@flacjacket

flacjacket Jun 16, 2011

Member

I didn't fully clean up the rebase, I updated the file and it should be fine now

Member

flacjacket commented Jun 16, 2011

I didn't fully clean up the rebase, I updated the file and it should be fine now

@certik

This comment has been minimized.

Show comment
Hide comment
@certik

certik Jun 16, 2011

Member

Test results html report: http://pastehtml.com/view/axdktb5eu.html

Automatic review by sympy-bot.

Member

certik commented Jun 16, 2011

Test results html report: http://pastehtml.com/view/axdktb5eu.html

Automatic review by sympy-bot.

@flacjacket

This comment has been minimized.

Show comment
Hide comment
@flacjacket

flacjacket Jun 16, 2011

Member

This should clear up the doctest error, but I'm not sure, since I can't reproduce it.

Member

flacjacket commented Jun 16, 2011

This should clear up the doctest error, but I'm not sure, since I can't reproduce it.

@plaes

View changes

Show outdated Hide outdated sympy/physics/quantum/spin.py
@plaes

View changes

Show outdated Hide outdated sympy/physics/quantum/spin.py
@plaes

View changes

Show outdated Hide outdated sympy/physics/quantum/spin.py
@plaes

View changes

Show outdated Hide outdated sympy/physics/quantum/spin.py
@plaes

View changes

Show outdated Hide outdated sympy/physics/quantum/spin.py
@plaes

View changes

Show outdated Hide outdated sympy/physics/quantum/spin.py
@ellisonbg

View changes

Show outdated Hide outdated sympy/physics/quantum/spin.py
@ellisonbg

View changes

Show outdated Hide outdated sympy/physics/quantum/tests/test_spin.py
@ellisonbg

View changes

Show outdated Hide outdated sympy/physics/quantum/tests/test_spin.py
@flacjacket

This comment has been minimized.

Show comment
Hide comment
@flacjacket

flacjacket Jun 17, 2011

Member

That last commit should address all the points that have been addressed so far, with the exception of the testing of D/d/rewrite, which will come in a later pull request.

Member

flacjacket commented Jun 17, 2011

That last commit should address all the points that have been addressed so far, with the exception of the testing of D/d/rewrite, which will come in a later pull request.

@ellisonbg

This comment has been minimized.

Show comment
Hide comment
@ellisonbg

ellisonbg Jun 17, 2011

Member

One more thing. In the docstrings you are using uppercase J, M, etc., but in the code we use the more common lowercase j, m. Can you update the docstrings to use lowercase letters for j, m?

Member

ellisonbg commented Jun 17, 2011

One more thing. In the docstrings you are using uppercase J, M, etc., but in the code we use the more common lowercase j, m. Can you update the docstrings to use lowercase letters for j, m?

Improve changing between xyz bases for spin states
Use the Wigner D-function to define the represent function for spin
states which allows for statesof any j and m values to be represented as
vectors in the new basis.

Implementation of rewrite, which is used to write states in terms of
different basis is improved to work for all j and m values and for
changing to any basis, not just to z. This utilizes the represent
function.

Changed the InnerProduct evaluation logic to use the represent functions
allowing for innerproducts to be evaluated between any spin states.
@certik

This comment has been minimized.

Show comment
Hide comment
@certik

certik Jun 22, 2011

Member

Test results html report: http://pastehtml.com/view/ay1bpv44i.html

Automatic review by sympy-bot.

Member

certik commented Jun 22, 2011

Test results html report: http://pastehtml.com/view/ay1bpv44i.html

Automatic review by sympy-bot.

certik added a commit that referenced this pull request Jun 23, 2011

Merge pull request #431 from flacjacket/xyz_bases
Spin x/y/z bases representation

@certik certik merged commit 3d7f6d0 into sympy:master Jun 23, 2011

@certik

This comment has been minimized.

Show comment
Hide comment
@certik

certik Jun 23, 2011

Member

This looks good to me (doctests are there, all tests pass), I merged it in. Thanks!

Member

certik commented Jun 23, 2011

This looks good to me (doctests are there, all tests pass), I merged it in. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment