ProjectQ-Framework / FermiLib

FermiLib: Open source software for analyzing fermionic quantum simulation algorithms
https://projectq.ch/
Apache License 2.0
86 stars 38 forks source link

add jordan wigner for _plane_wave_hamiltonian #61

Closed Spaceenter closed 7 years ago

Spaceenter commented 7 years ago

@babbush Formula (D6) still seems problematic, so this implementation is using formula (D5) directly.

babbush commented 7 years ago

What part of D6 is problematic? Is it just the identity term that is not looking correct?

Spaceenter commented 7 years ago

Not only the identity term, but also (potentially) the Z term.

What I found is that _jellium_test fails if I remove either of the following two lines (according to the formula, those two lines should be removed):

https://github.com/ProjectQ-Framework/FermiLib/blob/develop/src/fermilib/utils/_jellium.py#L378 https://github.com/ProjectQ-Framework/FermiLib/blob/develop/src/fermilib/utils/_jellium.py#L392

However, the good thing is, even using (D5), the performance shouldn't in influenced that much, as most of the computations are for XZX/YZY, which is orders of magnitude more complex than Z term and I term. @babbush

babbush commented 7 years ago

Thanks Wei. This is super helpful.

On Thu, May 25, 2017 at 7:21 AM, Wei Sun notifications@github.com wrote:

Not only the identity term, but also (potentially) the Z term.

What I found is that _jellium_test fails if I remove either of the following two lines (according to the formula, those two lines should be removed):

https://github.com/ProjectQ-Framework/FermiLib/blob/ develop/src/fermilib/utils/_jellium.py#L378 https://github.com/ProjectQ-Framework/FermiLib/blob/ develop/src/fermilib/utils/_jellium.py#L392

However, the good thing is, even using (D5), the performance shouldn't in influenced that much, as most of the computations are for XZX/YZY, which is orders of magnitude more complex than Z term and I term. @babbush https://github.com/babbush

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ProjectQ-Framework/FermiLib/pull/61#issuecomment-304022148, or mute the thread https://github.com/notifications/unsubscribe-auth/ANlTf5HCigWHfQ3XZmF6e3GO12f89-Ngks5r9Y5QgaJpZM4Nl5L0 .