{"action":"created","comment":{"url":"https://api.github.com/repos/Qiskit/qiskit-terra/pulls/comments/238919347","pull_request_review_id":181572181,"id":238919347,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODkxOTM0Nw==","diff_hunk":"@@ -0,0 +1,101 @@\n+# -*- coding: utf-8 -*-\n+\n+# Copyright 2018, IBM.\n+#\n+# This source code is licensed under the Apache License, Version 2.0 found in\n+# the LICENSE.txt file in the root directory of this source tree.\n+\n+\"\"\"\n+A direction mapper rearrenges the direction of the cx nodes to make the circuit\n+compatible to the directed coupling map.\n+\"\"\"\n+from copy import copy\n+\n+from qiskit.transpiler._basepasses import TransformationPass\n+from qiskit.transpiler import MapperError\n+from qiskit.dagcircuit import DAGCircuit\n+from qiskit.mapper import Layout\n+from qiskit.extensions.standard import HGate\n+\n+\n+class DirectionMapper(TransformationPass):\n+    \"\"\"\n+     Rearranges the direction of the cx nodes to make the circuit\n+     compatible with the directed coupling map.\n+\n+     It uses this equivalence:\n+        ---(+)---      --[H]---.---[H]--\n+            |      =           |\n+        ----.----      --[H]--(+)--[H]--\n+    \"\"\"\n+\n+    def __init__(self, coupling_map, h_gate=None, initial_layout=None):\n+        \"\"\"\n+        Args:\n+            coupling_map (Coupling): Directed graph represented a coupling map.\n+            h_gate (Type):  Default: HGate. The Gate class that defines a Hadamard (H) gate.\n+            initial_layout (Layout): The initial layout of the DAG.\n+        \"\"\"\n+\n+        super().__init__()\n+        self.coupling_map = coupling_map\n+        self.initial_layout = initial_layout\n+        self.h_gate = h_gate if h_gate is not None else HGate\n+\n+    def run(self, dag):\n+        \"\"\"\n+        Flips the cx nodes to match the directed coupling map.\n+        Args:\n+            dag (DAGCircuit): DAG to map.\n+        Raises:\n+            TranspilerError: If the `dag` cannot be mapped just by flipping the cx nodes.\n+        \"\"\"\n+        new_dag = DAGCircuit()\n+\n+        if self.initial_layout is None:\n+            # create a one-to-one layout\n+            self.initial_layout = Layout()\n+            wire_no = 0\n+            for qreg in dag.qregs.values():\n+                for index in range(qreg.size):\n+                    self.initial_layout[(qreg, index)] = wire_no\n+                    wire_no += 1\n+        current_layout = copy(self.initial_layout)\n+\n+        for layer in dag.serial_layers():\n+            subdag = layer['graph']\n+\n+            for cnot in subdag.get_cnot_nodes():\n+\n+                control = cnot['op'].qargs[0]\n+                target = cnot['op'].qargs[1]\n+\n+                physical_q0 = current_layout[control]\n+                physical_q1 = current_layout[target]\n+                if self.coupling_map.distance(physical_q0, physical_q1) != 1:\n+                    raise MapperError('The circuit requires a connectiontion between the phsycial '\n+                                      'qubits %s and %s' % (physical_q0, physical_q1))\n+\n+                if (physical_q0, physical_q1) not in self.coupling_map.get_edges():\n+                    # A flip needs to be done\n+\n+                    # Create the involved registers\n+                    if control[0] not in subdag.qregs.values():\n+                        subdag.add_qreg(control[0])\n+                    if target[0] not in subdag.qregs.values():\n+                        subdag.add_qreg(target[0])\n+\n+                    # Add H gates around\n+                    subdag.add_basis_element('h', 1, 0, 0)\n+                    subdag.apply_operation_back(self.h_gate(target))\n+                    subdag.apply_operation_back(self.h_gate(control))\n+                    subdag.apply_operation_front(self.h_gate(target))\n+                    subdag.apply_operation_front(self.h_gate(control))\n+\n+                    # Flips the CX\n+                    cnot['op'].qargs[0], cnot['op'].qargs[1] = target, control\n+\n+            edge_map = current_layout.combine_into_edge_map(self.initial_layout)\n+            new_dag.extends_at_the_end(subdag, edge_map)","path":"qiskit/transpiler/passes/mapping/direction_mapper.py","position":99,"original_position":99,"commit_id":"143b65b21fdc8d3bd7b0e11d09152386a9534d1e","original_commit_id":"143b65b21fdc8d3bd7b0e11d09152386a9534d1e","user":{"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},"body":"what would happen if you just used `compose_back` here? I still don't fully get the difference between compose_back and extend_at_the_end. The latter just seems to accomodate \"extra\" registers, but I'm not sure if there are extra registers here.","created_at":"2018-12-05T03:15:18Z","updated_at":"2018-12-05T03:15:38Z","html_url":"https://github.com/Qiskit/qiskit-terra/pull/1422#discussion_r238919347","pull_request_url":"https://api.github.com/repos/Qiskit/qiskit-terra/pulls/1422","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Qiskit/qiskit-terra/pulls/comments/238919347"},"html":{"href":"https://github.com/Qiskit/qiskit-terra/pull/1422#discussion_r238919347"},"pull_request":{"href":"https://api.github.com/repos/Qiskit/qiskit-terra/pulls/1422"}}},"pull_request":{"url":"https://api.github.com/repos/Qiskit/qiskit-terra/pulls/1422","id":235951619,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1OTUxNjE5","html_url":"https://github.com/Qiskit/qiskit-terra/pull/1422","diff_url":"https://github.com/Qiskit/qiskit-terra/pull/1422.diff","patch_url":"https://github.com/Qiskit/qiskit-terra/pull/1422.patch","issue_url":"https://api.github.com/repos/Qiskit/qiskit-terra/issues/1422","number":1422,"state":"open","locked":false,"title":"Direction mapper","user":{"login":"1ucian0","id":766693,"node_id":"MDQ6VXNlcjc2NjY5Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/766693?v=4","gravatar_id":"","url":"https://api.github.com/users/1ucian0","html_url":"https://github.com/1ucian0","followers_url":"https://api.github.com/users/1ucian0/followers","following_url":"https://api.github.com/users/1ucian0/following{/other_user}","gists_url":"https://api.github.com/users/1ucian0/gists{/gist_id}","starred_url":"https://api.github.com/users/1ucian0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1ucian0/subscriptions","organizations_url":"https://api.github.com/users/1ucian0/orgs","repos_url":"https://api.github.com/users/1ucian0/repos","events_url":"https://api.github.com/users/1ucian0/events{/privacy}","received_events_url":"https://api.github.com/users/1ucian0/received_events","type":"User","site_admin":false},"body":"Fixes #1419 \r\n\r\n### Summary\r\n\r\nThe direction mapper rearranges the direction of the cx nodes to make the circuit compatible with the directed coupling map.\r\n\r\nIt uses this equivalence:\r\n```\r\n        ---(+)---      --[H]---.---[H]--\r\n            |      =           |\r\n        ----.----      --[H]--(+)--[H]--\r\n```\r\n\r\n\r\n","created_at":"2018-12-04T20:39:08Z","updated_at":"2018-12-05T03:15:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4289e04b1ab427a1ff2759c32d3ed066834daae","assignee":null,"assignees":[],"requested_reviewers":[{"login":"diego-plan9","id":418311,"node_id":"MDQ6VXNlcjQxODMxMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/418311?v=4","gravatar_id":"","url":"https://api.github.com/users/diego-plan9","html_url":"https://github.com/diego-plan9","followers_url":"https://api.github.com/users/diego-plan9/followers","following_url":"https://api.github.com/users/diego-plan9/following{/other_user}","gists_url":"https://api.github.com/users/diego-plan9/gists{/gist_id}","starred_url":"https://api.github.com/users/diego-plan9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diego-plan9/subscriptions","organizations_url":"https://api.github.com/users/diego-plan9/orgs","repos_url":"https://api.github.com/users/diego-plan9/repos","events_url":"https://api.github.com/users/diego-plan9/events{/privacy}","received_events_url":"https://api.github.com/users/diego-plan9/received_events","type":"User","site_admin":false},{"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},{"login":"nonhermitian","id":1249193,"node_id":"MDQ6VXNlcjEyNDkxOTM=","avatar_url":"https://avatars1.githubusercontent.com/u/1249193?v=4","gravatar_id":"","url":"https://api.github.com/users/nonhermitian","html_url":"https://github.com/nonhermitian","followers_url":"https://api.github.com/users/nonhermitian/followers","following_url":"https://api.github.com/users/nonhermitian/following{/other_user}","gists_url":"https://api.github.com/users/nonhermitian/gists{/gist_id}","starred_url":"https://api.github.com/users/nonhermitian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nonhermitian/subscriptions","organizations_url":"https://api.github.com/users/nonhermitian/orgs","repos_url":"https://api.github.com/users/nonhermitian/repos","events_url":"https://api.github.com/users/nonhermitian/events{/privacy}","received_events_url":"https://api.github.com/users/nonhermitian/received_events","type":"User","site_admin":false},{"login":"atilag","id":1304071,"node_id":"MDQ6VXNlcjEzMDQwNzE=","avatar_url":"https://avatars2.githubusercontent.com/u/1304071?v=4","gravatar_id":"","url":"https://api.github.com/users/atilag","html_url":"https://github.com/atilag","followers_url":"https://api.github.com/users/atilag/followers","following_url":"https://api.github.com/users/atilag/following{/other_user}","gists_url":"https://api.github.com/users/atilag/gists{/gist_id}","starred_url":"https://api.github.com/users/atilag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atilag/subscriptions","organizations_url":"https://api.github.com/users/atilag/orgs","repos_url":"https://api.github.com/users/atilag/repos","events_url":"https://api.github.com/users/atilag/events{/privacy}","received_events_url":"https://api.github.com/users/atilag/received_events","type":"User","site_admin":false},{"login":"taalexander","id":1553846,"node_id":"MDQ6VXNlcjE1NTM4NDY=","avatar_url":"https://avatars2.githubusercontent.com/u/1553846?v=4","gravatar_id":"","url":"https://api.github.com/users/taalexander","html_url":"https://github.com/taalexander","followers_url":"https://api.github.com/users/taalexander/followers","following_url":"https://api.github.com/users/taalexander/following{/other_user}","gists_url":"https://api.github.com/users/taalexander/gists{/gist_id}","starred_url":"https://api.github.com/users/taalexander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taalexander/subscriptions","organizations_url":"https://api.github.com/users/taalexander/orgs","repos_url":"https://api.github.com/users/taalexander/repos","events_url":"https://api.github.com/users/taalexander/events{/privacy}","received_events_url":"https://api.github.com/users/taalexander/received_events","type":"User","site_admin":false},{"login":"mtreinish","id":2447371,"node_id":"MDQ6VXNlcjI0NDczNzE=","avatar_url":"https://avatars0.githubusercontent.com/u/2447371?v=4","gravatar_id":"","url":"https://api.github.com/users/mtreinish","html_url":"https://github.com/mtreinish","followers_url":"https://api.github.com/users/mtreinish/followers","following_url":"https://api.github.com/users/mtreinish/following{/other_user}","gists_url":"https://api.github.com/users/mtreinish/gists{/gist_id}","starred_url":"https://api.github.com/users/mtreinish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtreinish/subscriptions","organizations_url":"https://api.github.com/users/mtreinish/orgs","repos_url":"https://api.github.com/users/mtreinish/repos","events_url":"https://api.github.com/users/mtreinish/events{/privacy}","received_events_url":"https://api.github.com/users/mtreinish/received_events","type":"User","site_admin":false},{"login":"jaygambetta","id":15731369,"node_id":"MDQ6VXNlcjE1NzMxMzY5","avatar_url":"https://avatars2.githubusercontent.com/u/15731369?v=4","gravatar_id":"","url":"https://api.github.com/users/jaygambetta","html_url":"https://github.com/jaygambetta","followers_url":"https://api.github.com/users/jaygambetta/followers","following_url":"https://api.github.com/users/jaygambetta/following{/other_user}","gists_url":"https://api.github.com/users/jaygambetta/gists{/gist_id}","starred_url":"https://api.github.com/users/jaygambetta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaygambetta/subscriptions","organizations_url":"https://api.github.com/users/jaygambetta/orgs","repos_url":"https://api.github.com/users/jaygambetta/repos","events_url":"https://api.github.com/users/jaygambetta/events{/privacy}","received_events_url":"https://api.github.com/users/jaygambetta/received_events","type":"User","site_admin":false},{"login":"ewinston","id":25756217,"node_id":"MDQ6VXNlcjI1NzU2MjE3","avatar_url":"https://avatars0.githubusercontent.com/u/25756217?v=4","gravatar_id":"","url":"https://api.github.com/users/ewinston","html_url":"https://github.com/ewinston","followers_url":"https://api.github.com/users/ewinston/followers","following_url":"https://api.github.com/users/ewinston/following{/other_user}","gists_url":"https://api.github.com/users/ewinston/gists{/gist_id}","starred_url":"https://api.github.com/users/ewinston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewinston/subscriptions","organizations_url":"https://api.github.com/users/ewinston/orgs","repos_url":"https://api.github.com/users/ewinston/repos","events_url":"https://api.github.com/users/ewinston/events{/privacy}","received_events_url":"https://api.github.com/users/ewinston/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/Qiskit/qiskit-terra/milestones/5","html_url":"https://github.com/Qiskit/qiskit-terra/milestone/5","labels_url":"https://api.github.com/repos/Qiskit/qiskit-terra/milestones/5/labels","id":3525568,"node_id":"MDk6TWlsZXN0b25lMzUyNTU2OA==","number":5,"title":"0.7","description":null,"creator":{"login":"atilag","id":1304071,"node_id":"MDQ6VXNlcjEzMDQwNzE=","avatar_url":"https://avatars2.githubusercontent.com/u/1304071?v=4","gravatar_id":"","url":"https://api.github.com/users/atilag","html_url":"https://github.com/atilag","followers_url":"https://api.github.com/users/atilag/followers","following_url":"https://api.github.com/users/atilag/following{/other_user}","gists_url":"https://api.github.com/users/atilag/gists{/gist_id}","starred_url":"https://api.github.com/users/atilag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atilag/subscriptions","organizations_url":"https://api.github.com/users/atilag/orgs","repos_url":"https://api.github.com/users/atilag/repos","events_url":"https://api.github.com/users/atilag/events{/privacy}","received_events_url":"https://api.github.com/users/atilag/received_events","type":"User","site_admin":false},"open_issues":26,"closed_issues":87,"state":"open","created_at":"2018-07-26T15:04:09Z","updated_at":"2018-12-05T01:27:52Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/Qiskit/qiskit-terra/pulls/1422/commits","review_comments_url":"https://api.github.com/repos/Qiskit/qiskit-terra/pulls/1422/comments","review_comment_url":"https://api.github.com/repos/Qiskit/qiskit-terra/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Qiskit/qiskit-terra/issues/1422/comments","statuses_url":"https://api.github.com/repos/Qiskit/qiskit-terra/statuses/143b65b21fdc8d3bd7b0e11d09152386a9534d1e","head":{"label":"1ucian0:1419","ref":"1419","sha":"143b65b21fdc8d3bd7b0e11d09152386a9534d1e","user":{"login":"1ucian0","id":766693,"node_id":"MDQ6VXNlcjc2NjY5Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/766693?v=4","gravatar_id":"","url":"https://api.github.com/users/1ucian0","html_url":"https://github.com/1ucian0","followers_url":"https://api.github.com/users/1ucian0/followers","following_url":"https://api.github.com/users/1ucian0/following{/other_user}","gists_url":"https://api.github.com/users/1ucian0/gists{/gist_id}","starred_url":"https://api.github.com/users/1ucian0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1ucian0/subscriptions","organizations_url":"https://api.github.com/users/1ucian0/orgs","repos_url":"https://api.github.com/users/1ucian0/repos","events_url":"https://api.github.com/users/1ucian0/events{/privacy}","received_events_url":"https://api.github.com/users/1ucian0/received_events","type":"User","site_admin":false},"repo":{"id":140555676,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA1NTU2NzY=","name":"qiskit-terra","full_name":"1ucian0/qiskit-terra","private":false,"owner":{"login":"1ucian0","id":766693,"node_id":"MDQ6VXNlcjc2NjY5Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/766693?v=4","gravatar_id":"","url":"https://api.github.com/users/1ucian0","html_url":"https://github.com/1ucian0","followers_url":"https://api.github.com/users/1ucian0/followers","following_url":"https://api.github.com/users/1ucian0/following{/other_user}","gists_url":"https://api.github.com/users/1ucian0/gists{/gist_id}","starred_url":"https://api.github.com/users/1ucian0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1ucian0/subscriptions","organizations_url":"https://api.github.com/users/1ucian0/orgs","repos_url":"https://api.github.com/users/1ucian0/repos","events_url":"https://api.github.com/users/1ucian0/events{/privacy}","received_events_url":"https://api.github.com/users/1ucian0/received_events","type":"User","site_admin":false},"html_url":"https://github.com/1ucian0/qiskit-terra","description":"Terra provides the foundations for Qiskit. It allows the user to write quantum circuits easily, and takes care of the constraints of real hardware (the transpiler). It is built to be modular, to simplify adding extensions for circuit optimizations and backends. ","fork":true,"url":"https://api.github.com/repos/1ucian0/qiskit-terra","forks_url":"https://api.github.com/repos/1ucian0/qiskit-terra/forks","keys_url":"https://api.github.com/repos/1ucian0/qiskit-terra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/1ucian0/qiskit-terra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/1ucian0/qiskit-terra/teams","hooks_url":"https://api.github.com/repos/1ucian0/qiskit-terra/hooks","issue_events_url":"https://api.github.com/repos/1ucian0/qiskit-terra/issues/events{/number}","events_url":"https://api.github.com/repos/1ucian0/qiskit-terra/events","assignees_url":"https://api.github.com/repos/1ucian0/qiskit-terra/assignees{/user}","branches_url":"https://api.github.com/repos/1ucian0/qiskit-terra/branches{/branch}","tags_url":"https://api.github.com/repos/1ucian0/qiskit-terra/tags","blobs_url":"https://api.github.com/repos/1ucian0/qiskit-terra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/1ucian0/qiskit-terra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/1ucian0/qiskit-terra/git/refs{/sha}","trees_url":"https://api.github.com/repos/1ucian0/qiskit-terra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/1ucian0/qiskit-terra/statuses/{sha}","languages_url":"https://api.github.com/repos/1ucian0/qiskit-terra/languages","stargazers_url":"https://api.github.com/repos/1ucian0/qiskit-terra/stargazers","contributors_url":"https://api.github.com/repos/1ucian0/qiskit-terra/contributors","subscribers_url":"https://api.github.com/repos/1ucian0/qiskit-terra/subscribers","subscription_url":"https://api.github.com/repos/1ucian0/qiskit-terra/subscription","commits_url":"https://api.github.com/repos/1ucian0/qiskit-terra/commits{/sha}","git_commits_url":"https://api.github.com/repos/1ucian0/qiskit-terra/git/commits{/sha}","comments_url":"https://api.github.com/repos/1ucian0/qiskit-terra/comments{/number}","issue_comment_url":"https://api.github.com/repos/1ucian0/qiskit-terra/issues/comments{/number}","contents_url":"https://api.github.com/repos/1ucian0/qiskit-terra/contents/{+path}","compare_url":"https://api.github.com/repos/1ucian0/qiskit-terra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/1ucian0/qiskit-terra/merges","archive_url":"https://api.github.com/repos/1ucian0/qiskit-terra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/1ucian0/qiskit-terra/downloads","issues_url":"https://api.github.com/repos/1ucian0/qiskit-terra/issues{/number}","pulls_url":"https://api.github.com/repos/1ucian0/qiskit-terra/pulls{/number}","milestones_url":"https://api.github.com/repos/1ucian0/qiskit-terra/milestones{/number}","notifications_url":"https://api.github.com/repos/1ucian0/qiskit-terra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/1ucian0/qiskit-terra/labels{/name}","releases_url":"https://api.github.com/repos/1ucian0/qiskit-terra/releases{/id}","deployments_url":"https://api.github.com/repos/1ucian0/qiskit-terra/deployments","created_at":"2018-07-11T09:52:28Z","updated_at":"2018-12-04T17:58:04Z","pushed_at":"2018-12-04T20:53:50Z","git_url":"git://github.com/1ucian0/qiskit-terra.git","ssh_url":"git@github.com:1ucian0/qiskit-terra.git","clone_url":"https://github.com/1ucian0/qiskit-terra.git","svn_url":"https://github.com/1ucian0/qiskit-terra","homepage":"https://qiskit.org","size":31115,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Qiskit:master","ref":"master","sha":"8675fe94b6b8726ad53d755f6051c1f38fc2cc84","user":{"login":"Qiskit","id":30696987,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwNjk2OTg3","avatar_url":"https://avatars1.githubusercontent.com/u/30696987?v=4","gravatar_id":"","url":"https://api.github.com/users/Qiskit","html_url":"https://github.com/Qiskit","followers_url":"https://api.github.com/users/Qiskit/followers","following_url":"https://api.github.com/users/Qiskit/following{/other_user}","gists_url":"https://api.github.com/users/Qiskit/gists{/gist_id}","starred_url":"https://api.github.com/users/Qiskit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Qiskit/subscriptions","organizations_url":"https://api.github.com/users/Qiskit/orgs","repos_url":"https://api.github.com/users/Qiskit/repos","events_url":"https://api.github.com/users/Qiskit/events{/privacy}","received_events_url":"https://api.github.com/users/Qiskit/received_events","type":"Organization","site_admin":false},"repo":{"id":83821669,"node_id":"MDEwOlJlcG9zaXRvcnk4MzgyMTY2OQ==","name":"qiskit-terra","full_name":"Qiskit/qiskit-terra","private":false,"owner":{"login":"Qiskit","id":30696987,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwNjk2OTg3","avatar_url":"https://avatars1.githubusercontent.com/u/30696987?v=4","gravatar_id":"","url":"https://api.github.com/users/Qiskit","html_url":"https://github.com/Qiskit","followers_url":"https://api.github.com/users/Qiskit/followers","following_url":"https://api.github.com/users/Qiskit/following{/other_user}","gists_url":"https://api.github.com/users/Qiskit/gists{/gist_id}","starred_url":"https://api.github.com/users/Qiskit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Qiskit/subscriptions","organizations_url":"https://api.github.com/users/Qiskit/orgs","repos_url":"https://api.github.com/users/Qiskit/repos","events_url":"https://api.github.com/users/Qiskit/events{/privacy}","received_events_url":"https://api.github.com/users/Qiskit/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Qiskit/qiskit-terra","description":"Terra provides the foundations for Qiskit. It allows the user to write quantum circuits easily, and takes care of the constraints of real hardware.","fork":false,"url":"https://api.github.com/repos/Qiskit/qiskit-terra","forks_url":"https://api.github.com/repos/Qiskit/qiskit-terra/forks","keys_url":"https://api.github.com/repos/Qiskit/qiskit-terra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Qiskit/qiskit-terra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Qiskit/qiskit-terra/teams","hooks_url":"https://api.github.com/repos/Qiskit/qiskit-terra/hooks","issue_events_url":"https://api.github.com/repos/Qiskit/qiskit-terra/issues/events{/number}","events_url":"https://api.github.com/repos/Qiskit/qiskit-terra/events","assignees_url":"https://api.github.com/repos/Qiskit/qiskit-terra/assignees{/user}","branches_url":"https://api.github.com/repos/Qiskit/qiskit-terra/branches{/branch}","tags_url":"https://api.github.com/repos/Qiskit/qiskit-terra/tags","blobs_url":"https://api.github.com/repos/Qiskit/qiskit-terra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Qiskit/qiskit-terra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Qiskit/qiskit-terra/git/refs{/sha}","trees_url":"https://api.github.com/repos/Qiskit/qiskit-terra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Qiskit/qiskit-terra/statuses/{sha}","languages_url":"https://api.github.com/repos/Qiskit/qiskit-terra/languages","stargazers_url":"https://api.github.com/repos/Qiskit/qiskit-terra/stargazers","contributors_url":"https://api.github.com/repos/Qiskit/qiskit-terra/contributors","subscribers_url":"https://api.github.com/repos/Qiskit/qiskit-terra/subscribers","subscription_url":"https://api.github.com/repos/Qiskit/qiskit-terra/subscription","commits_url":"https://api.github.com/repos/Qiskit/qiskit-terra/commits{/sha}","git_commits_url":"https://api.github.com/repos/Qiskit/qiskit-terra/git/commits{/sha}","comments_url":"https://api.github.com/repos/Qiskit/qiskit-terra/comments{/number}","issue_comment_url":"https://api.github.com/repos/Qiskit/qiskit-terra/issues/comments{/number}","contents_url":"https://api.github.com/repos/Qiskit/qiskit-terra/contents/{+path}","compare_url":"https://api.github.com/repos/Qiskit/qiskit-terra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Qiskit/qiskit-terra/merges","archive_url":"https://api.github.com/repos/Qiskit/qiskit-terra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Qiskit/qiskit-terra/downloads","issues_url":"https://api.github.com/repos/Qiskit/qiskit-terra/issues{/number}","pulls_url":"https://api.github.com/repos/Qiskit/qiskit-terra/pulls{/number}","milestones_url":"https://api.github.com/repos/Qiskit/qiskit-terra/milestones{/number}","notifications_url":"https://api.github.com/repos/Qiskit/qiskit-terra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Qiskit/qiskit-terra/labels{/name}","releases_url":"https://api.github.com/repos/Qiskit/qiskit-terra/releases{/id}","deployments_url":"https://api.github.com/repos/Qiskit/qiskit-terra/deployments","created_at":"2017-03-03T17:02:42Z","updated_at":"2018-12-05T01:27:57Z","pushed_at":"2018-12-05T03:06:21Z","git_url":"git://github.com/Qiskit/qiskit-terra.git","ssh_url":"git@github.com:Qiskit/qiskit-terra.git","clone_url":"https://github.com/Qiskit/qiskit-terra.git","svn_url":"https://github.com/Qiskit/qiskit-terra","homepage":"https://qiskit.org","size":30677,"stargazers_count":2244,"watchers_count":2244,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":675,"mirror_url":null,"archived":false,"open_issues_count":173,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":675,"open_issues":173,"watchers":2244,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Qiskit/qiskit-terra/pulls/1422"},"html":{"href":"https://github.com/Qiskit/qiskit-terra/pull/1422"},"issue":{"href":"https://api.github.com/repos/Qiskit/qiskit-terra/issues/1422"},"comments":{"href":"https://api.github.com/repos/Qiskit/qiskit-terra/issues/1422/comments"},"review_comments":{"href":"https://api.github.com/repos/Qiskit/qiskit-terra/pulls/1422/comments"},"review_comment":{"href":"https://api.github.com/repos/Qiskit/qiskit-terra/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Qiskit/qiskit-terra/pulls/1422/commits"},"statuses":{"href":"https://api.github.com/repos/Qiskit/qiskit-terra/statuses/143b65b21fdc8d3bd7b0e11d09152386a9534d1e"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"ajavadia"}}