Circuit Layer Operations Per Second (CLOPS)#

%load_ext autoreload
%autoreload 2

Set IQM Token if using Resonance#

# import os
# os.environ["IQM_TOKEN"] = "xxxxxxxxxxxxxxx"

Choose (or define) a backend#

#backend = "fakeadonis"
#backend = "fakeapollo"
backend = "garnet"
#backend = "deneb"

CLOPS Configuration#

from iqm.benchmarks.quantum_volume.clops import *
EXAMPLE_CLOPS = CLOPSConfiguration(
    qubits=[9, 14, 15, 17, 18, 19],
    num_circuits=100, # By definition set to 100
    num_updates=10, # By definition set to 10
    num_shots=100, # By definition set to 100
    calset_id=None,
)

Run the experiment#

benchmark_clops = CLOPSBenchmark(backend, EXAMPLE_CLOPS)
run_clops = benchmark_clops.run()

Perform Analysis#

result_clops = benchmark_clops.analyze()

List all the keys in the attributes of the dataset#

for k in run_clops.dataset.attrs.keys():
    print(k)
run_clops.dataset.attrs["operation_counts"]

The observation object contains the benchmark results#

result_clops.observations

Generate plots#

The plot generated by the CLOPS analysis is a bar plot that shows a breakdown of elapsed times in the experiment in units of seconds.

The bars labeled as “Remote” refer to time spent in the remote components of the experiment, as reported by the backend.

  • Remote (components) shows the values of the time spent in compilation, submission and execution of the jobs.

  • Remote (total) shows the total time spent in the remote components of the experiment.

NB: the difference between the Remote “total” and “components” elapsed times may be due to other aspects like loading and storing jobs and IDs, etc.

The “Wall-time” bars show time spent in the experiment as experienced by the user. NB: The time spent in assigning parameters is not included in the CLOPS value, since this is done offline in your (the user’s) hardware.

  • Wall-time (CLOPS) encompasses the time related to the CLOPS value, i.e., comprising only of submitting jobs per template and retrieving the results, without time spent in transpilation or parameter assignment, which are both done offline.

  • Wall-time (total) shows a breakdown of the total wall-time of the experiment, with the added offline times of transpilation of circuit templates and assignment of parameters.

NB: The difference between the “user retrieve” time and the Remote “total” time can be assigned as a latency time, and may vary significantly depending on external circumstances. This latency is the aggregated time between when a job is finished and when the results are received (which may be due to several external factors).

result_clops.plot_all()