BTC_01_PL: Probability Loading

my_benchmark_execution

This module execute a complete BTC of the PL kernel

class tnbs.BTC_01_PL.my_benchmark_execution.KERNEL_BENCHMARK(**kwargs)

Bases: object

Class for execute a Kernerl benchmark

exe()

Execute complete Benchmark WorkFlow

save(save, save_name, input_pdf, save_mode)

For saving panda DataFrames to csvs

Parameters
  • save (bool) – For saving or not

  • save_nam (str) – name for file

  • input_pdf (pandas DataFrame) –

  • save_mode (str) – saving mode: overwrite (w) or append (a)

tnbs.BTC_01_PL.my_benchmark_execution.build_iterator(**kwargs)

For building the iterator of the benchmark

tnbs.BTC_01_PL.my_benchmark_execution.compute_samples(**kwargs)

This functions computes the number of executions of the benchmark for assure an error r with a confidence of alpha

Parameters

kwargs (keyword arguments) – For configuring the sampling computation

Returns

samples – DataFrame with the number of executions for each integration interval

Return type

pandas DataFrame

tnbs.BTC_01_PL.my_benchmark_execution.run_code(iterator_step, repetitions, stage_bench, **kwargs)

For configuration and execution of the benchmark kernel.

Parameters
  • iterator_step (tuple) – tuple with elements from iterator built from build_iterator.

  • repetitions (list) – number of repetitions for each execution

  • stage_bench (str) – benchmark stage. Only: benchmark, pre-benchamrk

  • kwargs (keyword arguments) – for configuration of the benchmark kernel

Returns

  • metrics (pandas DataFrame) – DataFrame with the desired metrics obtained for the integral computation

  • save_name (string) – Desired name for saving the results of the execution

tnbs.BTC_01_PL.my_benchmark_execution.summarize_results(**kwargs)

Create summary with statistics

my_benchmark_info

This module gathers all mandatory information for Benchmarks field of NEASQC JSON report for a BTC PL kernel execution.

tnbs.BTC_01_PL.my_benchmark_info.my_api(**kwargs)

Collect the information about the used APIs

tnbs.BTC_01_PL.my_benchmark_info.my_benchmark_info(**kwargs)

Complete WorkFlow for getting all the benchmar informated related info

tnbs.BTC_01_PL.my_benchmark_info.my_benchmark_kernel(**kwargs)

Name for the benchmark Kernel

tnbs.BTC_01_PL.my_benchmark_info.my_classical_compilation(**kwargs)

Information about the classical compilation part of the benchmark

tnbs.BTC_01_PL.my_benchmark_info.my_endtime(**kwargs)

Providing the end time of the benchmark

tnbs.BTC_01_PL.my_benchmark_info.my_metadata_info(**kwargs)

Other important info user want to store in the final json.

tnbs.BTC_01_PL.my_benchmark_info.my_programlanguage(**kwargs)

Getting the programing language used for benchmark

tnbs.BTC_01_PL.my_benchmark_info.my_programlanguage_vendor(**kwargs)

Getting the version of the programing language used for benchmark

tnbs.BTC_01_PL.my_benchmark_info.my_programlanguage_version(**kwargs)

Getting the version of the programing language used for benchmark

tnbs.BTC_01_PL.my_benchmark_info.my_quantum_compilation(**kwargs)

Information about the quantum compilation part of the benchmark

tnbs.BTC_01_PL.my_benchmark_info.my_starttime(**kwargs)

Providing the start time of the benchmark

tnbs.BTC_01_PL.my_benchmark_info.my_timemethod(**kwargs)

Providing the method for getting the times

my_benchmark_summary

This module is for properly formating the Results sub-field of Benchmarks field of the NEASQC JSON report by gathering the results of a complete BTC of the PL kernel.

tnbs.BTC_01_PL.my_benchmark_summary.summarize_results(**kwargs)

Mandatory code for properly present the benchmark results following the NEASQC jsonschema

my_environment_info

Module for gathering different hardware information for main fields of NEASQC report generation for reporting BTC of a PL kernel

tnbs.BTC_01_PL.my_environment_info.my_QPUCPUConnection(**kwargs)

Connection between the QPU and the CPU used in the benchmark

tnbs.BTC_01_PL.my_environment_info.my_cpu_model(**kwargs)

model of the cpu used in the benchmark

tnbs.BTC_01_PL.my_environment_info.my_frecuency(**kwargs)

Frcuency of the used CPU

tnbs.BTC_01_PL.my_environment_info.my_machine_name(**kwargs)

Name of the machine where the benchmark was performed

tnbs.BTC_01_PL.my_environment_info.my_network(**kwargs)

Network connections if several QPUs are used

tnbs.BTC_01_PL.my_environment_info.my_organisation(**kwargs)

Given information about the organisation how uploads the benchmark

tnbs.BTC_01_PL.my_environment_info.my_qpu(**kwargs)

Complete info about the used QPU

tnbs.BTC_01_PL.my_environment_info.my_qpu_model(**kwargs)

Name of the model of the QPU

neasqc_benchmark

Module for complete generation of NEASQC Benhmark Test Case report for a BTC PL kernel

class tnbs.BTC_01_PL.neasqc_benchmark.BENCHMARK

Bases: object

Generic class for benchmark applications in NEASQC

exe(info)

Method for filling the report.

Parameters

info (dictionary) –

save(filename)

Method for saving the generated benchmark report

Parameters

filename (string) – pathf for storing the benchmark report

set_benchmark_info(benchmark_info)

Method for filling Benchmarks field.

Parameters

benchmark_info (OrderedDict) –

set_cpu_model(cpu_model)

Method for filling CPUModel field.

Parameters

cpu_model (str) –

set_frecuency(frecuency)

Method for filling Frequency field.

Parameters

frecuency (int) –

set_machine_name(node_name)

Method for filling MachineName field.

Parameters

node_name (string) –

set_network(network)

Method for filling Network field.

Parameters

network (OrderedDict) –

set_organisation(organisation)

Method for filling ReportOrganization field.

Parameters

organisation (string) –

set_qpu_cpu_connection(qpu_cpu_connection)

Method for filling QPUCPUConnection field.

Parameters

qpu_cpu_connection (OrderedDict) –

set_qpu_description(qpu_description)

Method for filling QPUDescription field.

Parameters

qpu_description (OrderedDict) –

set_qpu_model(qpu_model)

Method for filling QPUModel field.

Parameters

qpu_model (str) –

validate()

Method for validating the generated benchmark report.