Skip to content

Commit

Permalink
Dev bipartite graphs (#104)
Browse files Browse the repository at this point in the history
* A community tutorial with functions and a simple workflow to test larger vc problems on bipartite graphs


Co-authored-by: TFD <[email protected]>
Co-authored-by: Leonardo Disilvestro <[email protected]>
  • Loading branch information
3 people authored Oct 27, 2022
1 parent 7cf0b29 commit 9ca51d5
Show file tree
Hide file tree
Showing 12 changed files with 418 additions and 0 deletions.
405 changes: 405 additions & 0 deletions examples/community_tutorials/mvc_examples/bipartite_graphs.ipynb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 0}, {"id": 1}, {"id": 2}, {"id": 3}, {"id": 4}, {"id": 5}, {"id": 6}, {"id": 7}, {"id": 8}, {"id": 9}, {"id": 10}, {"id": 11}, {"id": 12}, {"id": 13}], "links": [{"source": 0, "target": 13}, {"source": 1, "target": 8}, {"source": 1, "target": 9}, {"source": 1, "target": 10}, {"source": 1, "target": 11}, {"source": 1, "target": 12}, {"source": 1, "target": 13}, {"source": 2, "target": 13}, {"source": 3, "target": 8}, {"source": 3, "target": 11}, {"source": 4, "target": 8}, {"source": 4, "target": 11}, {"source": 4, "target": 12}, {"source": 5, "target": 9}, {"source": 5, "target": 10}, {"source": 5, "target": 12}, {"source": 6, "target": 7}, {"source": 6, "target": 10}, {"source": 6, "target": 13}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 0}, {"id": 1}, {"id": 2}, {"id": 3}, {"id": 4}, {"id": 5}, {"id": 6}, {"id": 7}, {"id": 8}, {"id": 9}, {"id": 10}, {"id": 11}, {"id": 12}, {"id": 13}], "links": [{"source": 0, "target": 9}, {"source": 0, "target": 10}, {"source": 0, "target": 12}, {"source": 0, "target": 13}, {"source": 1, "target": 7}, {"source": 1, "target": 10}, {"source": 1, "target": 11}, {"source": 1, "target": 12}, {"source": 1, "target": 13}, {"source": 2, "target": 10}, {"source": 3, "target": 11}, {"source": 4, "target": 11}, {"source": 5, "target": 7}, {"source": 5, "target": 8}, {"source": 5, "target": 9}, {"source": 5, "target": 11}, {"source": 5, "target": 13}, {"source": 6, "target": 10}, {"source": 6, "target": 13}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 0}, {"id": 1}, {"id": 2}, {"id": 3}, {"id": 4}, {"id": 5}, {"id": 6}, {"id": 7}, {"id": 8}, {"id": 9}, {"id": 10}, {"id": 11}, {"id": 12}, {"id": 13}], "links": [{"source": 0, "target": 13}, {"source": 1, "target": 11}, {"source": 2, "target": 7}, {"source": 2, "target": 9}, {"source": 2, "target": 10}, {"source": 2, "target": 11}, {"source": 3, "target": 7}, {"source": 3, "target": 9}, {"source": 3, "target": 13}, {"source": 4, "target": 8}, {"source": 4, "target": 10}, {"source": 4, "target": 11}, {"source": 4, "target": 12}, {"source": 5, "target": 8}, {"source": 5, "target": 9}, {"source": 5, "target": 10}, {"source": 5, "target": 12}, {"source": 5, "target": 13}, {"source": 6, "target": 13}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 0}, {"id": 1}, {"id": 2}, {"id": 3}, {"id": 4}, {"id": 5}, {"id": 6}, {"id": 7}, {"id": 8}, {"id": 9}, {"id": 10}, {"id": 11}, {"id": 12}, {"id": 13}, {"id": 14}, {"id": 15}], "links": [{"source": 0, "target": 7}, {"source": 0, "target": 13}, {"source": 0, "target": 14}, {"source": 0, "target": 15}, {"source": 1, "target": 14}, {"source": 2, "target": 11}, {"source": 3, "target": 8}, {"source": 3, "target": 9}, {"source": 3, "target": 10}, {"source": 3, "target": 11}, {"source": 3, "target": 13}, {"source": 3, "target": 14}, {"source": 4, "target": 11}, {"source": 4, "target": 14}, {"source": 5, "target": 8}, {"source": 5, "target": 11}, {"source": 5, "target": 12}, {"source": 5, "target": 14}, {"source": 5, "target": 15}, {"source": 6, "target": 7}, {"source": 6, "target": 8}, {"source": 6, "target": 9}, {"source": 6, "target": 10}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 0}, {"id": 1}, {"id": 2}, {"id": 3}, {"id": 4}, {"id": 5}, {"id": 6}, {"id": 7}, {"id": 8}, {"id": 9}, {"id": 10}, {"id": 11}, {"id": 12}, {"id": 13}, {"id": 14}, {"id": 15}], "links": [{"source": 0, "target": 7}, {"source": 0, "target": 8}, {"source": 0, "target": 9}, {"source": 0, "target": 10}, {"source": 0, "target": 13}, {"source": 1, "target": 9}, {"source": 1, "target": 10}, {"source": 1, "target": 11}, {"source": 1, "target": 12}, {"source": 1, "target": 14}, {"source": 2, "target": 8}, {"source": 2, "target": 13}, {"source": 3, "target": 15}, {"source": 4, "target": 8}, {"source": 4, "target": 9}, {"source": 4, "target": 12}, {"source": 4, "target": 13}, {"source": 4, "target": 15}, {"source": 5, "target": 7}, {"source": 5, "target": 8}, {"source": 5, "target": 11}, {"source": 5, "target": 13}, {"source": 6, "target": 15}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 0}, {"id": 1}, {"id": 2}, {"id": 3}, {"id": 4}, {"id": 5}, {"id": 6}, {"id": 7}, {"id": 8}, {"id": 9}, {"id": 10}, {"id": 11}, {"id": 12}, {"id": 13}, {"id": 14}, {"id": 15}], "links": [{"source": 0, "target": 12}, {"source": 0, "target": 13}, {"source": 0, "target": 14}, {"source": 1, "target": 8}, {"source": 1, "target": 11}, {"source": 2, "target": 8}, {"source": 2, "target": 11}, {"source": 3, "target": 10}, {"source": 3, "target": 14}, {"source": 3, "target": 15}, {"source": 3, "target": 7}, {"source": 4, "target": 8}, {"source": 4, "target": 9}, {"source": 4, "target": 10}, {"source": 4, "target": 11}, {"source": 5, "target": 8}, {"source": 5, "target": 9}, {"source": 5, "target": 10}, {"source": 5, "target": 11}, {"source": 5, "target": 12}, {"source": 5, "target": 13}, {"source": 5, "target": 14}, {"source": 6, "target": 11}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 0}, {"id": 1}, {"id": 2}, {"id": 3}, {"id": 4}, {"id": 5}, {"id": 6}, {"id": 7}, {"id": 8}, {"id": 9}, {"id": 10}, {"id": 11}, {"id": 12}, {"id": 13}, {"id": 14}, {"id": 15}], "links": [{"source": 0, "target": 8}, {"source": 0, "target": 9}, {"source": 0, "target": 10}, {"source": 0, "target": 13}, {"source": 1, "target": 10}, {"source": 1, "target": 15}, {"source": 2, "target": 9}, {"source": 2, "target": 14}, {"source": 3, "target": 8}, {"source": 3, "target": 10}, {"source": 3, "target": 12}, {"source": 3, "target": 13}, {"source": 3, "target": 15}, {"source": 4, "target": 9}, {"source": 4, "target": 10}, {"source": 4, "target": 11}, {"source": 4, "target": 15}, {"source": 5, "target": 9}, {"source": 5, "target": 11}, {"source": 5, "target": 14}, {"source": 5, "target": 15}, {"source": 6, "target": 10}, {"source": 6, "target": 11}, {"source": 6, "target": 15}, {"source": 7, "target": 9}, {"source": 7, "target": 11}, {"source": 7, "target": 14}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 0}, {"id": 1}, {"id": 2}, {"id": 3}, {"id": 4}, {"id": 5}, {"id": 6}, {"id": 7}, {"id": 8}, {"id": 9}, {"id": 10}, {"id": 11}, {"id": 12}, {"id": 13}, {"id": 14}, {"id": 15}], "links": [{"source": 0, "target": 9}, {"source": 0, "target": 10}, {"source": 0, "target": 11}, {"source": 0, "target": 12}, {"source": 0, "target": 13}, {"source": 1, "target": 9}, {"source": 1, "target": 11}, {"source": 1, "target": 12}, {"source": 1, "target": 15}, {"source": 2, "target": 8}, {"source": 2, "target": 11}, {"source": 2, "target": 12}, {"source": 2, "target": 13}, {"source": 2, "target": 15}, {"source": 3, "target": 9}, {"source": 4, "target": 12}, {"source": 4, "target": 14}, {"source": 5, "target": 9}, {"source": 5, "target": 11}, {"source": 5, "target": 12}, {"source": 5, "target": 14}, {"source": 6, "target": 8}, {"source": 6, "target": 10}, {"source": 6, "target": 11}, {"source": 6, "target": 13}, {"source": 6, "target": 15}, {"source": 7, "target": 9}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 0}, {"id": 1}, {"id": 2}, {"id": 3}, {"id": 4}, {"id": 5}, {"id": 6}, {"id": 7}, {"id": 8}, {"id": 9}, {"id": 10}, {"id": 11}, {"id": 12}, {"id": 13}, {"id": 14}, {"id": 15}, {"id": 16}, {"id": 17}], "links": [{"source": 0, "target": 10}, {"source": 0, "target": 11}, {"source": 0, "target": 13}, {"source": 0, "target": 14}, {"source": 0, "target": 17}, {"source": 1, "target": 15}, {"source": 2, "target": 9}, {"source": 2, "target": 11}, {"source": 2, "target": 13}, {"source": 2, "target": 14}, {"source": 2, "target": 17}, {"source": 3, "target": 9}, {"source": 3, "target": 10}, {"source": 3, "target": 11}, {"source": 3, "target": 16}, {"source": 4, "target": 9}, {"source": 4, "target": 10}, {"source": 4, "target": 17}, {"source": 5, "target": 15}, {"source": 5, "target": 16}, {"source": 6, "target": 9}, {"source": 6, "target": 12}, {"source": 6, "target": 14}, {"source": 6, "target": 15}, {"source": 6, "target": 16}, {"source": 7, "target": 16}, {"source": 8, "target": 9}, {"source": 8, "target": 10}, {"source": 8, "target": 11}, {"source": 8, "target": 13}, {"source": 8, "target": 14}, {"source": 8, "target": 15}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 0}, {"id": 1}, {"id": 2}, {"id": 3}, {"id": 4}, {"id": 5}, {"id": 6}, {"id": 7}, {"id": 8}, {"id": 9}, {"id": 10}, {"id": 11}, {"id": 12}, {"id": 13}, {"id": 14}, {"id": 15}, {"id": 16}, {"id": 17}], "links": [{"source": 0, "target": 9}, {"source": 0, "target": 12}, {"source": 0, "target": 14}, {"source": 0, "target": 17}, {"source": 1, "target": 9}, {"source": 1, "target": 10}, {"source": 1, "target": 12}, {"source": 1, "target": 16}, {"source": 2, "target": 12}, {"source": 2, "target": 14}, {"source": 2, "target": 15}, {"source": 2, "target": 16}, {"source": 3, "target": 11}, {"source": 3, "target": 12}, {"source": 3, "target": 13}, {"source": 3, "target": 15}, {"source": 3, "target": 17}, {"source": 4, "target": 10}, {"source": 4, "target": 15}, {"source": 5, "target": 9}, {"source": 5, "target": 10}, {"source": 6, "target": 9}, {"source": 6, "target": 14}, {"source": 6, "target": 15}, {"source": 6, "target": 16}, {"source": 7, "target": 9}, {"source": 7, "target": 10}, {"source": 7, "target": 16}, {"source": 8, "target": 10}, {"source": 8, "target": 12}, {"source": 8, "target": 14}, {"source": 8, "target": 16}]}
3 changes: 3 additions & 0 deletions tests/test_notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@ def test_09_RQAOA_example():
@pytest.mark.qpu
def test_10_workflows_on_Amazon_braket():
notebook_test_function("./examples/10_workflows_on_Amazon_braket.ipynb")

def test_bipartite_graphs():
notebook_test_function("./examples/community_tutorials/mvc_examples/bipartite_graphs.ipynb")

0 comments on commit 9ca51d5

Please sign in to comment.