Error-tolerant quantum convolutional neural networks for
  symmetry-protected topological phases
The analysis of noisy quantum states prepared on current quantum computers is
getting beyond the capabilities of classical computing. Quantum neural networks
based on parametrized quantum circuits, measurements and feed-forward can
process large amounts of quantum data to reduce measurement and computational
costs of detecting non-local quantum correlations. The tolerance of errors due
to decoherence and gate infidelities is a key requirement for the application
of quantum neural networks on near-term quantum computers. Here we construct
quantum convolutional neural networks (QCNNs) that can, in the presence of
incoherent errors, recognize different symmetry-protected topological phases of
generalized cluster-Ising Hamiltonians from one another as well as from
topologically trivial phases. Using matrix product state simulations, we show
that the QCNN output is robust against symmetry-breaking errors below a
threshold error probability and against all symmetry-preserving errors provided
the error channel is invertible. This is in contrast to string order parameters
and the output of previously designed QCNNs, which vanish in the presence of
any symmetry-breaking errors. To facilitate the implementation of the QCNNs on
near-term quantum computers, the QCNN circuits can be shortened from
logarithmic to constant depth in system size by performing a large part of the
computation in classical post-processing. These constant-depth QCNNs reduce
sample complexity exponentially with system size in comparison to the direct
sampling using local Pauli measurements.
Petr Zapletal, Nathan A. McMahon, Michael J. Hartmann
# Error-tolerant quantum convolutional neural networks for symmetry-protected topological phases

###### Abstract

The analysis of noisy quantum states prepared on current quantum computers is getting beyond the capabilities of classical computing. Quantum neural networks based on parametrized quantum circuits, measurements and feed-forward can process large amounts of quantum data to reduce measurement and computational costs of detecting non-local quantum correlations. The tolerance of errors due to decoherence and gate infidelities is a key requirement for the application of quantum neural networks on near-term quantum computers. Here we construct quantum convolutional neural networks (QCNNs) that can, in the presence of incoherent errors, recognize different symmetry-protected topological phases of generalized cluster-Ising Hamiltonians from one another as well as from topologically trivial phases. Using matrix product state simulations, we show that the QCNN output is robust against symmetry-breaking errors below a threshold error probability and against all symmetry-preserving errors provided the error channel is invertible. This is in contrast to string order parameters and the output of previously designed QCNNs, which vanish in the presence of any symmetry-breaking errors. To facilitate the implementation of the QCNNs on near-term quantum computers, the QCNN circuits can be shortened from logarithmic to constant depth in system size by performing a large part of the computation in classical post-processing. These constant-depth QCNNs reduce sample complexity exponentially with system size in comparison to the direct sampling using local Pauli measurements.

## I Introduction

Existing noisy intermediate-scale quantum (NISQ) computers can perform computations that are challenging for classical computers [1]. However, quantum computing hardware and quantum algorithms need to be further developed to enable the exploitation of quantum computers in areas such as the simulation of many-body systems [2; 3] and machine learning [4]. One of the major challenges in developing scalable quantum computers is the characterization of noisy quantum data produced by near-term quantum hardware. With increasing system size, standard characterization techniques using direct measurements and classical post-processing become prohibitively demanding due to large measurement counts and computational efforts. While many local properties can be efficiently determined using randomized measurements [5], global properties of quantum states are typically hard to estimate.

Quantum machine learning techniques based on the direct processing of quantum data on quantum processors can substantially reduce the measurement costs, including quantum principle component analysis [6], quantum autoencoders [7; 8; 9], certification of Hamiltonian dynamics [10; 11], quantum reservoir processing [12]. Moreover, quantum neural networks based on parametrized quantum circuits, measurements and feed-forward can process large amounts of quantum data, to detect non-local quantum correlations with reduced measurement and computational efforts compared to standard characterization techniques [13; 14; 15; 16; 17]. A key requirement for employing quantum neural networks to characterize noisy quantum data produced by near-term quantum hardware is the tolerance to errors due to decoherence and gate infidelities.

The characterization of non-local correlations in quantum states is of key importance to condensed matter physics. It is required for the classification of topological quantum phases of matter [18; 19] and for understanding new strongly correlated materials [20] such as high-temperature superconductors [21]. Classical machine learning tools for the recognition of topological phases of matter have recently been studied, uncovering phase diagrams from data produced by numerical simulations [22; 23; 24] and measured in experiments [25; 26; 27; 28]. Moreover, quantum many-body states belonging to topological quantum phases have been prepared on quantum computers using exact matrix product state representations [29], unitary quantum circuits [30], and measurement and feed-forward [31]. Properties of topological phases have been probed on quantum computers by measuring characteristic quantities [29; 32] such as string order parameters (SOPs) [33; 34]. Classical machine learning algorithms have been shown to classify topological quantum phases from classical shadows formed by randomized measurements [35]. However, the rapidly increasing sample complexity with system size remains an outstanding problem for such approaches.

In Ref. [14], quantum convolutional neural networks (QCNNs) have been proposed to recognize symmetry-protected topological (SPT) phases [18; 19] with reduced sample complexity compared to the direct measurement of SOPs. Such QCNNs can be trained to identify characteristics of SPT phases from training data [14; 36; 37]. Alternatively, QCNNs can be analytically constructed to mimic renormalization-group flow [14; 38], a method for classifying quantum phases [20]. A shallow QCNN has been implemented on a 7-qubit superconducting quantum processor in Ref. [39]. This QCNN has exhibited robustness against incoherent errors on the NISQ de
vice which allowed for the recognition of a SPT phase with a higher fidelity than the direct measurement of SOPs. However, the propagation of errors leads to a rapid growth of error density in deeper QCNNs due to the reduction of qubit number from one QCNN layer to the next, which represents a central problem.

Here we overcome this problem by constructing QCNNs that can recognize SPT phases of a generalized cluster-Ising model in the presence of incoherent errors. Apart from recognizing SPT phases from topologically trivial phases as previously shown in Refs. [14; 37; 38; 39], we newly demonstrate that QCNNs constructed here can distinguish two SPT phases from one another.

Using matrix product state (MPS) simulations, we show that the QCNN output is robust against symmetry-breaking errors below a threshold error probability. This enables new quantum phase recognition capabilities for QCNNs in scenarios where SOPs and previous QCNN designs [14] are impractical. SOPs rapidly vanish with an increasing length for any probability of symmetry-breaking errors [40], whereas the QCNN proposed in Ref. [14] rapidly concentrates symmetry-breaking errors with increasing depth leading to a vanishing output for any error probability.

In addition to the tolerance to symmetry-breaking errors, the QCNNs constructed here tolerate all symmetry-preserving errors if the error channel is invertible. The error tolerance is limited close to phase boundaries due to diverging correlation lengths. Nonetheless, a sharp change in the QCNN output at the phase boundaries allows us to precisely determine critical values of Hamiltonian parameters.

To facilitate the implementation of QCNNs on near-term quantum computers, we show that the QCNN circuits constructed here can be shortened from logarithmic to constant depth in system size by efficiently performing a large part of the computation in classical post-processing. The output of the QCNNs corresponds to the expectation value of a multiscale SOP, which is a sum of products of individual SOPs. The multiscale SOP can, in principle, be determined using direct Pauli measurements on the input state without using any quantum circuit. However, the constant-depth QCNN circuits, we derive here, reduce the sample complexity of measuring the multiscale SOP exponentially with system size in comparison to direct Pauli measurements.

The remainder of this manuscript is structured as follows. In Sec. II, we introduce the generalized cluster-Ising model we consider before describing the construction of the QCNNs to analyze it in Sec. III. We investigate the robustness of the QCNN output against incoherent symmetry-preserving errors in Sec. IV and show how to design QCNNs that tolerate symmetry-breaking errors in Sec. V. We investigate the phase transition between two SPT phases in Sec. VI and study the tolerance to incoherent errors close to phase boundaries in Sec. VII. In Sec. VIII, we compare the sample complexity of QCNNs to the direct Pauli measurement of the input state before presenting concluding remarks and possible applications of error-tolerant QCNNs in Sec. IX.

## II Generalized cluster-Ising model

We consider a one-dimensional chain of \(N\) qubits with open boundary conditions described by the generalized cluster-Ising Hamiltonian

\[H= -J_{1}\sum_{j=2}^{N-1}\,C_{j}-J_{2}\sum_{j=3}^{N-2}D_{j}\] \[-h_{1}\sum_{j=1}^{N}\,X_{j}-h_{2}\sum_{j=1}^{N-1}\,X_{j}X_{j+1}, \tag{1}\]

where \(C_{j}=Z_{j-1}X_{j}Z_{j+1}\), \(D_{j}=Z_{j-2}X_{j-1}X_{j}X_{j+1}Z_{j+2}\), and \(X_{j}\) as well as \(Z_{j}\) are Pauli operators on qubit \(j\). The Hamiltonian exhibits a \(\mathbb{Z}_{2}\times\mathbb{Z}_{2}\) symmetry generated by \(P_{e/o}=\prod_{j=1}^{N/2}X_{2j/2j-1}\). The ground states of the Hamiltonian belong to one of four phases: a paramagnetic phase, an antiferromagnetic phase, a '\(ZXZ\)' SPT phase and a '\(ZXXXXZ\)' SPT phase [41]. The '\(ZXZ\)' ('\(ZXXXXZ\)') SPT phase contains the '\(ZXZ\)' ('\(ZXXXXZ\)') cluster state, which is a stabilizer state with stabilizer elements \(C_{j}\) (\(D_{j}\)) and thus the ground state for \(J_{2}=h_{1}=h_{2}=0\) (\(J_{1}=h_{1}=h_{2}=0\)). SPT phases are characterized by SOPs [33; 34]. In particular, the SOPs

\[S_{jk} =Z_{j}\left(\prod_{i=1}^{(k-j)/2}X_{j+2i-1}\right)Z_{k}, \tag{2}\] \[T_{jk} =Z_{j}X_{j+1}Y_{j+2}\left(\prod_{i=2}^{(k-j)/2-2}X_{j+2i}\right)Y_ {k-2}X_{k-1}Z_{k}, \tag{3}\]

attain non-vanishing values in the '\(ZXZ\)' SPT phase and the '\(ZXXXXZ\)' SPT phase, respectively.

## III Quantum convolutional neural networks

Our goal is to design QCNNs that detect the SPT phases of the generalized cluster-Ising model via quantum phase recognition, a process that identifies whether the ground states \(|\psi\rangle\) of the Hamiltonian (II) belong to a given quantum phase. To perform quantum phase recognition, we process the ground states \(|\psi\rangle\) with the QCNN depicted in Fig. 1a consisting of \(d\) convolutional layers, \(d\) pooling layers and a final fully connected layer. In each convolutional layer \(f=1,2,...,d\), a translationally invariant unitary \(V_{f}\) is applied. In a pooling layer, the system size is reduced by measuring a fraction of qubits and applying feed-forward gates \(W_{f}\) conditioned on the measurement outcomes on the remaining qubits. In this
work, we consider the reduction of system size by a factor of three in each pooling layer. As a result, the maximal depth \(d=\lfloor\log_{3}N\rfloor\) of the QCNN is logarithmic in system size \(N\). In the fully connected layer, a general unitary \(V_{\text{FC}}\) is performed on all remaining qubits and the qubits are read out labeling whether the ground state \(|\psi\rangle\) belongs to a given SPT phase or not.

For each SPT phase, we construct the QCNN depicted in Fig. 1b by generalizing the procedure proposed in Ref. [14]. First, we identify a characteristic state belonging to each SPT phase. For the '\(ZXZ\)' ('\(ZXXXZ\)') SPT phase this is the '\(ZXZ\)' ('\(XXXXZ\)') cluster state, which can be mapped onto a product state by a disentangling unitary \(U^{\dagger}\) consisting of two (four) layers of two-qubit gates between neighboring qubits, see Appendix B for details. The convolutional layers of the QCNN consist of the disentangling unitary \(U^{\dagger}_{N/3^{f-1}}\) mapping the corresponding cluster state on \(N/3^{f-1}\) qubits onto a product state and the entangling unitary \(U_{N/3^{f}}\) mapping the product state on a sublattice with \(N/3^{f}\) qubits onto the cluster state. As a result, we obtain the cluster state for a reduced system size after the measurement of the remaining qubits in each pooling layer. By construction, the cluster state is a fixed point of the QCNN circuit.

Next, we make all states belonging to the '\(ZXZ\)' ('\(ZXXXZ\)') SPT phase flow towards the '\(ZXZ\)' ('\(ZXXXZ\)') cluster state with the increasing depth of the QCNN. To this end, we implement in pooling layers a procedure that is analogous to quantum error correction (QEC), identifying perturbations away from the cluster state as errors. These errors are detected by measurements in the pooling layers and corrected by feed-forward gates \(W_{f}\) on the remaining qubits which are conditioned on the measurement outcomes. A measurement and a feed-forward gate can be replaced by an entangling gate and tracing out of the "measured" qubits. Using this equivalence, we represent the QEC procedure in each pooling layer \(f\) as a unitary \(\text{QEC}_{f}\) as depicted in Fig. 1b. It has been shown in Ref. [14] that by correcting \(X_{j}\) and \(X_{j}X_{j+1}\) errors one can make all pure ground states of the cluster-Ising Hamiltonian belonging to the '\(ZXZ\)' SPT phase (for \(J_{2}=0\)) flow towards the '\(ZXZ\)' cluster state. In this way, the QCNN mimics a renormalization-group flow [20].

In the fully connected layer, we measure stabilizer elements, i.e. either \(C_{j}\) or \(D_{j}\) for the '\(ZXZ\)' phase or the '\(ZXXXZ\)' SPT phase, respectively. This measurement is performed by applying the disentangling unitary \(U^{\dagger}_{N/3^{d}}\) and reading out all remaining qubits in the \(X\) basis. For system size \(N\) and depth \(d\), we have \(m=\lfloor N/3^{d}\rfloor\) output qubits. The QCNN output

