Loss Channel Details
This page provides the mathematical background for simulating qubit loss
with LossyPauliSum.
For usage, see Simulating loss.
Updated Pauli basis
We can include loss in qubit simulation by adding a third state, which we will call the leakage state \(|L\rangle\). In order to include this in Pauli Propagation, we extend the set of Pauli basis operator by an additional operator \(L = |L\rangle \langle L|\), which is the projector on the leakage state.
The complete set of Pauli operators we use to describe any Pauli String is then
Neglecting coherences between the qubit subspace and the leakage state, this basis fully describes the three-level system.
For clarity, the corresponding matrix definitions are
Note
In the basis above, gates no longer correspond to the matrix definitions. The reason for this is simple: applying e.g. an \(X\) gate to a qubit in \(|L\rangle\), will leave the qubit invariant. However, it is obvious that multiplying any Pauli \(P \neq L\) from the basis with \(L\) will give 0. This would correspond to a zero-amplitude state. The implementation takes that into account accordingly.
Loss channel
The action of an independent loss channel is to map part of the population from the qubit subspace into the \(|L\rangle\) state. This corresponds to reducing the trace of the density operator.
The Kraus operators for a loss channel are
where \(p_L\) is the probability of losing a qubit.
The action of the channel on the Pauli basis is
Note that this channel is not symmetric under forward and backward propagation. Since for any channel \(\mathcal{E}[\rho] = \sum_i K_i \rho K_i ^\dagger\), we have \(\langle A \rangle = \text{tr}(A \mathcal{E}[\rho]) = \text{tr}(\sum_i K_i^\dagger A K_i \rho)\), the above action on Paulis corresponds to the adjoint channel.
The action of the channel is clear from a physical perspective: whenever a qubit undergoes a loss channel, we lose population out of the qubit subspace.
However, we can also see if there is no loss present in the initial state, we will never map any part of a Pauli string to \(L\). This might seem a bit surprising, but is accurate. Under the loss channel described here, we simply lose population out of the qubit subspace. Any expectation value of a qubit-subspace operator will tend towards \(0\) with increasing loss.
An intuitive picture is also to consider a pure state which describes a single probabilistic trajectory through the circuit. Before loss, a state vector in the qubit subspace is just
Should the qubit be lost, the resulting state vector is
Since under the described dynamics there is no way to recover a qubit once it has been lost, any trajectory where the qubit has been lost will contribute a 0 overlap for any qubit subspace operator \(Q\),
While this is conceptually accurate, the resulting loss does not capture what happens on hardware. If there is no loss detection, then a qubit that has been lost will be falsely counted as being in the \(|0\rangle\) state when being measured. If there is loss detection, we could either reject the trajectory via post-selection, which is equivalent to having no loss in the system. Or, we can reset the qubit to the \(|0\rangle\) during the circuit.
Reset channel
In order to accurately model the hardware behavior, we will extend the above description by another channel. A reset channel, which incoherently resets a lost qubit into the \(|0\rangle\) state.
The underlying dynamics of this channel are equivalent to having amplitude damping from \(|L\rangle\) to the \(|0\rangle\) state. The Kraus operators for this channel are
$$ K_0 = I, ~~~ K_1 = |0\rangle\langle L|.$$ The corresponding mappings of the Pauli basis are
$\(\mathcal{E}(L) = 0.\)$ Intuitively, these mappings can be understood as - Coherences remain unchanged. - Lost qubits are reset: lost population is removed (\(L\) is set to 0) and added to the \(|0\rangle\) state, which is equivalent to a positive contribution to both \(Z\) or \(I\).
This reset channel is sufficient in order to model either actually resetting a lost qubit, or the error that arises when falsely counting a lost qubit as 0. For the latter, we simply apply the loss channel to all qubits at the end of the circuit. This ensures that lost qubits to not partake in the dynamics of the circuit, but are then counted as 0 in a measurement.
Note, that since we are doing Pauli Propagation, we always have to apply the adjoint circuit. Thus, resetting lost qubits at the end of the circuit means that we apply the reset channel at the very beginning when propagating a Pauli string.
Comment on branching and scaling
Both channels above branch, which without truncation would lead to exponential scaling.
For the loss channel, it is easy to see that coefficient truncation can deal with branching, since it only branches on \(L \to p_L I + L\). Branches therefore scale with \(p_L\), which is usually \(\ll 1\).
The reset channel, on the other hand, branches on both \(I\) and \(Z\) into \(L\) without any leading coefficient. The probability of having lost the \(i\)-th qubit at the end of the circuit is just given by \(\langle L_i\rangle\). Since there are no coherences between \(L\) and the qubit subspace, expectation values factorize, i.e. for any Pauli string, where \(P_i \neq L_i\),
In a slight abuse of notation, we note that $\langle L_i\rangle \propto p_L $, the contribution of Pauli Strings that have an \(L\) on many positions is very small. Therefore, we can truncate these in order to suppress exponential branching.
In practice, this works similar to large weight truncation and is achieved by a designated
truncation strategy, which you can configure by setting the [max_loss_weight] on a [ppvm.paulisum.LossyPauliSum].