dual_from_state

dual_from_state(povm: BasePOVM, state: SparsePauliOp | DensityMatrix | Statevector) BaseDual[source]

Return the Dual frame of povm based on the outcome distribution of a supplied state.

This method constructs a joint Dual frame where the alpha-parameters are set as the outcome probabilities of the supplied state. It can be shown that this is the Dual frame minimizing the variance of the estimator (irrespective of the observable to estimate) if outcomes are sampled from this state.

You can use this function like any of the Dual frame constructors to set the POVMPostProcessor.dual attribute as shown in this how-to guide.

Warning

Computing this Dual frame obviously requires knowledge of an exact reference state and, thus, is limited in its applicability to development and testing cases in which an exact state is available.

Parameters:
Raises:

NotImplementedError – if povm is not a MultiQubitPOVM instance. If you have a ProductPOVM, have a look at dual_from_marginal_probabilities().

Returns:

The Dual frame with minimal variance of the estimator for any arbitrary observable.

Return type:

BaseDual