Noise model

In the calculation of the NMR-correlation function a quantum algorithm is used to time-evolve a spin-Hamiltonian on a quantum computer. For quantum computers available presently, moderate noise occurs during the computation. This noise can however be interpreted as a coupling to an environment of the original NMR system.

The effect of the noise during the quantum computation is given by the noisy algorithm model. It maps incoherent noise during the execution of the algorithm to a continuous open system time evolution from the system. Calculating noisy algorithm model is a part of the HQS Qorrelator App and its theoretical basis is described shortly below. Its practical use is demonstarted in the examples.

For physical NMR systems, the environment seen by the spins is at infinite temperature. It is then desired that the noise during the quantum computation has an effect that is similar to an infinite temperature environment. The verification of this needs a detailed analysis of the noisy algorithm model. Such an analysis is provided by the HQS NMR tool. This thermalization analysis returns the essential information condensed to a simple quantity: the thermalization fidelity \(F \). Its value is defined to be between 0 and 1. The value \( F=1 \) means that the infinite-temperature environment interpretation is valid exactly, whereas numbers below 1, but well above 0, imply that this interpretation is approximatively valid. Values \( F\approx 0\) imply that the interpretation may not be valid. Different quantum algorithms lead to different thermalization fidelities \( F \).

Device noise

The effect of the noise during the quantum computation is modeled in our software by the noisy algorithm model. This adds noise to the classical simulation of the gate-based time propagation of the system state on quantum computer. Each gate comes with a noise that acts on qubits. The device can be set up with three different types of qubit noise:

  • Damping
  • Dephasing
  • Depolarization

The device initialization involves setting up independent rates of each decoherence channels (see the examples). To find out the noise probability corresponding to each gate, this is combined with the physical time needed to execute the gate.

In the modeling, we split each gate operation in an algorithm into the ideal unitary gate \( \hat U \) and a noise \( \hat N \). Two simplest examples are

\[ {\cal U} \hat\rho \rightarrow {\cal NU} \hat\rho \ {\cal U}_2 {\cal U}_1 \hat\rho \rightarrow {\cal N}_2 {\cal U}_2 {\cal N}_1 {\cal U}_1 \hat\rho , \] where \( {\cal U}_k \) and \( {\cal N}_k \) are superoperator representations of the unitary gate and the non-unitary noise. (In the superoperator representation the density matrix \( \hat\rho \) is a vector.)

The non-unitary noise gate is given by a Lindblad time-evolution over the physical gate time \(\tau_k\), \({\cal N}_k \equiv e^{{\cal L}_k\tau_k}\), where \({\cal L}_k\) is the Lindblad superoperator, defined below.

The Lindbladians are used to describe incoherent time evolution of the reduced density matrix of the qubits due to the effect of noise. We have \(\dot\rho = {\cal L}[\rho]\). Damping of all \(N\) qubits is described by

\[ {\cal L}[\hat\rho] = \sum_{j=1}^N \gamma\left( \hat S^-_j \hat\rho \hat S^+_j - \frac{1}{2} \hat S^+_j \hat S^-_j \hat\rho - \frac{1}{2} \hat\rho \hat S^+_j \hat S^-_j \right) . \]

Here the spin operators act on the qubits. The dephasing noise corresponds to a Z (longitudinal) noise operator, \[ {\cal L}[\hat\rho] = \sum_{j=1}^N\gamma\left( \hat S_j^z \hat \rho \hat S_j^z - \hat \rho \right) . \] The form is equivalent with the preceding Lindbladian, but we have used here \(\hat S^z\hat S^z=1\). The depolarising noise is a sum of X, Y, and Z noise channels, with Lindbladian of the form \[ {\cal L}[\rho] = \sum_{j=1}^N\left[\frac{\gamma}{4}\sum_{d\in[x,y,z]}\left( \hat S^d_j \rho \hat S^d_j - \hat \rho \right)\right] . \] For single-qubit systems this reduces to \({\cal L}[\rho] = \gamma\left( \frac{1}{2} - \hat \rho \right)\). Multiple Lindbladians can be added on the right-hand side of the density-matrix equation-of-motion, \(\dot\rho = \sum_l{\cal L}_l[\rho]\).

A fully thermalized state \(\hat\rho_0\) (having an equal probability of states \( \vert 0\rangle \) and \( \vert 1\rangle \)) is a steady state of the depolarization noise. It is also a steady state of dephasing noise, though dephasing does not necessary drive the system towards it, since it conserves the excitation number. However, with any addition of X noise or Y noise it does that. In contrast, the steady state of the damping noise is a state with no excitations, i.e., a pure state \(\vert 0,0,\ldots\rangle\). It is then the magnitude of the damping noise that plays a central role in the full thermalization, as discussed below.

Effective noise

The thermalization analysis is done for the effective noise of the quantum algorithm. This is given by Lindbladian \( {\cal L}^\textrm{eff} \). This describes the collective effect of the noise gathered during the execution of the quantum algorithm. It is a Lindbladian acting on the spins of the NMR system. It is created as a sum of noise operations at each gate within one Trotter step. Each of these terms contribute via a Lindbladian of the original form, but with a unitary-transformed noise operator.

