{"action":"created","issue":{"url":"https://api.github.com/repos/QISKit/qiskit-sdk-py/issues/436","repository_url":"https://api.github.com/repos/QISKit/qiskit-sdk-py","labels_url":"https://api.github.com/repos/QISKit/qiskit-sdk-py/issues/436/labels{/name}","comments_url":"https://api.github.com/repos/QISKit/qiskit-sdk-py/issues/436/comments","events_url":"https://api.github.com/repos/QISKit/qiskit-sdk-py/issues/436/events","html_url":"https://github.com/QISKit/qiskit-sdk-py/pull/436","id":318792786,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg0ODg0MTMw","number":436,"title":"[WIP] Write statevector simulator for ProjectQ","user":{"login":"yaelbh","id":22316088,"node_id":"MDQ6VXNlcjIyMzE2MDg4","avatar_url":"https://avatars1.githubusercontent.com/u/22316088?v=4","gravatar_id":"","url":"https://api.github.com/users/yaelbh","html_url":"https://github.com/yaelbh","followers_url":"https://api.github.com/users/yaelbh/followers","following_url":"https://api.github.com/users/yaelbh/following{/other_user}","gists_url":"https://api.github.com/users/yaelbh/gists{/gist_id}","starred_url":"https://api.github.com/users/yaelbh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaelbh/subscriptions","organizations_url":"https://api.github.com/users/yaelbh/orgs","repos_url":"https://api.github.com/users/yaelbh/repos","events_url":"https://api.github.com/users/yaelbh/events{/privacy}","received_events_url":"https://api.github.com/users/yaelbh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-04-30T05:58:23Z","updated_at":"2018-06-03T05:40:54Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/QISKit/qiskit-sdk-py/pulls/436","html_url":"https://github.com/QISKit/qiskit-sdk-py/pull/436","diff_url":"https://github.com/QISKit/qiskit-sdk-py/pull/436.diff","patch_url":"https://github.com/QISKit/qiskit-sdk-py/pull/436.patch"},"body":"Improve the way that QISKit connects with ProjectQ API, when using ProjectQ C++ simulator as a backend. In particular, added snapshot functionality, and the capability of using this simulator as a statevector simulator.\r\n\r\n## Description\r\n1) Added snapshot functionality in qasm_simulator_projectq.py. Interface is identical to qasm_simulator_cpp.py.\r\n2) Wrote statevector_simulator_projectq.py. Interface is identical to statevector_simulator_cpp.py.\r\n\r\nAs part of this work, the following bugs were fixed:\r\n1) A bug in qasm_simulator_projectq.py, where new qubits were allocated in ProjectQ with every shot. So if running with more than one shot, each shot was run on an entirely different circuit.\r\n2) A bug in qasm_simulator_projectq.py. The bug has to do with the fact that ProjectQ forbids de-allocation if there are qubits in superposition. To ensure that all qubits have been measured, the code maintained a list of unmeasured qubits, which were measured at the end. However this list was not updated when there were measurements along the circuit - i.e., when measured qubits become unmeasured. The fix makes the code measure all qubits at the end of a circuit. This fixes the bug while results in identical intended functionality and no noticeable runtime difference.\r\n\r\nIn addition, we removed request for parameter 'shots' in statevector simulators.\r\n\r\n## Motivation and Context\r\nResolving part of Issue #425. This is part of the effort to make the various simulators interchangeable.\r\n\r\n## How Has This Been Tested?\r\nI ran existing and new tests.\r\n\r\n## Screenshots (if appropriate):\r\n\r\n## Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n\r\n## Checklist:\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [x] My code follows the code style of this project.\r\n- [x] My change requires a change to the documentation.\r\n- [ ] I have updated the documentation accordingly.\r\n      General documentation of simulators is still missing.\r\n- [x] I have read the **CONTRIBUTING** document.\r\n- [x] I have added tests to cover my changes.\r\n- [x] All new and existing tests passed."},"comment":{"url":"https://api.github.com/repos/QISKit/qiskit-sdk-py/issues/comments/394138694","html_url":"https://github.com/QISKit/qiskit-sdk-py/pull/436#issuecomment-394138694","issue_url":"https://api.github.com/repos/QISKit/qiskit-sdk-py/issues/436","id":394138694,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDEzODY5NA==","user":{"login":"yaelbh","id":22316088,"node_id":"MDQ6VXNlcjIyMzE2MDg4","avatar_url":"https://avatars1.githubusercontent.com/u/22316088?v=4","gravatar_id":"","url":"https://api.github.com/users/yaelbh","html_url":"https://github.com/yaelbh","followers_url":"https://api.github.com/users/yaelbh/followers","following_url":"https://api.github.com/users/yaelbh/following{/other_user}","gists_url":"https://api.github.com/users/yaelbh/gists{/gist_id}","starred_url":"https://api.github.com/users/yaelbh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaelbh/subscriptions","organizations_url":"https://api.github.com/users/yaelbh/orgs","repos_url":"https://api.github.com/users/yaelbh/repos","events_url":"https://api.github.com/users/yaelbh/events{/privacy}","received_events_url":"https://api.github.com/users/yaelbh/received_events","type":"User","site_admin":false},"created_at":"2018-06-03T05:40:54Z","updated_at":"2018-06-03T05:40:54Z","author_association":"CONTRIBUTOR","body":"@jaygambetta There is already a qasm ProjectQ simulator, and it works well, so why not keep it."}}
{"actor":{"display_login":"yaelbh"}}