Open renezander90 opened 5 months ago
A error occurs when recursive_qs_search is applied to a network.Graph.
from qrisp import * import networkx as nx def test(G, qv): h(qv) qv = QuantumVariable(1) G = nx.Graph() G.add_edges_from([(0, 1), (0, 2)]) with conjugate(test)(G, qv): h(qv)
Here, the conjugation environment applies recursive_qs_search to the arguments G, qv. If G is a networkx.Graph this yields an error.
A workaround would be hiding the graph G:
from qrisp import * import networkx as nx def test_workaround(G, qv): def test(qv): h(qv) return test qv = QuantumVariable(1) G = nx.Graph() G.add_edges_from([(0, 1), (0, 2)]) test = test_workaround(G, qv) with conjugate(test)(qv): h(qv)
A error occurs when recursive_qs_search is applied to a network.Graph.
Here, the conjugation environment applies recursive_qs_search to the arguments G, qv. If G is a networkx.Graph this yields an error.
A workaround would be hiding the graph G: