Skip to main content
IBM Quantum Platform
이 페이지는 Qiskit SDK 의 이전 버전에서 가져온 것으로, 최신 버전에는 존재하지 않습니다. 최신 버전으로 업데이트하시기를 권장합니다. 자세한 정보는 릴리스 정보를 참조하십시오.

BaseReadoutMitigator

class qiskit.result.BaseReadoutMitigator

GitHub

Bases: ABC

Base readout error mitigator class.


Methods

expectation_value

abstract expectation_value(data, diagonal, qubits=None, clbits=None, shots=None)

Calculate the expectation value of a diagonal Hermitian operator.

Parameters

  • data (Counts) – Counts object to be mitigated.
  • diagonal (Callable |dict |str |ndarray) – the diagonal operator. This may either be specified as a string containing I,Z,0,1 characters, or as a real valued 1D array_like object supplying the full diagonal, or as a dictionary, or as Callable.
  • qubits (Iterable[int] | None) – the physical qubits measured to obtain the counts clbits. If None these are assumed to be qubits [0, …, N-1] for N-bit counts.
  • clbits (List[int] | None) – Optional, marginalize counts to just these bits.
  • shots (int | None) – Optional, the total number of shots, if None shots will be calculated as the sum of all counts.

Returns

The mean and an upper bound of the standard deviation of operator expectation value calculated from the current counts.

Return type

Tuple[float, float]

quasi_probabilities

abstract quasi_probabilities(data, qubits=None, clbits=None, shots=None)

Convert counts to a dictionary of quasi-probabilities

Parameters

  • data (Counts) – Counts to be mitigated.
  • qubits (Iterable[int] | None) – the physical qubits measured to obtain the counts clbits. If None these are assumed to be qubits [0, …, N-1] for N-bit counts.
  • clbits (List[int] | None) – Optional, marginalize counts to just these bits.
  • shots (int | None) – Optional, the total number of shots, if None shots will be calculated as the sum of all counts.

Returns

A dictionary containing pairs of [output, mean] where “output”

is the key in the dictionaries, which is the length-N bitstring of a measured standard basis state, and “mean” is the mean of non-zero quasi-probability estimates.

Return type

QuasiDistribution

이 페이지가 도움이 되었습니까?
GitHub에서 버그, 오타를 보고하거나 컨텐츠를 요청하십시오.