A minimal example is a two-gate Trotter step. Since gates \( {\cal G}_i \) are unitary and thereby invertible, we can write \[ {\cal N}_2 {\cal G}_2 {\cal N}_1 {\cal G}_1 \rho = {\cal N}_2 {\cal G}_2 {\cal N}_1 {\cal G}_2^{-1} {\cal G}_2 {\cal G}_1 \rho \equiv {\cal N}_2 {\cal N}_1' {\cal G} \rho \equiv {\cal N} {\cal G} \rho \] where \( {\cal G} = {\cal G}_2 {\cal G}_1 \) and the effective noise operator is \[ {\cal N} = {\cal N}_2 {\cal N}_1' \ {\cal N}'_1 = {\cal G}_2 {\cal N}_1 {\cal G}_2^{-1} \] We see that when re-organizing the gates and noises to one overall gate plus noise construction, the first noise superoperator got transformed by \( {\cal G}_2 \). Equivalently, the original noise operator in the Lindbladian (such as \(\hat S^x\)) got transformed by \( \hat G_2 \). Importantly, it turns out to be the superoperators \( {\cal N}'_1 \) and \( {\cal N}_2 \) that define the effective Lindbladian. They map to a sum of individual noise Lindbladians, with noise operators (such as \(\hat S^x\)) that have the transformed noise operators (such as \({\hat G}_2 \hat S^x {\hat G}_2^{-1}\)). In particular, the noise originating from dephasing or depolarization is a summation of noise of unitary-transformed X,Y, or Z Pauli operators. This turns out to be important for the thermalization analysis, since such contributions can be mapped exactly to an environment at infintite temperature, as discussed below.

