{"action":"created","issue":{"url":"https://api.github.com/repos/Qiskit/qiskit-terra/issues/289","repository_url":"https://api.github.com/repos/Qiskit/qiskit-terra","labels_url":"https://api.github.com/repos/Qiskit/qiskit-terra/issues/289/labels{/name}","comments_url":"https://api.github.com/repos/Qiskit/qiskit-terra/issues/289/comments","events_url":"https://api.github.com/repos/Qiskit/qiskit-terra/issues/289/events","html_url":"https://github.com/Qiskit/qiskit-terra/issues/289","id":296471235,"node_id":"MDU6SXNzdWUyOTY0NzEyMzU=","number":289,"title":"DAGCircuit Remove node","user":{"login":"eddieschoute","id":25747714,"node_id":"MDQ6VXNlcjI1NzQ3NzE0","avatar_url":"https://avatars2.githubusercontent.com/u/25747714?v=4","gravatar_id":"","url":"https://api.github.com/users/eddieschoute","html_url":"https://github.com/eddieschoute","followers_url":"https://api.github.com/users/eddieschoute/followers","following_url":"https://api.github.com/users/eddieschoute/following{/other_user}","gists_url":"https://api.github.com/users/eddieschoute/gists{/gist_id}","starred_url":"https://api.github.com/users/eddieschoute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddieschoute/subscriptions","organizations_url":"https://api.github.com/users/eddieschoute/orgs","repos_url":"https://api.github.com/users/eddieschoute/repos","events_url":"https://api.github.com/users/eddieschoute/events{/privacy}","received_events_url":"https://api.github.com/users/eddieschoute/received_events","type":"User","site_admin":false},"labels":[{"id":705273342,"node_id":"MDU6TGFiZWw3MDUyNzMzNDI=","url":"https://api.github.com/repos/Qiskit/qiskit-terra/labels/good%20first%20issue","name":"good first issue","color":"7057ff","default":true},{"id":933835133,"node_id":"MDU6TGFiZWw5MzM4MzUxMzM=","url":"https://api.github.com/repos/Qiskit/qiskit-terra/labels/type:%20feature%20request","name":"type: feature request","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"ajavadia","id":8622381,"node_id":"MDQ6VXNlcjg2MjIzODE=","avatar_url":"https://avatars2.githubusercontent.com/u/8622381?v=4","gravatar_id":"","url":"https://api.github.com/users/ajavadia","html_url":"https://github.com/ajavadia","followers_url":"https://api.github.com/users/ajavadia/followers","following_url":"https://api.github.com/users/ajavadia/following{/other_user}","gists_url":"https://api.github.com/users/ajavadia/gists{/gist_id}","starred_url":"https://api.github.com/users/ajavadia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajavadia/subscriptions","organizations_url":"https://api.github.com/users/ajavadia/orgs","repos_url":"https://api.github.com/users/ajavadia/repos","events_url":"https://api.github.com/users/ajavadia/events{/privacy}","received_events_url":"https://api.github.com/users/ajavadia/received_events","type":"User","site_admin":false},"assignees":[{"login":"ajavadia","id":8622381,"node_id":"MDQ6VXNlcjg2MjIzODE=","avatar_url":"https://avatars2.githubusercontent.com/u/8622381?v=4","gravatar_id":"","url":"https://api.github.com/users/ajavadia","html_url":"https://github.com/ajavadia","followers_url":"https://api.github.com/users/ajavadia/followers","following_url":"https://api.github.com/users/ajavadia/following{/other_user}","gists_url":"https://api.github.com/users/ajavadia/gists{/gist_id}","starred_url":"https://api.github.com/users/ajavadia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajavadia/subscriptions","organizations_url":"https://api.github.com/users/ajavadia/orgs","repos_url":"https://api.github.com/users/ajavadia/repos","events_url":"https://api.github.com/users/ajavadia/events{/privacy}","received_events_url":"https://api.github.com/users/ajavadia/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2018-02-12T18:04:57Z","updated_at":"2018-08-06T13:50:26Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"When modifying a DAGCircuit it is not easily possible to remove a specific node from the circuit. There exists a protected method `_remove_op_node` which does what I want to do. Is there a reason why this method needs to be protected?\r\n\r\n## Expected Behavior\r\nThere should exist a way to remove a specific node from a DAGCircuit that does not use protected methods.\r\n\r\n## Current Behavior\r\nThe only way currently is to either modify `multi_graph` directly (and risk breaking changes) or ignore the protected status and use `_remove_op_node` anyway (my choice currently).\r\n\r\n## Possible Solution\r\nSimple fix: Make the method public.\r\nComplex fix: Rework the API for interacting with DAGCircuit. Currently, I am required to inspect `multi_graph` directly for many things that I wish to do with a DAGCircuit. I do not think this should be intended, since `multi_graph` encodes some fairly opaque internal state.\r\n\r\n## Context\r\nI am trying to transform a DAGCircuit for the [QISKit developer challenge](https://qx-awards.mybluemix.net/#qiskitDeveloperChallengeAward) to conform to a given hardware architecture. I do that by removing op nodes from the given DAGCircuit and building a DAGCircuit that conforms to the architecture.\r\n\r\n## Your Environment\r\n* Version used: qiskit 0.4.8\r\n* Environment name and version (e.g. Python 3.6.1): python 3.6.4\r\n* Operating System and version: macOS 10.13"},"comment":{"url":"https://api.github.com/repos/Qiskit/qiskit-terra/issues/comments/410714542","html_url":"https://github.com/Qiskit/qiskit-terra/issues/289#issuecomment-410714542","issue_url":"https://api.github.com/repos/Qiskit/qiskit-terra/issues/289","id":410714542,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDcxNDU0Mg==","user":{"login":"eddieschoute","id":25747714,"node_id":"MDQ6VXNlcjI1NzQ3NzE0","avatar_url":"https://avatars2.githubusercontent.com/u/25747714?v=4","gravatar_id":"","url":"https://api.github.com/users/eddieschoute","html_url":"https://github.com/eddieschoute","followers_url":"https://api.github.com/users/eddieschoute/followers","following_url":"https://api.github.com/users/eddieschoute/following{/other_user}","gists_url":"https://api.github.com/users/eddieschoute/gists{/gist_id}","starred_url":"https://api.github.com/users/eddieschoute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddieschoute/subscriptions","organizations_url":"https://api.github.com/users/eddieschoute/orgs","repos_url":"https://api.github.com/users/eddieschoute/repos","events_url":"https://api.github.com/users/eddieschoute/events{/privacy}","received_events_url":"https://api.github.com/users/eddieschoute/received_events","type":"User","site_admin":false},"created_at":"2018-08-06T13:50:26Z","updated_at":"2018-08-06T13:50:26Z","author_association":"CONTRIBUTOR","body":"I have lost count how often I needed to access the multi-graph directly. It's basically the only way I know of actually using the DAG part of `DAGCircuit`!"}}
{"actor":{"display_login":"eddieschoute"}}