Topological phases of matter often share a deep connection between their bulk and edge properties^{8,9}. In the case of the Haldane chain, the bulk exhibits a hidden antiferromagnetic (AFM) order characterized by AFM correlations interlaced with an arbitrary number of *S*^{z} = 0 elements, where *S*^{z} denotes the spin component in the z-direction. This pattern can only be revealed through non-local string correlations that are sensitive to the local spin states, which, however, require detection of the quantum many-body system with microscopic resolution. Although this was not possible in early experiments on spin-1 chains, evidence for a spin gap, as well as spin-1/2 localized edge states, was found using neutron scattering^{10,11} or electron resonance experiments^{12,13} while not directly probing this hidden order or spatially resolving the edge states. Recent developments in quantum simulations enable one to go beyond such solid-state bulk measurements by observing quantum many-body systems with single-site resolution^{14,15,16,17,18} and in a fully spin- and density-resolved way^{19,20}. This provides a rich diagnostic tool to obtain a direct microscopic picture of the hidden order in experiments^{21,22}. The power of this technique has also been demonstrated recently in a study that was able to reveal a symmetry-protected topological (SPT) phase in the hardcore boson Su–Schrieffer–Heeger (SSH) model using Rydberg atoms^{23}. Here we expand on those results by realizing a finite-temperature version of the Haldane phase in a spin system with tuneable coupling strength, system size and controlled charge fluctuations. We show this by measuring both topological and trivial string order parameters.

An instructive way to engineer the Haldane phase in systems of spin-1/2 fermions is on the basis of the AKLT model^{4,24}, in which a spin-1 particle is formed out of two spin-1/2 particles. Thus, spin-1/2 ladder systems emerge as an experimentally realizable platform for the Haldane phase. Whereas a natural implementation with spin-1 particles on individual rungs requires ferromagnetic rung couplings and antiferromagnetic leg couplings, a much wider variety of couplings in spin-1/2 quantum ladders feature the Haldane phase^{25,26}. This includes the antiferromagnetic Heisenberg case, which we realize here as the strong-interaction limit of the Fermi–Hubbard model.

In our experiment, we prepare such ladders by adiabatically loading a spin-balanced mixture of the two lowest hyperfine states of ^{6}Li into an engineered lattice potential (Methods). As illustrated in Fig. 1a, we realize four isolated two-leg ladders with a variable number (*L*) of unit cells (where *L* is therefore also equivalent to length), surrounded by a low-density bath of particles^{27}. The unit cells are chosen to be either along the rungs of the ladders (vertical unit cell, Fig. 1b) or along the diagonals (diagonal unit cells, Fig. 1c). The edges of the ladders are then engineered to match the choice of unit cell: straight edges are chosen for vertical unit cells, whereas one site is blocked on each edge in the case of diagonal unit cells. The atoms in the lowest band of the optical lattice are well described by the Fermi–Hubbard model, with tunnelling energies, ({t}_{parallel }) (chain), ({t}_{perp }) (rung), and on-site interactions *U*. For half-filling and at strong (U/{t}_{parallel ,perp }approx 13), used throughout most of our experiments (see Methods for details), density fluctuations are suppressed and the spin ladder realizes the Heisenberg model^{28} with Hamiltonian:

$$hat{H}={J}_{parallel }sum _{begin{array}{c}xin [0,L)\ y=A,Bend{array}}{hat{{bf{S}}}}_{x,y}cdot {hat{{bf{S}}}}_{x+1,y}+{J}_{perp }sum _{xin [0,L)}{hat{{bf{S}}}}_{x,A}cdot {hat{{bf{S}}}}_{x,B}$$

(1)

with positive leg and rung couplings, ({J}_{parallel ,perp }=4{t}_{parallel ,perp }^{2}/U) and the spin-1/2 operators ({hat{{bf{S}}}}_{x,y}) at site (*x*, *y*), with *A*, *B* denoting the two legs of the ladder.

The topological properties are most easily explained in the limit ({J}_{perp }gg {J}_{parallel }), where strong spin singlets form along the rungs and the system exhibits an energy gap of ({J}_{perp }). The behaviour on the edges of the ladder then depends on how the system is terminated, and therefore on which unit cells have been chosen. For diagonal unit cells (Fig. 1b), two unpaired spin-1/2 particles remain and the many-body system has a fourfold degeneracy that is only weakly lifted by an edge-to-edge coupling, which vanishes exponentially with system size (Supplementary Information). In the trivial case of vertical unit cells (Fig. 1c), all spins pair into singlets and the ground state is unique. These descriptions remain valid even for weaker ({J}_{perp }/{J}_{parallel }), where the singlet alignment may change between vertical and horizontal, but any line between two rungs cuts an even number of singlets^{29,30}.