\[y=\frac{1}{m}\sum_{j=-(m-1)/2}^{(m-1)/2}\langle X_{\frac{N+1}{2}+j\cdot 3^{ d}}\rangle \tag{4}\]

is thus the expectation value of \(X\) averaged over the \(m\) output qubits.

Before discussing the performance of the constructed QCNNs in the presence of noise due to decoherence and gate infidelities on NISQ devices, we make a crucial ob

Figure 1: Quantum convolutional neural network (QCNN). (a) QCNN quantum circuit consisting of \(d\) convolutional layers, \(d\) pooling layers and a final fully connected (FC) layer. The measurement of the output qubits labels whether the input state \(\rho\) belongs to a given SPT phase. (b) QCNN circuit mimicking renormalization-group flow. In each convolutional layer \(f=1,2,...,d\), a disentangling unitary \(U^{\dagger}_{N/3^{f-1}}\) and an entangling unitary \(U_{N/3^{f}}\) are applied on sublattices with \(N/3^{f-1}\) qubits and \(N/3^{f}\) qubits, respectively. In each pooling layer \(f\), a quantum-error-correction unitary \(\text{QEC}_{f}\) is performed on a sublattice with \(N/3^{f-1}\) qubits. In the fully connected layer, a disentangling unitary \(U^{\dagger}_{N/3^{d}}\) is applied. At the end, \(\lfloor N/3^{d}\rfloor\) qubits are measured in the \(X\) bases. (c) QCNN circuit equivalent to (b) consisting of a constant-depth quantum circuit \(U^{\dagger}_{N}\), the measurement of all qubits in the \(X\) basis and classical post-processing. The label of the quantum phase is determined as a Boolean function \(G(x)\) of the measured bit strings \(x\).
servation allowing for a substantial shortening of the QCNN circuits. A large part of the QCNN circuits depicted in Fig. 1b can be efficiently implemented in classical post-processing if the QEC procedures \(\widetilde{\text{QEC}}_{f}=U_{N/3^{\prime}}^{\dagger}\text{QEC}_{f}U_{N/3^{ \prime}}\) transformed by the entangling unitaries \(U_{N/3^{\prime}}\) map \(X\)-basis eigenstates \(\ket{x}\) onto other \(X\)-basis eigenstates \(\ket{x^{\prime}}\)

\[\widetilde{\text{QEC}}_{f}\ket{x}\propto\ket{x^{\prime}}. \tag{5}\]

In this case, the QCNNs are equivalent to a constant depth quantum circuit consisting of the disentangling unitary \(U_{N}^{\dagger}\), the measurement of all qubits in the \(X\) basis and classical post-processing as depicted in Fig. 1c. See Appendix B for the derivation of these equivalent QCNN circuits. In these equivalent QCNN circuits, only the first convolutional layer is implemented on a quantum computer. The remaining convolutional layers, all pooling layers and the fully connected layer are implemented after the measurement of all qubits in classical post-processing as a bit-string-valued Boolean function \(G(x)=x^{\prime}\) of the measured bit strings \(x=x_{1}x_{2}\ldots x_{N}\), where \(x_{j}=0,1\) corresponds to measuring \(X_{j}=+1,-1\). Errors perturbing the cluster states lead to flipped measurement outcomes after the disentangling unitary \(U_{N}^{\dagger}\). These error syndromes are then corrected in classical post-processing.

Note that the QCNN proposed in Ref. [14] satisfies the condition (5) and its equivalent QCNN circuit consisting of a constant-depth quantum circuit, measurement and classical post-processing has been developed and experimentally realized in Ref. [39].

In this work, we consider the equivalent QCNN circuits depicted in Fig. 1c. First, we numerically obtain the ground states of the Hamiltonian (1) in the thermodynamic limit using the infinite density matrix renormalization group (iDMRG) algorithm [42], see Appendix A for details. Next, we perform the constant-depth quantum circuit on the infinite MPSs by sequentially applying two-qubit gates between neighboring qubits. Then, we sample \(M_{S}\) outcomes of the measurement of \(N\) qubits from the infinite MPSs. Finally, we determine the QCNN output \(y\) from the measured bit strings \(x\) using the Boolean function \(G(x)\) as

\[y=\frac{1}{m}\frac{1}{M_{S}}\sum_{j=-(m-1)/2}^{(m-1)/2}\sum_{x}\left[1-2\,G(x) _{\frac{N+1}{2}+j\cdot 3^{4}}\right]. \tag{6}\]

## IV Tolerance to symmetry-preserving errors

NISQ computers operate in the presence of noise due to decoherence and gate infidelities. To enable the exploitation of QCNNs as a characterization tool for NISQ computers, it is thus crucial to investigate the effects of noise on the performance of QCNNs and to construct QCNNs whose output is robust against noise.

We expect that the preparation of typical many-body ground states \(\ket{\psi}\) will require substantially deeper quantum circuits than the QCNNs considered in this work which can be implemented in very short constant depth as discussed above. We thus focus on the robustness of QCNNs against errors that occur during the preparation of many-body ground states \(\ket{\psi}\) on NISQ devices and neglect errors occurring during the QCNN circuits. To simulate the preparation errors, we consider an error channel

\[\rho=\mathcal{E}(\ket{\psi}\bra{\psi})=\sum_{l=0}^{m}K_{l}\ket{\psi}\bra{\psi} K_{l}^{\dagger}, \tag{7}\]

where \(K_{l}\in\{\sqrt{p_{\texttt{x}}}\texttt{1},\sqrt{p_{X}}X,\sqrt{p_{Y}}Y,\sqrt{p_{ Z}}Z\}^{\otimes N}\) are Kraus operators, \(p_{E}\) are probabilities of Pauli errors \(E=X,Y,Z\) and \(p_{\texttt{1}}+p_{X}+p_{Y}+p_{Z}=1\). For \(p_{X}=p_{Y}=p_{Z}\), this error channel describes single-qubit depolarizing noise.

We formulate quantum phase recognition on NISQ devices as a task to identify whether the exact ground state \(\ket{\psi}\) belongs to a given quantum phase provided access only to the noisy state \(\rho\), which approximates \(\ket{\psi}\). We now discuss how to design QCNNs tolerating different types of errors and their ability to recognize an SPT phase for the example of the '\(ZXZ\)' phase.

We start by investigating the performance of the QCNN proposed in Ref. [14] in the presence of incoherent \(X\) errors described by the error channel (7) with

Figure 2: QCNN with \(X\)-error correcting layers detecting the ‘\(ZXZ\)’ phase. The QCNN circuit consists of a constant-depth quantum circuit, the measurement of all qubits in the \(X\) basis and classical post-processing. The quantum circuit performs the disentangling unitary \(U_{N}^{\dagger}\) consisting of controlled \(Z\) gates between neighboring qubits. The outcomes \(x\) of the measurement in the \(X\) basis are processed by the Boolean function \(G(x)\), expressed as a logic circuit in terms of AND and XOR gates. The logic circuit is composed of \(d\) layers correcting the syndromes of \(X\) errors. Red and purple lines show the propagation of \(X\) errors and \(Z\) errors, respectively, through the QCNN circuit. The \(X\)-error syndrome is corrected by the XOR gate marked in red.
\(p_{Y}=p_{Z}=0\). We use the compact implementation as a quantum circuit consisting of the disentangling unitary \(U_{N}^{\dagger}\), the measurement of all qubits in the \(X\) basis and classical post-processing. We show the QCNN circuit in Fig. 2. The disentangling unitary \(U_{N}^{\dagger}\) consists of controlled \(Z\) gates between neighboring qubits. The outcomes \(x\) of the measurement in the \(X\) basis are processed by the Boolean function \(G(x)\) which is expressed as a logic circuit in terms of AND and XOR gates, see Fig. 2. The key feature of the QCNN is that it identifies and corrects perturbations away from the '\(ZXZ\)' cluster state. In particular, it corrects coherent \(X_{j}\) and \(X_{j}X_{j+1}\) errors which drive perturbations away from the cluster state to other ground states of the Hamiltonian (1) [14]. The logic circuit is composed of \(d\) layers \(f=1,2,...,d\), which correspond to the \(X\)-error correcting \(\widetilde{\text{QEC}}_{f}\) procedures transformed by the disentangling unitary \(U_{N}^{\dagger}\).

We plot in Fig. 3 the QCNN output across a cut through the phase diagram as a function of \(h_{2}/J_{1}\) for fixed \(h_{1}/J_{1}=0.5\) and \(J_{2}=0\) for different depths \(d\) of the QCNN. We can see that the QCNN output converges to unity with the increasing depth of the QCNN in the '\(ZXZ\)' SPT phase but vanishes with the increasing depth outside of the SPT phase. This demonstrates our first observation that QCNNs can tolerate incoherent \(X\) errors since their QEC procedures can correct not only coherent perturbations, that transform the cluster state to another ground state in the SPT phase, but also incoherent errors.

The QCNN output converges to ideal noise-free values with increasing depth \(d\) for any probability \(p_{X}\neq 0.5\) of incoherent \(X\) errors, since the error channel is invertible for these cases. For \(p_{X}=0.5\) the situation is qualitatively different as the error channel (7) is not invertible. Invertible symmetry-preserving error channels for \(p_{X}\neq 0.5\) preserve SPT order [40]. In contrast, the non-invertible error channel for \(p_{X}=0.5\) completely washes out SPT order as

\[\mathcal{E}^{\dagger}(S_{jk})=(1-2p_{X})^{2}S_{jk}=0, \tag{8}\]

for all \(j\) and \(k\), where \(\mathcal{E}^{\dagger}(\cdot)=\sum_{l=0}^{m}K_{l}^{\dagger}\cdot K_{l}\) is the adjoint channel to Eq. (7). As a result, also the QCNN output vanishes for any input ground state and any depth \(d\).

We conclude that QCNNs recognizing the '\(ZXZ\)' SPT phase can tolerate symmetry-preserving \(X\) errors, provided that the error channel is invertible.

## V Tolerance to symmetry-breaking errors

Since noise in NISQ devices typically does not preserve the symmetries of problem Hamiltonians, it is important to investigate the robustness of QCNNs against symmetry-breaking errors.

While coherent and incoherent \(X\) errors are tolerated by the QCNN designed in Ref. [14], the situation is fundamentally different for incoherent \(Z\) errors as they break the \(\mathbb{Z}_{2}\times\mathbb{Z}_{2}\) symmetry of the Hamiltonian (1). \(Z\) errors described by the error channel (7) with \(p_{X}=p_{Y}=0\) lead to a decrease of the SOPs

\[\mathcal{E}^{\dagger}(S_{jk})=(1-2p_{Z})^{\frac{L-1}{2}}S_{jk}, \tag{9}\]

which scales exponentially with their length \(L=k-j+1\). As a result, the SOPs rapidly vanish with the increasing length \(L\) for any finite (non-unity) \(Z\)-error probability \(p_{Z}\neq 0,1\).

Similarly to SOPs, the original design [14] of the QCNN depicted in Fig. 2 is substantially affected by \(Z\) errors. The syndrome of a \(Z_{j}\) error, i.e., the flipped outcome \(x_{j}\) of the measurement in the \(X\) basis, is denoted in Fig. 2 by a purple line. In contrast to \(X\)-error syndromes that are corrected (see red lines in Fig. 2), \(Z\)-error syndromes (purple line) propagate through the QCNN circuit, see Appendix C for mode details. As the system size is reduced by a factor of three in each layer, the density of \(Z\)-error syndromes increases with the increasing depth of the QCNN. As a result, the output of the QCNN rapidly decreases with the depth \(d\) both in the '\(ZXZ\)' SPT phase and outside of the phase for any finite probability \(p_{Z}\neq 0,1\).

To perform quantum phase recognition on NISQ devices, QCNNs thus need to be robust against symmetry-breaking errors. To this end, we construct a new QCNN depicted in Fig. 4 by alternating the original \(X\)-error correcting layers with new \(Z\)-error correcting layers. The \(Z\)-error correcting layer \(f\) consists of a new QEC procedure that can be efficiently implemented in classical post-processing as the majority function

\[M(x_{j-7.3^{f-1}},x_{j},x_{j+7.3^{f-1}})=\] \[[(x_{j-7.3^{f-1}}\oplus x_{j})\wedge(x_{j}\oplus x_{j+7.3^{f-1}}) ]\oplus x_{j}, \tag{10}\]

Figure 3: QCNN consisting of \(X\)-error correcting layers for the ground states of the cluster-Ising Hamiltonian (1) perturbed by incoherent \(X\) errors. The QCNN output as a function of \(h_{2}/J_{1}\) and different depths \(d\) of the QCNN. The orange region denotes the ‘\(ZXZ\)’ phase. (Parameters: \(h_{1}/J_{1}=0.5\), \(J_{2}=0\), \(N=1215\), \(p_{X}=0.1\), \(p_{Y}=p_{Z}=0\), \(M_{S}=10^{4}\))
where \(\wedge\) is the AND gate and \(\oplus\) is the XOR gate, see Fig. 4. The majority function \(M(x_{j-7.3^{f-1}},x_{j},x_{j+7.3^{f-1}})\) returns the value of the majority of the three bits \(x_{j-7.3^{f-1}}\), \(x_{j}\), and \(x_{j+7.3^{f-1}}\). It thus removes isolated error syndromes, see purple lines in Fig. 4 and Appendix C for more details. The corresponding QEC unitary is described in Appendix B.

