Skip to content
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

adds InteractionOperator utilities #509

Merged
merged 13 commits into from Apr 29, 2019

Conversation

Projects
None yet
3 participants
@bryano
Copy link
Collaborator

commented Mar 19, 2019

handled by normal_ordered, is_hermitian, and hermitian_conjugate

new zero construction method

new projection method

Bryan A. O'Gorman
adds InteractionOperator utilities
handled by normal_ordered, is_hermitian, and hermitian_conjugate

new zero construction method

new projection method

@googlebot googlebot added the cla: yes label Mar 19, 2019

Bryan A. O'Gorman added some commits Apr 3, 2019

Bryan A. O'Gorman
@@ -839,9 +849,36 @@ def normal_ordered(operator, hbar=1.):
order_fn = normal_ordered_quad_term
kwargs['hbar'] = hbar

elif isinstance(operator, InteractionOperator):

This comment has been minimized.

Copy link
@kevinsung

kevinsung Apr 5, 2019

Collaborator

What does it mean to normal-order an InteractionOperator?

This comment has been minimized.

Copy link
@bryano

bryano Apr 5, 2019

Author Collaborator

The docstring for normal_ordered says that, in addition to putting creation operators before annihilation operators, it orders the operators in each set by index. InteractionOperator takes care of the former by construction; this does the latter.

This comment has been minimized.

Copy link
@bryano

bryano Apr 5, 2019

Author Collaborator

This actually orders from lowest to highest, so I'll need to either update the docstring or change the code. Why the convention that the modes are ordered from highest to lowest?

This comment has been minimized.

Copy link
@kevinsung

kevinsung Apr 9, 2019

Collaborator

I don't know why that convention was picked. In any case, let's stick with the old convention.

This comment has been minimized.

Copy link
@bryano

bryano Apr 11, 2019

Author Collaborator

Done

This comment has been minimized.

Copy link
@bryano

bryano Apr 11, 2019

Author Collaborator

@kevinsung ready for re-review

Bryan A. O'Gorman added some commits Apr 11, 2019

Bryan A. O'Gorman
Bryan A. O'Gorman
Bryan A. O'Gorman
Bryan A. O'Gorman
Bryan A. O'Gorman
Bryan A. O'Gorman
@kevinsung
Copy link
Collaborator

left a comment

LGTM after minor change

Bryan A. O'Gorman
@bryano

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 22, 2019

@kevinsung I think this is good to go

@bryano

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 26, 2019

@kevinsung Could you merge this?

@kevinsung kevinsung merged commit a626465 into quantumlib:master Apr 29, 2019

3 checks passed

cla/google All necessary CLAs are signed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.02%) to 99.622%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.