To make the analogy between the spin-1/2 ladder and the Haldane integer chain more apparent, we switch to a description in terms of total spin per *k*th unit cell, ({hat{{bf{S}}}}_{k}={hat{{bf{S}}}}_{k,{rm{A}}}+{hat{{bf{S}}}}_{k,{rm{B}}}), where the indices (A, B) indicate the two spin-1/2 particles in the same unit cell, making an integer spin. In the diagonal unit cell such a system shows a high (≥80%) triplet fraction^{26} (Supplementary Information). We note that this spin ladder can be adiabatically connected to a spin-1 chain by including ferromagnetic couplings within the unit cell^{25}. However, having a high triplet fraction is not essential for having a well-defined Haldane phase, as both systems share the same universal SPT features^{26}.

The defining property of the Haldane SPT phase is that it is an integer-spin chain with spin-1/2 edge modes: the bulk SO(3) symmetry is said to fractionalize into SU(2) symmetry at the edge. It has no spontaneous symmetry breaking and thus the spin correlation function (langle {hat{S}}_{k}^{z}{hat{S}}_{k+d}^{z}rangle ) is short range. Instead, the aforementioned symmetry fractionalization^{6,7} can be detected in the bulk using string order parameters^{3,31}:

$${g}_{{mathscr{O}},U}(d)=langle {hat{{mathscr{O}}}}_{k}(mathop{prod }limits_{l=k+1}^{k+d-1}{hat{U}}_{l}){hat{{mathscr{O}}}}_{k+d}rangle $$

(2)

with an on-site symmetry ({hat{U}}_{l}) and endpoint operator ({hat{{mathscr{O}}}}_{k}), where *l* denotes the unit cell and *d* the string distance (Fig. 2 and Supplementary Information). This correlator probes the transformation behaviour of the bulk under a symmetry ({hat{U}}_{l}); for example, a spin rotation around the *z* axis by π, ({hat{R}}_{l}^{z}equiv {rm{exp }}({i}{rm{pi }}{hat{S}}_{l}^{z})). The pure-string correlator ({g}_{{mathbb{1}},{R}^{z}}(d)), where ({hat{{mathscr{O}}}}_{k}=1) and ({hat{U}}_{l}={hat{R}}_{l}^{z}), is non-zero for (dgg 1) if the edge does not have half-integer spins^{31}. This is the case for the topologically trivial configuration but not for the Haldane phase, in which the symmetry is fractionalized. The spin-string operator ({g}_{{S}^{z},{R}^{z}}(d))(ref. ^{3}), ({hat{{mathscr{O}}}}_{k}={hat{S}}_{k}^{z}), exhibits the opposite behaviour and is non-zero only in the Haldane phase (see Supplementary Information for details about the symmetries of the Haldane phase). Thus we can identify the Haldane phase by comparing the two string correlators ({g}_{{S}^{z},{R}^{z}}) and ({g}_{{mathbb{1}},{R}^{z}}), and observe opposite behaviour in the two different regimes.

Another perspective on ({g}_{{S}^{z},{R}^{z}}) can be gained by recognizing it as a normal two-point correlator at distance *d*, which ignores all spin-0 contributions along the way (‘squeezed space’^{22,32}). In the underlying spin-1/2 system, this order stems from *N *− 1 consecutive rungs dominantly consisting of *N *− 1 singlets and two spin-1/2 states, which have a combined total spin of +1, 0 or −1.

To observe the characteristics of the SPT phase, we prepare a two-leg ladder of length *L* = 7 and ({J}_{perp }/{J}_{parallel }=1.3(2)) in both the topological and the trivial configuration. The tailored potential yields a homogeneous filling of the system with sharp boundaries (Fig. 2a), which is characterized by a remaining density variance over the system of 2 × 10^{−4}. To focus on the spin physics, we select realizations with ({N}_{uparrow }+{N}_{downarrow }=2L) per ladder. Additionally, we exclude ladders with an excessive number of doublon–hole fluctuations and do not consider strings with odd atom numbers in the string or the endpoints of the correlator (Methods). We characterize the spin-balanced ladder systems (({M}^{z}equiv ({N}_{uparrow }-{N}_{downarrow })/2=0)) by evaluation of the string order parameters, as defined in equation (2). In the topological configuration, we observe fast decay of ({g}_{{S}^{z},{R}^{z}}) over a distance of approximately one site and a long-range correlation up to *d* = 6, with a final value of ({g}_{{S}^{z},{R}^{z}}simeq 0.1) (Fig. 2b). In contrast, for the trivial configuration, the correlation decays rapidly to zero as a function of the string correlator length. The opposite behaviour is seen for ({g}_{{mathbb{1}},{R}^{z}}(d)), demonstrating the hidden correlations expected for both phases.

