metric_results
qubit_approximant.benchmarking.metrics.metric_results
metric_results(fn, fn_kwargs, circuit, params_list)
Returns 4 lists of error metrics, one for each layer. The metrics are: - L1 norm - L2 norm - Infinity norm - Infidelity
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fn |
Callable
|
Function we want to approximate. |
required |
fn_kwargs |
dict
|
Keyword arguments for 'fn'. |
required |
circuit |
Circuit
|
Circuit used to model 'fn'. |
required |
params_list |
list[NDArray]
|
List of parameters for the circuit with different number of layers. |
required |
Returns:
Type | Description |
---|---|
Tuple[list[float], ...]
|
Returns lists of L1 norms, L2 norms, infinity norms and infidelities for every number of layers. |
Source code in qubit_approximant/benchmarking/metrics/metric_results.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
|