Skip to content

Commit

Permalink
add debug flag (#802)
Browse files Browse the repository at this point in the history
* add debug flag

* pass on variable debug to next method
  • Loading branch information
visagim authored Sep 16, 2024
1 parent 235f4ca commit 89fbef4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/qililab/platform/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@ def execute_anneal_program( # pylint: disable=too-many-locals
num_averages: int,
num_shots: int = 1,
weights: str | None = None,
debug: bool = False,
) -> QProgramResults:
"""Given an annealing program execute it as a qprogram.
The annealing program should contain a time ordered list of circuit elements and their corresponging ising coefficients as a dictionary. Example structure:
Expand All @@ -680,6 +681,8 @@ def execute_anneal_program( # pylint: disable=too-many-locals
annealing_program_dict (list[dict[str, dict[str, float]]]): annealing program to run
transpiler (Callable): ising to flux transpiler. The transpiler should take 2 values as arguments (delta, epsilon) and return 2 values (phix, phiz)
averages (int, optional): Amount of times to run and average the program over. Defaults to 1.
debug (bool, optional): Whether to create debug information. For ``Qblox`` clusters all the program information is printed on screen.
For ``Quantum Machines`` clusters a ``.py`` file is created containing the ``QUA`` and config compilation. Defaults to False.
"""
if self.flux_to_bus_topology is None:
raise ValueError("Flux to bus topology not given in the runcard")
Expand Down Expand Up @@ -710,7 +713,7 @@ def execute_anneal_program( # pylint: disable=too-many-locals
bus=readout_bus, waveform=measurement_name, weights=IQPair(I=weights_shape, Q=weights_shape)
)

return self.execute_qprogram(qprogram=qp_annealing, calibration=calibration)
return self.execute_qprogram(qprogram=qp_annealing, calibration=calibration, debug=debug)
raise ValueError("The calibrated measurement is not present in the calibration file.")

def execute_experiment(self, experiment: Experiment, results_path: str) -> str:
Expand Down

0 comments on commit 89fbef4

Please sign in to comment.