Skip to content

bloqade.gemini.decoding.tomography.TomographyResult

← Module overview

classTomographyResultsource

bloqade.gemini.decoding.tomography.TomographyResult

Point-estimate single-qubit tomography result.

class TomographyResult(shots_by_basis: Mapping[str, np.ndarray])

Parameters

NameTypeDescription
shots_by_basisMapping[str, np.ndarray]A mapping of each basis to an array of shots (0/1's) in each basis.

Attributes

NameTypeDescription
density_matrixnp.ndarray

methodfidelity_blochsource

bloqade.gemini.decoding.tomography.TomographyResult.fidelity_bloch

Signature
def fidelity_bloch(target_bloch: np.ndarray | Sequence[float], tol: float = 1e-10) -> float

Return the fidelity to a target state from its Bloch vector.

Parameters

NameTypeDefaultDescription
target_blochnp.ndarray | Sequence[float]required
tolfloat1e-10

Returns

float

source