We start by investigating the QCNN with alternating \(X\)- and \(Z\)-error correcting layers for the '\(ZXZ\)' cluster state perturbed by incoherent \(Z\) errors as the input state. We plot in Fig. 5 the QCNN output as a function of the \(Z\)-error probability \(p_{Z}\). We can see an alternating QCNN output after odd and even layers. \(Z\) errors propagate through odd, \(X\)-error correcting layers and, as the system size is reduced by a factor of three, the density of \(Z\) errors increases. This error concentration leads to the decrease of the QCNN output after odd layers, compare blue and red lines in Fig. 5. In contrast, even layers correct \(Z\) errors leading to the decrease of their density and the increase in the QCNN output. We find that the QCNN can tolerate \(Z\) errors for error probabilities \(p_{Z}\) below a threshold \(p_{\rm th}=0.054\) as the error correction in even layers dominates over the error concentration in odd layers leading to a net increase of the QCNN output after every two layers, see blue lines in Fig. 5. On the other hand, \(Z\) errors cannot be tolerated above the threshold since the error concentration dominates over the error correction leading to a net decrease of the QCNN output. See Appendix C for the derivation of the threshold error probability \(p_{\rm th}\). This shows that implementing a \(Z\)-error correcting layer after each \(X\)-error correcting layer prevents the concentration of symmetry-breaking \(Z\) errors below the threshold error probability.

We now study the error tolerance of QCNNs with alternating layers for different ground states of the cluster-Ising Hamiltonian. We consider a depolarizing channel with \(p_{X}=p_{Y}=p_{Z}\) describing the presence of \(X\) errors, \(Z\) errors and their simultaneous appearance \(Y=iXZ\), representing a typical situation for NISQ devices. We plot in Fig. 6a the QCNN output for different ground states as a function of \(h_{2}/J_{1}\) and different depths \(d\) of the QCNN. We can see that the QCNN tolerates the incoherent errors as the QCNN output converges to unity with the increasing depth \(d\) in the SPT phase and it vanishes outside of the SPT phase.

The two types of layers in the QCNN play complementary roles. The \(X\)-error correcting layers implement renormalization-group flow with states belonging to the '\(ZXZ\)' phase flowing towards the '\(ZXZ\)' cluster state and states outside of the '\(ZXZ\)' phase diverging from it. The \(X\)-error correcting layers are thus crucial for recognizing the '\(ZXZ\)' phase. In contrast, the \(Z\)-error correcting layers reduce the density of error syndromes by removing syndromes due to symmetry-breaking errors. As a result, the \(Z\)-error correcting layers equip the QCNNs with the tolerance to symmetry-breaking errors, see Fig. 6a.

We now show that the QCNNs with alternating \(X\)- and \(Z\)-error correcting layers can perform phase recognition provided that the probability of errors in the prepared states is below the threshold \(p_{\rm th}\). To this end we plot the QCNN output for the depth \(d=4\) as a function of

Figure 5: QCNN consisting of alternating layers correcting \(X\) errors and \(Z\) errors for the ‘\(ZXZ\)’ cluster state perturbed by symmetry-breaking \(Z\) errors. The QCNN output as a function of the error probability \(p_{Z}\) of \(Z\) errors for different depths \(d\). The black dashed line shows the threshold error probability \(p_{\rm th}=0.054\). (Parameters: \(N=1215\), \(M_{S}=10^{4}\), \(p_{X}=p_{Y}=0\))

Figure 4: QCNN with alternating layers correcting \(X\) errors and \(Z\) errors for detecting the ‘\(ZXZ\)’ phase. The QCNN circuit consists of a constant-depth quantum circuit, the measurement of all qubits in the \(X\) basis and classical post-processing. The quantum circuit performs the disentangling unitary \(U_{N}^{\dagger}\) consisting of controlled \(Z\) gates between neighboring qubits. The outcomes \(x\) of the measurement in the \(X\) basis are processed by the Boolean function \(G(x)\) expressed as a logic circuit in terms of AND and XOR gates as well as of the majority function \(M\). The decomposition of the majority function \(M\) into AND and XOR gates is shown on the right. Red and purple lines show the propagation of \(X\) errors and \(Z\) errors, respectively, through the QCNN circuit. The logic circuit consists of \(d\) layers \(f=1,2,...,d\). Odd layers \(f\) correct the syndromes of \(X\) errors (see the XOR gate marked in red) and even layers \(f\) correct the syndromes of \(Z\) errors (see the majority function \(M\) marked in purple).
\(h_{1}/J_{1}\) and \(h_{2}/J_{1}\) in Fig. 6b in the presence of depolarizing noise. We can see that the QCNN output attains near unity value in the '\(ZXZX\)' phase and vanishing value outside of the '\(ZXZ\)' phase. The abrupt change of the QCNN output from near unity values to vanishing values coincides with the phase boundary (black crosses) determined by iDMRG simulations, see Appendix A for more details.

In contrast to the QCNN, SOPs \(S_{jk}\) are significantly suppressed in the presence of incoherent errors. We plot in Fig. 6c SOPs \(S_{jk}\) as a function of \(h_{2}/J_{1}\) for different lengths \(L\) in the presence of depolarizing noise. We can see that the SOPs rapidly vanish both in the '\(ZXZ\)' SPT phase and outside of the phase with the increasing length \(L\).

In conclusion, the QCNN constructed here recognizes the '\(ZXZ\)' SPT phase in the presence of symmetry-breaking errors below the threshold error probability \(p_{\rm th}\). In contrast, SOPs rapidly vanish with the increasing length for any finite probability of symmetry-breaking errors. The previously considered QCNN of Ref. [14] cannot tolerate symmetry-breaking errors either as its output decreases with the increasing depth for any error probability. As a result, it cannot recognize the SPT phase in the presence of symmetry-breaking errors.

## VI '\(Zxxxz\)' symmetry-protected topological phase

We now discuss the extension of phase recognition capabilities of the error-tolerant QCNNs we introduced to distinguish the '\(ZXXXZ\)' SPT phase from topologically trivial phases as well as the '\(ZXZ\)' and '\(ZXXXZ\)' SPT phases from one another.

Similarly, as for the '\(ZXZ\)' SPT phase, we construct a QCNN which detects the '\(ZXXXZ\)' phase from the topologically trivial paramagnetic and antiferromagnetic phases. Now the convolutional layer consists of a disentangling unitary \(\tilde{U}_{N}^{\dagger}\) mapping the '\(ZXXXXZ\)' cluster state onto a product state. The QEC procedures are amended to correct \(X_{j}\) and \(X_{j}X_{j+1}\) errors perturbing the '\(ZXXXXZ\)' cluster state, see Appendix D for more details about the QCNN for the '\(ZXXXXZ\)' phase. To equip the QCNN with the tolerance to state preparation errors, we again employ the procedure correcting \(Z_{j}\) errors based on the majority function of Eq. (10). In contrast to the disentangling circuit \(U_{N}^{\dagger}\) for the '\(ZXZ\)' cluster state, which commutes with \(Z_{j}\) errors, the disentangling unitary \(\tilde{U}_{N}^{\dagger}\) for the '\(ZXXXXZ\)' cluster state maps \(Z_{j}\) errors onto the errors \(\tilde{U}_{N}^{\dagger}Z_{j}\tilde{U}_{N}=Y_{j-1}Z_{j}Y_{j+1}\), which flip the measurement outcomes \(x_{j-1}\), \(x_{j}\) and \(x_{j+1}\) on the three qubits \(j-1\), \(j\) and \(j+1\). Due to this multiplication of symmetry-breaking errors, the threshold probability \(\tilde{p}_{\rm th}=0.018\) is reduced compared to \(p_{\rm th}=0.054\) for the '\(ZXZ\)' SPT phase.

We now investigate QCNNs capable of distinguishing the '\(ZXZ\)' phase and the '\(ZXXXX\)' phase from one another. We consider ground states of the cluster-Ising Hamiltonian (1) for non-vanishing \(J_{1}\) and \(J_{2}\). We choose \(h_{1}=0\) and \(h_{2}/J_{2}=0.1\) that represent generic values of the Hamiltonian parameters for which the model cannot be mapped onto non-interacting fermions [41]. We determine the phase boundary between the '\(ZXZ\)' phase and the '\(ZXXXXZ\)' phase to be located at \(J_{1}/J_{2}=0.95\) via iDMRG simulations.

We start with a QCNN recognizing the '\(ZXZ\)' phase from the '\(ZXXXXZ\)' phase. Before showing the results, we explain the construction of this QCNN, which requires identifying the perturbations driving the ground

Figure 6: Recognition of ‘\(ZXZ\)’ SPT phase by QCNN consisting of alternating layers correcting \(X\) errors and \(Z\) errors for ground states of the Hamiltonian (1) perturbed by depolarizing noise. (a) The QCNN output \(y\) on the cut through the phase diagram as a function of \(h_{2}/J_{1}\) for different depths \(d\) of the QCNN. (b) The QCNN output \(y\) as a function of \(h_{1}/J_{1}\) and \(h_{2}/J_{1}\) for the depth \(d=4\). Black crosses show the phase boundary identified using iDMRG simulations. (c) String order parameters (SOPs) \(S_{jk}\) on the cut through the phase diagram as a function of \(h_{2}/J_{1}\) for different lengths \(L=k-j+1\). The orange regions denote the ‘\(ZXZ\)’ phase. [Parameters: \(p_{X}=p_{Y}=p_{Z}=0.015\), \(M_{S}=10^{4}\), \(J_{2}=0\); (a) \(N=1215\), \(h_{1}/J_{1}=0.5\); (b) \(N=135\); (c) \(h_{1}/J_{1}=0.5\)].
states for non-vanishing \(h_{2}\) and \(J_{2}\) away from the characteristic '\(ZXZ\)' cluster state. These perturbations include the \(X_{j}X_{j+1}\) interactions and the stabilizer elements \(D_{j}\). The \(X_{j}X_{j+1}\) interactions are corrected by the original \(X\)-error correcting procedure. The \(D_{j}\) stabilizer elements are mapped by the disentangling unitary onto \(U_{N}^{\dagger}D_{j}U_{N}=-Y_{j-1}X_{j}Y_{j+1}\), which lead to the same syndromes after the measurement of all qubits in the \(X\) basis (flipped measurement outcomes at qubits \(j-1\) and \(j+1\)) as \(X_{j}\) perturbations, for which \(U_{N}^{\dagger}X_{j}U_{N}=Z_{j-1}X_{j}Z_{j+1}\). As a result, the QCNN depicted in Fig. 2 constructed in the previous section for correcting \(X_{j}\) and \(X_{j}X_{j+1}\) perturbations, corrects \(D_{j}\) perturbations as well and can be readily used to recognize the '\(ZXZ\)' phase from the '\(ZXXXZ\)' phase. To achieve tolerance to state preparation errors on NISQ devices, we can thus alternate the \(X\)-error correcting layers with \(Z\)-error correcting layers in the same way as depicted in Fig. 4.

We plot the QCNN output (blue lines) as a function of \(J_{1}/J_{2}\) in Fig. 7 for different depths of the QCNN in the presence of depolarizing noise. We can see that the QCNN detects the '\(ZXZ\)' phase as its output converges to unity in the phase (\(J_{1}/J_{2}>0.95\)) and vanishes in the '\(ZXXXZ\)' phase (\(J_{1}/J_{2}<0.95\)).

We now discuss the construction of a QCNN recognizing the '\(ZXXXZ\)' phase from the '\(ZXZ\)' phase. Here, the stabilizer elements \(C_{j}\) and \(X_{j}X_{j+1}\) interactions play the role of perturbations away from the '\(ZXXXZ\)' cluster state. The disentangling unitary \(\hat{U}_{N}^{\dagger}\) for the '\(ZXXXZ\)' cluster state maps the \(C_{j}\) perturbations onto \(\hat{U}_{N}^{\dagger}C_{j}\hat{U}_{N}\propto Y_{j-1}X_{j}Y_{j+1}\). The \(C_{j}\) perturbations have different syndromes after the measurement of all qubits in the \(X\) basis than \(X_{j}\) and \(X_{j}X_{j+1}\) perturbations, \(\hat{U}_{N}^{\dagger}X_{j}\hat{U}_{N}=Y_{j-2}X_{j-1}X_{j}X_{j+1}Y_{j+2}\) and \(\hat{U}_{N}^{\dagger}X_{j}X_{j+1}\tilde{U}_{N}=Y_{j-2}Z_{j-1}Z_{j+2}Y_{j+3}\). As a result, we need to amend the QEC procedures to correct the \(C_{j}\) perturbations, see Appendix B for more details about this procedure. The \(C\)-error correcting procedure also corrects \(X_{j}X_{j+1}\) perturbations and \(X_{j}\) perturbations, where the latter now come about only due to noise on NISQ devices, see Appendix D for more details. To achieve tolerance to incoherent \(Z_{j}\) errors, we alternate the \(C\)-error correcting layers with \(Z\)-error correcting layers. We plot the resulting QCNN output (brown lines) as a function of \(J_{1}/J_{2}\) in Fig. 7 for different depths of the QCNN in the presence of depolarizing noise. We can see that the QCNN detects the '\(ZXXXZ\)' phase as its output converges to unity in the phase \(J_{1}/J_{2}<0.95\) and vanishes in the '\(ZXZ\)' phase \(J_{1}/J_{2}>0.95\).

We have thus demonstrated that the error-tolerant QCNNs we introduced can recognize not only topological phases from topologically trivial phases but also two topological phases from one another. To this end, the QCNN for the '\(ZXXXZ\)' phase needed to be amended to correct \(C_{j}\) perturbations whereas the original QCNN for the '\(ZXZ\)' phase was already capable of correcting \(D_{j}\) perturbations.

## VII Phase boundary

So far, we have shown that the QCNNs we consider can recognize SPT phases in the presence of incoherent errors. We now investigate the tolerance of incoherent errors close to phase boundaries. Precisely detecting phase boundaries is one of the major challenges of many-body physics due to diverging correlation lengths and the rapid growth of entanglement in their vicinity [20; 43].

In Fig. 8a we plot the output of the QCNN for the '\(ZXZ\)' phase close to a phase boundary between the '\(ZXZ\)' phase and the paramagnetic phase in the presence of depolarizing noise. We can see that the QCNN tolerates incoherent errors well in the SPT phase as its output converges to unity with the increasing depth \(d\). On the other hand, close to the phase boundary the QCNN does not tolerate incoherent errors as its output decreases with the increasing depth \(d\). We thus observe that while symmetry-preserving \(X\) errors can be tolerated for any ground state, the tolerance to symmetry-breaking errors is limited close to phase boundaries.

