tn_noise_learning.channels#
Noise channels as LPDOs on any topology, and the Pauli eigenstate basis used for preparation and measurement.
PAULI_EIGENSTATES
module-attribute
#
PAULI_EIGENSTATES = array(
[
[[1, 0], [0, 0]],
[[0, 0], [0, 1]],
[[0.5, 0.5], [0.5, 0.5]],
[[0.5, -0.5], [-0.5, 0.5]],
[[0.5, -0.5j], [0.5j, 0.5]],
[[0.5, 0.5j], [-0.5j, 0.5]],
],
dtype=complex,
)
States |0>, |1>, |+>, |−>, |+i>, |−i>; effect 2 * basis + bit is outcome bit of basis Z, X or Y.
depolarizing #
depolarizing(topology: Topology, p: float) -> LPDO
Single-qubit depolarizing channel (1 − p) ρ + (p / 3) Σ_{P≠I} P ρ P on every site.
Source code in src/tn_noise_learning/channels.py
79 80 81 | |
pauli_channel #
pauli_channel(
topology: Topology, probs: Iterable[float] | ndarray
) -> LPDO
Independent single-qubit Pauli channels ρ → Σ_P p_P P ρ P.
| PARAMETER | DESCRIPTION |
|---|---|
topology
|
site connectivity (all bonds have size one).
TYPE:
|
probs
|
|
Source code in src/tn_noise_learning/channels.py
65 66 67 68 69 70 71 72 73 74 75 76 | |
pauli_eigenstates #
pauli_eigenstates(num_sites: int) -> np.ndarray
The six Pauli eigenstates on every site, shape (num_sites, 6, 2, 2).
Source code in src/tn_noise_learning/channels.py
49 50 51 | |
two_qubit_depolarizing #
two_qubit_depolarizing(
topology: Topology,
p: float,
edges: Iterable[tuple[int, int]] | None = None,
) -> LPDO
Two-qubit depolarizing channel (1 − p) ρ + p · Tr[ρ] 𝟙/4 on pairwise-disjoint edges, identity elsewhere.
| PARAMETER | DESCRIPTION |
|---|---|
topology
|
site connectivity.
TYPE:
|
p
|
depolarizing probability; the sixteen two-qubit Paulis get weights
TYPE:
|
edges
|
edges that carry the channel (default: all topology edges). They must be topology edges and must not share sites. |
Source code in src/tn_noise_learning/channels.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | |