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

Trace and partial trace operations on qubits #1428

Merged
merged 15 commits into from Aug 1, 2012

Conversation

Projects
None yet
6 participants
@gdevanla
Contributor

gdevanla commented Jul 18, 2012

This PR has all changes related to "Trace and Reduced trace operations on Qubits". It also extends qapply() to work with density operators. Examples, have been added to examples/notebook, and a screen shot of examples can be found at http://wp.me/p2lo7k-3m

The PR might need a re-base later on, but I am submitting this to start the review process with @ellisonbg, @flacjacket

@Krastanov

This comment has been minimized.

Show comment
Hide comment
@Krastanov

Krastanov Jul 18, 2012

Member

SymPy Bot Summary: 🔴 There were test failures.

@gdevanla: Please fix the test failures.

Test command: setup.py test
master hash: be3da02
branch hash: 8c5abca04252b4a464a841039519267be7c7275e

Interpreter 1: ✳️ All tests have passed.

Interpreter: /usr/local/bin/python2.5 (2.5.6-final-0)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sY_-ogDA

Interpreter 2: 🔴 There were test failures.

Interpreter: /usr/bin/python2.7 (2.7.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sY9cAhDA

Interpreter 3: 🔴 There were test failures.

Interpreter: /usr/bin/python3.2 (3.2.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYooohDA

Build HTML Docs: 🔴 There were test failures.

Docs build command: make html-errors
Sphinx version: 1.1.3

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYjrkhDA

Automatic review by SymPy Bot.

Member

Krastanov commented Jul 18, 2012

SymPy Bot Summary: 🔴 There were test failures.

@gdevanla: Please fix the test failures.

Test command: setup.py test
master hash: be3da02
branch hash: 8c5abca04252b4a464a841039519267be7c7275e

Interpreter 1: ✳️ All tests have passed.

Interpreter: /usr/local/bin/python2.5 (2.5.6-final-0)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sY_-ogDA

Interpreter 2: 🔴 There were test failures.

Interpreter: /usr/bin/python2.7 (2.7.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sY9cAhDA

Interpreter 3: 🔴 There were test failures.

Interpreter: /usr/bin/python3.2 (3.2.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYooohDA

Build HTML Docs: 🔴 There were test failures.

Docs build command: make html-errors
Sphinx version: 1.1.3

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYjrkhDA

Automatic review by SymPy Bot.

@travisbot

This comment has been minimized.

Show comment
Hide comment
@travisbot

travisbot Jul 18, 2012

This pull request fails (merged 8c5abca0 into be3da02).

travisbot commented Jul 18, 2012

This pull request fails (merged 8c5abca0 into be3da02).

@travisbot

This comment has been minimized.

Show comment
Hide comment
@travisbot

travisbot Jul 19, 2012

This pull request passes (merged 73205f79 into be3da02).

travisbot commented Jul 19, 2012

This pull request passes (merged 73205f79 into be3da02).

@Krastanov

This comment has been minimized.

Show comment
Hide comment
@Krastanov

Krastanov Jul 19, 2012

Member

SymPy Bot Summary: 🔴 There were test failures.

@gdevanla: Please fix the test failures.

Test command: setup.py test
master hash: be3da02
branch hash: 73205f7963990050c2165f8cf7875a87cba25208

Interpreter 1: ✳️ All tests have passed.

Interpreter: /usr/local/bin/python2.5 (2.5.6-final-0)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sY-MAhDA

Interpreter 2: 🔴 There were test failures.

Interpreter: /usr/bin/python2.7 (2.7.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYpIohDA

Interpreter 3: 🔴 There were test failures.

Interpreter: /usr/bin/python3.2 (3.2.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYkLkhDA

Build HTML Docs: 🔴 There were test failures.

Docs build command: make html-errors
Sphinx version: 1.1.3

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYiJIhDA

Automatic review by SymPy Bot.

Member

Krastanov commented Jul 19, 2012

SymPy Bot Summary: 🔴 There were test failures.

@gdevanla: Please fix the test failures.

Test command: setup.py test
master hash: be3da02
branch hash: 73205f7963990050c2165f8cf7875a87cba25208

Interpreter 1: ✳️ All tests have passed.

Interpreter: /usr/local/bin/python2.5 (2.5.6-final-0)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sY-MAhDA

Interpreter 2: 🔴 There were test failures.

Interpreter: /usr/bin/python2.7 (2.7.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYpIohDA

Interpreter 3: 🔴 There were test failures.

Interpreter: /usr/bin/python3.2 (3.2.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYkLkhDA

Build HTML Docs: 🔴 There were test failures.

Docs build command: make html-errors
Sphinx version: 1.1.3

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYiJIhDA

Automatic review by SymPy Bot.

@@ -174,10 +172,24 @@ def doit(self, **hints):
return Add(*terms)
def _generate_outer_prod(self,arg1,arg2):

This comment has been minimized.

@ellisonbg

ellisonbg Jul 23, 2012

Member

Rename to _generate_tensor_prod to be consistent with our naming.

@ellisonbg

ellisonbg Jul 23, 2012

Member

Rename to _generate_tensor_prod to be consistent with our naming.

This comment has been minimized.

@gdevanla

gdevanla Jul 24, 2012

Contributor

This method is just a helper function in density.py. I have removed the _generate_outer_prod method. Therefore, this method can stay and continue with the same name.

@gdevanla

gdevanla Jul 24, 2012

Contributor

This method is just a helper function in density.py. I have removed the _generate_outer_prod method. Therefore, this method can stay and continue with the same name.

@ellisonbg

View changes

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

View changes

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

View changes

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

View changes

Show outdated Hide outdated sympy/physics/quantum/tests/test_qubit.py
@travisbot

This comment has been minimized.

Show comment
Hide comment
@travisbot

travisbot Jul 24, 2012

This pull request passes (merged 03d4229d into be3da02).

travisbot commented Jul 24, 2012

This pull request passes (merged 03d4229d into be3da02).

@Krastanov

This comment has been minimized.

Show comment
Hide comment
@Krastanov

Krastanov Jul 24, 2012

Member

SymPy Bot Summary: 🔴 There were test failures.

@gdevanla: Please fix the test failures.

Test command: setup.py test
master hash: c84e5df
branch hash: 03d4229df2db2ba1742b03c912bc08871061ec27

Interpreter 1: ✳️ All tests have passed.

Interpreter: /usr/local/bin/python2.5 (2.5.6-final-0)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYrYohDA

Interpreter 2: 🔴 There were test failures.

Interpreter: /usr/bin/python2.7 (2.7.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYu9ghDA

Interpreter 3: 🔴 There were test failures.

Interpreter: /usr/bin/python3.2 (3.2.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYgeghDA

Build HTML Docs: 🔴 There were test failures.

Docs build command: make html-errors
Sphinx version: 1.1.3

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYobkhDA

Automatic review by SymPy Bot.

Member

Krastanov commented Jul 24, 2012

SymPy Bot Summary: 🔴 There were test failures.

@gdevanla: Please fix the test failures.

Test command: setup.py test
master hash: c84e5df
branch hash: 03d4229df2db2ba1742b03c912bc08871061ec27

Interpreter 1: ✳️ All tests have passed.

Interpreter: /usr/local/bin/python2.5 (2.5.6-final-0)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYrYohDA

Interpreter 2: 🔴 There were test failures.

Interpreter: /usr/bin/python2.7 (2.7.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYu9ghDA

Interpreter 3: 🔴 There were test failures.

Interpreter: /usr/bin/python3.2 (3.2.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYgeghDA

Build HTML Docs: 🔴 There were test failures.

Docs build command: make html-errors
Sphinx version: 1.1.3

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYobkhDA

Automatic review by SymPy Bot.

@flacjacket

View changes

Show outdated Hide outdated sympy/core/trace.py
@flacjacket

This comment has been minimized.

Show comment
Hide comment
@flacjacket

flacjacket Jul 26, 2012

Member

I don't see any major problems with this, beyond what comments have already been made.

You'll need to rebase or merge this with master.

Member

flacjacket commented Jul 26, 2012

I don't see any major problems with this, beyond what comments have already been made.

You'll need to rebase or merge this with master.

@travisbot

This comment has been minimized.

Show comment
Hide comment
@travisbot

travisbot Jul 26, 2012

This pull request passes (merged 70d0b95 into 861a066).

travisbot commented Jul 26, 2012

This pull request passes (merged 70d0b95 into 861a066).

@Krastanov

This comment has been minimized.

Show comment
Hide comment
@Krastanov

Krastanov Jul 26, 2012

Member

SymPy Bot Summary: 🔴 There were test failures.

@gdevanla: Please fix the test failures.

Test command: setup.py test
master hash: 861a066
branch hash: 70d0b95

Interpreter 1: ✳️ All tests have passed.

Interpreter: /usr/local/bin/python2.5 (2.5.6-final-0)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYv6YiDA

Interpreter 2: 🔴 There were test failures.

Interpreter: /usr/bin/python2.7 (2.7.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYp64iDA

Interpreter 3: 🔴 There were test failures.

Interpreter: /usr/bin/python3.2 (3.2.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sY970iDA

Build HTML Docs: 🔴 There were test failures.

Docs build command: make html-errors
Sphinx version: 1.1.3

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sY38UiDA

Automatic review by SymPy Bot.

Member

Krastanov commented Jul 26, 2012

SymPy Bot Summary: 🔴 There were test failures.

@gdevanla: Please fix the test failures.

Test command: setup.py test
master hash: 861a066
branch hash: 70d0b95

Interpreter 1: ✳️ All tests have passed.

Interpreter: /usr/local/bin/python2.5 (2.5.6-final-0)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYv6YiDA

Interpreter 2: 🔴 There were test failures.

Interpreter: /usr/bin/python2.7 (2.7.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYp64iDA

Interpreter 3: 🔴 There were test failures.

Interpreter: /usr/bin/python3.2 (3.2.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sY970iDA

Build HTML Docs: 🔴 There were test failures.

Docs build command: make html-errors
Sphinx version: 1.1.3

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sY38UiDA

Automatic review by SymPy Bot.

@travisbot

This comment has been minimized.

Show comment
Hide comment
@travisbot

travisbot Jul 29, 2012

This pull request passes (merged 7d34c55 into 861a066).

travisbot commented Jul 29, 2012

This pull request passes (merged 7d34c55 into 861a066).

@Krastanov

This comment has been minimized.

Show comment
Hide comment
@Krastanov

Krastanov Jul 29, 2012

Member

SymPy Bot Summary: 🔴 There were test failures.

@gdevanla: Please fix the test failures.

Test command: setup.py test
master hash: 5e2cf47
branch hash: 7d34c55

Interpreter 1: ✳️ All tests have passed.

Interpreter: /usr/local/bin/python2.5 (2.5.6-final-0)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYu_wiDA

Interpreter 2: 🔴 There were test failures.

Interpreter: /usr/bin/python2.7 (2.7.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYmLYiDA

Interpreter 3: 🔴 There were test failures.

Interpreter: /usr/bin/python3.2 (3.2.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYw_8hDA

Build HTML Docs: ✳️ All tests have passed.

Docs build command: make html-errors
Sphinx version: 1.1.3

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYttUiDA

Automatic review by SymPy Bot.

Member

Krastanov commented Jul 29, 2012

SymPy Bot Summary: 🔴 There were test failures.

@gdevanla: Please fix the test failures.

Test command: setup.py test
master hash: 5e2cf47
branch hash: 7d34c55

Interpreter 1: ✳️ All tests have passed.

Interpreter: /usr/local/bin/python2.5 (2.5.6-final-0)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYu_wiDA

Interpreter 2: 🔴 There were test failures.

Interpreter: /usr/bin/python2.7 (2.7.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYmLYiDA

Interpreter 3: 🔴 There were test failures.

Interpreter: /usr/bin/python3.2 (3.2.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYw_8hDA

Build HTML Docs: ✳️ All tests have passed.

Docs build command: make html-errors
Sphinx version: 1.1.3

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYttUiDA

Automatic review by SymPy Bot.

@travisbot

This comment has been minimized.

Show comment
Hide comment
@travisbot

travisbot Jul 30, 2012

This pull request passes (merged c3f176a into 861a066).

travisbot commented Jul 30, 2012

This pull request passes (merged c3f176a into 861a066).

@Krastanov

This comment has been minimized.

Show comment
Hide comment
@Krastanov

Krastanov Jul 30, 2012

Member

SymPy Bot Summary: 🔴 There were test failures.

@gdevanla: Please fix the test failures.

Test command: setup.py test
master hash: 3519951
branch hash: c3f176a

Interpreter 1: 🔴 There were test failures.

Interpreter: /usr/local/bin/python2.5 (2.5.6-final-0)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYs64iDA

Interpreter 2: 🔴 There were test failures.

Interpreter: /usr/bin/python2.7 (2.7.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYlY8iDA

Interpreter 3: 🔴 There were test failures.

Interpreter: /usr/bin/python3.2 (3.2.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sY_pYiDA

Build HTML Docs: 🔴 There were test failures.

Docs build command: make html-errors
Sphinx version: 1.1.3

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYyP8hDA

Automatic review by SymPy Bot.

Member

Krastanov commented Jul 30, 2012

SymPy Bot Summary: 🔴 There were test failures.

@gdevanla: Please fix the test failures.

Test command: setup.py test
master hash: 3519951
branch hash: c3f176a

Interpreter 1: 🔴 There were test failures.

Interpreter: /usr/local/bin/python2.5 (2.5.6-final-0)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYs64iDA

Interpreter 2: 🔴 There were test failures.

Interpreter: /usr/bin/python2.7 (2.7.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYlY8iDA

Interpreter 3: 🔴 There were test failures.

Interpreter: /usr/bin/python3.2 (3.2.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sY_pYiDA

Build HTML Docs: 🔴 There were test failures.

Docs build command: make html-errors
Sphinx version: 1.1.3

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYyP8hDA

Automatic review by SymPy Bot.

ellisonbg added a commit that referenced this pull request Aug 1, 2012

Merge pull request #1428 from gdevanla/trace_qubit
Trace and partial trace operations on qubits

@ellisonbg ellisonbg merged commit ce620ba into sympy:master Aug 1, 2012

1 check passed

default
Details
@ellisonbg

This comment has been minimized.

Show comment
Hide comment
@ellisonbg

ellisonbg Aug 1, 2012

Member

Great work, just merged.

Member

ellisonbg commented Aug 1, 2012

Great work, just merged.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Oct 11, 2013

Coverage Status

Changes Unknown when pulling c3f176a on gdevanla:trace_qubit into * on sympy:master*.

coveralls commented Oct 11, 2013

Coverage Status

Changes Unknown when pulling c3f176a on gdevanla:trace_qubit into * on sympy:master*.

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