To quantify the behavior close to the phase boundary further, we investigate the probability \(p_{Z}\) of symmetry-breaking \(Z\) errors which can be tolerated for each ground state belonging to the '\(ZXZ\)' phase as we approach the phase boundary with the paramagnetic phase. To do so, we determine the threshold error probability \(p_{\rm th}\) below which the QCNN output converges to unity and above which the output decreases. We plot in Fig. 9 the threshold error probability \(p_{\rm th}\) (red dots) as a function of the correlation length \(\xi\) of the ground states [44]. We can see that the threshold error probability decreases with the correlation length. We fit this decrease by the ex

Figure 7: Distinguishing the ‘\(ZXZ\)’ SPT phase and the ‘\(ZXXXZ\)’ SPT phase. The QCNN output as a function of \(J_{1}/J_{2}\) for different depths \(d\) of the QCNN for ground states perturbed by depolarizing noise. The QCNN with alternating \(X\)-error correcting layers and \(Z\)-error correcting layers (blue lines) as well as the QCNN with alternating \(C\)-error and \(Z\)-error correcting layers (brown lines). (Parameters: \(N=1215\), \(M_{S}=10^{3}\), \(h_{1}/J_{2}=0\), \(h_{2}/J_{2}=0.1\), \(p_{X}=p_{Y}=p_{Z}=0.01\))
ponential function \(p_{\rm th}=p_{\rm th}^{0}\exp(-\xi/\bar{\xi})\) with the fitted parameters \(p_{\rm th}^{0}\) and \(\bar{\xi}\) in Tab. 1. We can see in Fig. 9 a similar exponential decrease of the threshold probability \(p_{\rm th}\) close to the phase boundaries between the '\(ZXXXXZ\)' phase and the paramagnetic state (gray diamonds) as well as between the '\(ZXXXXZ\)' phase and the '\(ZXZ\)' phase (green triangles). The error tolerance is thus strongly suppressed close to all phase boundaries when the correlation length exceeds the characteristic value \(\bar{\xi}\approx 26\), c.f. Tab. 1.

To identify the phase boundary between the '\(ZXZ\)' phase and the paramagnetic phase in the presence of symmetry-breaking errors, we plot in Fig. 8b the slope \(\partial x/\partial h_{2}\) of the QCNN output \(y\) with respect to the Hamiltonian parameter \(h_{2}\) for different depths \(d\) of the QCNN. We can see a sharp dip in the slope of the QCNN output precisely located at the phase boundary. The dip becomes more pronounced with the increasing depth \(d\) of the QCNN. This shows that while the QCNN output decreases with the increasing depth \(d\) close to the phase boundary, see Fig. 8a, we can still precisely identify the phase boundary as a sharp dip in the slope of the QCNN output. We can see in Fig. 6b that the abrupt change of the QCNN output coincides with the phase boundary (black crosses) determined using iDMRG in the entire phase diagram (\(J_{2}=0\)). We also observe that the slope of the QCNN output exhibits a sharp dip (or peak) at all other phase boundaries of the generalized cluster-Ising model also for \(J_{2}\neq 0\) (not shown here).

In stark contrast to these characteristics, individual SOPs and their slopes are largely suppressed for any finite probability of symmetry-breaking errors. We plot in Fig. 8c the slope \(\partial S_{jk}/\partial h_{2}\) of the SOPs with respect to the Hamiltonian parameter \(h_{2}\) for different lengths \(L=k-j+1\). We can see that the slope of the SOPs cannot be distinguished from sampling noise for the number of samples \(M_{S}=10^{4}\). Crucially, the slope of the SOPs does not become more pronounced with increasing length \(L\). As a result, one cannot use the SOPs to determine the phase boundary in the presence of symmetry-breaking noise.

In conclusion, the tolerance of the considered QCNNs to symmetry-breaking errors is limited close to phase boundaries due to diverging correlation lengths. Nonetheless, we can precisely determine critical values

Figure 8: Detecting the phase boundary between the ‘\(ZXZ\)’ phase and the paramagnetic phase in the presence of depolarizing noise. (a) The output of the QCNN with alternating layers correcting \(X\) errors and \(Z\) errors close to the phase boundary as a function of \(h_{2}/J_{1}\) for different depths \(d\). (b) Slope of the QCNN output \(\partial y/\partial h_{2}\) with respect to the Hamiltonian parameter \(h_{2}\). (c) Slope of SOPs \(\partial S_{jk}/\partial h_{2}\) with respect to the Hamiltonian parameter \(h_{2}\) close to the phase boundary as a function of \(h_{2}/J_{1}\) for different lengths \(L=k-j+1\). The orange regions denote the ‘\(ZXZ\)’ phase. [Parameters: \(M_{S}=10^{4}\), \(h_{1}/J_{1}=0.5\), \(J_{2}=0\), \(p_{X}=p_{Y}=p_{Z}=0.015\); (a) and (b) \(N=1215\)]

Figure 9: Tolerance to incoherent errors close to phase boundaries. The plot shows the threshold probability \(p_{\rm th}\) of symmetry-breaking errors as a function of the correlation length \(\xi\) in the vicinity of phase boundaries between the ‘\(ZXZ\)’ phase and the paramagnetic phase (red dots), the ‘\(ZXXXXZ\)’ phase and the paramagnetic phase (gray diamonds), and the ‘\(ZXXXXZ\)’ phase and the ‘\(ZXZ\)’ phase (green triangles). Solid lines show fitted exponential functions and dashed lines show threshold error probabilities of corresponding cluster states. [Parameters: \(N=1215\), \(M_{S}=10^{5}\), \(h_{1}/J_{1}=0.5\) and \(J_{2}=0\) (red dots), \(h_{1}/J_{2}=0.5\) and \(J_{1}=0\) (gray diamonds), \(h_{1}=0\) and \(h_{2}/J_{2}=0.1\) (green triangles)]
of Hamiltonian parameters as a dip in the slope of the QCNN output. This is in stark contrast to SOPs and their slopes which rapidly vanish for any finite probability of symmetry-breaking errors and thus cannot be used to identify phase boundaries in the presence of symmetry-breaking errors.

## VIII Sample complexity

We now compare QCNNs to the direct measurement of the input state. We focus on sample complexity which quantifies the number of projective measurements required to identify to which quantum phase the input state belongs. In the absence of noise, QCNNs substantially reduce sample complexity compared to the direct measurement of SOPs [14]. In the presence of symmetry-breaking noise, SOPs vanish and thus they cannot detect the SPT phase. Instead, we could sample the observable, that is measured by a QCNN, which is different from any single SOP and robust against symmetry-breaking noise, directly from the input state without using any quantum circuit. In this section, we discuss this observable for the QCNN detecting the '\(ZXZ\)' phase and the cost of directly sampling it from the input state in comparison to sampling the QCNN output.

To determine the observable measured by the QCNN with alternating X- and Z-error correcting layers, we represent the QCNN circuit as a unitary \(U_{\text{QCNN}}\), see Appendix E for details. The measurement of the Pauli \(X_{\frac{N+1}{2}}\) operator at the end of the QCNN circuit corresponds to the measurement of a multiscale SOP

\[S_{\text{M}} =U_{\text{QCNN}}^{\dagger}X_{\frac{N+1}{2}}U_{\text{QCNN}}\] \[=\sum_{ij}\eta_{ij}^{(1)}S_{ij}+\sum_{ijkl}\eta_{ijkl}^{(2)}S_{ ij}S_{kl}+..., \tag{11}\]

on the input state. The multiscale SOP \(S_{\text{M}}\) is a sum of products of SOPs \(S_{ij}\) at different lengths \(L=j-i+1\). The length of the SOPs, \(L\sim 3^{d}\), increases exponentially with the depth \(d\) of the QCNN. Compared to the QCNN of Ref. [14], the change in the coefficients \(\eta^{(n)}\) due to our construction equips the QCNN with error tolerance. The multiscale SOP in Eq. (11) involves at least \(2^{3^{d-2}}\) products of SOPs.

As an alternative to executing the QCNN, we can determine the expectation value of the multiscale SOP using the direct measurements of the input state without performing any quantum circuit. Assuming that only measurements in local Pauli bases can be directly performed, which is the case for most devices, we show in Appendix F that the multiscale SOP involves at least \(3^{3^{d-4}}\) products of SOPs, which cannot be simultaneously measured via local Pauli measurements as they require sampling in mutually incompatible Pauli bases. As a result, the sample complexity of the direct Pauli measurement scales double exponentially with the depth of the QCNN, corresponding to an exponential scaling with system size for the maximal depth \(d=\lfloor\log_{3}N\rfloor\). In contrast, the QCNN determines the expectation value of the multiscale SOP with a constant sample complexity in system size (and depth of the QCNN), which exponentially reduces the sample complexity compared to direct Pauli measurements.

Importantly, the equivalent QCNN circuit depicted in Fig. 4, which is based on a constant-depth quantum circuit, measurement and classical post-processing, measures the multiscale SOP with the same sample complexity as the full quantum QCNN circuit. The constant-depth quantum circuit allows us to simultaneously measure all stabilizer elements \(C_{j}\). From measured bit strings, we then determine the expectation value of the multiscale SOP in classical post-processing with the same sample complexity as for the full quantum QCNN circuit.

QCNNs detecting the '\(ZXXXZ\)' phase also measure multiscale SOPs which are sums of double exponentially many products of SOPs \(T_{jk}\). Similarly to the QCNN for the '\(ZXZ\)' phase, these QCNNs also reduce sample complexity exponentially compared to direct local Pauli measurements.

## IX Conclusions

We constructed QCNNs that tolerate incoherent errors due to decoherence and gate infidelities during the preparation of their input states. These QCNNs tolerate symmetry-breaking errors below a threshold error probability in contrast to previous QCNN designs and SOPs, which are significantly suppressed for any non-vanishing error probability. Moreover, their output is robust against invertible symmetry-preserving error channels. The error tolerance is limited close to phase boundaries due to diverging correlation lengths. However, a steep gradient of the QCNN output at phase boundaries between SPT phases and topologically trivial phases as well as between two SPT phases allows us to precisely determine critical values of the Hamiltonian parameters.

The QCNN quantum circuits constructed here can be shortened from logarithmic depth in input size to short, constant depth by performing a large part of computation in classical post-processing after the measurement of all qubits. This substantially improves the performance of QCNNs under NISQ conditions by reducing the number of finite-fidelity quantum gates. The classical post

\begin{table}
\begin{tabular}{|l|c|c|} \hline Phase boundary & \(p_{\text{th}}^{0}\) & \(\bar{\xi}\) \\ \hline \(ZXZ\)’\(\rightarrow\)Paramagnetic & 0.058 & 26.09 \\ \(\cdot ZXXXZ\)’\(\rightarrow\)Paramagnetic & 0.025 & 28.12 \\ \(\cdot ZXXXZ\)’\(\rightarrow\)’\(ZXZ\)’ & 0.055 & 24.62 \\ \hline \end{tabular}
\end{table}
Table 1: Fitted parameters of the threshold probability \(p_{\text{th}}=p_{\text{th}}^{0}\exp(-\xi/\bar{\xi})\) of symmetry-breaking errors as a function of the correlation length \(\xi\) close to different phase boundaries.
processing part of QCNNs consists of logic circuits with at most logarithmic depth in input size. The QCNNs we constructed reduce sample complexity exponentially in input size in comparison to the direct sampling of the QCNN output using local Pauli measurements.

Our work provides new insights into SPT order in open quantum systems, which are subject to decoherence and dissipation. Apart from NISQ computers, the error channel we consider, see Eq. (7), describes typical open quantum systems [40]. On the one hand, SOPs rapidly vanish with an increasing length for any symmetry-breaking error channel as shown in Ref. [40]. On the other hand, our results show that SPT order is not completely washed out for probabilities of symmetry-breaking errors below a finite threshold. This distinction emerges because the multiscale SOPs, that are efficiently measured by the QCNNs we introduce, exploit information about SPT order at different length scales to detect SPT phases in the presence of symmetry-breaking noise.

Due to the tolerance of errors and the short depth of their quantum circuits, the QCNNs constructed here can be readily realized on current NISQ computers to efficiently measure characteristic non-local observables of SPT phases. This will facilitate the investigation of topological quantum phases of matter on quantum computers.

Interesting future directions include QCNNs for two- and higher-dimensional systems detecting intrinsic topological order [45; 30], and less understood topological phases such as anyonic chains [46] and quantum spin liquids [47]. Another promising direction is the training of QCNNs based on parametrized quantum circuits to identify non-local observables characterizing topological phases from training data [36; 37; 48; 14].

The QCNNs we constructed open the way for efficiently characterizing noisy quantum data produced by near-term quantum hardware. In addition to the recognition of topological phases, reducing the sample complexity of non-local observables will substantially speed up other quantum algorithms. A prominent example is the variational quantum eigensolver for quantum chemistry problems which involves many repetitions of demanding measurements of molecular Hamiltonians [49; 50].

## X Acknowledgements

We thank R. Mansuroglu for insightful discussions. This work was supported by the EU program H2020-FETOPEN project 828826 Quromorphic and is part of the Munich Quantum Valley, which is supported by the Bavarian state government with funds from the Hightech Agenda Bayern Plus. NAM is funded by the Alexander von Humboldt foundation.

## Appendix A Numerical simulations

