qp.labs.phox.MMDConfig

class MMDConfig(bandwidth, n_ops, wires=None, sqrt_loss=False, return_per_bandwidth=False)[source]

Bases: object

Hyperparameters 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 to None.

  • sqrt_loss (bool, optional) – If True, computes the square root of the absolute reduced MMD loss. Defaults to False.

  • return_per_bandwidth (bool, optional) – If True, returns a list containing the individual loss estimates for each bandwidth. If False, returns the scalar average across all specified bandwidths. Defaults to False.

return_per_bandwidth

sqrt_loss

wires

bandwidth

n_ops

return_per_bandwidth = False
sqrt_loss = False
wires = None
bandwidth
n_ops