{"action":"created","issue":{"url":"https://api.github.com/repos/quantumlib/OpenFermion/issues/213","repository_url":"https://api.github.com/repos/quantumlib/OpenFermion","labels_url":"https://api.github.com/repos/quantumlib/OpenFermion/issues/213/labels{/name}","comments_url":"https://api.github.com/repos/quantumlib/OpenFermion/issues/213/comments","events_url":"https://api.github.com/repos/quantumlib/OpenFermion/issues/213/events","html_url":"https://github.com/quantumlib/OpenFermion/issues/213","id":298119604,"number":213,"title":"External potential operator in plane wave basis non-Hermitian for even grids","user":{"login":"max-radin","id":10065071,"avatar_url":"https://avatars1.githubusercontent.com/u/10065071?v=4","gravatar_id":"","url":"https://api.github.com/users/max-radin","html_url":"https://github.com/max-radin","followers_url":"https://api.github.com/users/max-radin/followers","following_url":"https://api.github.com/users/max-radin/following{/other_user}","gists_url":"https://api.github.com/users/max-radin/gists{/gist_id}","starred_url":"https://api.github.com/users/max-radin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/max-radin/subscriptions","organizations_url":"https://api.github.com/users/max-radin/orgs","repos_url":"https://api.github.com/users/max-radin/repos","events_url":"https://api.github.com/users/max-radin/events{/privacy}","received_events_url":"https://api.github.com/users/max-radin/received_events","type":"User","site_admin":false},"labels":[{"id":699437065,"url":"https://api.github.com/repos/quantumlib/OpenFermion/labels/help%20wanted","name":"help wanted","color":"0e8a16","default":true}],"state":"open","locked":false,"assignee":{"login":"Spaceenter","id":4895865,"avatar_url":"https://avatars0.githubusercontent.com/u/4895865?v=4","gravatar_id":"","url":"https://api.github.com/users/Spaceenter","html_url":"https://github.com/Spaceenter","followers_url":"https://api.github.com/users/Spaceenter/followers","following_url":"https://api.github.com/users/Spaceenter/following{/other_user}","gists_url":"https://api.github.com/users/Spaceenter/gists{/gist_id}","starred_url":"https://api.github.com/users/Spaceenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Spaceenter/subscriptions","organizations_url":"https://api.github.com/users/Spaceenter/orgs","repos_url":"https://api.github.com/users/Spaceenter/repos","events_url":"https://api.github.com/users/Spaceenter/events{/privacy}","received_events_url":"https://api.github.com/users/Spaceenter/received_events","type":"User","site_admin":false},"assignees":[{"login":"Spaceenter","id":4895865,"avatar_url":"https://avatars0.githubusercontent.com/u/4895865?v=4","gravatar_id":"","url":"https://api.github.com/users/Spaceenter","html_url":"https://github.com/Spaceenter","followers_url":"https://api.github.com/users/Spaceenter/followers","following_url":"https://api.github.com/users/Spaceenter/following{/other_user}","gists_url":"https://api.github.com/users/Spaceenter/gists{/gist_id}","starred_url":"https://api.github.com/users/Spaceenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Spaceenter/subscriptions","organizations_url":"https://api.github.com/users/Spaceenter/orgs","repos_url":"https://api.github.com/users/Spaceenter/repos","events_url":"https://api.github.com/users/Spaceenter/events{/privacy}","received_events_url":"https://api.github.com/users/Spaceenter/received_events","type":"User","site_admin":false},{"login":"babbush","id":14242687,"avatar_url":"https://avatars2.githubusercontent.com/u/14242687?v=4","gravatar_id":"","url":"https://api.github.com/users/babbush","html_url":"https://github.com/babbush","followers_url":"https://api.github.com/users/babbush/followers","following_url":"https://api.github.com/users/babbush/following{/other_user}","gists_url":"https://api.github.com/users/babbush/gists{/gist_id}","starred_url":"https://api.github.com/users/babbush/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/babbush/subscriptions","organizations_url":"https://api.github.com/users/babbush/orgs","repos_url":"https://api.github.com/users/babbush/repos","events_url":"https://api.github.com/users/babbush/events{/privacy}","received_events_url":"https://api.github.com/users/babbush/received_events","type":"User","site_admin":false}],"milestone":null,"comments":22,"created_at":"2018-02-18T21:24:38Z","updated_at":"2018-03-26T02:58:31Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"It seems that the Hamiltonians produced by `plane_wave_external_potential` and `dual_basis_external_potential` are non-Hermitian if the number of grid subdivisions is even and any atoms are not at the origin. For example, the program below returns False:\r\n\r\n```\r\nfrom openfermion.utils import Grid, is_hermitian\r\nfrom openfermion.transforms import get_sparse_operator\r\nfrom openfermion.hamiltonians import plane_wave_external_potential\r\n\r\ngrid = Grid(1, 4, 4.0)\r\ngeometry = [('H', (0.1,))]\r\nH = plane_wave_external_potential(grid, geometry, True)\r\nsparse = get_sparse_operator(H)\r\nprint(is_hermitian(sparse))\r\n```\r\n\r\nI think this is due to the \"dualling\" (meaning that momentum subtraction is done modulo the maximum momentum). When I remove the dualling in `plane_wave_external_potential`, then the operator is Hermitian.\r\n\r\nDoes anyone have any thoughts on this? From https://arxiv.org/abs/1706.00023 it sounds like it might be ok to go without dualling for the plane wave basis, but that dualling is important for the dual basis. (For the systems I'm looking at, having an even number of subdivisions would be very convenient!)"},"comment":{"url":"https://api.github.com/repos/quantumlib/OpenFermion/issues/comments/376032925","html_url":"https://github.com/quantumlib/OpenFermion/issues/213#issuecomment-376032925","issue_url":"https://api.github.com/repos/quantumlib/OpenFermion/issues/213","id":376032925,"user":{"login":"gkc1000","id":1824452,"avatar_url":"https://avatars3.githubusercontent.com/u/1824452?v=4","gravatar_id":"","url":"https://api.github.com/users/gkc1000","html_url":"https://github.com/gkc1000","followers_url":"https://api.github.com/users/gkc1000/followers","following_url":"https://api.github.com/users/gkc1000/following{/other_user}","gists_url":"https://api.github.com/users/gkc1000/gists{/gist_id}","starred_url":"https://api.github.com/users/gkc1000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkc1000/subscriptions","organizations_url":"https://api.github.com/users/gkc1000/orgs","repos_url":"https://api.github.com/users/gkc1000/repos","events_url":"https://api.github.com/users/gkc1000/events{/privacy}","received_events_url":"https://api.github.com/users/gkc1000/received_events","type":"User","site_admin":false},"created_at":"2018-03-26T02:58:31Z","updated_at":"2018-03-26T02:58:31Z","author_association":"NONE","body":"Since my mailbox is filling up ...\r\n\r\nI'm not completely sure what is implemented inside OpenFermion, but:\r\n\r\n1. Hermiticity is obviously a property of the operator i.e. so we can choose an arbitrary set of basis functions and <m|H|n> = <n|H|m>*. So any possibility of observing non-Hermiticity can only arise from an approximation in computing the matrix element <m|H|n> (in relation to the earlier questions with max-radin).\r\n\r\n2. The approximation that corresponds to the discrete-variable representation + dualing in the PRX paper can be interpreted for the nuclear potential V as\r\n\r\n\\sum_{i} <m|R_i><R_i|V|R_i><R_i|n>\r\n\r\nwhere <m|R_i> is taken to be evaluation of the function at grid-point R_i, and the grid points are evenly spaced in the box. This is Hermitian.\r\n\r\n3. if I look inside the plane_wave_hamiltonian.py, it looks like the above is implemented in plane-wave space, i.e. one is working with the elements V(G_i) such that \r\n\r\nV(R_i) = DFT[ V(G_i) ]\r\n\r\nTo ensure Hermiticity, one has to ensure that V(R_i). This implies that V(G_i) = V(-G_i)* where G_i is \"aliased\" as in a discrete FT. \r\n\r\n"}}
{"actor":{"display_login":"gkc1000"}}