dual_from_empirical_frequencies

dual_from_empirical_frequencies(povm_post_processor: POVMPostProcessor, *, loc: int | tuple[int, ...] | None = None, bias: list[float] | float | None = None, ansatz: list[SparsePauliOp | DensityMatrix | Statevector] | SparsePauliOp | DensityMatrix | Statevector | None = None) BaseDual[source]

Return the Dual frame of povm based on the frequencies of the sampled outcomes.

Given outcomes sampled from a ProductPOVM, each local Dual frame is parametrized with the alpha-parameters set as the marginal outcome frequencies. For stability, the (local) empirical frequencies can be biased towards the (marginal) outcome probabilities of an ansatz state.

Parameters:
  • povm_post_processor (POVMPostProcessor) – the POVMPostProcessor object from which to extract the POVMPostProcessor.povm and the empirical frequencies to build the Dual frame.

  • loc (int | tuple[int, ...] | None) – index of the results to use. This is relevant if multiple sets of parameter values were supplied to the sampler in the same Pub. If None, it is assumed that the supplied circuit was not parametrized or that a unique set of parameter values was supplied. In this case, loc is trivially set to 0.

  • bias (list[float] | float | None) – the strength of the bias towards the outcome distribution of the ansatz state. If it is a float, the same bias is applied to each (local) sub-system. If it is a list of float, a specific bias is applied to each sub-system. If None, the bias for each sub-system is set to be the number of outcomes of the POVM acting on this sub-system.

  • ansatz (list[SparsePauliOp | DensityMatrix | Statevector] | SparsePauliOp | DensityMatrix | Statevector | None) – list of quantum states for each local sub-system. If a single (local) quantum state is supplied, it is used for all sub-systems. From these states, the local outcome probability distributions are computed for each sub-system. The empirical marginal frequencies are biased towards these distributions. If None, the fully mixed state is used for each sub-system.

Raises:
Returns:

The Dual frame based on the empirical outcome frequencies from the post-processed result.

Return type:

BaseDual