Our main results are based on MPS simulations implemented using the Python library TeNPy [42]. Using iDMRG with the maximal bond dimension \(\chi=150\), we obtain numerically exact ground states \(\ket{\psi}\) of the Hamiltonian (1) in the thermodynamic limit to avoid finite size effects. First, we identify phase boundaries as sharp peaks in the second derivative of the ground state energy with respect to \(h_{2}/J_{1}\) for constant \(h_{1}/J_{1}\) and \(J_{2}=0\) in Figs. 3, 6, and 8, with respect to \(J_{1}/J_{2}\) for constant \(h_{1}=0\) and \(h_{2}/J_{2}=0.1\) in Fig. 7, as well as with respect to \(h_{2}/J_{2}\) for constant \(h_{1}/J_{2}\) and \(J_{1}=0\) in Fig. 12.

We implement the QCNN circuits depicted in Fig. 1c consisting of a constant-depth quantum circuit, the measurement of all qubits in the \(X\) basis and classical post-processing. The constant-depth quantum circuit performs the disentangling unitary \(U_{N}^{\dagger}\) consisting of nearest-neighbor two-qubit gates which can be efficiently applied on the MPSs \(\ket{\psi}\) obtained using iDMRG. We simulate the measurement outcomes of \(N\) qubits by sampling spin configurations \(x\) in the \(X\) basis from their probability distribution \(P_{x}=\mathrm{Tr}[|x\rangle\langle x|U_{N}^{\dagger}|\psi\rangle\langle\psi|U_ {N}]\) corresponding to the MPS \(U_{N}^{\dagger}|\psi\rangle\) after having performed the disentangling unitary \(U_{N}^{\dagger}\). QCNN outputs are determined from the sampled bit strings \(x\) as a Boolean function which is expressed as a logic circuit, see Figs. 2 and 4.

To explore incoherent errors using the error channel (7), we implement the error channel \(\mathcal{E}\) by sampling error events \(E_{l}=K_{l}/\sqrt{p_{l}}\) from their probability distribution \(p_{l}=\mathrm{Tr}[K_{l}^{\dagger}K_{l}]/2^{N}\). The error events \(E_{l}\) are products of Pauli operators, which can be efficiently implemented on the MPSs \(\ket{\psi}\). We then sample bit strings \(x\) from the joint probability distribution

\[P_{x} = \tag{10}\] \[=\]

which correspond to the measurement outcomes for the noisy state \(\mathcal{E}(\ket{\psi}\bra{\psi})\) after having performed the disentangling unitary \(U_{N}^{\dagger}\).

Increasing the bond dimension to \(\chi=200\) does not lead to a visible change in our findings showing that the MPSs accurately describe the ground states of the Hamiltonian (1) and their processing with the QCNNs.

## Appendix B QCNN circuits

In this appendix, we describe in detail the QCNN circuits used in this work. We first discuss the QCNN detecting the '\(ZXZ\)' phase. Then we describe the QCNN detecting the '\(ZXXXZ\)' phase. Finally, we discuss the QCNNs distinguishing the two SPTs phase from one another.

All QCNNs considered in this work consist of \(d\) convolutional layers, \(d\) pooling layers and a fully connected
layer as depicted in Fig. 1a. Each convolutional layer \(f=1,2,...,d\) consists of a disentangling unitary \(U_{N/3^{f-1}}^{\dagger}\) on \(N/3^{f-1}\) qubits followed by an entangling unitary \(U_{N/3^{f}}\) on a sublattice with \(N/3^{f}\) qubits as depicted in Fig. 1b. Each pooling layer involves a QEC procedure \(\mathrm{QEC}_{f}\). In the fully connected layer, the disentangling unitary \(U_{N/3^{d}}^{\dagger}\) is applied and all \(\lfloor N/3^{d}\rfloor\) remaining qubits are measured in the \(X\) basis. Note that each \(\mathrm{QEC}_{f}\) procedure is preceded by the entangling unitary \(U_{N/3^{f}}\), which is implemented in the preceding convolutional layer, and followed by the disentangling unitary \(U_{N/3^{f}}^{\dagger}\), which is implemented in the following convolutional layer for \(f<d\) and in the fully connected layer for \(f=d\), see Fig. 1b. The QCNN circuit is thus equivalent to a single convolutional layer followed by \(d\) pooling layers as depicted in Fig. 10a. The convolutional layer performs the disentangling unitary \(U_{N}^{\dagger}\). The pooling layer \(f\) involves the QEC unitary \(\widetilde{\mathrm{QEC}}_{f}=U_{N/3^{f}}^{\dagger}\mathrm{QEC}_{f}U_{N/3^{f}}\) transformed by the entangling unitary \(U_{N/3^{f}}\). Note that in this equivalent quantum circuit, convolutional layers for \(f>1\) are absorbed into the \(\widetilde{\mathrm{QEC}}_{f}\) unitaries in the pooling layers. The disentangling unitary \(U_{N/3^{d}}^{\dagger}\) from the fully connected layer is also absorbed into the \(\widetilde{\mathrm{QEC}}_{d}\) unitary. The fully connected layer in this equivalent quantum circuit thus consists only of the measurement of remaining qubits in the \(X\) basis.

For conciseness, we focus here on the equivalent quantum circuits depicted in Fig. 10a as the \(\widetilde{\mathrm{QEC}}_{f}\) procedures transformed by the entangling unitary consist of fewer gates than the bare \(\mathrm{QEC}_{f}\) procedures.

We first discuss the QCNN detecting the '\(ZXZ\)' phase. We start with the QCNN consisting of \(X\)-error correcting layers depicted in Fig. 10b. The disentangling unitary \(U_{N}^{\dagger}\) consists of controlled \(Z\) gates between neighboring qubits. The transformed QEC procedure \(\widetilde{\mathrm{QEC}}_{f}^{X}\) consists of controlled-controlled Z gates \(\mathrm{C}_{x}\mathrm{C}_{x}\mathrm{Z}\), controlled Z gates \(\mathrm{C}_{x}\mathrm{Z}\) and controlled-controlled NOT gates \(\mathrm{C}_{x}\mathrm{C}_{x}\mathrm{NOT}\) with all controls in the \(X\) basis. The error-tolerant design of the QCNN depicted in Fig. 10c consists of alternating layers correcting \(X\) errors and \(Z\) errors. The new \(Z\)-error correcting procedure \(\widetilde{\mathrm{QEC}}_{f}^{Z}\) involves SWAP, \(\mathrm{C}_{x}\mathrm{Z}\) and \(\mathrm{C}_{x}\mathrm{C}_{x}\mathrm{Z}\) gates.

Since all gates are controlled in the \(X\) basis and they implement either Pauli \(X\) or Pauli \(Z\) operations on the target qubit, the \(\widetilde{\mathrm{QEC}}_{f}^{X}\) and \(\widetilde{\mathrm{QEC}}_{f}^{Z}\) procedures map \(X\)-basis eigenstates \(\ket{x}\) onto other \(X\)-basis eigenstates \(\pm\ket{g_{f}(x)}\), where \(g_{f}:\{0,1\}^{N}\rightarrow\{0,1\}^{N}\) is a Boolean function. As we also measure in the \(X\) basis in the fully-connected layer, the processing of a quantum state \(\rho\) by the QCNN can be implemented in classical post-processing as a Boolean function \(G(x)=(g_{d}\circ g_{d-1}\circ...\circ g_{1})(x)\) after measuring all qubits in the \(X\) basis. In

Figure 10: QCNN quantum circuits. (a) QCNN circuit equivalent to Fig. 1b consisting of a single convolutional layer, \(d\) pooling layers and a fully connected (FC) layer. The convolutional layer performs the disentangling unitary \(U_{N}^{\dagger}\). Each pooling layer \(f=1,2,...,d\) performs the \(\widetilde{\mathrm{QEC}}_{f}\) procedure transformed by the entangling unitary \(U_{N/3^{f}}\) on a sublattice with \(N/3^{f-1}\) qubits. The fully connected layer involves the measurement of \(\lfloor N/3^{d}\rfloor\) qubits in the \(X\) basis. (b) QCNN detecting the ‘\(ZXZ\)’ phase with \(X\)-error correcting procedures \(\widetilde{\mathrm{QEC}}_{f}^{X}\). (c) QCNN detecting the ‘\(ZXZ\)’ phase with alternating procedures \(\widetilde{\mathrm{QEC}}_{f}^{X}\) and \(\widetilde{\mathrm{QEC}}_{f+1}^{Z}\) correcting \(X\) errors and \(Z\) errors, respectively. The disentangling unitary \(U_{N}^{\dagger}\) involves controlled \(Z\) gates with controls in the computational basis. The \(\widetilde{\mathrm{QEC}}_{f}^{X}\) procedure consists of controlled-controlled Z gates \(\mathrm{C}_{x}\mathrm{C}_{x}\mathrm{Z}\), controlled Z gates \(\mathrm{C}_{x}\mathrm{Z}\) and controlled-controlled NOT gates \(\mathrm{C}_{x}\mathrm{C}_{x}\mathrm{NOT}\) with all controls in the \(X\) basis. The \(\widetilde{\mathrm{QEC}}_{f+1}^{Z}\) procedure consists of SWAP, \(\mathrm{C}_{x}\mathrm{C}_{x}\mathrm{Z}\) and \(\mathrm{C}_{x}\mathrm{Z}\) gates.
particular, the output

\[\langle X_{j}\rangle=\mathrm{Tr}\left[X_{j}Q_{d}U_{N}^{\dagger}\rho U_{N}Q_{d}^{ \dagger}\right]=\sum_{x}P_{x}(1-2G(x)_{j}), \tag{10}\]

of qubit \(j\) measured in the fully-connected layer of the full quantum QCNN circuit (Fig. 10a) can be determined from bit strings \(x\) measured after the convolutional layer by using the \(j\)th element of the output of the Boolean function \(G(x)\), where \(P_{x}=\mathrm{Tr}[|x\rangle\langle x|U_{N}^{\dagger}\rho U_{N}]\) is the probability of measuring a bit string \(x\) after the first convolutional layer and

\[Q_{d}=\widetilde{\mathrm{QEC}}_{d}...\widetilde{\mathrm{QEC}}_{2}\widetilde{ \mathrm{QEC}}_{1}. \tag{11}\]

We thus only need to apply the single disentangling unitary \(U_{N}^{\dagger}\) on a quantum computer, measure all qubits in the \(X\) basis and determine the QCNN output in classical post-processing from the measured bit strings \(x\), see Fig. 1c. The QCNN quantum circuits depicted in Figs. 10b and 10c can thus be implemented as equivalent circuits depicted in Figs. 2 and 4, respectively. The Boolean function \(g_{f}\) corresponding to the pooling layer \(f\) performing the \(\widetilde{\mathrm{QEC}}_{f}\) procedure can be expressed as a logic circuit with a constant depth in system size, see Figs. 2 and 4. As a result, the Boolean function \(G\) corresponding to the QCNN with \(d\) pooling layers can be implemented as a logic circuit with a depth proportional to \(d\) which can be at most \(d=\lfloor\log_{3}N\rfloor\) logarithmic in system size \(N\).

We now describe QCNNs detecting the '\(ZXXX\)' phase. The QCNN consisting of alternating layers correcting \(X\) errors and \(Z\) errors is depicted in Fig. 11a. The disentangling unitary \(\tilde{U}^{\dagger}\) consists of controlled \(Z\) gates CZ between all neighboring qubits controlled in the computational basis, controlled \(Y\) gates \(\mathrm{C}_{y}\mathrm{Y}\) between all neighboring qubits controlled in the \(Y\) basis and \(Z\) gates. The \(X\)-error correcting procedure \(\widetilde{\mathrm{QEC}}_{f}^{X}\) consists of controlled \(Y\) gates \(\mathrm{C}_{x}\mathrm{Y}\) and controlled-controlled \(Y\) gates \(\mathrm{C}_{x}\mathrm{C}_{x}\mathrm{Y}\) with controls in the \(X\) basis. The \(Z\)-error correcting procedure \(\widetilde{\mathrm{QEC}}_{f}^{Z}\) is the same as for the '\(ZXZ\)' phase involving SWAP, \(\mathrm{C}_{x}\mathrm{Z}\) and \(\mathrm{C}_{x}\mathrm{C}_{x}\mathrm{Z}\) gates. The QCNN consisting of alternating layers correcting \(C\) errors and \(Z\) errors is depicted in Fig. 11b. The \(C\)-error correcting procedure \(\widetilde{\mathrm{QEC}}_{f}^{C}\) consists of \(\mathrm{C}_{x}\mathrm{Y}\) and \(\mathrm{C}_{x}\mathrm{C}_{x}\mathrm{Y}\) gates.

As all \(\widetilde{\mathrm{QEC}}_{f}\) procedures consist of gates controlled in the \(X\) basis implementing the Pauli \(Y\) operation or the Pauli \(Z\) operation on the target qubit, they satisfy the condition (5) and thus they can be implemented in classical post-processing as a Boolean function \(g_{f}(x)=x^{\prime}\). The output

\[\langle X_{j}\rangle=\mathrm{Tr}\left[X_{j}Q_{d}\tilde{U}_{N}^{\dagger}\rho \tilde{U}_{N}Q_{d}^{\dagger}\right]=\sum_{x}\tilde{P}_{x}(1-2G(x)_{j}), \tag{12}\]

of qubit \(j\) measured in the fully-connected layer of the full quantum QCNN circuit can be determined from bit strings \(x\) measured after the first convolutional layer \(\tilde{U}_{N}^{\dagger}\) by using the \(j\)th element of the output of the Boolean function \(G(x)\), where \(\tilde{P}_{x}=\mathrm{Tr}[|x\rangle\langle x|\tilde{U}_{N}^{\dagger}\rho \tilde{U}_{N}]\).

Note that the Boolean function corresponding to the \(C\)-error correcting procedure for the '\(ZXXXZ\)' phase
is the same as the Boolean function performing the \(X\)-error correcting procedure for the '\(ZXZ\)' phase depicted in Fig. 2.

## Appendix C Error propagation in QCNN circuits

In this appendix, we discuss the propagation of errors in QCNNs detecting the '\(ZXZ\)' phase. We exploit that the QCNNs can be implemented as the constant-depth quantum circuit \(U_{N}^{\dagger}\), measurements in the \(X\) basis and classical post-processing. We focus on the propagation of errors in the constant-depth quantum circuit \(U_{N}^{\dagger}\) and the logic circuits implemented in classical post-processing.

