{"action":"created","issue":{"url":"https://api.github.com/repos/Qiskit/qiskit-terra/issues/897","repository_url":"https://api.github.com/repos/Qiskit/qiskit-terra","labels_url":"https://api.github.com/repos/Qiskit/qiskit-terra/issues/897/labels{/name}","comments_url":"https://api.github.com/repos/Qiskit/qiskit-terra/issues/897/comments","events_url":"https://api.github.com/repos/Qiskit/qiskit-terra/issues/897/events","html_url":"https://github.com/Qiskit/qiskit-terra/issues/897","id":359939440,"node_id":"MDU6SXNzdWUzNTk5Mzk0NDA=","number":897,"title":"transpiler pass return value is ignored","user":{"login":"rossduncan","id":1511888,"node_id":"MDQ6VXNlcjE1MTE4ODg=","avatar_url":"https://avatars1.githubusercontent.com/u/1511888?v=4","gravatar_id":"","url":"https://api.github.com/users/rossduncan","html_url":"https://github.com/rossduncan","followers_url":"https://api.github.com/users/rossduncan/followers","following_url":"https://api.github.com/users/rossduncan/following{/other_user}","gists_url":"https://api.github.com/users/rossduncan/gists{/gist_id}","starred_url":"https://api.github.com/users/rossduncan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rossduncan/subscriptions","organizations_url":"https://api.github.com/users/rossduncan/orgs","repos_url":"https://api.github.com/users/rossduncan/repos","events_url":"https://api.github.com/users/rossduncan/events{/privacy}","received_events_url":"https://api.github.com/users/rossduncan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-09-13T15:08:35Z","updated_at":"2018-09-17T10:44:58Z","closed_at":"2018-09-17T10:44:58Z","author_association":"NONE","body":"<!-- ⚠️ If you do not respect this template, your issue will be closed -->\r\n<!-- ⚠️ Make sure to browse the opened and closed issues -->\r\n\r\n### Informations\r\n\r\n- **Qiskit Terra version**: 0.5.7\r\n- **Python version**: 3.7.0\r\n- **Operating system**: Mac OS X 10.13.6\r\n\r\n### What is the current behavior?\r\nIn transpiler. _transpiler.py, the transpile method invokes the run() method of the transpiler pass.  However, it does so only for side effects and ignores the return value.\r\n\r\n### Steps to reproduce the problem\r\nSee [here](https://github.com/Qiskit/qiskit-terra/blob/transpiler/qiskit/transpiler/_transpiler.py#L296)\r\n\r\n\r\n### What is the expected behavior?\r\nUse the value returned by run() as the new dag for subsequent passes.\r\n\r\n### Suggested solutions\r\nModify the above linked line to :\r\n```\r\ndag = pass_.run(dag)\r\n```\r\nor similar.   The current implementation forces transpiler passes to modify the dag in place, which is restrictive.  OTOH it would be easy for passes which do modify the dag in place to accommodate the change.\r\n"},"comment":{"url":"https://api.github.com/repos/Qiskit/qiskit-terra/issues/comments/421964224","html_url":"https://github.com/Qiskit/qiskit-terra/issues/897#issuecomment-421964224","issue_url":"https://api.github.com/repos/Qiskit/qiskit-terra/issues/897","id":421964224,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTk2NDIyNA==","user":{"login":"delapuente","id":757942,"node_id":"MDQ6VXNlcjc1Nzk0Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/757942?v=4","gravatar_id":"","url":"https://api.github.com/users/delapuente","html_url":"https://github.com/delapuente","followers_url":"https://api.github.com/users/delapuente/followers","following_url":"https://api.github.com/users/delapuente/following{/other_user}","gists_url":"https://api.github.com/users/delapuente/gists{/gist_id}","starred_url":"https://api.github.com/users/delapuente/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delapuente/subscriptions","organizations_url":"https://api.github.com/users/delapuente/orgs","repos_url":"https://api.github.com/users/delapuente/repos","events_url":"https://api.github.com/users/delapuente/events{/privacy}","received_events_url":"https://api.github.com/users/delapuente/received_events","type":"User","site_admin":false},"created_at":"2018-09-17T10:44:58Z","updated_at":"2018-09-17T10:44:58Z","author_association":"COLLABORATOR","body":"Closing in favour of #825 "}}
{"actor":{"display_login":"delapuente"}}