iqm.benchmarks.optimization.qscore

iqm.benchmarks.optimization.qscore#

Qscore benchmark

Functions

calculate_optimal_angles_for_QAOA_p1(graph)

Calculates the optimal angles for single layer QAOA MaxCut ansatz.

compute_expectation_value(counts, graph, ...)

Computes expectation value based on measurement results.

create_objective_function(counts, graph, ...)

Creates a function that maps the parameters to the parametrized circuit, runs it and computes the expectation value.

cut_cost_function(x, graph)

Returns the number of cut edges in a graph (with minus sign).

is_successful(approximation_ratio)

Check whether a Q-score benchmark returned approximation ratio above beta*, therefore being successful.

plot_approximation_ratios(nodes, beta_ratio, ...)

Generate the figure of approximation ratios vs number of nodes,

qscore_analysis(run)

Analysis function for a QScore experiment

run_QAOA(counts, graph_physical, qubit_node, ...)

Solves the cut size of MaxCut for a graph using QAOA.

Classes

QScoreBenchmark(backend_arg, configuration)

Q-score estimates the size of combinatorial optimization problems a given number of qubits can execute with meaningful results.

QScoreConfiguration(*, benchmark, shots, ...)

Q-score configuration.

Inheritance

Inheritance diagram of iqm.benchmarks.optimization.qscore