The '\(ZXZ\)' cluster state \(\ket{C}\) is mapped by the disentangling unitary \(U_{N}^{\dagger}\) onto the product state \(\ket{+}^{\otimes N}\), where \(\ket{+}\) is the \(+1\) eigenstate of the Pauli \(X\) operator. The subsequent measurement thus deterministically yields the outcome \(x_{j}=0\) corresponding to \(X_{j}=+1\) for all qubits \(j\). A single \(X_{j}\) error perturbing the cluster state \(X_{j}\ket{C}\) is mapped onto \(U_{N}^{\dagger}X_{j}U_{N}=Z_{j-1}X_{j}Z_{j+1}\) by the disentangling unitary \(U_{N}^{\dagger}\) leading to the flip of two measurement outcomes \(x_{j\pm 1}=1\), see red lines in Fig. 2. This \(X\)-error syndrome is corrected by the \(X\)-error correcting procedure such that \(g(x)_{k}=0\) for all \(N/3\) classical bits \(k\) propagating to the next layer, see Fig. 2. The other \(2\cdot N/3\) bits are discarded. Similarly, the syndrome \(x_{j}=x_{j\pm 1}=x_{j+2}=1\) of a \(X_{j}X_{j+1}\) error is corrected by the \(X\)-error correcting procedure. As a result, for low density of \(X_{j}\) and \(X_{j}X_{j+1}\) errors, the QCNN output converges to unity. As shown in Fig. 3, the QCNN output converges to unity for all states in the '\(ZXZ\)' phase. The phase boundary coincides with a threshold density of coherent \(X\) errors perturbing the cluster state [14; 38]. Above the threshold density, \(X\)-error syndromes are concentrated in the QCNN circuit and the QCNN output vanishes with increasing depth \(d\). Incoherent \(X\) errors can be tolerated for any probability \(p_{X}\neq 0.5\) as discussed in the main text.

The situation is more complicated for \(Z\) errors. A single \(Z_{j}\) error perturbing the cluster state \(Z_{j}\ket{C}\) leads to the flip of a single measurement outcome \(x_{j}=1\) as the error \(Z_{j}\) commutes with the disentangling unitary \(U_{N}^{\dagger}\), see Fig. 2. This syndrome of the \(Z_{j}\) error propagates through the \(X\)-error correcting layer such that \(g(x)_{k}=1\) for bits \(k\) on the sublattice with \(N/3\) bits in the next layer if \(k=j-2\), \(k=j\), or \(k=j+2\). As \(2\cdot N/3\) bits are discarded in each layer, the density of error syndromes increases. This leads to a decreasing QCNN output for any probability \(p_{Z}\neq 0\) or \(p_{Z}\neq 1\) of \(Z\) errors. To correct \(Z\) errors, we construct a new \(Z\)-error correcting \(\widetilde{\mathrm{QEC}}_{f}^{Z}\) procedure, depicted in Fig. 10c, with a corresponding logic circuit depicted in Fig. 4. This logic circuit consists of the majority function, see Eq. (10). The majority function \(M(x_{j-7.3^{f-1}},x_{j},x_{j+7.3^{f-1}})\) in layer \(f\) returns the value of the majority of the three bits \(x_{j-7.3^{f-1}}\), \(x_{j}\), and \(x_{j+7.3^{f-1}}\). It thus removes isolated syndromes \(x_{j}=1\) of \(Z_{j}\) errors, see Fig. 4. Provided that the initial density of \(Z_{j}\) errors is small enough, the majority vote further decreases the density of error syndromes, preventing their concentration in the QCNN circuit.

We now investigate the propagation of \(Z\) errors in the QCNN with alternating \(X\)-error and \(Z\)-error correcting layers for the cluster state \(\rho=\mathcal{E}\left(\ket{C}\bra{C}\right)\) with the probability \(p_{Z}\) of \(Z\) errors described by the error channel (7) with \(p_{X}=p_{Y}=0\). As \(Z\) errors commute with the disentangling unitary \(U_{N}^{\dagger}\), we measure \(x_{j}=1\) with the uniform probability \(p_{Z}\) at all qubits \(j\). Moreover, the probabilities of measuring the values \(x_{j}=1\) and \(x_{k}=1\) on different qubits \(j\) and \(k\) are not correlated. We will now describe how the probability \(p_{f}\) of \(Z\)-error syndromes evolves in each layer \(f\) of the QCNN. We first note that the probability \(p_{f}\) remains uniform in each layer, i.e. the same for all qubits \(j\), as the QCNN circuit is translationally invariant. We also neglect correlations between error syndromes that build up in the logic circuit assuming that the probability of \(Z\)-error syndromes on different qubits remains uncorrelated. This assumption is well justified by the agreement with our numerical simulations.

We start with the probability \(p_{0}=p_{Z}\) of measuring \(x_{j}=1\) at each qubit \(j\) after the disentangling unitary \(U_{N}^{\dagger}\). The measured bit strings \(x\) are now processed in the \(X\)-error correcting layers for \(f\) odd and in the \(Z\)-error correcting layers for \(f\) even. A bit \(x_{j}\) at the output of the \(X\)-error correcting layer \(f\) depends on five bits \(x_{j-4.3^{f-1}}\), \(x_{j-2.3^{f-1}}\), \(x_{j}\), \(x_{j+2.3^{f-1}}\), and \(x_{j+4.3^{f-1}}\) at the input of this layer, see Fig. 4, each of which has the value \(1\) with the probability \(p_{f-1}\). Using a truth table for the output of the \(X\)-error correcting layer, we determine that the output value \(x_{j}=1\) occurs with the probability

\[\begin{split} p_{f}&=f_{X}(p_{f-1})\\ &=p_{f-1}^{3}+p_{f-1}(1-p_{f-1})^{2}\left(3-2p_{f-1}+4p_{f-1}^{2} \right).\end{split} \tag{13}\]

The probability \(p_{f}\) after each \(X\)-error correcting layer increases, i.e., \(p_{f}>p_{f-1}\) for \(0<p_{f-1}<0.5\) resulting in a decreased QCNN output. This can also be seen in Fig. 5, where after each \(X\)-error correcting layer, the QCNN output decreases, compare red and blue lines.

A bit \(x_{j}\) at the output of the \(Z\)-error correcting layer \(f\) depends on three bits \(x_{j-7.3^{f-1}}\), \(x_{j}\), and \(x_{j+7.3^{f-1}}\) at the input of this layer, see Fig. 4, each of which has the value \(1\) with the probability \(p_{f-1}\). Using a truth table for the output of the \(Z\)-error correcting layer, we determine that the output value \(x_{j}=1\) occurs with the probability

\[p_{f}=f_{Z}(p_{f-1})=p_{f-1}^{2}(3-2p_{f-1}). \tag{14}\]

The probability \(p_{f}\) after each \(Z\)-error correcting layer decreases, i.e., \(p_{f}<p_{f-1}\) for \(0<p_{f-1}<0.5\) resulting in an increased QCNN output. This can also be seen in Fig. 5, where after each \(Z\) error correcting layer the QCNN output increases, compare red and blue lines.

We identify two distinct regimes depending on the initial error probability \(p_{0}=p_{Z}\). For error probabilities
below the threshold \(p_{Z}<p_{\rm th}\), error correction in even (\(Z\)-error correcting) layers dominates over error concentration in odd (\(X\)-error correcting) layers resulting in a net reduction of errors after two subsequent layers. For error probabilities above the threshold \(p_{Z}>p_{\rm th}\), error concentration in odd layers dominates over error correction in even layers resulting in a net concentration of errors after two subsequent layers. We determine the threshold probability \(p_{\rm th}=0.054\) as the fixed point of the recursion relation \(p_{f}=f_{Z}(f_{X}(p_{f-2}))\).

## Appendix D '\(Zxxxz\)' SPT phase

In this appendix, we discuss QCNNs recognizing '\(ZXXX\)' SPT phase and their tolerance to different types of errors. Similarly, as for the '\(ZXZ\)' SPT phase, we construct a QCNN to recognize the '\(ZXXXZ\)' SPT phase from the paramagnetic phase and the antiferromagnetic phase. The \(X\)-error correcting procedure \(\widetilde{\rm QEC}^{X}_{f}\) is depicted in Fig. 11a.

The '\(ZXXXZ\)' cluster state \(\ket{D}\) is mapped by the disentangling unitary \(\tilde{U}^{\dagger}_{N}\) in the first convolutional layer onto the product state \(\ket{+}^{\otimes N}\). The subsequent measurement thus deterministically yields the outcome \(x_{j}=0\) for all qubits \(j\). A single \(X_{j}\) error perturbing the cluster state \(X_{j}\ket{D}\) is mapped onto \(\tilde{U}^{\dagger}_{N}X_{j}\tilde{U}_{N}=Y_{j-2}X_{j-1}X_{j}X_{j+1}Y_{j+2}\) by the disentangling unitary \(\tilde{U}^{\dagger}_{N}\) leading to the flip of two measurement outcomes \(x_{j\pm 2}=1\). This error is corrected by the \(X\)-error correcting QEC procedure such that \(g(x)_{k}=0\) for all \(N/3\) classical bits \(k\) propagating to the next layer. Similarly, the syndrome \(x_{j\pm 2}=x_{j-1}=x_{j+3}=1\) of a \(X_{j}X_{j+1}\) error is corrected by the \(X\)-error correcting procedure.

We now investigate the QCNN with \(X\)-error correcting layers. We plot in Fig. 12a the QCNN output across a cut through the phase diagram as a function of \(h_{2}/J_{2}\) for \(J_{1}=0\) and different depths \(d\) of the QCNN in the presence of incoherent \(X\) errors. We can see that the QCNN output converges to unity with the increasing depth of the QCNN in the '\(ZXXXXZ\)' SPT phase (gray region). On the other hand, the QCNN output vanishes with the increasing depth in the topologically trivial phases (white regions). This shows that the QCNN can recognize the '\(ZXXXZ\)' SPT phase from topologically trivial phases in the presence of incoherent \(X\) errors. Incoherent \(X\) errors can be tolerated for any probability \(p_{X}\neq 0.5\).

To equip the QCNN with the tolerance to symmetry-breaking \(Z\) errors, we alternate \(X\)-error correcting layers with \(Z\)-error correcting layers, see Fig. 11a. The \(\widetilde{\rm QEC}^{Z}_{f}\) procedure, correcting \(Z\) errors, is the same as that for the '\(ZXXZ\)' phase, c.f. Fig. 10c, which can be implemented in classical post-processing as the majority function (10), depicted in Fig. 4. We start by investigating the QCNN with alternating layers for the '\(ZXXXZ\)' cluster state perturbed by incoherent \(Z\) errors as the input state. We plot in Fig. 12b the QCNN output as a function of the \(Z\)-error probability. We can see an alternating QCNN output after odd and even layers. \(Z\) errors propagate through odd \(X\)-error correcting layers and, as the system size is reduced by a factor of three, the density of \(Z\) errors increases. This error concentration leads to the decrease of the QCNN output after odd layers, compare brown and

Figure 12: QCNN recognizing the ‘\(ZXXXZ\)’ phase from the paramagnetic phase and the anti-ferromagnetic phase. (a) The output of the QCNN consisting of \(X\)-error correcting layers for ground states of the cluster-Ising Hamiltonian (1) perturbed by incoherent \(X\) errors as a function of \(h_{2}/J_{2}\) for different depths \(d\) of the QCNN. (b) The output of the QCNN consisting of alternating layers correcting \(X\) errors and \(Z\) errors as a function of the \(Z\)-error probability \(p_{Z}\) for the ‘\(ZXXXXZ\)’ cluster state for different depths \(d\). The black dashed line shows the threshold error probability \(\tilde{p}_{\rm th}=0.018\). (c) The output of the QCNN consisting of alternating layers correcting \(X\) errors and \(Z\) errors for ground states of the cluster-Ising Hamiltonian (1) perturbed by depolarizing noise as a function of \(h_{2}/J_{2}\) for different depths \(d\). The gray regions denote ‘\(ZXXXXZ\)’ phase. [Parameters: \(N=1215\), \(M_{S}=10^{4}\); (a) \(p_{X}=0.1\), \(p_{Y}=p_{Z}=0\), \(h_{1}/J_{2}=0.5\), \(J_{1}=0\); (b) \(p_{X}=p_{Y}=0\); (c) \(p_{X}=p_{Y}=p_{Z}=0.005\), \(h_{1}/J_{2}=0.5\), \(J_{1}=0\)]
yellow lines in Fig. 12b. In contrast, even layers correct \(Z\) errors leading to the decrease of their density and the increase of the QCNN output. The QCNN can tolerate \(Z\) errors below the threshold error probability \(\tilde{p}_{\rm th}=0.018\) as the error correction in even layers dominates over the error concentration in odd layers. This shows that implementing the \(Z\)-error correcting layer after each \(X\)-error correcting layer prevents the concentration of symmetry-breaking \(Z\) errors for small error probabilities.

The threshold probability \(\tilde{p}_{\rm th}=0.018\) for the '\(ZXXX\)Z' phase is smaller than the threshold probability \(p_{\rm th}=0.054\) for the '\(ZXZ\)' phase. This decrease in the tolerated error probabilities can be understood by investigating the propagation of \(Z\) errors in the QCNN circuit. In contrast to the disentangling circuit \(U_{N}^{\dagger}\) for the '\(ZXZ\)' phase, which commutes with \(Z_{j}\) errors, the disentangling unitary \(\tilde{U}^{\dagger}\) for the '\(ZXXXXZ\)' phase maps \(Z_{j}\) errors onto three errors \(\tilde{U}^{\dagger}_{N}Z_{j}\tilde{U}_{N}=Y_{j-1}Z_{j}Y_{j+1}\), which flip the measurement outcomes \(x_{j}=x_{j\pm 1}=1\) on qubits \(j-1\), \(j\) and \(j+1\). This error syndrome is corrected by the \(Z\)-error correcting procedure provided that the \(Z_{j}\) error is isolated. However, the threshold error probability \(\tilde{p}_{\rm th}\) is smaller than for the '\(ZXZ\)' phase due to the multiplication of symmetry-breaking errors by the disentangling unitary.

