Tomography
Minimal single-qubit tomography helpers for MSD postselection demos.
TomographyResult
dataclass
TomographyResult(shots_by_basis: Mapping[str, ndarray])
Point-estimate single-qubit tomography result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
shots_by_basis
|
Mapping[str, ndarray]
|
A mapping of each basis to an array of shots (0/1's) in each basis. |
required |
Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/decoding/tomography.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | |
fidelity_bloch
fidelity_bloch(
target_bloch: ndarray | Sequence[float],
tol: float = 1e-10,
) -> float
Return the fidelity to a target state from its Bloch vector.
Source code in .venv/lib/python3.12/site-packages/bloqade/gemini/decoding/tomography.py
108 109 110 111 112 113 114 115 116 117 118 | |