eclipse-qrisp / Qrisp

Qrisp - a framework for high-level programming of Quantum computers
https://www.qrisp.eu/
Eclipse Public License 2.0
83 stars 23 forks source link

Visualizing benchmark_data with gain_metric='tts' results in an error #28

Open MatP1337 opened 7 months ago

MatP1337 commented 7 months ago

The following code snipet reproduces the bug:

from qrisp import *
from networkx import Graph
G = Graph()
G.add_edges_from([[0,3],[0,4],[1,3],[1,4],[2,3],[2,4]])
from qrisp.qaoa import maxcut_problem
max_cut_instance = maxcut_problem(G)
benchmark_data = max_cut_instance.benchmark(qarg = QuantumVariable(5),
depth_range = [3,4,5],
shot_range = [5000, 10000],
iter_range = [25, 50],
optimal_solution = "11100",
repetitions = 2
)
benchmark_data.visualize(gain_metric='approx_ratio') # works
benchmark_data.visualize(gain_metric='tts') # produces an error