We now study the error tolerance of the QCNN with alternating layers for different ground states of the clustering Hamiltonian (1) perturbed by depolarizing noise. We plot in Fig. 12c the QCNN output as a function of \(h_{2}/J_{2}\) for \(J_{1}=0\) and different depths \(d\) of the QCNN. We can see that the QCNN tolerates the incoherent errors due to depolarizing noise as its output converges to unity with the increasing depth \(d\) in the '\(ZXXXZ\)' phase (gray region) and vanishes in the topologically trivial phases (white regions).

In conclusion, we constructed a QCNN for the '\(ZXXXX\)' phase that tolerates symmetry-preserving \(X\) errors if the error channel is invertible and symmetry-breaking \(Z\) errors for small error probabilities. The QCNN is constructed similarly as for the '\(ZXZ\)' phase by amending the QEC procedures to correct \(X_{j}\) and \(X_{j}X_{j+1}\) errors perturbing the '\(ZXXXXZ\)' cluster state. As the disentangling unitary \(\tilde{U}_{N}^{\dagger}\) for the '\(ZXXXXZ\)' phase maps \(Z_{j}\) errors onto three errors, \(\tilde{U}^{\dagger}_{N}Z_{j}\tilde{U}_{N}=Y_{j-1}Z_{j}Y_{j+1}\), the threshold probability \(\tilde{p}_{\rm th}=0.018\) of \(Z\) errors is reduced compared to the QCNN for the '\(ZXZ\)' phase.

We finally discuss the propagation of errors in the QCNN detecting the '\(ZXXXXZ\)' phase from the '\(ZXZ\)' phase. This QCNN consists of alternating \(C\)-error and \(Z\)-error correcting layers as depicted in Fig. 11b and discussed in Sec. VI of the main text. The \(C\)-error correcting layers are essential for the detection of the '\(ZXXXXZ\)' phase while the \(Z\)-error correcting layers equip the QCNN with error tolerance. A single \(C_{j}\) error is transformed by the disentangling unitary \(\tilde{U}_{N}^{\dagger}\) as \(\tilde{U}_{N}^{\dagger}C_{j}\tilde{U}_{N}\propto Y_{j-1}X_{j}Y_{j+1}\) and thus leads to the error syndrome \(x_{j\pm 1}=1\). This error syndrome is corrected by the \(C\)-error correcting procedure. \(X_{j}\) and \(X_{j}X_{j+1}\) errors are mapped onto \(\tilde{U}_{N}^{\dagger}X_{j}\tilde{U}_{N}=Y_{j-2}X_{j-1}X_{j}X_{j+1}Y_{j+2}\) and \(\tilde{U}_{N}^{\dagger}X_{j}X_{j+1}\tilde{U}_{N}=Y_{j-2}Z_{j-1}Z_{j+2}Y_{j+3}\) with the corresponding error syndromes \(x_{j\pm 2}=1\) and \(x_{j\pm 2}=x_{j-1}=x_{j+3}=1\), respectively. The syndrome \(x_{j\pm 2}=1\) of the \(X_{j}\) error is corrected by the \(C\)-error correcting layer only if bit \(j\) propagates to the next layer. If bit \(j\) is discarded, the \(X_{j}\)-error syndrome is transformed into either \(x_{j-2}=x_{j+4}=1\) or into \(x_{j-4}=x_{j+2}=1\). On the sublattice with \(N/3\) bits in the next layer, this corresponds in both cases to the \(C_{k}\)-error syndrome \(x_{k\pm 3}=1\). In the subsequent \(Z\)-error correcting layer, we take the majority value \(M(x_{k-7\cdot 3},x_{k},x_{k-7\cdot 3})\) of every triple of qubits \(x_{k-7\cdot 3}\), \(x_{k}\), and \(x_{k-7\cdot 3}\). As these bits are separated by the distance \(7\cdot 3\), the single \(C_{k}\)-error syndrome does not change any of the majority values and it is thus removed. Similarly, also \(X_{j}X_{j+1}\) error syndromes are removed by two subsequent layers. The QCNN can thus distinguish the '\(ZXXXXZ\)' phase from the '\(ZXZ\)' phase, see Fig. 7.

Note that the QCNN consisting of only \(C\)-error correcting layers also corrects \(X_{j}\) and \(X_{j}X_{j+1}\) errors. As we discussed above, the syndrome of the \(X_{j}\) error is transformed by the \(C\)-error correcting layer into the \(C_{k}\)-error syndrome on the sublattice with \(N/3\) bits. This \(C_{k}\)-error syndrome is corrected in the subsequent \(C\)-error correcting layer. Similarly, the syndrome of a single \(X_{j}X_{j+1}\) error is also corrected by two subsequent \(C\)-error correcting layers.

## Appendix E Multiscale string order parameter

In this appendix, we describe the multiscale SOP \(S_{\rm M}\), see Eq. (11), that is measured by the QCNNs considered in this work. First, we show that \(S_{\rm M}\) is a sum of products of SOPs \(S_{jk}\). Then, we demonstrate that the length of the SOPs involved in \(S_{\rm M}\) increases exponentially with the depth \(d\) of the QCNN. Finally, we determine a lower bound for the number of products of SOPs in \(S_{\rm M}\).

We focus here on the QCNN detecting the '\(ZXZ\)' phase, consisting of alternating \(X\)-error and \(Z\)-error correcting layers. We consider the form of the QCNN depicted in Fig. 10c with all convolutional layers for \(f>1\) and the fully connected layer absorbed into the \(\widetilde{\rm QEC}_{f}\) procedures in pooling layers. The QCNN circuit thus performs the unitary

\[U_{\rm QCNN}=\widetilde{\rm QEC}_{d}^{X}\widetilde{\rm QEC}_{d-1}^{Z}... \widetilde{\rm QEC}_{2}^{Z}\widetilde{\rm QEC}_{1}^{X}U_{N}^{\dagger} \tag{12}\]

consisting of the disentangling unitary \(U_{N}^{\dagger}\) and \(d\) pooling layers \(\widetilde{\rm QEC}_{f}\) where \(f=1,2,...,d\). For odd (even) \(f\), the pooling layers perform the \(X\)-error (Z-error) correcting procedure \(\widetilde{\rm QEC}_{f}^{X}\) (\(\widetilde{\rm QEC}_{f}^{Z}\)), see Fig. 10c. We also assume that the QCNN has an odd number \(d\) of layers.

**Sum of products of string order parameters.** We first show that the observable measured by the QCNN
corresponds to the multiscale SOP \(S_{\rm M}\) which is a sum of products of SOPs, c.f. Eq. (11).

The measurement of the Pauli operator

\[\langle X_{\frac{N+1}{2}}\rangle= {\rm Tr}[X_{\frac{N+1}{2}}U_{\rm QCNN}\rho U_{\rm QCNN}^{\dagger}]\] \[= {\rm Tr}[U_{\rm QCNN}^{\dagger}X_{\frac{N+1}{2}}U_{\rm QCNN}\rho] \tag{12}\]

at the end of the QCNN circuit corresponds to the measurement of the observable \(U_{\rm QCNN}^{\dagger}X_{\frac{N+1}{2}}U_{\rm QCNN}\) on the input state \(\rho\). We used the cyclic property of the trace in the second equality in Eq. (12). We backpropagate the measured observable through the QCNN circuit to the input state (zerroch layer). To this end, we use the recursion relations

\[\widetilde{\rm QEC}_{f}^{X\,\dagger}G_{jk}^{(f)}\widetilde{\rm QEC }_{f}^{X}=\frac{1}{4}\Biggl{[}\sum_{\alpha\beta}G_{(j-\alpha)(k+\beta)}^{(f-1)}\] \[-\sum_{\alpha}G_{(j-\alpha)k}^{(f-1)}G_{(k+\gamma)(k+\gamma)}^{(f -1)}-\sum_{\alpha}G_{(j-\gamma)(j-\gamma)}^{(f-1)}G_{j(k+\alpha)}^{(f-1)}\] \[+G_{(j-\gamma)(j-\gamma)}^{(f-1)}G_{jk}^{(f-1)}G_{(k+\gamma)(k+ \gamma)}^{(f-1)}\Biggr{]}, \tag{13}\] \[\widetilde{\rm QEC}_{f}^{Z\,\dagger}G_{jk}^{(f)}\widetilde{\rm QEC }_{f}^{Z}\] \[=\frac{1}{2^{l_{f}}}\prod_{\delta}\left[X_{\delta-\epsilon}+X_{ \delta}+X_{\delta+\epsilon}-X_{\delta-\epsilon}X_{\delta}X_{\delta+\epsilon} \right], \tag{14}\]

for Pauli strings

\[G_{jk}^{(f)}= X_{j}X_{j+2\cdot 3f}...X_{k}, \tag{15}\]

where \(\alpha,\beta\in\left\{0,2\cdot 3^{f-1},4\cdot 3^{f-1}\right\}\), \(\gamma=4\cdot 3^{f-1}\), \(\delta\in\left\{j,j+2\cdot 3^{f},...,k\right\}\) and \(\epsilon=7\cdot 3^{f-1}\). The length of the Pauli strings \(G_{jk}^{(f)}\) is defined as \(l_{f}=(k-j)/(2\cdot 3^{f})+1\).

The backpropagation of the measured observable is summarized in Tab. 2. The Pauli operator \(X_{\frac{N+1}{2}}\) measured at the end of the QCNN circuit corresponds to the Pauli string \(G_{\frac{N+1}{2},\frac{N+1}{2}}^{(d)}=X_{\frac{N+1}{2}}\) with the minimal length \(l_{d}=1\). The recursion relation (13) dictates that backpropagating this operator through the \(X\)-error correcting layer \(\widetilde{\rm QEC}_{d}^{X}\) gives rise to a sum of 16 terms including nine Pauli strings \(G_{jk}^{(d-1)}\), six products of two Pauli strings \(G_{jk}^{(d-1)}\) and a single product of three Pauli strings \(G_{jk}^{(d-1)}\) at layer \(f=d-1\), see Tab. 2.

Next, we backpropagate these Pauli strings and the products of Pauli strings through the layer \(\widetilde{\rm QEC}_{d-1}^{Z}\) performing the \(Z\)-error correcting procedure. Due to the linearity of the unitary \(\widetilde{\rm QEC}_{d-1}^{Z}\), we can separately backpropagate each product in the sum. Each Pauli string \(G_{jk}^{(d-1)}\) gives rise to \(4^{l_{d-1}}\) products of Pauli \(X_{i}\) operators at layer \(f=d-2\), see Eq. (14). These products can be expressed in terms of Pauli strings \(G_{jk}^{(d-2)}\) by using Eq. (15). We thus again obtain a sum of products of Pauli strings \(G_{jk}^{(d-2)}\) at layer \(f=d-2\), see Tab. 2.

We continue backpropagating these products of Pauli strings towards the input state at layer \(f=0\). Backpropagating the Pauli string \(G_{jk}^{(f)}\) through the \(X\)-error correcting layer \(\widetilde{\rm QEC}_{f}^{X}\) gives rise to 16 products of Pauli strings \(G_{jk}^{(f-1)}\), see Eq. (13). In every \(X\)-error correcting layer as well as in every \(Z\)-error correcting layer, we again obtain a sum of products of Pauli strings \(G_{jk}^{(f)}\). At layer \(f=0\), Pauli strings \(G_{jk}^{(0)}\) are mapped by the disentangling unitary \(U_{N}^{\dagger}\) onto SOPs,

\[U_{N}G_{jk}^{(0)}U_{N}^{\dagger}=S_{(j-1)(k+1)}, \tag{16}\]

see Tab. 2. As a result, we measure on the input state a sum of products of SOPs, i.e., the multiscale SOP \(S_{\rm M}\) of Eq. (11).

**Length of string order parameters.** The backpropagation of all Pauli strings and their products is intractable due to their rapidly increasing number with the depth of the QCNN, see Tab. 2. However, we now show that the multiscale SOP involves a SOP whose length
increases exponentially with the depth \(d\) of the QCNN.

To this end, we focus on the product

\[H^{(f)}_{jk}=\mathcal{L}^{(f)}_{j}G^{(f)}_{jk}G^{(f)}_{(j+3J)(k-3J)}\mathcal{R}^{ (f)}_{k} \tag{100}\]

of Pauli strings \(G^{(f)}_{jk}\), \(G^{(f)}_{(j-3J^{\prime})(k+3J^{\prime})}\), \(\mathcal{L}^{(f)}_{j}\) and \(\mathcal{R}^{(f)}_{k}\). The Pauli strings \(\mathcal{L}^{(d-2)}_{j}=\mathcal{R}^{(d-2)}_{k}=\mathbb{1}\) reduce to the identity operator at layer \(f=d-2\) and they are defined recursively for \(f<d-2\) by relations

\[\mathcal{L}^{(f)}_{j} =\mathcal{L}^{(f+1)}_{j+2\cdot 3^{f}}, \tag{101}\] \[\mathcal{R}^{(f)}_{k} =\mathcal{R}^{(f+1)}_{k-2\cdot 3^{f}}, \tag{102}\]

for \(f\) being even and

\[\mathcal{L}^{(f)}_{j} =\mathcal{L}^{(f+1)}_{j-5\cdot 3^{f}}X_{j-6\cdot 3^{f}}X_{j-3 \cdot 3^{f}}, \tag{103}\] \[\mathcal{R}^{(f)}_{k} =X_{k+3\cdot 3^{f}}X_{k+6\cdot 3^{f}}\mathcal{R}^{(f+1)}_{k+5 \cdot 3^{f}}, \tag{104}\]

