|
@@ -6,9 +6,12 @@ import itertools as it |
|
|
import clifford |
|
|
import clifford |
|
|
import json |
|
|
import json |
|
|
import qi |
|
|
import qi |
|
|
import networkx as nx |
|
|
|
|
|
|
|
|
try: |
|
|
|
|
|
from networkx import Graph as NXGraph |
|
|
|
|
|
except ImportError: |
|
|
|
|
|
NXGraph = object |
|
|
|
|
|
|
|
|
class GraphState(object): |
|
|
|
|
|
|
|
|
class GraphState(NXGraph): |
|
|
|
|
|
|
|
|
def __init__(self, nodes=[]): |
|
|
def __init__(self, nodes=[]): |
|
|
self.adj, self.node = {}, {} |
|
|
self.adj, self.node = {}, {} |
|
@@ -196,5 +199,3 @@ class GraphState(object): |
|
|
""" Check equality between graphs """ |
|
|
""" Check equality between graphs """ |
|
|
return self.adj == other.adj and self.node == other.node |
|
|
return self.adj == other.adj and self.node == other.node |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|