qrisp.vqe.VQEBenchmark.save#
- VQEBenchmark.save(filename)[source]#
Saves the data to the harddrive for later use.
- Parameters:
- filenamestring
The filename where to save the data.
Examples
We create a Heisenberg problem and benchmark several parameters:
from qrisp import QuantumVariable from qrisp.vqe.problems.heisenberg import * from networkx import Graph G = Graph() G.add_edges_from([(0,1),(1,2),(2,3),(3,4)]) vqe = heisenberg_problem(G,1,0) H = create_heisenberg_hamiltonian(G,1,0) benchmark_data = vqe.benchmark(qarg = QuantumVariable(5), depth_range = [1,2,3], precision_range = [0.02,0.01], iter_range = [25,50], optimal_energy = H.ground_state_energy(), repetitions = 2 )
To save the results, we call the according method.
benchmark_data.save("example.vqe")