Furthermore, the two-point spin correlation, (C(d)equiv {g}_{{S}^{z},{mathbb{1}}}(d)=)(langle {hat{S}}_{k}^{z}{hat{S}}_{k+d}^{z}rangle ,,) yields only the short-range AFM correlation characteristic for a gapped phase (see insets in Fig. 2b). It is interesting to note that at the largest distance in the topological case, *C*(*d* = 6) displays a clear (negative) correlation between the two edge spins, despite small correlations at shorter distances. This (classical) correlation confirms the existence of a non-magnetized bulk, such that spins on the edges of the system must be of opposite direction at global *M*^{z} = 0.

We probe the edges explicitly by measuring the amplitude of the local rung-averaged magnetization *m*^{z}(*x*) as a function of rung position *x* for different sectors of the ladder magnetization *M*^{z} (Fig. 2c). In the case of an imbalanced spin mixture with *M*^{z} = ±1, we see that the two end sites exhibit on average a higher magnetization than the bulk rungs in the topological configuration. This is consistent with the bulk of the ground states of both phases forming a global singlet, and only the edges of the topological phase carrying an excess spin-1/2 without energy cost. The measured bulk magnetization can be attributed to finite-temperature effects (Supplementary Information).

The SPT phase is expected to be robust^{26} on variation of the ratio ({J}_{perp }/{J}_{parallel }), but maintains a finite gap in the system. We realize both the trivial and topological configuration with different ({t}_{perp }/{t}_{parallel }) at almost fixed *U* and study the string correlators at maximal distance (*L *− 1) versus ({J}_{perp }/{J}_{parallel }) (Fig. 3a). For the topological configuration with diagonal unit cells, we observe ({g}_{{mathbb{1}},{R}^{z}}(L-1)simeq 0) and (|{g}_{{S}^{z},{R}^{z}}| > 0) for all ({J}_{perp }/{J}_{parallel }) with a maximum around ({J}_{perp }/{J}_{parallel }simeq 1.3(2)) (that is, ({J}_{perp }/({J}_{perp }+{J}_{parallel })simeq 0.56(4))), whereas for the trivial case the role of the correlators is reversed. Both phases continuously connect in the limit of two disconnected chains at ({J}_{perp }=0). These observations demonstrate qualitatively all the key predictions of the antiferromagnetic spin-1/2 ladder at temperature *T* = 0 (ref. ^{26}) and the strengths of the measured correlations are consistent with exact diagonalization (ED) calculations using an entropy per particle (S/N=(0.3-0.45),{k}_{{rm{B}}}) (shaded lines in Fig. 3a).

We reveal these features despite the finite temperature in our system, which would destroy the long-range hidden order in an infinite system. The total entropy in our system is, however, still low enough to yield a large fraction of realizations of the topological ground state. In larger systems, the total number of thermal excitations grows (at fixed entropy per particle) and the non-local correlator (|,{g}_{{S}^{z},{R}^{z}}(L-1)|) decreases (see inset of Fig. 3a), consistent with vanishing correlations in the thermodynamic limit, thus yielding a restriction on our system size at our level of experimental precision and entropy per particle (Supplementary Information). Finite size effects are explored in detail in the Supplementary Information. We note that the difference between the SPT phase and the trivial phase is here clearly shown by considering both ({g}_{{S}^{z},{R}^{z}}) and ({g}_{{mathbb{1}},{R}^{z}}).

To investigate the localization length of the edge states, we evaluate our data for ({m}^{z}) = ±1 and plot the local magnetization per unit cell ({m}^{z})(*k*) for different system sizes (Fig. 3b). Because of the singlets in the bulk, the excess spin is most likely to be found at the edges of the system. This spin partly polarizes the neighbouring sites antiferromagnetically, leading to an exponentially localized net magnetization with AFM substructure^{33}. The data are well described by the fit function ({m}^{z}(k)={m}_{{rm{B}}}+{m}_{{rm{E}}}left({(-1)}^{k}{{rm{e}}}^{-k/xi }+{(-1)}^{L-k-1}{{rm{e}}}^{-(L-k-1)/xi }right)) with free bulk magnetization *m*_{B}, edge magnetization *m*_{E} and decay length *ξ*. In Fig. 3c, we show how this localization length *ξ* decreases as we approach the limit of rung singlets, ({J}_{perp }gg {J}_{parallel }). Comparison with ED lets us identify two regimes: at ({J}_{perp }gtrsim {J}_{parallel }), the measured *ξ* drops with larger ({J}_{perp }) and coincides with theory independent of temperature, whereas at low ({J}_{parallel }) thermal effects dominate, limiting the increase of *ξ* to three sites for our system (Supplementary Information).

