BPResult#
- class pyqit.utils.diagnostic.BPResult(n_qubits: int, n_samples: int, layer_variances: dict[str, float], layer_ratios: dict[str, float], overall_variance: float, expected_variance: float, is_barren: bool, quantum_variance: float, classical_variance: float | None = None, n_executions: int | None = None)[source]#
Bases:
objectResult of check_barren_plateau.
repr(result) or print(result) renders a table (rich if installed, ASCII otherwise).
- n_qubits, n_samples
- Type:
int
- layer_variances, layer_ratios
Per-weight-layer gradient variance, and its ratio to the baseline.
- Type:
dict of {str: float}
- overall_variance, quantum_variance
- Type:
float
- expected_variance#
Theoretical floor from McClean et al., scaled by bp_scale_factor.
- Type:
float
- is_barren#
- Type:
bool
- classical_variance#
Set only for hybrid models with classical weight layers.
- Type:
float, optional
- n_executions#
Circuit executions the sampling cost, as counted by the device: one per sample under backprop, one plus two per parameter under parameter-shift. None when the model runs no QNode.
- Type:
int, optional