All noise contributions (over arbitrary many gates) within one Trotter circuit can be represented also in the general compact form \[ {\cal L}^\textrm{eff}[\rho] = \frac{\textrm{i}}{\hbar}[ \hat\rho, H] + \sum_{ij}M_{\hat A_i \hat A_j}\left( \hat A_i \hat\rho \hat A^\dagger_j -\frac{1}{2} \hat A^\dagger_j \hat A_i \rho -\frac{1}{2} \hat\rho \hat A^\dagger_j \hat A_i \right) \] Here we have also included contribution from the coherent gates as commutation with Hamiltonian \( \hat H\), establishing the coherent time-evolution part. The operators \( \hat A_i \) are chosen such that they construct a full basis of superoperators. The software tool works in the basis of spin operators \(S^d_j\), i.e., Pauli matrices. This means that for us operators \( \hat A_i \) are either spin operators \(S^d_j\), or multiplications between different-site spin operators, \(S^d_iS^{d'}_j\ldots\).

The noise Lindbladian corresponding to the NMR quantum algorithm is calculated automatically by the HQS NMR tool. An example printing out the effective noise model is given in the practical examples.

Thermalization

The thermalization analysis is done for the effective noise, described by Lindbladian \( {\cal L}^\textrm{eff} \). The driving idea behind the following analysis is that in order to interpret the effective noise as an infinite temperature environment, it needs to drive the system to a fully mixed state. The fully mixed density matrix is proportional to the identity matrix, \( \hat\rho_0 = \frac{1}{2^N} \mathbb{1} \), where \( N \) is the number of qubits, or equivalently spins.

Steady state of noise

We want that the fully thermalized system is a steady state of the system, \( \dot\rho = {\cal L}^\textrm{eff}[\rho_\textrm{mixed}]=0 \). Since the mixed density matrix commutes with the Hamiltonian \( \hat H\), this gives a condition \[ \sum_{ij}M_{\hat A_i \hat A_j}\left( \hat A_i \hat A^\dagger_j - \hat A^\dagger_j \hat A_i \right) = 0 . \]

We first note that if there are no non-diagonal contributions, so that \( M_{A_i A_j}=0 \) for \(i\neq j\), and if the operators are Pauli matrices or unitary tranformations of them, we will have \( A_i A_i^\dagger =1 \), and the relation is valid. It follows that all contributions in the effective Lindbladian originating in the dephasing and depolarization during the quantum algorithm satisfy this condition, since they contribute through summation of this type of terms. (Note that the collective summed representation of these terms in terms of operators \(\hat A_i\) can still have non-diagonal terms.) The thermalization analysis is then an analysis of the effective noise originating in the damping of the qubits.

Damping analysis

The software tool works in the basis of spin (Pauli) operators. We then continue by looking at the representation of the damping Lindbladian in this basis \[ \gamma \hat S^- \rho \hat S^+ = \frac{\gamma}{4} \left( \hat S^x \rho \hat S^x + \hat S^y \rho \hat S^y +\textrm{i}\hat S^x \rho \hat S^y - \textrm{i}\hat S^y \rho \hat S^x \right) \] We observe that for damping noise \[ M_{\hat S^x,\hat S^x} = M_{\hat S^y,\hat S^y} = \textrm{Imag}\left[M_{\hat S^x,\hat S^y} \right] = -\textrm{Imag}\left[M_{\hat S^y,\hat S^x} \right] \] On the other hand, for a combination of decay and excitation, we have \[ \gamma_- \hat S^- \rho \hat S^+ + \gamma_+ \hat S^+ \rho \hat S^- = \frac{\gamma_+ + \gamma_-}{4} \left( \hat S^x \rho \hat S^x + \hat S^y \rho \hat S^y \right) + \frac{\gamma_+ - \gamma_-}{4} \left( \textrm{i}\hat S^x \rho \hat S^y - \textrm{i}\hat S^y \rho \hat S^x \right) \] If \(\gamma_-=\gamma_+\), we have \( \textrm{Imag}\left[M_{\hat S^x,\hat S^y} \right] = 0 \). This noise can then be represented as a direct sum of X-noise Lindbladian and Y-noise Lindbladian. A fully-mixed density matrix \(\hat\rho_0\) is a steady state of such noise. It then corresponds to an infinite temperature environment.

On the other hand, we note that any single-qubit rotation of spins lead to combinations such as \( \hat A= \cos\phi\hat S^x + \sin\phi\hat S^y\). For this \( \hat A^\dagger \hat A^\dagger = 1 \) and we have finite values of \( \textrm{Real}\left[M_{\hat S^x, \hat S^y} \right] \). However, \( \textrm{Imag}\left[M_{\hat S^x, \hat S^y} \right] = 0 \). Also all common two-qubit gates do not lead to imaginary factors. We thus assign an imaginary part of \(M_{\hat S^x, \hat S^y}\) to something that originates in damping.

According to these observations, we start constructing a definition of thermalization fidelity \[ \tilde F = 1-2\frac{\textrm{Imag}\left[M_{\hat S^x, \hat S^y} \right] } {M_{\hat S^x, \hat S^x}+M_{\hat S^y, \hat S^y}} . \] The contribution is calculated in the presence of all noise mechanisms (not just damping).

For pure damping the result is 0 whereas for a symmetric combination of damping and excitation (infinite temperature) the result is \( \tilde F=1 \). The result is also \( \tilde F=1 \) for any common single-qubit gate transformation of dephasing or depolarization noise. For a finite damping, the presence of dephasing and depolarization increases the fidelity, since they contribute only via the denominator (corresponding to the total decoherence rate).

Definition of thermalization fidelity

The above construction was done for damping in the Z basis. Generalizing to damping of all directions, and to arbitrary many spin sites, we now refine the definition to \[ F_1 = 1 - 2\sum_{j=1}^N\frac{\left\vert\textrm{Imag}\left[ M_{\hat S^x_j, \hat S^y_j} \right]\right\vert + \left\vert \textrm{Imag}\left[ M_{\hat S^x_j, \hat S^z_j}\right] \right\vert + \left\vert \textrm{Imag}\left[ M_{\hat S^y_j, \hat S^z_j}\right]\right\vert } {\sum_{i=1}^N\sum_{d\in[x,y,z]}M_{\hat S^d_i, \hat S^d_i} } . \] The index \(1\) refers to that the numerator includes only single-spin operators as operators \(\hat A_i\), such as \(\hat A_i=\hat S^x_2\). In the software, we use a factored approximation of the exact noise model, where higher-order noise operators are approximated by single-spin operators. This approximation includes only single-spin operators as the diagonals \(M_{\hat A_i, \hat A_i}\): the summation in the denominator is then done over all diagonal rates in the effective model.

The factoring approximation of the effective noise model can still include non-diagonal elements of type \( M_{\hat S^s_i \hat S^t_j,\hat S^u_k} \). These contributions can also cause deviations to the steady state in comparison to the fully mixed state, but with a smaller overall effect. A numerical analysis shows that the key terms stopping full thermalization come from terms of type \( M_{\hat S^x_i, \hat S^y_i \hat S^z_j} \), i.e., there is a matching spin index on two sides, associated with X and Y spin operators. According to this observation, we phenomenologically add a (second order) correction to the fidelity and finally define it as \[ F = F_1 - 2\sum_{i\neq j}\frac{\vert \textrm{Imag}\left[ M_{\hat S^x_i, \hat S^y_i \hat S^z_j}\right] \vert + \vert \textrm{Imag}\left[ M_{\hat S^y_i,\hat S^x_i \hat S^z_j}\right] \vert } {\sum_{k=1}^N\sum_{d\in[x,y,z]}M_{\hat S^d_k \hat S^d_k} } . \]

It should be noted that we are neglecting a possible contribution from other higher-order contributions of type \( M_{\hat S^s_i, \hat S^t_j \hat S^u_k} \). To keep track of the size of dropped terms, we also define a discarded weight, which is a sum of the absolute values of the non-diagonal rates, divided by the overall rate, i.e., the above denominator.