dwavesystems / dwavesystems/dwave-graphs

Bug in Qubit chimera graph plotting

Open
#90 1 comment 0 reactions 1 assignee Claimed by @davage View on GitHub
bug/fix
Dominant language
Python
Stars
95
Forks
62
Avg merge
7d 18h
Merged PRs (30d)
1

Description

**Description**
The example provided in your documentation:
https://docs.ocean.dwavesys.com/projects/dwave-networkx/en/latest/reference/drawing.html
only works for that example and no other qubits. I have added an example for indexing qubit 2 instead of qubit 0 for a clear example, showing that it still plots onto qubit 0.
Possibly something to do with

**To Reproduce**

import networkx as nx
import dwave_networkx as dnx
import matplotlib.pyplot as plt

H = nx.Graph()
H.add_nodes_from([2, 4, 5, 6, 7])
H.add_edges_from([(2, 4), (2, 5), (2, 6), (2, 7)])
pos = dnx.chimera_layout(H)

G = dnx.chimera_graph(1,1,4)
ind = dnx.find_chimera_indices(G)
dnx.draw_chimera(G)
dnx.draw_chimera(H, node_color='b', node_shape='*', style='dashed', edge_color='b', width=3)
plt.show()

**Environment:**
- OS: Microsoft Windows 10 Pro 10.0.17134
- Python version: 3.6.6

**Additional**
-MatplotlibDeprecationWarning also being raised from Matplotlib v 3.0.2
-exceptions being raised for any attempt to plot any two qubits indexed at 0, 1, 2, or 3. The exception raised states 'Exception: not yet implemented for Chimera graphs with more than one tile'.
If I assume tile to mean unit cell then no other unit cell is being referenced when attempting to plot qubits 0, 1, 2, or 3 together.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.