Thus far, we have worked in the Mott limit where density fluctuations can be ignored, such that the spin Hamiltonian, equation (1), is a good effective description of the Fermi–Hubbard ladder. However, it is known that the Haldane SPT phase can be unstable to density fluctuations^{34,35,36}. By reducing (U/{t}_{parallel }), the symmetry in the unit cell in the bulk changes from SO(3) to SU(2), as it now may contain both half-integer and integer total spin. This effectively removes the distinction between bulk and edge (Supplementary Information). This means that the edge mode and string order parameter are no longer topologically non-trivial, which is also manifested in the fact that the two phases can be adiabatically connected by tuning through a low-(U/{t}_{parallel }) regime if one breaks additional symmetries but preserves spin-rotation symmetry^{34,35,36}. In particular, the above string orders lose their distinguishing power: ({g}_{{S}^{z},{R}^{z}}) and ({g}_{{mathbb{1}},{R}^{z}}) will both generically have long-range order away from the Mott limit^{34}.

Intriguingly, despite the breakdown of the above symmetry argument and string order parameter, the Hubbard ladder (with diagonal unit cell) remains a non-trivial SPT phase due to its sublattice symmetry. This symmetry is a direct consequence of the ladder being bipartite (see Supplementary Information for details). It is simplest to see that this protects the SPT phase in the limit *U* = 0, where the two spin species decouple, such that our model reduces to two copies of the SSH chain^{37}. It is known that such a stack remains in a non-trivial SPT phase in the presence of interactions, namely *U* ≠ 0 (ref. ^{38}). Moreover, together with the parity symmetry of spin-down particles, ({hat{P}}_{l}^{downarrow }equiv {rm{exp }}left[{i}{rm{pi }}left({hat{n}}_{l,{rm{A}}}^{downarrow }+{hat{n}}_{l,{rm{B}}}^{downarrow }right)right]), it then gives rise to a different string order parameter: the topological phase is characterized by long-range order in ({g}_{{S}^{z},{P}^{downarrow }}), whereas it has vanishing correlations for ({g}_{{mathbb{1}},{P}^{downarrow }}), with the roles being reversed in the trivial phase. This novel string order is derived in the Supplementary Information. Remarkably, in the Heisenberg limit, it coincides with the conventional string order parameter used before.

In the topological phase it is meaningful to normalize ({g}_{{S}^{z},{P}^{downarrow }}) to ({tilde{g}}_{{S}^{z},{P}^{downarrow }}=eta {g}_{{S}^{z},{P}^{downarrow }}) with ({eta }^{-1}=langle |{hat{S}}_{k}^{z}||{hat{S}}_{k+d}^{z}|rangle ), which effectively excludes endpoints with spin *S*^{z} = 0. Indeed, we find unchanged string correlations ({tilde{g}}_{{S}^{z},{P}^{downarrow }}) and ({g}_{{mathbb{1}},{P}^{downarrow }}) down to the lowest experimentally explored value (U/{t}_{parallel }=2.5(2)) (Fig. 4a, b) and edge state signals down to (U/{t}_{parallel }=5.0(3)) (Fig. 4c). Density matrix renormalization group (DMRG) calculations for (Lto infty ) confirm non-zero ({tilde{g}}_{{S}^{z},{P}^{downarrow }}) (*L*−1) at *T* = 0 and for all rung-coupling strengths (Fig. 4d), while ({g}_{{mathbb{1}},{P}^{downarrow }}(L-1)) is strictly zero. Owing to the normalization ({tilde{g}}_{{S}^{z},{P}^{downarrow }}(L-1)) goes to 1 for ({J}_{perp }gg {J}_{parallel }).

In our work, we realized a finite-temperature version of the topological Haldane SPT phase using the full spin and density resolution of our Fermi quantum gas microscope. We demonstrated the robustness of the edge states and the hidden order of this SPT phase in both the Heisenberg and the Fermi–Hubbard regime. In the future, studies may extend the two-leg ladder to a varying number of legs, in which one would expect clear differences between even and odd numbers of legs^{39} and topological effects away from half-filling^{40}, or may investigate topological phases in higher dimensions^{41}. Furthermore, the ladder geometry holds the potential to reveal hole–hole pairing^{42} at temperatures more favourable than in a full two-dimensional system.