for \(f\) being odd.

We show in the Supplementary Material that the product \(H^{(f)}_{jk}\) appears at every layer \(f\leq d-2\). The backpropagation of the products \(H^{(f)}_{jk}\) is summarized in Tab. 3. The first product \(H^{(d-2)}_{(\frac{N+1}{2}-l_{0})(\frac{N+1}{2}+3l^{d-2})}\) appears at layer \(f=d-2\), see Tab. 2. The product \(H^{(f)}_{jk}\) recursively appears at every layer \(f<d-2\). After the disentangling unitary \(U^{\dagger}_{N}\) at layer \(f=0\), the product \(H^{(0)}_{jk}\) gives rise to a product of SOPs, see Tab. 3.

The Pauli string \(G^{(0)}_{(\frac{N+1}{2}-l_{0}+1)(\frac{N+1}{2}+l_{0}-1)}\) in the product \(H^{(0)}_{(\frac{N+1}{2}-l_{0})(\frac{N+1}{2}+l_{0})}\) at layer \(f=0\) attains the length \(l_{0}=\frac{3+13}{8}\), see Tab. 3. The Pauli string \(G^{(0)}_{(\frac{N+1}{2}-l_{0}+1)(\frac{N+1}{2}+l_{0}-1)}\) is mapped by the disentangling unitary \(U^{\dagger}_{N}\) onto the SOP \(S_{(\frac{N+1}{2}-l_{0})(\frac{N+1}{2}+l_{0})}\) with the length

\[L=2l_{0}+1=\frac{3^{d}+17}{4}\sim 3^{d}. \tag{105}\]

This shows that the multiscale SOP (11) involves a SOP whose length increases exponentially for large depths \(d\) of the QCNN. For the depth \(d=\log_{3}N\), this SOP exhibits the length \(L\approx N/4\) comparable to system size \(N\). By extending the analysis presented here, it can be shown that the multiscale SOP \(S_{\text{M}}\) involves also other SOPs with exponentially increasing lengths \(L\sim 3^{d}\) as well as SOPs at all length scales between \(L=1\) and \(L\sim 3^{d}\).

**Number of products of string order parameters.** Finally, we determine a lower bound for the number of products of SOPs in the multiscale SOP \(S_{\text{M}}\). To this end, we focus on products of Pauli strings displayed in Tab. 4.

We start with the product \(H^{(2)}_{(\frac{N+1}{2}-l_{0})(\frac{N+1}{2}+l_{0}-1)}\) which appears at layer \(f=2\), see Tab. 3. The recursion relation (100) dictates that this product appears at layer \(f=1\) as well. In contrast to the discussion above, we now focus on the product \(H^{(2)}_{(\frac{N+1}{2}-g_{2})(\frac{N+1}{2}+g_{2})}\) at layer \(f=1\). The Pauli strings \(G^{(2)}_{(\frac{N+1}{2}-g_{2}(l_{2}-1)][\frac{N+1}{2}+9(l_{2}-1)]}\) and \(G^{(2)}_{(\frac{N+1}{2}-9l_{2})(\frac{N+1}{2}+9l_{2})}\) in this product have lengths \(l_{2}=\frac{3^{d-2}+13}{8}\) and \(l_{2}+1\). We backpropagate this product through the \(X\)-error correcting layer \(\widetilde{\text{QEC}}^{X}_{1}\) and the

\begin{table}
\begin{tabular}{c|c|c|c} \(f\) & Product of Pauli strings & \(l_{f}\) & \\ \hline \(d-2\) & \(H^{(d-2)}_{(i-3l^{d-2})(i+3l^{d-2})}\) & \(1\) & \(\widetilde{\text{QEC}}^{\mathcal{L}}_{d-2}\) \\  & \(\vdots\) & & \\ \(f\) even & \(H^{(f)}_{(i-l_{f}\cdot 3f)(i+l_{f}\cdot 3f)}\) & \(\frac{\mathbb{J}^{d-f+1}+3}{8}\) & \(\widetilde{\text{QEC}}^{\mathcal{L}}_{f}\) \\ \(f\) odd & \(H^{(f)}_{(i-l_{f}\cdot 3f)(i+l_{f}\cdot 3f)}\) & \(\frac{3^{d-f-1}}{8}\) & \(\widetilde{\text{QEC}}^{\mathcal{L}}_{f}\) \\  & \(\vdots\) & & \\ \(0\) & \(H^{(0)}_{(i-l_{0})(i+l_{0})}\) & \(\frac{3^{d}+13}{8}\) & \(U^{\dagger}_{N}\) \\ \hline input & \(\widetilde{\mathcal{L}}S_{(i-l_{0}-1)(i+l_{0}+1)}S_{(i-l_{0})(i+l_{0})}\widetilde{ \mathcal{R}}\) & \(L=\frac{3^{d}+17}{4}\) & — \\ \end{tabular}
\end{table}
Table 3: Backpropagation of products \(H^{(f)}_{jk}\) of Pauli strings through the QCNN circuit with the depth \(d\). We focus on a single product at each layer \(f=1,2,...,d-2\). The table displays the length \(l_{f}\) of the Pauli string \(G^{(f)}_{(j+3f)(k-3f)}\) in the product \(H^{(f)}_{jk}\) and the unitary performed at layer \(f\). The corresponding product of SOPs measured on the input state and the length \(L\) of the SOP \(S_{(i-l_{0})(i+l_{0})}\) are displayed in the last row. Operators \(\tilde{\mathcal{L}}\) and \(\tilde{\mathcal{R}}\) are defined in the Supplementary Material and \(i=\frac{N+1}{2}\).
disentangling unitary \(U_{N}^{\dagger}\)

\[U_{N}\widetilde{\text{QEC}_{1}^{X}}^{\dagger}H_{(i-9l_{2})(i+9l_{2} )}^{(2)}\widetilde{\text{QEC}_{1}^{X}}U_{N}^{\dagger}\] \[=\bar{\mathcal{L}}\left(\prod_{\zeta}A_{\zeta}C_{\zeta}B_{\zeta} \right)\bar{\mathcal{R}}, \tag{101}\]

where \(\zeta\in\{\frac{N+1}{2}-9l_{2},\frac{N+1}{2}-9(l_{2}-1),...,\frac{N+1}{2}+9l_{ 2}\}\), \(C_{\zeta}=S_{(\zeta-1)(\zeta+1)}\) are stabilizer elements as defined in the main text, and

\[A_{\zeta}= \frac{1}{2}\left(C_{\zeta-4}C_{\zeta-2}-C_{\zeta-4}+C_{\zeta-2}+ \mathbb{1}\right), \tag{102}\] \[B_{\zeta}= \frac{1}{2}\left(\mathbb{1}+C_{\zeta+2}-C_{\zeta+4}+C_{\zeta+2}C _{\zeta+4}\right). \tag{103}\]

In Eq. (101), we used the recursion relation (101) as well as Eq. (102), see Supplementary Material for details. The product (101) involves \(2l_{2}+1=\frac{3^{d-2}+17}{4}>\frac{3^{d-2}}{4}\) terms \(A_{\zeta}\) and \(B_{\zeta}\). By distributing the parentheses in all terms \(A_{\zeta}\) and \(B_{\zeta}\), we obtain a sum of \(16^{l_{2}+1}>2^{3^{d-2}}\) products of SOPs \(S_{jk}\). Note that these products of SOPs emerge from only the single product \(H_{(\frac{N+1}{2}-9l_{2})(\frac{N+1}{2}+9l_{2})}^{(2)}\) at layer \(f=1\). This places the lower bound \(2^{3^{d-2}}\) on the total number of products of SOPs in the multiscale SOP \(S_{\text{M}}\), which involves also many other products of SOPs.

In summary, we showed in this appendix that the QCNN with alternating \(X\)-error and \(Z\)-error correcting layers detecting the '\(ZX\)' phase measures the multiscale SOP \(S_{\text{M}}\), see Eq. (11). This multiscale SOP is a sum of products of SOPs \(S_{jk}\) whose length \(L\sim 3^{d}\) increases exponentially with the depth \(d\) of the QCNN. The lower bound for the number of products of SOPs in the sum is \(2^{3^{d-2}}\).

## Appendix F Sample complexity of the multiscale string order parameter

In this appendix, we discuss the sample complexity of directly sampling the multiscale SOP of Eq. (11) from the input state via local Pauli measurements without using any quantum circuit.

A local Pauli measurement consists of simultaneously reading out all qubits \(j\) in the basis of Pauli operators \(\sigma_{j}=X_{j},Y_{j},Z_{j}\). We thus measure in the basis of the tensor product \(\mathcal{B}=\bigotimes_{j=1}^{N}\sigma_{j}\) of the Pauli operators \(\sigma_{j}\). A product of SOPs can be sampled via the local Pauli measurement in any Basis \(\mathcal{B}\) in which it is diagonal. Several products of SOPs that are diagonal in the same tensor product basis can be simultaneously sampled in this basis. We can express the multiscale SOP

\[S_{\text{M}}=\sum_{m=1}^{b}O_{m} \tag{104}\]

in terms of operators \(O_{m}\) which are sums of products of SOPs that are diagonal in the tensor product basis \(\mathcal{B}_{m}\). To determine the expectation value of the multiscale SOP, we can individually measure each operator \(O_{m}\) using local Pauli measurements. While the sample complexity of this measurement depends on the variance \(\langle O_{m}^{2}\rangle-\langle O_{m}\rangle^{2}\) of the operators \(O_{m}\), the number \(b\) of different bases \(\mathcal{B}_{m}\) in which we need to measure places a lower bound on the sample complexity. Note that the decomposition (104) of the multiscale SOP is not unique as a product of SOPs can be diagonal in several bases \(\mathcal{B}_{m}\). To determine the lower bound for the sample complexity of the multiscale SOP, we now investigate the minimal number \(B\) of bases in which we need to measure.

To this end, we focus on the products (101) of SOPs. We rewrite the products (101) as

\[\bar{\mathcal{L}}\left(\prod_{\zeta}A_{\zeta}C_{\zeta}B_{\zeta} \right)\bar{\mathcal{R}}\] \[=\bar{\mathcal{L}}A_{\frac{N+1}{2}-9l_{2}}\left(\prod_{\zeta}C_{ \zeta}\right)\left(\prod_{\zeta^{\prime}}K_{\zeta^{\prime}}\right)B_{\frac{N+ 1}{2}+9l_{2}}\bar{\mathcal{R}}, \tag{105}\]

where \(\zeta^{\prime}\in\{\frac{N+1}{2}-9l_{2}+4,\frac{N+1}{2}-9l_{2}+13,...,\frac{N+1 }{2}+9l_{2}-5\}\) and

\[K_{\zeta^{\prime}}= \frac{1}{4}\left[\left(C_{\zeta^{\prime}-2}+\mathbb{1}\right) \left(C_{\zeta^{\prime}+3}+\mathbb{1}\right)\right. \tag{106}\] \[+\left(C_{\zeta^{\prime}-2}-\mathbb{1}\right)C_{\zeta^{\prime}} \left(C_{\zeta^{\prime}+3}+\mathbb{1}\right)\] (107) \[+\left(C_{\zeta^{\prime}-2}+\mathbb{1}\right)C_{\zeta^{\prime}+1} \left(C_{\zeta^{\prime}+3}-\mathbb{1}\right)\] (108) \[+\left.\left(C_{\zeta^{\prime}-2}-\mathbb{1}\right)C_{\zeta^{ \prime}}C_{\zeta^{\prime}+1}\left(C_{\zeta^{\prime}+3}-\mathbb{1}\right) \right]. \tag{109}\]

Crucially, each operator \(K_{\zeta^{\prime}}\) involves terms that need to be measured in three different tensor product bases. Recalling that \(C_{\zeta^{\prime}}=Z_{\zeta^{\prime}-1}X_{\zeta^{\prime}}Z_{\zeta^{\prime}+1}\), the terms in the line (107) are diagonal in the \(X\) basis on qubit \(\zeta^{\prime}\) and in the computational basis on qubit \(\zeta^{\prime}+1\). The terms in the line (108) are diagonal in the computational basis on qubit \(\zeta^{\prime}\) and in the \(X\) basis on qubit \(\zeta^{\prime}+1\). The terms in the line (108) are diagonal in the \(Y\) basis on qubits \(\zeta^{\prime}\) and \(\zeta^{\prime}+1\). As a result, we need to measure in three different bases \(X_{\zeta^{\prime}}Z_{\zeta^{\prime}+1}\), \(Z_{\zeta^{\prime}}X_{\zeta^{\prime}+1}\) and \(Y_{\zeta^{\prime}}Y_{\zeta^{\prime}+1}\) on qubits \(\zeta^{\prime}\) and \(\zeta^{\prime}+1\). The terms in the line (107) are diagonal in any of these three bases as they act as the identity operator on qubits \(\zeta^{\prime}\) and \(\zeta^{\prime}+1\).

The product of SOPs (105) involves \(2\,l_{2}=\frac{3^{d-2}+13}{4}>3^{d-4}\) operators \(K_{\zeta^{\prime}}\). Distributing the parentheses in all operators \(K_{\zeta^{\prime}}\) on the right-hand side of Eq. (105) gives rise to products of SOPs with mutually incompatible bases \(\bigotimes_{\zeta^{\prime}}\{X_{\zeta^{\prime}}Z_{\zeta^{\prime}+1},Z_{\zeta^{ \prime}}X_{\zeta^{\prime}+1},X_{\zeta^{\prime}}Y_{\zeta^{\prime}+1}\}\) on qubits \(\zeta^{\prime}\) and \(\zeta^{\prime}+1\). As a result, we need to measure in \(3^{2l_{2}}>3^{3^{d-4}}\) different tensor product bases \(\mathcal{B}_{m}\). This places the lower bound \(3^{3^{d-4}}\) for the sample complexity of measuring the multiscale SOP via local Pauli measurements.