qp.labs.phox.MMDConfig¶
- class MMDConfig(bandwidth, n_ops, wires=None, sqrt_loss=False, return_per_bandwidth=False)[source]¶
Bases:
objectHyperparameters for Maximum Mean Discrepancy (MMD) loss calculation.
- Parameters:
bandwidth (float | Sequence[float]) – RBF kernel bandwidth(s) for the MMD calculation. If a sequence is provided, the loss will be computed for each bandwidth and either averaged or returned as a list depending on
return_per_bandwidth.n_ops (int) – The number of binary operators (observables) to sample when approximating the MMD loss.
wires (Sequence[int] | None, optional) – The specific wires (qubits) to evaluate the MMD over. If
None, the calculation defaults to using all available qubits. Defaults toNone.sqrt_loss (bool, optional) – If
True, computes the square root of the absolute reduced MMD loss. Defaults toFalse.return_per_bandwidth (bool, optional) – If
True, returns a list containing the individual loss estimates for each bandwidth. IfFalse, returns the scalar average across all specified bandwidths. Defaults toFalse.
Attributes