# Real-space Formalism for the Euler Class and Fragile Topology in
Quasicrystals and Amorphous Lattices

Dexin Li  Citian Wang  School of Physics, Peking University, Beijing 100871,
China  Huaqing Huang<EMAIL_ADDRESS>School of Physics, Peking
University, Beijing 100871, China  Collaborative Innovation Center of Quantum
Matter, Beijing 100871, China  Center for High Energy Physics, Peking
University, Beijing 100871, China

###### Abstract

We propose a real-space formalism of the topological Euler class, which
characterizes the fragile topology of two-dimensional systems with real wave
functions. This real-space description is characterized by local Euler markers
whose macroscopic average coincides with the Euler number, and it applies
equally well to periodic and open boundary conditions for both crystals and
noncrystalline systems. We validate this by diagnosing topological phase
transitions in clean and disordered crystalline systems with the reality
endowed by the space-time inversion symmetry $\mathcal{I}_{ST}$. Furthermore,
we demonstrated the topological Euler phases in quasicrystals and even in
amorphous lattices lacking any spatial symmetries. Our work not only provides
a local characterization of the fragile topology but also significantly
extends its territory beyond $\mathcal{I}_{ST}$-symmetric crystalline
materials.

Introduction.—Topological phases have garnered attention for their unique
properties, originating with the integer quantum Hall effect which is
characterized by the topological invariant called the Chern number [1, 2, 3]
and associated chiral edge modes[4, 5]. Mathematically, the Chern number is
derived from the Chern class, a cohomology class characterizing complex vector
bundles. Typically, Chern numbers can be determined from complex Bloch wave
functions via a momentum-space expression that relies on the translation
invariance of crystalline solids [6, 7, 8, 9]. However, in open-boundary
systems, or in the presence of disorder, the lack of transitional invariance
renders the momentum-space expression no longer available. This has led to the
development of a real-space representation of the Chern number [10], including
local Chern markers [11, 12] and the nonlocal Bott index [13, 14, 15], which
triggers extensive study on the real-space characterizations of more
topological states of matter [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43].

Recently, novel topological phases characterized by Euler and Stiefel–Whitney
classes have been proposed in orientable real vector bundles associated with
real Bloch states [44, 45, 46, 47, 48, 49]. Physically, two-dimensional real
wave functions can be topologically classified by the Stiefel–Whitney numbers
[50, 51, 52] which are $\mathbb{Z}_{2}$ invariants taking either 0 or 1, and
each two-band subspace may exhibit a fragile topology that is characterized by
an integer Euler number $e\in\mathbb{Z}$ [53, 54, 55]. Similar to the Chern
number, the Euler number can be expressed as an integral in momentum space for
real orientable two-band systems, and its parity is identical to the second
Stiefel-Whitney number $w_{2}$, implying a close relationship between these
two classes. Unlike the Chern insulator, a system with nontrivial $w_{2}$ or
equivalently odd $e$ exhibits a higher-order bulk-boundary correspondence,
resulting in the existence of corner states when additional chiral symmetry is
present [51, 52, 56, 57]. Typically, the real Bloch states in crystals are
enforced by the space-time inversion symmetry $\mathcal{I}_{ST}$ (time-
reversal $\mathcal{T}$ combined with inversion $\mathcal{P}$ or two-fold
rotation $\mathcal{C}_{2z}$) [58], which can be destroyed locally in the
presence of disorder. Moreover, in a finite nonmagnetic system with open
boundaries, $\mathcal{I}_{ST}$ symmetry is not even essential for the reality
condition. The limitation of the momentum-space formula makes it urgent to
search for a local characterization of real topological phases in systems with
disorder and more generally in open-boundary systems inherently lacking
translation and $\mathcal{I}_{ST}$ symmetries, such as quasicrystals [59, 60,
61, 62, 63, 64] and amorphous systems [65, 66, 67, 68, 69, 70].

In this Letter, we develop a real-space formalism for Euler class topology in
2D systems. In an analogy to the Chern class, we introduce a local Euler
marker $e(\bm{r})$ to directly map the Euler topology in real space for both
crystals and noncrystalline systems. The macroscopic average of $e(\bm{r})$
coincides with the Euler number regardless of periodic or open boundary
conditions. We validate our real-space formalism by verifying topological
Euler and trivial phases in clean systems, yielding consistent results with
$\bm{k}$-space approaches. Additionally, we apply our method to a particular
$\mathcal{P}\mathcal{T}$-symmetric disordered system, successfully diagnosing
the disorder-induced topological phase transition. Furthermore, our real-space
formalism proves powerful in characterizing fragile topological phases in
quasicrystals and even in amorphous systems lacking any spatial symmetries.

Characteristic class in $\bm{k}$\- versus $\bm{r}$-space.—Characteristic
classes have received substantial attention for their connection with
characteristic numbers, which are topological invariants obtained through
integrating these classes over specific base spaces. Beyond the extensively
studied Chern class, other characteristic classes like the Euler and Stiefel-
Whitney classes are crucial for understanding the topological properties of
matters.

The Euler class is a characteristic class of oriented real vector bundles. It
can be constructed using an orthonormal basis $\\{|u_{n}(\bm{k})\rangle\\}$,
where $|u_{n}(\bm{k})\rangle$ represents the cell-periodic part of the $n$-th
occupied Bloch state
$\langle\bm{r}|\psi_{n}(\bm{k})\rangle=e^{i\bm{k}\cdot\bm{r}}\langle\bm{r}|u_{n}(\bm{k})\rangle$.
Utilizing this basis, we obtain the curvature matrix $\mathcal{F}$ with its
entries given by:

$\displaystyle\mathcal{F}_{mn}(\bm{k})=\langle\partial_{[k_{x}}u_{m}(\bm{k})|\partial_{k_{y}]}u_{n}(\bm{k})\rangle\mathrm{d}k_{x}\wedge\mathrm{d}k_{y},$
(1)

where $[\cdots,\cdots]$ denotes the commutator applied to the index $k_{x}$
and $k_{y}$. When there are two occupied bands, the Euler class can be
expressed as a differential 2-from in k space,

$\displaystyle e(\mathcal{F})$ $\displaystyle=$
$\displaystyle\frac{1}{2\pi}\mathrm{Pf}(\mathcal{F}),$ (2) $\displaystyle=$
$\displaystyle\frac{1}{2\pi}\langle\partial_{[k_{x}}u_{1}(\bm{k})|\partial_{k_{y}]}u_{2}(\bm{k})\rangle\mathrm{d}k_{x}\wedge\mathrm{d}k_{y},$

where Pf denotes the Pfaffian acting on the matrix $\mathcal{F}$. The Euler
number $e$ is an integer topological invariant for two real bands, which can
be expressed as a simple $\bm{k}$-space integral [71, 72],

$\displaystyle
e=\frac{1}{2\pi}\int_{BZ}\langle\partial_{[k_{x}}u_{1}(\bm{k})|\partial_{k_{y}]}u_{2}(\bm{k})\rangle\mathrm{d}k_{x}\mathrm{d}k_{y}.$
(3)

To derive the expression of the Euler number in $\bm{r}$-space, we start by
replacing the occupied states in the above expression with a projection
operator $\hat{P}(\bm{k})=\sum_{\mathrm{occ}}|u_{n}(\bm{k})\rangle\langle
u_{n}(\bm{k})|$ in the occupied subspace, which is a common technique used for
the Chern class [11]. After some algebra (see Supplemental Material (SM)
111See Supplemental Material at http://link.aps.org/supplemental/xxx, for more
details about the derivation and numerical calculations of the real-space
formula of the Euler number, which include Refs. [83, 91, 92, 93, 15, 11, 78,
51, 74, 71, 14, 16, 75, 47, 96, 97, 98, 99, 100].), we obtain the
$\bm{k}$-space formula of Euler number $e$ represented by $\hat{P}(\bm{k})$,

$\displaystyle
e=\frac{1}{2\pi}\int_{BZ}\mathrm{d}^{2}\bm{k}\mathrm{Pf}_{\mathrm{occ}}(\hat{P}(\bm{k})[\partial_{k_{x}}\hat{P}(\bm{k}),\partial_{k_{y}}\hat{P}(\bm{k})]),$
(4)

where Pfocc denotes the Pfaffian taken over the occupied subspace. Then we can
straightforwardly generalize it from k to r space via the duality (see SM
††footnotemark: ),

$\displaystyle\int_{BZ}\frac{\mathrm{d}^{2}\bm{k}}{(2\pi)^{2}/A}$
$\displaystyle\to$ $\displaystyle\mathrm{Tr}$
$\displaystyle\partial_{k_{x}}\hat{P}(\bm{k})$ $\displaystyle\to$
$\displaystyle\frac{L_{x}}{2\pi}(\hat{U}\hat{P}\hat{U}^{\dagger}-\hat{P}),$
$\displaystyle\partial_{k_{y}}\hat{P}(\bm{k})$ $\displaystyle\to$
$\displaystyle\frac{L_{y}}{2\pi}(\hat{V}\hat{P}\hat{V}^{\dagger}-\hat{P}),$
(5)

where $A=L_{x}L_{y}$ is the area of the system, Tr is the trace over the
coordinate space, $\hat{U}=\exp(2\pi\mathrm{i}\hat{X}/L_{x})$ and
$\hat{V}=\exp(2\pi\mathrm{i}\hat{Y}/L_{y})$ are the unitary position operator,
and $\hat{P}$ is the $\bm{r}$-space projection operator. Note that the order
of $\hat{P}$ is determined by both the site coordinates
$\bm{r}_{i}=(x_{i},y_{i})$, dependent on the lattice size, and the internal
index $n$, matching the order of $\hat{P}(\bm{k})$. Therefore, we can divide
the space on which $\hat{P}$ operates into two subspaces,
$S(\hat{P})=l^{2}(\mathbb{T}^{2})\otimes\mathbb{R}^{N}$. Here,
$l^{2}(\mathbb{T}^{2})$ is the coordinate space, where $\mathbb{T}^{2}$
denotes the two-torus, a rectangle with edge length $L_{x}$ and $L_{y}$ with
periodic boundary conditions (PBC) [15]. And $\mathbb{R}^{N}$ is internal
space with the internal degrees of freedom $N$. Consequently, we arrive at the
$\bm{r}$-space expression for the Euler number:

$\displaystyle
e=\frac{1}{2\pi}\mathrm{Tr}\mathrm{Pf}_{\mathrm{occ}}(\hat{P}[\hat{U}\hat{P}\hat{U}^{\dagger},\hat{V}\hat{P}\hat{V}^{\dagger}]),$
(6)

where Pfocc denotes the Pfaffian taken over the occupied submatrix in the
internal space (see SM for more details ††footnotemark: ). Analogous to prior
work on the local Chern marker [11], we propose defining the local Euler
marker $e(\bm{r})$ as the expression in Eq. (6) before taking the trace, i.e.,

$\displaystyle
e(\bm{r})=\frac{1}{2\pi}\mathrm{Pf}_{\mathrm{occ}}(\langle\bm{r}|\hat{P}[\hat{U}\hat{P}\hat{U}^{\dagger},\hat{V}\hat{P}\hat{V}^{\dagger}]|\bm{r}\rangle).$
(7)

As a well-defined topological invariant in real space, the $\bm{r}$-space
formula of the Euler number applies well to both crystalline and
noncrystalline systems. It not only provides an intuitive local perspective of
global topology but also serves as a valuable tool for distinguishing
topological phases in aperiodic systems without translational symmetry.

Remarks on $\bm{r}$-space Euler number.—Before proceeding, we have a few
remarks. First, the analysis we’ve conducted thus far can be directly applied
to the Chern class, and the resultant $\bm{r}$-space expression is nothing but
the Bott index,
$\mathrm{Bott}(\hat{U},\hat{V})=(1/{2\pi})\mathrm{Im}\mathrm{Tr}\log(\hat{U}\hat{V}\hat{U}^{-1}\hat{V}^{-1})$
with $\hat{U}=\hat{P}\exp(2\pi i\hat{X}/{L_{x}})\hat{P}$ and
$\hat{V}=\hat{P}\exp(2\pi i\hat{Y}/{L_{y}})\hat{P}$, which offers an
equivalent topological classification to the Chern number [14, 16]. However,
there are significant differences between the $\bm{r}$-space formulation of
the Euler and Chern number. The $\bm{r}$-space Chern number only requires a
simple trace performed consistently in both coordinate and internal space. In
contrast, for the $\bm{r}$-space Euler number, it becomes essential to
distinguish between the coordinate and internal space, which requires trace
and Pfaffian operations, respectively.

Secondly, to decompose the coordinate and internal spaces for extracting the
occupied submatrix needed for Pfaffian calculation, we apply a unitary
transformation to the eigenstates which makes $\hat{P}$ block-diagonal. This
unitary transformation corresponds to constructing a set of composite Wannier
functions, which can be determined by an explicit algorithm of localization
functional minimization proposed by Marzari and Vanderbilt [74, 75] (see SM
††footnotemark: ). Importantly, while a nontrivial topological invariant may
pose a topological obstruction for constructing Wannier representations
composed of exponentially localized states in line with lattice symmetries
[51, 76, 77, 53], it does not hinder the search for composite Wannier
functions with optimal power-law decay [78, 79, 80, 81, 82, 83].

Thirdly, the distinct treatments of Chern and Euler numbers in real space also
lead to different behaviors in finite samples under open boundary conditions
(OBC). It’s well-known that the summation of the local Chern marker over an
entire open system must equal zero, regardless of whether the system is a
Chern insulator or not. This is because the local Chern marker in the bulk is
always offset by the significant deviation at the boundary [11, 15]. In
contrast, the local Euler marker near the open boundary fades away and thus
doesn’t suffer from the counteraction under OBC, making the choice of boundary
condition irrelevant for the $\bm{r}$-space Euler number (see SM
††footnotemark: ).

Tight-binding model.—To numerically validate the $\bm{r}$-space formula of
Euler number, we consider a general $\mathcal{PT}$-symmetric tight-binding
model with the basis ($ip_{x},ip_{y},d_{xy},d_{x^{2}-y^{2}}$) per site. The
Hamiltonian is given by

$H=\sum_{i\mu}\epsilon_{\mu}c_{i\mu}^{\dagger}c_{i\mu}+\sum_{\langle
ij\rangle}\sum_{\mu\nu}t_{\mu\nu}(\bm{r}_{ij})c_{i\mu}^{\dagger}c_{j\nu},$ (8)

where $c_{i\mu}^{\dagger}(c_{i\mu})$ is electron creation (annihilation)
operator on the $\mu$ orbital at the $i$-th site. $\epsilon_{\mu}$ is the on-
site energy and $t_{\mu\nu}(\bm{r}_{ij})$ is the Slater-Koster parameterized
hopping integral [84, 85] and has an inverse-square decay with the distance
(i.e., $|\bm{r}_{ij}|^{-2}$) [86]. It has been proven that a
$\mathcal{PT}$-symmetric Hamiltonian can become real-valued through the Takagi
decomposition [87, 51]. Here we intentionally chose the $p$ orbitals to be
imaginary, which results in $\mathcal{PT}=\hat{K}$ with the complex
conjugation operator $\hat{K}$. The invariance of the Hamiltonian under
$\mathcal{PT}$ imposes the reality condition on $H$. It was previously known
that a fragile topological state with a nontrivial Euler number $e=1$ can be
achieved by considering a double band inversion between $p_{x,y}$ and
$d_{x^{2}-y^{2},xy}$ orbitals [88]. Here we verify the validity of the
$\bm{r}$-space Euler number in both crystalline and noncrystalline systems
based on this model. We also validate our expression using other models with
different Euler numbers, which are detailed in the SM ††footnotemark: .

Figure 1: (a) Orbital-resolved band structures of the square lattice with a
double band inversion between $p_{x,y}$ and $d_{x^{2}-y^{2},xy}$ orbitals. The
parameters used are $\epsilon_{p_{x},p_{y}}$ = 1.58,
$\epsilon_{d_{x^{2}-y^{2},xy}}$ = -0.42,
$V_{pp\sigma}=-0.865,V_{pp\pi}=-0.144,V_{pd\sigma}=0.173,V_{pd\pi}=0.135,V_{dd\sigma}=0.144,V_{dd\pi}=0.124,V_{dd\delta}=0.259$
eV. (b) The variation of the Euler number as the onsite energy difference
$\Delta=\epsilon_{p}-\epsilon_{d}$ changes. Other parameters remain unchanged
and the lattice size is $L=201$. (c) The $\bm{r}$-space Euler number as a
function of the disorder strength $W$ in $31\times 31$ square lattices with
periodic boundary condition (PBC). (d) The lattice size $L$ dependence of the
$\bm{r}$-space Euler number calculated without and with on-site energy
disorder ($W=1.0$ eV) using PBC and open boundary condition (OBC).

Diagnosis of Topological phase transitions.—With the well-defined
$\bm{r}$-space Euler number, we first diagnose topological phase transitions
in a square lattice based on the model in Eq. (8). As shown in Fig. 1(a), the
orbital-resolved band structure displays signs of a double band inversion
between $p_{x,y}$ and $d_{x^{2}-y^{2},xy}$ orbitals around the $\Gamma$ point,
implying their nontrivial electronic topology. We compute the Euler number in
both $\bm{k}$-space and $\bm{r}$-space, consistently yielding a value of
$e=1$, thus confirming the nontrivial Euler topology. We further examine the
evolution of the Euler number in both $\bm{k}$\- and $\bm{r}$-spaces with
increasing the on-site energy difference $\Delta=\epsilon_{p}-\epsilon_{d}$.
In Fig. 1(b), the system undergoes a topological phase transition from a
topological Euler insulator with $e=1$ (region I) to an intermediate gapless
state (II) and eventually transitions into a trivial insulator with $e=0$
(III). The calculated $\bm{r}$-space Euler number matches with the
$\bm{k}$-space one, except for the intermediate gapless phase (region II)
where the Euler number is ill-defined. This transition can be understood by
tracing the evolution of band inversion (see SM ††footnotemark: ): Starting
from a double inverted band order, the nontrivial energy gap gradually
decreases to zero with increasing $\Delta$, then remains closed over a finite
$\Delta$ range, and eventually reopens with a trivial normal band order.

Next, we demonstrate the applicability of the $\bm{r}$-space Euler number for
aperiodic systems by introducing the disorder in the on-site energies of the
aforementioned model. We specifically consider disorder that preserves
$\mathcal{PT}$ symmetry, represented by
$V_{\mathrm{dis}}=\sum_{i\in\tau_{1/2}}\lambda_{i}(c_{i}^{\dagger}c_{i}+c_{\mathcal{P}i}^{\dagger}c_{\mathcal{P}i})$
with the random variables $\\{\lambda_{i}\\}$ distributed uniformly within the
interval $[-W,W]$ on half of the sites ($\tau_{1/2}$) in the sample, where $W$
is the disorder strength. The annihilation operators $c_{i}$ and
$c_{\mathcal{P}i}$ act on the site at $\bm{r}_{i}$ and its inversion partner
$\mathcal{P}\bm{r}_{i}$, respectively. The averaged $\bm{r}$-space Euler
number as a function of $W$ is shown in Fig. 1(c). For moderate disorder, the
$\bm{r}$-space Euler number $e$ remains around 1, indicating the system
remains topologically nontrivial. Remarkably, as disorder strength $W$
increases, $e$ gradually decreases to 0, diagnosing a topological phase
transition (see SM ††footnotemark: ). Our results confirm the disorder-induced
topological phase transition classified by the topological Euler class [89,
90], and validate the $\bm{r}$-space formalism of Euler number in disordered
systems.

Figure 2: Fragile topological state characterized by $e=1$ in the Ammann-
Beenker-tiling quasicrystal based on the model in Eq. (8). The parameters are
$\epsilon_{p_{x},p_{y}}$ = 1.58, $\epsilon_{d_{x^{2}-y^{2},xy}}$ = -0.42,
$V_{pp\sigma}=-1.783,V_{pp\pi}=-0.299,V_{pd\sigma}=0.359,V_{pd\pi}=0.280,V_{dd\sigma}=0.299,V_{dd\pi}=0.257,V_{dd\delta}=0.537$
eV. The octagonal sample contains 1168 sites. (a) Energy spectrum of the
quasicrystal with OBC or twisted boundary condition (TBC). Insert shows 8
corner states (highlighted by red stars) in the bulk gap. (b) The real-space
distribution of the in-gap corner states [red stars in (a)]. (c) The
distribution of local Euler markers in the quasicrystal with OBC.

We further check the effect of lattice size and different boundary conditions
on the $\bm{r}$-space Euler number, as shown in Fig. 1(d). All calculated
$\bm{r}$-space Euler numbers converge to the limit of 1 by increasing the
lattice size, demonstrating the faithful formalism of the Euler number.
Importantly, both PBC and OBC result in similar converging behaviors of the
Euler number, with their difference diminishing as the influence of the
boundaries decreases with increasing lattice size. This suggests that the
$\bm{r}$-space formula remains reliable regardless of the boundary conditions,
which is notably different from the Chern number. We also note that the
$\bm{r}$-space Euler number converges slowly in disordered lattices. This is
because the disordered system is close to the critical point, so the energy
gap is small and the correlation length is large, which demands a larger
lattice size for accurate Euler-number calculation. Our results show that the
$\bm{r}$-space Euler number equals the exact one within a correction of order
$\mathcal{O}(1/(L\Delta E))$ for systems with lattice size $L$ and energy gap
$\Delta E$, which resembles the case of Bott index and Chern number [14].

Figure 3: Fragile topological state characterized by $e=1$ in the amorphous
square lattice based on the model in Eq. (8). The relevant parameters are as
follows: $L=31$, $\epsilon_{p_{x},p_{y}}$ = 1.58,
$\epsilon_{d_{x^{2}-y^{2},xy}}$ = -0.42,
$V_{pp\sigma}=-0.565,V_{pp\pi}=-0.044,V_{pd\sigma}=0.773,V_{pd\pi}=0.335,V_{dd\sigma}=0.444,V_{dd\pi}=0.224,V_{dd\delta}=0.659$
eV. (a) The energy eigenvalues versus the state index for the amorphous square
lattice with PBC and OBC. Four corner states in the gap are highlighted by red
stars. (b) The spatial distribution of the corner states [red stars in (a)].
(c) The real-space distribution of the local Euler marker $e(\bm{r})$ for the
amorphous system with OBC.

Fragile topology in quasicrystals and amorphous lattices.—As an application of
our proposed $\bm{r}$-space formula, we explore the Euler topology in
quasicrystals and amorphous lattices. Specifically, we consider the 2D Ammann-
Beenker-tiling quasicrystal, which possesses 8-fold rotational symmetry but
lacks transitional symmetry. In the finite octagonal quasicrystal sample with
open boundary conditions (OBC), 8 degenerate states emerge within the bulk gap
region (grey area), as shown in Fig. 2(a). The bulk gap estimation utilizes a
twisted boundary condition (TBC) to preserve octagonal symmetry and eliminate
boundary effects (see SM ††footnotemark: ). We plot the spatial distribution
of these in-gap states [see Fig. 2(b)], and find that they are well localized
at 8 corners of the octagonal quasicrystal, implying its feature of higher-
order topology. We also examine the local Euler marker distribution in the
finite quasicrystal sample, as depicted in Fig. 2(c). The plot confirms that
the local Euler markers $e(\bm{r})$ closely match the expected value of 1
within the bulk but deviate at the edges. As expected, the average of
$e(\bm{r})$ over the entire finite sample does not vanish but yields $e\approx
1$, verifying the nontrivial Euler topology of the quasicrystal.

We further study a finite amorphous lattice constructed by assigning random
site displacements away from their equilibrium position in an initial square
lattice. Consequently, all spatial symmetries are broken, including
$\mathcal{P}$ or $\mathcal{C}_{2z}$ demanded by the space-time inversion
symmetry for real Bloch states in periodic crystals. Nevertheless, for the
spinless model (8) in any amorphous lattice with OBC, it is always possible to
choose a real gauge so that both the Hamiltonian and eigenstates can be taken
real. This implies that the $\bm{r}$-space Euler number is still applicable to
identify its Euler topology. As shown in Fig. 3(a), the energy spectrum of the
finite amorphous lattice with OBC exhibits 4 corner states at the Fermi level
in the bulk gap estimated using artificial PBC (grey area). The spatial
distribution of these states supports that they are indeed localized at 4
corners of the finite sample [see Fig. 3(b)]. As shown in Fig. 3(c), the
distribution of the local Euler markers $e(\bm{r})$ is dominated in the
internal area but tends to vanish at the boundary of the finite amorphous
sample. The sum of $e(\bm{r})$ over the entirety of the finite sample yields a
nonzero Euler number which is expected to converge to the quantized value of 1
with increasing lattice size.

Conclusion.—We have proposed an explicit real-space formula for the Euler
number to identify the fragile topological phases in both crystalline and
noncrystalline systems whose wave functions are real. Specifically, the local
Euler marker $e(\bm{r})$ whose macroscopic average coincides with the Euler
number $e$, is introduced to characterize the topological order in real space.
Notably, this applies equally well to periodic and open boundary conditions.
We have validated our expression by diagnosing the topological phase
transition in crystals and disordered systems with $\mathcal{PT}$ symmetry.
Furthermore, we have also uncovered the topological Euler phases in
quasicrystals and amorphous lattices without any spatial symmetry. Our work
greatly extends the real-space topological marker for topological states in
real Hilbert space and inspires future exploration in more topological
characteristic classes.

###### Acknowledgements.

We thank Guo Chuan Thiang for the valuable discussions. This work is supported
by the National Key R&D Program of China (Grant No. 2021YFA1401600) and the
National Natural Science Foundation of China (Grant No. 12074006). The
computational resources were supported by the high-performance computing
platform of Peking University.

##  Appendix A Orientability of our models

In this section, we examine the orientability of our models. The Euler class
$\mathcal{e}(\mathcal{F})$ is defined as

$\displaystyle\mathcal{e}(\mathcal{F})=\frac{1}{2\pi}\mathrm{Pf}(\mathcal{F}),$
(S1)

where Pf denotes the Pfaffian acting on the curvature matrix $\mathcal{F}$.
Under the basis transformation $O$, the Euler class acquires an additional
factor $\mathrm{det}(O)$, as shown below:

$\displaystyle\mathcal{e}(\mathcal{F})$ $\displaystyle\to$
$\displaystyle\mathcal{e}(O^{-1}\mathcal{F}O),$ (S2) $\displaystyle=$
$\displaystyle\frac{1}{2\pi}\mathrm{Pf}(O^{-1}\mathcal{F}O),$ $\displaystyle=$
$\displaystyle\frac{1}{2\pi}\mathrm{Pf}(O^{T}\mathcal{F}O),$

where the last equality originates from the orthonormality property of the
real wave functions, which means $O^{-1}=O^{T}$. It’s worth noting that for a
$2n\times 2n$ skew-symmetric matrix $A$ and an arbitrary $2n\times 2n$ matrix
$B$, the Pfaffian satisfies the identity
$\mathrm{Pf}(B^{T}AB)=\mathrm{Pf}(A)\mathrm{det}(B)$. Therefore, since the
curvature matrix $\mathcal{F}$ is skew-symmetric, we can simplify the
expression further as:

$\displaystyle\mathcal{e}(\mathcal{F})$ $\displaystyle\to$
$\displaystyle\frac{1}{2\pi}\mathrm{Pf}(\mathcal{F})\mathrm{det}(O),$ (S3)
$\displaystyle=$ $\displaystyle\mathcal{e}(\mathcal{F})\mathrm{det}(O).$

For the Euler class $e(\mathcal{F})$ to be a characteristic class, it must
remain invariant under any basis transformation. Therefore, a certain
transformation matrix $O$ with $\mathrm{det}(O)=1$ is essential. Since $O$ is
the transformation matrix between orthonormal basis, it naturally satisfies
the condition $|\mathrm{det}(O)|$=1. Thus, system orientability is necessary
to prevent $\mathrm{det}(O)=-1$ and ensure the invariance of the Euler class.

In fact, the orientability of the Brillouin zone is determined by the first
Stiefel-Whitney class $w_{1}$, which is the total Berry phase of the occupied
states over the Brillouin zone [47]. Because the Chern number of a time-
reversal symmetric system is always trivial, a complex smooth gauge can be
found in this system. Given a Berry connection $\bm{A}$ that satisfies
$\mathcal{F}=\mathrm{d}\bm{A}$ in this gauge, we have

$w_{1}|_{C}=\frac{1}{\pi}\oint_{C}\mathrm{d}\bm{k}\cdot\mathrm{Tr}\bm{A}(\bm{k}).$
(S4)

Therefore, our models are easily confirmed to be orientable with a trivial
$w_{1}=0$, allowing us to proceed with our discussion on the Euler class and
the second Stiefel-Whitney class.

##  Appendix B Derivation of Eq. (4) in the main text

In this section, we derive Eq. (4) in the main text, beginning with the
relation between the Chern and Euler class in a two-dimensional system.
Specifically, there is a correspondence between the first Chern class $c_{1}$
and the Euler class $e$:

$\displaystyle c_{1}(\mathcal{F}_{\mathbb{C}})=\mathcal{e}(\mathcal{F}),$ (S5)

where $\mathcal{F}_{\mathbb{C}}$ is the curvature over a complex number field,
isomorphic to $\mathcal{F}$ over a real number field through an isomorphism
$\mathbb{C}\cong\mathbb{R}\oplus\mathbb{R}$. In particular, for a system with
two occupied bands ($N_{\mathrm{occ}}=2$), we can construct a complex Bloch
state

$\displaystyle|u\rangle=\frac{1}{\sqrt{2}}(|u_{1}\rangle+\mathrm{i}|u_{2}\rangle),$
(S6)

where $|u_{n}\rangle$ $(n=1,2)$ represents the cell-periodic part of the
$n$-th occupied Bloch state $|\psi_{n}(\bm{k}))\rangle$. Note that for
brevity, we omit the explicit dependence of $\bm{k}$ in this section for
$|u_{n}(\bm{k})\rangle$, $|u(\bm{k})\rangle$, and the projection operator
$\tilde{P}(\bm{k})$. Based on the complex Bloch states, the first Chern class
is given by

$\displaystyle
c_{1}(\mathcal{F}_{\mathbb{C}})=\frac{1}{2\pi\mathrm{i}}\mathcal{F}_{\mathbb{C}}=\frac{1}{2\pi\mathrm{i}}\langle\partial_{[k_{x}}u|\partial_{k_{y}]}u\rangle\mathrm{d}k_{x}\wedge\mathrm{d}k_{y}.$
(S7)

This allows us to derive the expression of the Euler class from the first
Chern class.

To begin with, we can express the first Chern number as a $\bm{k}$-space
integral:

$\displaystyle
c_{1}=\frac{1}{2\pi\mathrm{i}}\int_{BZ}\mathrm{d}^{2}\bm{k}\mathrm{Tr}(\tilde{P}\partial_{[k_{x}}\tilde{P}\partial_{k_{y}]}\tilde{P}),$
(S8)

where the integral is over the Brillouin zone (BZ) and
$\tilde{P}=|u\rangle\langle u|$ is the projection operator, with its real and
imaginary parts given by:

$\displaystyle\mathrm{Re}{\tilde{P}}$ $\displaystyle=$
$\displaystyle\frac{1}{2}(|u_{1}\rangle\langle u_{1}|+|u_{2}\rangle\langle
u_{2}|)$ (S9)

and

$\displaystyle\mathrm{Im}{\tilde{P}}$ $\displaystyle=$
$\displaystyle\frac{1}{2}(|u_{2}\rangle\langle u_{1}|-|u_{1}\rangle\langle
u_{2}|).$ (S10)

Using Eq. (S6), we can rewrite Eq. (S8) as

$\displaystyle
c_{1}=\frac{1}{2\pi\mathrm{i}}\int_{BZ}\mathrm{d}^{2}\bm{k}\langle
u|[\partial_{k_{x}}\tilde{P},\partial_{k_{y}}\tilde{P}]|u\rangle,$ (S11)

and then the Euler number is given by

$\displaystyle e$ $\displaystyle=$
$\displaystyle\frac{1}{4\pi\mathrm{i}}\int_{BZ}\mathrm{d}^{2}\bm{k}\langle
u_{1}|[\partial_{k_{x}}\tilde{P},\partial_{k_{y}}\tilde{P}]|u_{1}\rangle+\frac{1}{4\pi\mathrm{i}}\int_{BZ}\mathrm{d}^{2}\bm{k}\langle
u_{2}|[\partial_{k_{x}}\tilde{P},\partial_{k_{y}}\tilde{P}]|u_{2}\rangle$
(S12) $\displaystyle+$
$\displaystyle\frac{1}{4\pi}\int_{BZ}\mathrm{d}^{2}\bm{k}\langle
u_{1}|[\partial_{k_{x}}\tilde{P},\partial_{k_{y}}\tilde{P}]|u_{2}\rangle-\frac{1}{4\pi}\int_{BZ}\mathrm{d}^{2}\bm{k}\langle
u_{2}|[\partial_{k_{x}}\tilde{P},\partial_{k_{y}}\tilde{P}]|u_{1}\rangle.$

To keep the Euler number $e$ real, we can simplify the operators
[$\partial_{k_{x}}\tilde{P},\partial_{k_{y}}\tilde{P}$] in Eq. (S12) to

$\mathrm{i}[\partial_{k_{x}}\mathrm{Re}\tilde{P},\partial_{k_{y}}\mathrm{Im}\tilde{P}]+\mathrm{i}[\partial_{k_{x}}\mathrm{Im}\tilde{P},\partial_{k_{y}}\mathrm{Re}\tilde{P}]$
(S13)

for the first two terms and

$[\partial_{k_{x}}\mathrm{Re}\tilde{P},\partial_{k_{y}}\mathrm{Re}\tilde{P}]-[\partial_{k_{x}}\mathrm{Im}\tilde{P},\partial_{k_{y}}\mathrm{Im}\tilde{P}]$
(S14)

for the other terms. Since $\\{|u_{n}\rangle\\}$ are orthonormal, we have the
following identities:

$\displaystyle\langle u_{n}|u_{m}\rangle$ $\displaystyle=$
$\displaystyle\delta_{n,m}$ (S15)

and

$\displaystyle\langle u_{n}|\partial_{k_{i}}u_{n}\rangle$ $\displaystyle=$
$\displaystyle\frac{1}{2}\partial_{k_{i}}(\langle u_{n}|u_{n}\rangle)=0.$
(S16)

Therefore, we have

$\displaystyle\left\\{\begin{aligned}
\@add@centering\centering\partial_{k_{i}}\mathrm{Re}\tilde{P}|u_{1}\rangle&=&\frac{1}{2}(|\partial_{k_{i}}u_{1}\rangle+|u_{2}\rangle\langle
u_{1}|\partial_{k_{i}}u_{2}\rangle&)&\\\
\partial_{k_{i}}\mathrm{Re}\tilde{P}|u_{2}\rangle&=&\frac{1}{2}(|\partial_{k_{i}}u_{2}\rangle-|u_{1}\rangle\langle
u_{1}|\partial_{k_{i}}u_{2}\rangle&)&\\\
\partial_{k_{i}}\mathrm{Im}{\tilde{P}}|u_{1}\rangle&=&\frac{1}{2}(|\partial_{k_{i}}u_{2}\rangle-|u_{1}\rangle\langle
u_{1}|\partial_{k_{i}}u_{2}\rangle&)&=\partial_{k_{i}}\mathrm{Re}\tilde{P}|u_{2}\rangle\\\
\partial_{k_{i}}\mathrm{Im}{\tilde{P}}|u_{2}\rangle&=&-\frac{1}{2}(|\partial_{k_{i}}u_{1}\rangle+|u_{2}\rangle\langle
u_{1}|\partial_{k_{i}}u_{2}\rangle&)&=-\partial_{k_{i}}\mathrm{Re}\tilde{P}|u_{1}\rangle,\end{aligned}\right.$
(S17)

with $k_{i}$ denoting $k_{x}$ or $k_{y}$. Since $\mathrm{Re}\tilde{P}$ is a
Hermitian operator and $\mathrm{Im}\tilde{P}$ is an anti-Hermitian operator,
we have:

$\displaystyle\langle
u_{n}|\partial_{k_{i}}\mathrm{Re}\tilde{P}=(\partial_{k_{i}}\mathrm{Re}\tilde{P}|u_{n}\rangle)^{\dagger}$
(S18)

and

$\displaystyle-\langle u_{n}|\partial_{k_{i}}\mathrm{Im}{\tilde{P}}$
$\displaystyle=$
$\displaystyle(\partial_{k_{i}}\mathrm{Im}{\tilde{P}}|u_{n}\rangle)^{\dagger},$
(S19)

where the additional minus sign in Eq. (S19) can be canceled by the minus sign
in the commutators in Eq. (S13) and Eq. (S14).

Therefore, the first term in Eq. (S12) is

$\displaystyle\frac{1}{4\pi\mathrm{i}}\int_{BZ}\mathrm{d}^{2}\bm{k}\langle
u_{1}|[\partial_{k_{x}}\tilde{P},\partial_{k_{y}}\tilde{P}]|u_{1}\rangle$
(S20) $\displaystyle=$
$\displaystyle\frac{1}{4\pi}\int_{BZ}\mathrm{d}^{2}\bm{k}\langle
u_{1}|([\partial_{k_{x}}\mathrm{Re}\tilde{P},\partial_{k_{y}}\mathrm{Im}\tilde{P}]+[\partial_{k_{x}}\mathrm{Im}\tilde{P},\partial_{k_{y}}\mathrm{Re}\tilde{P}])|u_{1}\rangle$
$\displaystyle=$
$\displaystyle\frac{1}{2\pi}\int_{BZ}\mathrm{d}^{2}\bm{k}(\langle
u_{1}|\partial_{k_{x}}\mathrm{Re}\tilde{P}\partial_{k_{y}}\mathrm{Im}\tilde{P}|u_{1}\rangle-\langle
u_{1}|\partial_{k_{y}}\mathrm{Re}\tilde{P}\partial_{k_{x}}\mathrm{Im}\tilde{P}|u_{1}\rangle)$
$\displaystyle=$
$\displaystyle\frac{1}{2\pi}\int_{BZ}\mathrm{d}^{2}\bm{k}(\langle
u_{1}|\partial_{k_{x}}\mathrm{Re}\tilde{P}\partial_{k_{y}}\mathrm{Re}\tilde{P}|u_{2}\rangle-\langle
u_{1}|\partial_{k_{y}}\mathrm{Re}\tilde{P}\partial_{k_{x}}\mathrm{Re}\tilde{P}|u_{2}\rangle)$
$\displaystyle=$
$\displaystyle\frac{1}{2\pi}\int_{BZ}\mathrm{d}^{2}\bm{k}\langle
u_{1}|[\partial_{k_{x}}\mathrm{Re}\tilde{P},\partial_{k_{y}}\mathrm{Re}\tilde{P}]|u_{2}\rangle.$

The analysis of the second term in Eq. (S12) is similar, with the only
difference being an additional minus sign from Eq. (S19) as

$\displaystyle\frac{1}{4\pi\mathrm{i}}\int_{BZ}\mathrm{d}^{2}\bm{k}\langle
u_{2}|[\partial_{k_{x}}\tilde{P},\partial_{k_{y}}\tilde{P}]|u_{2}\rangle$
(S21) $\displaystyle=$
$\displaystyle-\frac{1}{2\pi}\int_{BZ}\mathrm{d}^{2}\bm{k}\langle
u_{2}|\partial_{[k_{x}}\mathrm{Re}\tilde{P}\partial_{k_{y}]}\mathrm{Re}\tilde{P}|u_{1}\rangle$
$\displaystyle=$
$\displaystyle\frac{1}{2\pi}\int_{BZ}\mathrm{d}^{2}\bm{k}\langle
u_{1}|[\partial_{k_{x}}\mathrm{Re}\tilde{P},\partial_{k_{y}}\mathrm{Re}\tilde{P}]|u_{2}\rangle,$

where the last equality holds due to the Hermiticity of $\mathrm{Re}\tilde{P}$
and the reality of $|u_{n}\rangle$. Now, let’s consider the third term in Eq.
(S12), which is

$\displaystyle\frac{1}{4\pi}\int_{BZ}\mathrm{d}^{2}\bm{k}\langle
u_{1}|[\partial_{k_{x}}\tilde{P},\partial_{k_{y}}\tilde{P}]|u_{2}\rangle$
(S22) $\displaystyle=$
$\displaystyle\frac{1}{4\pi}\int_{BZ}\mathrm{d}^{2}\bm{k}(\langle
u_{1}|[\partial_{k_{x}}\mathrm{Re}\tilde{P},\partial_{k_{y}}\mathrm{Re}\tilde{P}]|u_{2}\rangle-\langle
u_{1}|[\partial_{k_{x}}\mathrm{Im}\tilde{P},\partial_{k_{y}}\mathrm{Im}\tilde{P}]|u_{2}\rangle)$
$\displaystyle=$
$\displaystyle\frac{1}{4\pi}\int_{BZ}\mathrm{d}^{2}\bm{k}(\langle
u_{1}|[\partial_{k_{x}}\mathrm{Re}\tilde{P},\partial_{k_{y}}\mathrm{Re}\tilde{P}]|u_{2}\rangle-\langle
u_{2}|[\partial_{k_{x}}\mathrm{Re}\tilde{P},\partial_{k_{y}}\mathrm{Re}\tilde{P}]|u_{1}\rangle)$
$\displaystyle=$
$\displaystyle\frac{1}{2\pi}\int_{BZ}\mathrm{d}^{2}\bm{k}\langle
u_{1}|[\partial_{k_{x}}\mathrm{Re}\tilde{P},\partial_{k_{y}}\mathrm{Re}\tilde{P}]|u_{2}\rangle.$

Likewise, the final term in Eq. (S12) can be expressed as:

$\frac{1}{2\pi}\int_{BZ}\mathrm{d}^{2}\bm{k}\langle
u_{1}|[\partial_{k_{x}}\mathrm{Re}\tilde{P},\partial_{k_{y}}\mathrm{Re}\tilde{P}]|u_{2}\rangle,$
(S23)

due to the anti-symmetry of $|u_{1}\rangle$ and $|u_{2}\rangle$.

Therefore, Eq. (S12) is now simplified to

$e=\frac{2}{\pi}\int_{BZ}\mathrm{d}^{2}\bm{k}\langle
u_{1}|[\partial_{k_{x}}\mathrm{Re}\tilde{P},\partial_{k_{y}}\mathrm{Re}\tilde{P}]|u_{2}\rangle.$
(S24)

The relevant operator in the above expression is $\mathrm{Re}\tilde{P}$. By
introducing the real projector
$\hat{P}$:=$\sum^{\mathrm{occ}}_{n}|u_{n}\rangle\langle u_{n}|$, we obtain the
following identities:

$\displaystyle\hat{P}$ $\displaystyle=$ $\displaystyle 2\mathrm{Re}\tilde{P}$
(S25)

and

$\displaystyle\hat{P}|u_{n}\rangle$ $\displaystyle=$
$\displaystyle|u_{n}\rangle.$ (S26)

Thus, the formula Eq. (S24) of the Euler number can be further expressed as:

$e=\frac{1}{2\pi}\int_{BZ}\mathrm{d}^{2}\bm{k}\langle
u_{1}|\hat{P}[\partial_{k_{x}}\hat{P},\partial_{k_{y}}\hat{P}]|u_{2}\rangle.$
(S27)

Due to the symmetry of $k_{x,y}$ and $|u_{1,2}\rangle$, the final form of the
Euler number in $\bm{k}$-space is

$e=\frac{1}{2\pi}\int_{BZ}\mathrm{d}^{2}\bm{k}\mathrm{Pf}_{\mathrm{occ}}(\hat{P}[\partial_{k_{x}}\hat{P},\partial_{k_{y}}\hat{P}]),$
(S28)

which is nothing but the Eq. (4) in the main text. Here Pfocc denotes the
Pfaffian taken over the occupied subspace. To be specific, in the eigenbasis,
a general matrix $\mathbf{M}$ can be represented as a block matrix

$\mathbf{M}=\begin{pmatrix}M_{1}&M_{2}\\\ M_{3}&M_{\mathrm{occ}}\\\
\end{pmatrix},$ (S29)

where $M_{\mathrm{occ}}$ is the submatrix of $\mathbf{M}$ constructed by
occupied eigenbasis. Therefore, Pfocc, which is the Pfaffian taken over the
occupied subspace, is defined as

$\mathrm{Pf_{occ}}(M):=\mathrm{Pf}(M_{\mathrm{occ}}).$ (S30)

##  Appendix C Derivation of Eq. (6) in the main text

In this section, we derive Eq. (6) in the main text, demonstrating its
equivalence to Eq. (4) in the main text under translational invariance.

Before proceeding, we first introduce some basic basis for the operators used
in the derivation. Firstly, we use a $\bm{k}$-mesh form instead of the
continuous form of the system. In real space, the Hamiltonian $\hat{H}$ is
constructed under a certain initial local basis {$|\alpha\bm{r}\rangle$} with
$|\alpha\bm{r}\rangle=|\bm{r}\rangle\otimes|\alpha\rangle$, i.e.,

$\displaystyle\hat{H}=\sum_{\alpha^{\prime}\bm{r}^{\prime},\alpha^{\prime\prime}\bm{r}^{\prime\prime}}|\alpha^{\prime}\bm{r}^{\prime}\rangle\langle\alpha^{\prime\prime}\bm{r}^{\prime\prime}|H_{\alpha^{\prime}\bm{r}^{\prime},\alpha^{\prime\prime}\bm{r}^{\prime\prime}},$
(S31)

where $\alpha$ and $\bm{r}$ denote the internal and coordinate index,
respectively. In $\bm{k}$ space, it is convenient to use the Bloch basis
{$|\psi_{n}(\bm{k})\rangle$} satisfying
$|\psi_{n}(\bm{k})\rangle=|\bm{k}\rangle\otimes|u_{n}(\bm{k})\rangle$ where
{$|\bm{k}\rangle$} is the plane wave basis with
$\langle\bm{r}|\bm{k}\rangle=\frac{1}{\sqrt{A}}e^{-\mathrm{i}\bm{k}\cdot\bm{r}}$
and $A=L_{x}L_{y}$ being the area of the system. We can thus construct the
$\bm{k}$-space Hamiltonian $\hat{H}(\bm{k})$ as

$\displaystyle\hat{H}(\bm{k})$ $\displaystyle=$
$\displaystyle\langle\bm{k}|\hat{H}|\bm{k}\rangle$ (S32) $\displaystyle=$
$\displaystyle\sum_{\alpha^{\prime},\alpha^{\prime\prime}}|\alpha^{\prime}(\bm{k})\rangle\langle\alpha^{\prime\prime}(\bm{k})|H_{\alpha^{\prime},\alpha^{\prime\prime}}(\bm{k})$
$\displaystyle=$ $\displaystyle\sum_{n}|u_{n}(\bm{k})\rangle\langle
u_{n}(\bm{k})|E_{n}(\bm{k}).$

Here, the second equality is established due to the translational invariance
of the Hamiltonian. Additionally, the cell-periodic Bloch basis
{$|u_{n}(\bm{k})\rangle$} is the eigenbasis of $\hat{H}(\bm{k})$.

Then, we can define the projection operator acting on different basis sets as
[75]

$\displaystyle\hat{P}$ $\displaystyle=$
$\displaystyle\sum^{\mathrm{occ}}_{n\bm{k}}|\psi_{n}(\bm{k})\rangle\langle\psi_{n}(\bm{k})|$
(S33) $\displaystyle=$
$\displaystyle\sum_{\bm{k}}|\bm{k}\rangle\langle\bm{k}|\sum^{\mathrm{occ}}_{n}|u_{n}(\bm{k})\rangle\langle
u_{n}(\bm{k})|$ $\displaystyle=$
$\displaystyle\sum_{\bm{k}}|\bm{k}\rangle\langle\bm{k}|\sum_{\alpha^{\prime},\alpha^{\prime\prime}}|\alpha^{\prime}(\bm{k})\rangle\langle\alpha^{\prime\prime}(\bm{k})|P_{\alpha^{\prime},\alpha^{\prime\prime}}(\bm{k})$
$\displaystyle=$
$\displaystyle\sum_{\bm{k},\alpha^{\prime},\alpha^{\prime\prime}}|\alpha^{\prime}\bm{k}\rangle\langle\alpha^{\prime\prime}\bm{k}|P_{\bm{k},\alpha^{\prime},\alpha^{\prime\prime}}$
$\displaystyle=$
$\displaystyle\sum_{\alpha^{\prime}\bm{r}^{\prime},\alpha^{\prime\prime}\bm{r}^{\prime\prime}}|\alpha^{\prime}\bm{r}^{\prime}\rangle\langle\alpha^{\prime\prime}\bm{r}^{\prime\prime}|P_{\alpha^{\prime}\bm{r}^{\prime},\alpha^{\prime\prime}\bm{r}^{\prime\prime}}.$

So the $\bm{k}$-space projector
$\hat{P}(\bm{k})=\sum^{\mathrm{occ}}_{n}|u_{n}(\bm{k})\rangle\langle
u_{n}(\bm{k})|$ can be explicitly represented as a matrix $P(\bm{k})$ under
basis {$|\alpha(\bm{k})\rangle$}. For convenience, we can create a new
projection matrix $P_{\bm{k}}$, which is a quasi-diagonal matrix with
$P(\bm{k})$ as diagonal blocks. In fact, $P_{\bm{k}}$ represents $\hat{P}$
under basis set {$|\alpha\bm{k}\rangle$} and is related to $P$ under basis set
{$|\alpha\bm{r}\rangle$} via a unitary basis transformation. Specifically, we
can construct a transformation matrix $U_{\bm{k},\bm{r}}$ with the entries as
$\langle\bm{r}|\bm{k}\rangle$ to denote this basis transformation. Notice that
$U_{\bm{k},\bm{r}}$ is indeed a unitary matrix in the thermodynamic limit
$A\to\infty$. Therefore, we can obtain the $\bm{r}$-space projection matrix
$P$ under the local basis by transforming $P_{\bm{k}}$ using the the
transformation:

$\displaystyle P_{\bm{k}}=U_{\bm{k},\bm{r}}PU^{\dagger}_{\bm{k},\bm{r}}.$
(S34)

Now we start to derive Eq. (6). Since the integral is now discretized as

$\displaystyle\frac{A}{(2\pi)^{2}}\int_{BZ}\mathrm{d}^{2}\bm{k}\to\sum_{\bm{k}},$
(S35)

we can define its equivalent operation $\mathrm{Tr}_{\bm{k}}$ acting on the
block index $\bm{k}$ of $P_{\bm{k}}$. Therefore, the $\bm{k}$-space Euler
number can be expressed in the matrix form as

$\displaystyle
e=\frac{2\pi}{A}\mathrm{Tr}_{\bm{k}}\mathrm{Pf}_{\mathrm{occ}}(P_{\bm{k}}[\partial_{k_{x}}P_{\bm{k}},\partial_{k_{y}}P_{\bm{k}}]).$
(S36)

In a translational invariant system, the $\bm{k}$ space and the coordinate
space can be connected via the Fourier transformation. Therefore, we have

$\displaystyle\partial_{k_{x}}\hat{P}(\bm{k})$ $\displaystyle\to$
$\displaystyle\frac{1}{\delta k_{x}}(P_{\bm{k}+\mathbf{\delta k}}-P_{\bm{k}})$
(S37) $\displaystyle=$ $\displaystyle\frac{1}{\delta
k_{x}}(U_{\bm{k}+\mathbf{\delta k},\bm{r}}PU^{\dagger}_{\bm{k}+\mathbf{\delta
k},\bm{r}}-U_{\bm{k},\bm{r}}PU^{\dagger}_{\bm{k},\bm{r}})$ $\displaystyle=$
$\displaystyle U_{\bm{k},\bm{r}}[\frac{1}{\delta k_{x}}(U_{\mathbf{\delta
k},\bm{r}}PU^{\dagger}_{\mathbf{\delta
k},\bm{r}}-P)]U^{\dagger}_{\bm{k},\bm{r}},$

where $\mathbf{\delta k}=(\delta k_{x},0)$. If we set $\delta
k_{x}=\frac{2\pi}{L_{x}}$, then $U_{\delta\bm{k},\bm{r}}$ is just the unitary
position matrix $U=\mathrm{e}^{\mathrm{i}\frac{2\pi}{L_{x}}X}$. Similarly, the
relation applies to the other unitary position matrix
$V=\mathrm{e}^{\mathrm{i}\frac{2\pi}{L_{y}}Y}$.

Based on these quantities defined in $\bm{r}$ space, the Euler number in Eq.
(S36) can be reformulated as

$\displaystyle\begin{aligned}
e&=\frac{1}{2\pi}\mathrm{Pf}_{\mathrm{occ}}\sum_{\bm{k}}U_{\bm{k},\bm{r}}P[UPU^{\dagger},VPV^{\dagger}]U^{\dagger}_{\bm{k},\bm{r}}\\\
&=\frac{1}{2\pi}\mathrm{Pf}_{\mathrm{occ}}\mathrm{Tr}(U_{\bm{k},\bm{r}}P[UPU^{\dagger},VPV^{\dagger}]U^{\dagger}_{\bm{k},\bm{r}})\\\
&=\frac{1}{2\pi}\mathrm{Pf}_{\mathrm{occ}}\mathrm{Tr}(P[UPU^{\dagger},VPV^{\dagger}]),\end{aligned}$
(S38)

where the last equation holds because of the invariant property of the trace
under any unitary transformation. Since the trace and Pfaffian operations act
on different individual subspaces, they are commutative as operators on the
Wannier basis, which proves exactly the Eq. (6).

In principle, when $\delta_{k_{x}}$ is small enough, one can perform the
Taylor expansion up to the first order

$\frac{1}{\delta k_{x}}(U_{\mathbf{\delta
k},\bm{r}}PU^{\dagger}_{\mathbf{\delta k},\bm{r}}-P)\approx\mathrm{i}[X,P]$
(S39)

to the right side of Eq. (S37). However, for a $\mathcal{PT}$-symmetric system
with real eigenbasis $\\{|u_{n}(\bm{k})\rangle\\}$, both the projection
operator $P_{\bm{k}}$ and its derivative $\partial_{k_{x}}P_{\bm{k}}$ are
supposed to be real-valued. The first-order expansion term $\mathrm{i}[X,P]$,
which deviates from the real field $\mathbb{R}$, should cancel with some other
first-order terms (and higher-order terms may contribute significantly) to
ensure the real-valued final expression. Therefore, the additional real-value
limitation from the $\mathcal{PT}$ symmetry necessitates the use of the
unitary position matrix $U$ instead of the usual position matrix $X$ in our
final expression of the $\bm{r}$-space Euler number. This is different from
the case of the Chern number where the first-order expansion is applicable to
yield a simplified $\bm{r}$-space formula in Ref. [11, 15].

##  Appendix D Numerical implementation of the real-space Euler number

In this section, we demonstrate the practical calculation of Eq. (6) in the
main text. We begin by selecting a suitable basis for expressing the operators
in the equation. Once this basis is established, we can straightforwardly
apply trace and Pfaffian operations.

We initially work with a set of local coordinate space bases, from which we
construct diagonal matrices representing the unitary position operators
$\hat{U}$ and $\hat{V}$. The projector $\hat{P}$ is defined as

$\mathbf{1}_{occ}=\begin{pmatrix}\mathbf{0}&\mathbf{0}\\\
\mathbf{0}&\mathbf{1}\\\ \end{pmatrix}$ (S40)

in the eigenbasis of the Hamiltonian, with eigenvalues arranged in descending
order. Here, $\mathbf{0}$ and $\mathbf{1}$ represent the null matrix and
identity matrix, respectively.

To proceed, we diagonalize the Hamiltonian to obtain the eigenvalues and
eigenvectors in the local basis. This allows us to create a unitary
transformation matrix from the local basis to the eigenbasis of the system. In
other words, we have

$H=\Pi D\Pi^{-1},$ (S41)

where $D$ is a diagonal matrix with the eigenvalues in descending order, and
the columns of $\Pi$ are the corresponding eigenvectors. Subsequently, we
determine the explicit expression of the projector $\hat{P}$ through this
unitary transformation of the basis, as follows:

$P=\Pi\mathbf{1}_{occ}\Pi^{-1}.$ (S42)

All operators are now represented in a unified local basis, simplifying the
matrix calculations. To carry out the trace and Pfaffian operations, a basis
transformation from the initial local basis to a composite Wannier basis is
required. This Wannier basis can be constructed from the eigenbasis by
minimizing the Marzari-Vanderbilt localization functional [74, 75]. Once we
have the transformation matrix $\Pi$ from the eigenbasis to the local basis
and $S$ from the eigenbasis to the composite Wannier basis, we can obtain the
matrix form of the expression within the brackets in Eq. (S38):

$M=S\Pi^{-1}P[UPU^{\dagger},VPV^{\dagger}]\Pi S^{-1}.$ (S43)

In this basis, the matrix entries are denoted as
$M_{n^{\prime}n^{\prime\prime},\bm{r}^{\prime}\bm{r}^{\prime\prime}}$. Then
the trace operation simply involves summing over the coordinate index
$\bm{r}$, expressed as

$\mathrm{Tr}:=\sum_{\bm{r}^{\prime},\bm{r}^{\prime\prime}}\delta_{\bm{r}^{\prime},\bm{r}^{\prime\prime}}.$
(S44)

Finally, the $\bm{r}$-space Euler number can be obtained by performing the
Pfaffian over occupied space as

$\mathrm{Pf}_{\mathrm{occ}}(\mathrm{Tr}M)=\mathrm{Pf}(\mathrm{Tr}M)_{\mathrm{occ}}.$
(S45)

The final step of basis transformation is crucial for accurately calculating
the $\bm{r}$-space Euler number. This transformation is necessary because only
in the Wannier basis can we effectively separate the total space into internal
and coordinate spaces. When using a set of local basis functions with high
localization properties, such as atomic orbitals, the hopping terms of the
Hamiltonian naturally mix the coordinate and internal spaces. As a result, it
becomes challenging to distinguish the occupied subspace within the internal
space, making it difficult to perform the Pfaffian operation using this basis.
On the other hand, the eigenbasis of the Hamiltonian is not suitable either.
Although it allows for the easy identification of the occupied subspace, this
highly delocalized basis presents difficulties in aligning it in a meaningful
way to perform the trace and Pfaffian operations correctly.

##  Appendix E The distinction between the real-space Chern and Euler numbers

In this section, we give some remarks on the distinction between the real-
space Chern and Euler numbers. First, the analysis we’ve conducted can be
directly applied to the Chern class, and the resultant $\bm{r}$-space
expression is nothing but the Bott index,

$\mathrm{Bott}(\hat{U},\hat{V})=\frac{1}{2\pi}\mathrm{Im}\mathrm{Tr}\log(\hat{U}\hat{V}\hat{U}^{-1}\hat{V}^{-1}),$
(S46)

with $\hat{U}=\hat{P}\exp(2\pi i\hat{X}/{L_{x}})\hat{P}$ and
$\hat{V}=\hat{P}\exp(2\pi i\hat{Y}/{L_{y}})\hat{P}$, which measures the
commutativity of the position operators and offers an identical topological
classification as the Chern number [14, 16]. The Bott index can be further
simplified by applying the Taylor expansion of the unitary position operator
up to the first order, which yields the conventional $\bm{r}$-space formula of
the Chern number in Ref. [11, 15]

$\displaystyle
c_{1}=\frac{4\pi}{L^{2}}\mathrm{Im}\mathrm{Tr}^{\prime}(\hat{P}[\hat{X},\hat{P}][\hat{Y},\hat{P}]),$
(S47)

where $\hat{X},\hat{Y}$ are the usual position operators and
$\mathrm{Tr}^{\prime}$ is the usual trace operation acting on the whole space,
distinguished from the aforementioned $\mathrm{Tr}$ acting on coordinate
subspace only.

However, there are significant differences between the $\bm{r}$-space
formulation of the Euler defined in Eq. (6) and Chern number. This distinction
arises because the Chern and Euler classes are defined by distinct invariant
polynomials of the curvature [71]. When calculating the Chern number in real
space, the trace operation is applied to both the internal and coordinate
spaces, resulting in a simplified expression with only a single trace
operation. In contrast, when calculating the $\bm{r}$-space Euler number, it
becomes essential to distinguish between the coordinate space and the internal
space, which requires trace and Pfaffian operations, respectively.

The discussion is more clear in the frame of matrix form. For any operator of
the form $M=\begin{pmatrix}\mathbf{0}&\mathbf{0}\\\ \mathbf{0}&M_{occ}\\\
\end{pmatrix}$ with $\mathbf{0}$ being the null matrix, the relation
$\mathrm{Tr}_{occ}M:=\mathrm{Tr}M_{occ}=\mathrm{Tr}\begin{pmatrix}\mathbf{0}&\mathbf{0}\\\
\mathbf{0}&M_{occ}\\\ \end{pmatrix}$ always holds. This is because the trace
operation is just to sum over the diagonal of the matrix $M$, which means that
the trace over a specific matrix is equal to the trace over the direct sum of
this matrix and any null matrix. Therefore, we can safely consider the whole
space without further restriction in the occupied space and the result remains
the same. However, the Pfaffian does not possess this property, i.e.,
$\mathrm{Pf}(\begin{pmatrix}\mathbf{0}&\mathbf{0}\\\ \mathbf{0}&M_{occ}\\\
\end{pmatrix})=\mathbf{0}$. What’s more, the ordering of the basis does not
matter for the trace since the sum operation is commutative, while the
ordering is crucial in the definition of the Pfaffian. Therefore, although a
single $\mathrm{Tr}^{\prime}$ is enough for calculating the $\bm{r}$-space
Chern number, it is important to find such a basis that can distinguish the
internal space from the coordinate space.

This distinction is already evident in the $\bm{k}$-space scenario. In a
periodic lattice, the Bloch states $\\{|\psi_{n}(\bm{k})\rangle\\}$ can be
transformed into Wannier states, which inherently distinguish the coordinate
space from the internal space. Specifically, in such a translational invariant
system, the Hamiltonian commutes with the translation operator, indicating a
common eigenvalue for both operators. Since the energy index $n$ and $\bm{k}$
denoting quasi-momentum are independent of each other, it is straightforward
to change the basis of $\bm{k}$ via the Fourier transformation to $\bm{r}$
without mixture from $n$ and derive the Wannier basis. However, if the system
lacks translational invariance, the usual Fourier transformation from Bloch
states fails to generate Wannier states. Consequently, it becomes crucial to
consider composite Wannier functions defined in real space via a unitary
transformation from energy eigenstates, without imposing further restrictions.

Secondly, It is worth noting that there is a gauge freedom in the Wannier
functions and the determination of the exponentially localized Wannier
functions is significant [74]. The existence of the nontrivial Euler number
prohibits finding such a basis of Wannier functions, which means that in a
space-time inversion symmetric two-dimensional system, the exponentially
localized Wannier functions can not be constructed in a phase with nontrivial
Euler number [51]. Nevertheless, this is not an obstacle to search for the
required composite Wannier functions that are not exponentially localized
[78].

##  Appendix F Averaging the local Euler marker in finite systems with OBC

In finite systems with OBC, a striking contrast emerges between the local
Chern marker and the local Euler marker. While averaging the local Chern
marker over such systems yields vanishing results, the same averaging process
for the local Euler marker results in non-vanishing values. This disparity
highlights a fundamental distinction between the Chern number and the Euler
number when calculated in finite systems under OBC, as elaborated below.

To calculate the $\bm{r}$-space Chern number $c_{1}$ in Eq. (S47), we employ
standard position operators $\hat{X}$ and $\hat{Y}$ to construct the operator
$\hat{P}[\hat{X},\hat{P}][\hat{Y},\hat{P}]$. Notably, the imaginary part of
this operator is directly proportional to $c_{1}$ when subjected to a trace
operation [11, 15]:

$c_{1}\propto\mathrm{ImTr}^{\prime}(\hat{P}[\hat{X},\hat{P}][\hat{Y},\hat{P}]).$
(S48)

Utilizing the transpose invariance and the cyclic property of the trace
operation and considering the symmetry of operators $\hat{X}$ and $\hat{Y}$,
we can rigorously demonstrate the vanishing of the $\bm{r}$-space Chern number
under OBC [15]:

$\displaystyle c_{1}$ $\displaystyle\propto$
$\displaystyle\mathrm{ImTr}^{\prime}(\hat{P}[\hat{X},\hat{P}][\hat{Y},\hat{P}])$
(S49) $\displaystyle=$
$\displaystyle\mathrm{ImTr}^{\prime}(\hat{P}(\hat{X}\hat{P}-\hat{P}\hat{X})(\hat{Y}\hat{P}-\hat{P}\hat{Y}))$
$\displaystyle=$
$\displaystyle\mathrm{ImTr}^{\prime}(\hat{P}\hat{X}\hat{P}\hat{Y}\hat{P}-\hat{P}\hat{X}\hat{P}^{2}\hat{Y}-\hat{P}^{2}\hat{X}\hat{Y}\hat{P}+\hat{P}^{2}\hat{X}\hat{P}\hat{Y})$
$\displaystyle=$
$\displaystyle\mathrm{ImTr}^{\prime}(\hat{P}\hat{X}\hat{P}\hat{Y}\hat{P}-\hat{P}\hat{X}\hat{P}\hat{Y}-\hat{P}\hat{X}\hat{Y}\hat{P}+\hat{P}\hat{X}\hat{P}\hat{Y})$
$\displaystyle=$
$\displaystyle\mathrm{ImTr}^{\prime}(\hat{P}\hat{X}\hat{P}\hat{Y}\hat{P}-\hat{P}\hat{X}\hat{Y}\hat{P}),$

where we utilize the property of the projection operator,
$\hat{P}^{2}=\hat{P}$. Note that $\hat{P}$, $\hat{X}$ and $\hat{Y}$ are all
Hermitian, we can further simplify $c_{1}$ by expending the imaginary part as
the subtract of the operator with its conjugate,

$\displaystyle c_{1}$ $\displaystyle\propto$
$\displaystyle\frac{1}{2i}(\mathrm{Tr}^{\prime}(\hat{P}\hat{X}\hat{P}\hat{Y}\hat{P}-\hat{P}\hat{X}\hat{Y}\hat{P})-\mathrm{Tr}^{\prime}(\hat{P}\hat{X}\hat{P}\hat{Y}\hat{P}-\hat{P}\hat{X}\hat{Y}\hat{P})^{*})$
(S50) $\displaystyle=$
$\displaystyle\frac{1}{2i}(\mathrm{Tr}^{\prime}(\hat{P}\hat{X}\hat{P}\hat{Y}\hat{P}-\hat{P}\hat{X}\hat{Y}\hat{P})-\mathrm{Tr}^{\prime}(\hat{P}\hat{X}\hat{P}\hat{Y}\hat{P}-\hat{P}\hat{X}\hat{Y}\hat{P})^{\dagger})$
$\displaystyle=$
$\displaystyle\frac{1}{2i}(\mathrm{Tr}^{\prime}(\hat{P}\hat{X}\hat{P}\hat{Y}\hat{P}-\hat{P}\hat{X}\hat{Y}\hat{P})-\mathrm{Tr}^{\prime}(\hat{P}\hat{Y}\hat{P}\hat{X}\hat{P}-\hat{P}\hat{Y}\hat{X}\hat{P})).$

This relationship is established through the transpose invariance of the trace
operation, i.e.,

$\mathrm{Tr}^{\prime}\hat{A}=\mathrm{Tr}^{\prime}\hat{A}^{\mathrm{T}},$ (S51)

which leads to

$\mathrm{ImTr}^{\prime}\hat{A}=\frac{1}{2i}(\mathrm{Tr}^{\prime}\hat{A}-\mathrm{Tr}^{\prime}\hat{A}^{*})=\frac{1}{2i}(\mathrm{Tr}^{\prime}\hat{A}-\mathrm{Tr}^{\prime}\hat{A}^{\dagger}).$
(S52)

Then, using the well-known cyclic property of trace operation, i.e., for
general matrices $\hat{A}$ and $\hat{B}$, it is known that

$\mathrm{Tr}^{\prime}(\hat{A}\hat{B})=\mathrm{Tr}^{\prime}(\hat{B}\hat{A}),$
(S53)

$c_{1}$ can be further simplified as

$\displaystyle c_{1}$ $\displaystyle\propto$
$\displaystyle\frac{1}{2i}(\mathrm{Tr}^{\prime}(\hat{P}\hat{X}\hat{P}\hat{Y}\hat{P})-\mathrm{Tr}^{\prime}(\hat{P}\hat{X}\hat{Y}\hat{P})-\mathrm{Tr}^{\prime}(\hat{P}\hat{Y}\hat{P}\hat{X}\hat{P})+\mathrm{Tr}^{\prime}(\hat{P}\hat{Y}\hat{X}\hat{P}))$
(S54) $\displaystyle=$
$\displaystyle\frac{1}{2i}(\mathrm{Tr}^{\prime}(\hat{X}\hat{P}\hat{Y}\hat{P}^{2})-\mathrm{Tr}^{\prime}(\hat{X}\hat{P}^{2}\hat{Y}\hat{P})-\mathrm{Tr}^{\prime}(\hat{X}\hat{Y}\hat{P}^{2})+\mathrm{Tr}^{\prime}(\hat{Y}\hat{X}\hat{P}^{2}))$
$\displaystyle=$
$\displaystyle\frac{1}{2i}(\mathrm{Tr}^{\prime}(\hat{X}\hat{P}\hat{Y}\hat{P})-\mathrm{Tr}^{\prime}(\hat{X}\hat{P}\hat{Y}\hat{P})-\mathrm{Tr}^{\prime}(\hat{X}\hat{Y}\hat{P})+\mathrm{Tr}^{\prime}(\hat{Y}\hat{X}\hat{P})$
$\displaystyle=$
$\displaystyle-\frac{1}{2i}\mathrm{Tr}^{\prime}(\hat{X}\hat{Y}\hat{P}-\hat{Y}\hat{X}\hat{P})$
$\displaystyle=$
$\displaystyle-\frac{1}{2i}\mathrm{Tr}^{\prime}([\hat{X},\hat{Y}]\hat{P})$
$\displaystyle=$ $\displaystyle 0,$

where we have used the the symmetry of operators $\hat{X}$ and $\hat{Y}$

$[\hat{X},\hat{Y}]=0.$ (S55)

In summary, the vanishing of the $\bm{r}$-space Chern number under OBC arises
from a cancellation effect, driven by three key factors:

  * •

Transpose invariance of the trace operation:
$\mathrm{Tr}^{\prime}\hat{A}=\mathrm{Tr}^{\prime}\hat{A}^{\mathrm{T}}$.

  * •

Cyclic property of the trace operation:
$\mathrm{Tr}^{\prime}(\hat{A}\hat{B})=\mathrm{Tr}^{\prime}(\hat{B}\hat{A})$.

  * •

Symmetry of standard position operators $\hat{X}$ and $\hat{Y}$:
$[\hat{X},\hat{Y}]=0$.

In contrast, calculating the $\bm{r}$-space Euler number doesn’t encounter a
similar cancellation effect, primarily due to the distinct properties of the
trace operation and the Pfaffian. First, the transpose invariance, which holds
for the trace operation, does not apply to the Pfaffian. For a general skew-
symmetric matrices $\hat{A}$, we have

$\mathrm{Pf}\hat{A}^{\mathrm{T}}=\mathrm{Pf}(-\hat{A})=\pm\mathrm{Pf}\hat{A},$
(S56)

with the additional sign depending on $N_{\mathrm{occ}}$. Second, unlike the
trace operation, the Pfaffian lacks the necessary cyclic properties for
straightforward cancellation,

$\mathrm{Pf}(\hat{A}\hat{B})\neq\mathrm{Pf}(\hat{B}\hat{A}).$ (S57)

Hence, it becomes possible to calculate the $\bm{r}$-space Euler number under
OBC.

##  Appendix G Details of the model and method

###  G.1 Model

All the calculations are performed based on the tight-binding Hamiltonian in
Eq. (8). The hopping integral $t_{\mu\nu}(\bm{r}_{ij})$ follows the Slater-
Koster parameterization which depends on the orbital type and the directional
cosines of the intersite vector $\bm{r}_{ij}=\bm{r}_{i}-\bm{r}_{j}$. The
hopping strength is chosen to have an inverse-square decay with the distance
as $t_{\mu\nu}(\bm{r}_{ij})\propto|\bm{r}_{ij}|^{-2}$. We adopt the
equilibrium interatomic bond length as the unit length $a$ of the systems,
which is the lattice constant for the perfect square lattice and the side
length of basic building blocks (square and rhombus) for the Ammann-Beenker-
tiling quasicrystals. In numerical calculations, we set the unit length of the
system $a=1$ for simplicity.

We consider a 2D square lattice with a band inversion at the $\Gamma$-point in
$\bm{k}$-space between degenerate $p_{x,y}$ and $d_{x^{2}-y^{2},xy}$ orbitals,
as shown in Fig. 1(a). In real space, we investigate $L\times L$ supercells of
the square lattice with periodic boundary condition (PBC) or open boundary
condition (OBC). For convenience, we choose the lattice size $L$ to be an odd
integer, which allows the supercell to possess an inversion center located at
its central site.

###  G.2 Disorder of on-site energy

The tight-binding Hamiltonian with the onsite disorder is under our
consideration as well. Therefore, we introduce a disorder term to the
Hamiltonian H as

$\displaystyle
H(\\{\lambda_{i}\\})=H+\sum_{i\mu}\lambda_{i}c_{i\mu}^{\dagger}c_{i\mu},$
(S58)

where $\\{\lambda_{i}\\}$ is a set of random on-site energy added to one-half
sites of the whole sample. Here $\\{\lambda_{i}\\}$ distribute uniformly
within the interval of $[-W,W]$ with $W$ being the disorder strength. To
preserve the inversion symmetry, the on-site energies of the rest sites of the
sample are determined by inversion. Namely, each pair of sites connected by
the inversion symmetry shares the same on-site energy. The calculations are
performed in samples with lattice size $L=31$. Because of the random
character, we average the $\bm{r}$-space Euler number over 100 sample
configurations for every $W$. A higher accuracy can be achieved by adopting
samples with larger sizes and doing the statistical average for more samples.

###  G.3 Structural disorder

In order to further investigate the applicability of the real-space formula of
the Euler number, we study the effect of in-plane structural disorder which
breaks the translational symmetry while preserving the time-reversal and
inversion symmetry of the lattice [91, 92, 93]. To illustrate this effect, we
assign random atomic displacement $\bm{\delta}=(d\cos\theta,d\sin\theta)$ away
from its equilibrium position for each atom of the aforementioned 2D perfect
square lattice, as depicted in Fig. S3(a). Here, $\theta$ is a random azimuth
angle uniformly distributed in the interval $[0,2\pi)$. The amplitude $d$ of
atomic displacements are uniformly distributed in the range $[0,0.1a)$ with
$a$ being the lattice constant. Since the inversion symmetry is still supposed
to be preserved, the random atomic displacement is just assigned to the first
half of the lattice, remaining atoms in the same row or column of the lattice
center unchanged. Then the locations of atoms from the other half of the
lattice are determined by the inversion symmetry. As the structure becomes
disordered, the hopping integrals in Eq. (8) also adjust according to local
structural distortions.

###  G.4 Twisted boundary condition for quasicrystals

For an octagonal sample of the Ammann-Beenker-tiling quasicrystal, we
calculate the energy spectrum using both OBC and the twisted boundary
condition (TBC). To apply TBC, we artificially glued the opposite edges of an
octagonal polygon. Specifically, for an octagonal polygon with the edge width
of $L_{edge}$, we label the edges as $E_{p}$ $(p=1,2,\cdots 8)$ anticlockwise.
For the edge $E_{p}$, we define a translation operator, which is perpendicular
to the edge and translates the octagon by a distance of $2L_{edge}$. By
applying the translation operator to the finite octagonal quasicrystal so that
edge $E_{p}$ of the sample connects with the opposite edge $E_{(p+4)\mod 8}$
of the translated image sample. Then we consider the hopping cross the edge
between site $i$ in the octagonal sample and site $\tilde{j}$ in the image
sample. These extra hoppings also follow the Slater-Koster parameterization
and have inverse-square decay with the distance (i.e.,
$|\bm{r}_{i\tilde{j}}|^{-2}$). Therefore, in addition to the intersite
hoppings between sites inside the sample, we also consider extra hoppings
between sites near opposite edges. Importantly, by applying TBC, we not only
get rid of the effect of the open boundary but also restore the 8-fold
symmetry of the quasicrystal.

###  G.5 Construction of composite Wannier function

The eigenfunctions $\phi_{m}$ associated with the energy index $m$ can be
obtained by solving the eigenvalue problem of the Hamiltonian $H$. Then the
required composite Wannier functions $W_{n}$ are constructed from $\phi_{m}$
as

$\displaystyle W_{n}=\sum_{m}S_{nm}\phi_{m},$ (S59)

via the unitary transformation $S$ that can be considered as the combination
of a phase term and a band matrix [83], which can be numerically obtained by
minimizing the Wannier spread functional

$\displaystyle\Omega=\sum_{n}[\langle W_{n}|r^{2}|W_{n}\rangle-\langle
W_{n}|r|W_{n}\rangle^{2}].$ (S60)

Once the Wannier functions are constructed, the internal and coordinate spaces
can be easily separated and the real-space Euler number can be calculated
straightforwardly using the formula given in Eq. (6).

###  G.6 Numerical calculation of the k-space Euler number

Generally speaking, accidental degenerate points (nodes) between the
nontrivial occupied bands are ubiquitous in $\bm{k}$-space [49]. To
numerically calculate the $\bm{k}$-space Euler number in this context, we
employ the following expression:

$\displaystyle|e|=\int_{\mathcal{D}}e(\mathcal{F})-\int_{\partial\mathcal{D}}\langle
u_{1}|\nabla|u_{2}\rangle\cdot\frac{\mathrm{d}\bm{k}}{2\pi},$ (S61)

where
$e(\mathcal{F})=({1}/{\pi})\langle\partial_{[k_{x}}u_{1}(\bm{k})|\partial_{k_{y}]}u_{2}(\bm{k})\rangle\mathrm{d}k_{x}\wedge\mathrm{d}k_{y}$,
and $\mathcal{D}$ represents the region in the Brillouin zone (BZ) containing
those nodes.

Figure S1: The evolution of band structure around the phase transition in Fig.
1(b). Orbital-resolved band structures near $\Gamma$ point for the square
lattice based on Eq. (8) with different on-site energy difference $\Delta$.
(a) $\Delta=6.76$ eV (region I, $e=1$). (b) $\Delta=\Delta_{1}=6.86$ eV (the
critical point between region I and II). (c) $\Delta=\Delta_{2}=7.10$ eV (the
critical point between region II and III). (d) $\Delta=7.20$ eV (region III,
$e=0$).

##  Appendix H More numerical results

###  H.1 Band structures around the topological phase transition in Fig. 1(b)
in the main text

Here we discuss three regions presented in Fig. 1(b) in the main text in
detail. These regions are divided by two critical points $\Delta_{1}=6.86$ and
$\Delta_{2}=7.10$ eV. As illustrated in Fig. S1(a), there is initially a
double band inversions occurring around $\Gamma$ point with
$\Delta<\Delta_{1}$, which accounts for the nontrivial band topology with
$|e|=1$. This is consistent with the calculations of the $\bm{r}$-space Euler
number in the main text, demonstrating that the phase in region I is indeed
the Euler insulator.

As the onsite difference $\Delta$ increases, the gap decreases gradually and
eventually closes at $\Delta_{1}$, as shown in Fig. S1(b). The closing of the
gap indicates a topological phase transition. However, unlike the usual
situation of a single band inversion where the gap reopens immediately after
closure accompanied by a sharp change in the topological invariant, our model
has an intermediate gapless region before the gap reopens at $\Delta_{2}$ as
shown in Fig. S1(c). From the perspective of the band topology, region II is a
one-band-inverted phase without protection from the Euler topology, which
accounts for the continuous decreasing of the $\bm{r}$-space Euler number in
region II [see Fig. 1(b) in the main text]. In addition, the distinction
between the $\bm{k}$-space and $\bm{r}$-space Euler number in region II is
also due to the closed gap that brings up the discrimination between $\hat{P}$
projected and the well-defined occupied states. When $\Delta>\Delta_{2}$ as
shown in Fig. S1(d), the gap reopens and there is no band inversion at
$\Gamma$ point anymore. This phase can be adiabatically connected to the
atomic limit without gap closure. Therefore, region III is a trivial insulator
with $e=0$ as expected.

Figure S2: The real-space distribution of local Euler markers $e(\bm{r})$ in
$31\times 31$ square lattices with PBC at different disorder strength $W$. (a)
$W=1.2$ eV. (b) $W=1.4$ eV. (c) $W=1.6$ eV. (d) $W=1.8$ eV. (e) $W=2.0$ eV.
(f) $W=2.2$ eV.

###  H.2 Local Euler markers in lattices with on-site disorder in Fig. 1(c) in
the main text

In Fig. 1(c) in the main text, we illustrate another intriguing type of
topological phase transition induced by on-site disorder. The averaged
$\bm{r}$-space Euler number $e$ decreases from 1 to 0 with increasing the
disorder strength $W$. Here we present the spatial distribution of the local
Euler marker of the sample with PBC at different disorder strengths $W$, as
shown in Fig. S2. At a relatively weak disorder of $W=1.2$ eV, the system
maintains its nontrivial Euler characteristics. Predominantly, the grid points
exhibit nontrivial local Euler markers $e(\bm{r})\approx 1$ with a few
isolated points having vanished $e(\bm{r})\approx 0$, as shown in Fig. S2(a).
However, by increasing the disorder strength $W$, a noteworthy transformation
occurs: the number of trivial points with $e(\bm{r})\approx 0$ increases, and
the trivial area enlarges in size, eventually leaving the nontrivial area
shrinks to an isolated region in the sample [see Fig. S2(c)]. This isolated
nontrivial region with $e(\bm{r})\approx 1$ diminishes in size gradually as
$W$ continues to increase, ultimately fragmenting into small segments [see
Fig. S2(d,e)]. Upon reaching $W\geq 2.2$ eV, the situation undergoes a
significant shift. As shown in Fig. S2(f), none of the grid points exhibits
nontrivial local Euler markers, indicating that the system is driven into a
trivial phase by strong on-site disorder. Notably, this type of topological
phase transition differs from those in disordered Chern insulators and quantum
spin Hall insulators, where a sudden jump of topological invariants occurs at
the critical point [27]. Instead, the disorder-induced transition in this
model manifests as a more continuous evolution. Physically, we conjecture this
to be due to the disorder-induced renormalization of the parameter $\Delta$
which dominates the transition from the Euler insulator to the trivial phase
through the intermediate gapless phase, as depicted in Fig. 1(b).

Figure S3: The disordered square lattice model that exhibits band inversions
between the ($p_{x},p_{y}$) and ($d_{x^{2}-y^{2}},d_{xy}$) orbitals. The
relevant parameters are as follows: $L=31$, $\epsilon_{p_{x},p_{y}}$ = 1.58,
$\epsilon_{d_{x^{2}-y^{2},xy}}$ = -0.42,
$V_{pp\sigma}=-0.565,V_{pp\pi}=-0.044,V_{pd\sigma}=0.773,V_{pd\pi}=0.335,V_{dd\sigma}=0.444,V_{dd\pi}=0.224,V_{dd\delta}=0.659$
eV. (a) The energy eigenvalues versus the state index in the vicinity of the
Fermi level for the disordered square lattice with PBC and OBC. (b) The
spatial distribution of the corner states [red stars in (a)]. (c) The real-
space distribution of the local Euler marker $e(\bm{r})$ for the disordered
system with OBC. (e-g) Corresponding results as (a-c) for a trivial state with
$e=0$ (The onsite energy difference is set to $\Delta=6$ eV).

###  H.3 Euler insulator in lattice with moderate structural disorder

To construct a structurally disordered square lattice [91, 92, 93, 68, 36,
37], we add random displacement $\bm{\delta}=d(\cos\theta,\sin\theta)$ away
from its equilibrium position for each site in one-half sample ($\tau_{1/2}$)
of the square lattice, and assign the displacements for the other half to
preserve inversion symmetry. Here $\theta$ and $d$ are determined by uniform
distributions in the interval $[0,\pi)$ and Gaussian distributions with
standard deviation $\sigma=0.2$, respectively. As shown in Fig. S3(a), the
energy spectrum of the structurally disordered lattice with OBC exhibits 4
states at the Fermi level in the bulk gap obtained using PBC (grey area). We
plot the spatial distribution of these states and find that they are well
localized at 4 corners of the sample [see Fig. S3(b)], implying its higher-
order topological feature. Because of the effect of the structural disorder,
the corner states move upwards to the bottom of the unoccupied bulk states.
Furthermore, we analyze the distribution of the local Euler marker in the
finite sample with structural disorder, as shown in Fig. S3(c). The plot
confirms that the local Euler markers $e(\bm{r})$ are close to the expected
value of 1 in the bulk of the sample, while they deviate in the boundary
region. As expected, the sum of $e(\bm{r})$ over the whole finite sample does
not vanish but yields the desired Euler number which should converge to the
quantized value with increasing lattice size. Consequently, we can obtain an
accurate $\bm{r}$-space Euler number by averaging $e(\bm{r})$ over an internal
region of the sample to get rid of the boundary deviation. As a comparison, we
also perform a similar calculation for a trivial phase (see the bottom panels
in Fig. S3). As illustrated in Fig. S3(g), the local Euler marker is almost 0
all over the sample, unambiguously indicating the trivial nature of the state.

###  H.4 Brief discussion of the reality condition in $\mathcal{PT}$-broken
systems

Although we focus on the $\mathcal{PT}$-symmetric system in the main text, it
is not a constraint on calculating the $\bm{r}$-space Euler number. In
$\bm{k}$ space, since the time reversal $\mathcal{T}$ can be considered a
conjugate operator combined with a unitary matrix and a sign flip of $\bm{k}$,
a $\mathcal{T}$-invariant Hamiltonian $H(\bm{k})$ satisfies
$H(\bm{k})=\hat{T}H(\bm{k})\hat{T}^{-1}=H^{\star}(-\bm{k})$ under a proper
basis obtained from Takagi decomposition. Therefore, only in a few time-
reversal invariant momentum with $\bm{k}=-\bm{k}$ can we derive a real
Hamiltonian. To keep the Hamiltonian real in the whole $\bm{k}$-space, another
operator such as $\mathcal{P}$ and $\mathcal{C}_{2z}$ that can reverse the
sign of $\bm{k}$ is essential. However, in $\bm{r}$ space, the time reversal
$\mathcal{T}$ no longer acts on the sign of $\bm{k}$. This means that the
symmetry requirement for the reality condition is only the time reversal
$\mathcal{T}$. Consequently, one can apply the real-space formula of the Euler
number to any nonmagnetic systems, such as open-boundary systems,
quasicrystals, and amorphous materials without any spatial symmetries.

###  H.5 Validation in other models with different Euler numbers

Figure S4:  The topological Euler phase with $(\chi_{1},\chi_{2})=(2,2)$ in a
square lattice based on the minimal four-band model in Eq. (S64). (a) Band
structures of the four-band model in the square lattice. (b) Energy spectrum
of a finite sample with OBC. The lattice size is $L=31$. The bulk gap obtained
using PBC is marked in grey. (c) Real-space distribution of one of the in-gap
states [highlighted by red stars in (a)] which are localized on two opposite
edges of the finite sample. (d) The real-space distribution of the local Euler
marker $e(\bm{r})$ in the sample with OBC.

In the main text, we present the results based on the tight-binding model with
the Euler number $e=1$. Now we show that our proposed $\bm{r}$-space formula
of the Euler number also applies to other models with different Euler numbers
as well. Different from the tight-binding Hamiltonian in Eq. (8) based on the
atomic orbital basis, we consider a generic $\mathcal{PT}$-symmetric four-band
Bloch Hamiltonian $H^{(\chi_{1},\chi_{2})}(\bm{k})$ with $(\chi_{1},\chi_{2})$
representing the Euler number of the upper and lower two-band subspace
respectively [89].

Specifically, we take $(\chi_{1},\chi_{2})=(2,2)$ as an example. The time-
reversal $\hat{T}$ and inversion $\hat{P}$ operators can be expressed as

$\displaystyle\begin{aligned} \hat{T}&=-\mathrm{i}\Gamma_{22}\hat{K},\\\
\hat{P}&=\mathrm{i}\Gamma_{22},\end{aligned}$ (S62)

where $\Gamma_{i,j}=\sigma_{i}\otimes\sigma_{j}$ are $4\times 4$ Dirac
matrices and $\hat{K}$ is the complex conjugation. The minimal four-band
Hamiltonian $H^{(2,2)}(\bm{k})$ can be expressed as

$\displaystyle
H^{(2,2)}(\bm{k})=\mathrm{sin}k_{1}\Gamma_{01}+\mathrm{sin}k_{2}\Gamma_{03}-[\frac{1}{2}+\frac{1}{2}(\mathrm{cos}k_{1}+\mathrm{cos}k_{2})+\frac{3}{2}\mathrm{cos}(k_{1}+k_{2})\Gamma_{22}+\frac{1}{2}\Gamma_{13}].$
(S63)

To calculate the $\bm{r}$-space Euler number in a finite $L\times L$ supercell
of the square lattice, we construct the real-space Hamiltonian $H^{(2,2)}$ by
performing the Fourier transformation to the Bloch Hamiltonian
$H^{\chi_{1},\chi_{2}}(\bm{k})$, which yields

$\displaystyle\begin{aligned}
H^{(\chi_{1},\chi_{2})}=\sum_{ij}\sum_{\mu\nu}\sum_{\bm{k}\in
BZ}e^{\mathrm{i}\bm{k}\cdot(\bm{r}_{i}-\bm{r}_{j})}[H^{(\chi_{1},\chi_{2})}(\bm{k})]_{\mu\nu}c_{i\mu}^{\dagger}c_{j\nu}.\end{aligned}$
(S64)

Here, $\bm{r}_{i}$ is the lattice vector of the $i$-th site in the square
lattice, and $c_{i\mu}^{\dagger}(c_{i\mu})$ is electron creation
(annihilation) operator on the $\mu$ orbital at the $i$-th site. For
simplicity, we only consider nearest-neighbor pairs $\langle ij\rangle$ in the
lattice. The hopping between site $i$ and $j$ is determined by the summation
over $\bm{k}$ in the BZ, $t_{\mu\nu}(\bm{r}_{ij})=\sum_{\bm{k}\in
BZ}e^{\mathrm{i}\bm{k}\cdot(\bm{r}_{i}-\bm{r}_{j})}[H^{\chi_{1},\chi_{2}}(\bm{k})]_{\mu\nu}$.
The on-site energies are given by $\epsilon_{\mu}=t_{\mu\mu}(\mathbf{0})$.

The calculated results are shown in Fig. S4. Similar to the Euler insulator
with $e=1$ presented in the main text, the OBC energy spectrum exhibits some
states in the bulk gap. However, these in-gap states are localized on edges
instead of corners of the finite sample [see Fig. S4(c)]. This indicates
distinct topological behaviors from the topological Euler insulator with
$e=1$. According to the relation between the second Stiefel-Whitney number and
the Euler number $w_{2}=e\mod 2$, the Euler insulator with $e=1$ is also a
Stiefel-Whitney insulator with $w_{2}=1$ which exhibits higher-order topology
with corner states in the presence of additional chiral symmetry [94, 51]. In
contrast, the Euler phase with $e=2$ leads to a trivial second Stiefiel-
Whitney number $w_{2}=0$. Nevertheless, the system associated with the nonzero
Euler number still has a fragile band topology [52]. As shown in Fig. S4 (d),
we plot the real-space distribution of the local Euler marker, which exhibits
similar bulk domination and edge diminution behavior as those studied in the
main text. Remarkably, the local Euler markers inside the bulk are close to
the expected value of 2, which results in the averaged $\bm{r}$-space Euler
number being $e=2$.

Figure S5:  The topological Euler phase with $(\chi_{1},\chi_{2})=(3,1)$ in a
square lattice based on the minimal four-band model. (a) Band structures of
the four-band model in the square lattice (b) Energy spectrum of a finite
sample with OBC. The lattice size is $L=31$. The bulk gap obtained using PBC
is marked in grey. (c) Real-space distribution of one of the in-gap states
[highlighted by red stars in (a)] which are localized on two opposite edges of
the finite sample. (d) The real-space distribution of the local Euler marker
$e(\bm{r})$ in the sample with OBC.

We further validate our $\bm{r}$-space Euler number in another four-band model
with different Euler numbers for occupied and unoccupied bands. Specifically,
we chose the minimal model with $(\chi_{1},\chi_{2})$=(3,1), which can be
formulated as

$\displaystyle H^{(3,1)}(\bm{k})=\begin{pmatrix}\bar{a}\\\ \bar{b}\\\
\bar{c}\end{pmatrix}^{\mathrm{T}}\cdot\uline{\Gamma}\cdot\begin{pmatrix}\bar{a}\\\
\bar{b}\\\ \bar{c}^{\prime}\end{pmatrix},$ (S65)

with

$\displaystyle\uline{\Gamma}=\begin{pmatrix}-\Gamma_{33}&-\Gamma_{13}&\Gamma_{01}\\\
\Gamma_{31}&\Gamma_{11}&\Gamma_{03}\\\
\Gamma_{10}&-\Gamma_{30}&-\Gamma_{22}\end{pmatrix}$ (S66)

and

$\displaystyle\begin{aligned} \bar{a}&=\mathrm{sin}k_{1},\\\
\bar{b}&=\mathrm{sin}k_{2}\\\
\bar{c}&=\frac{1}{2}(1+(\mathrm{cos}k_{1}+\mathrm{cos}k_{2})+3\mathrm{cos}(k_{1}+k_{2})),\\\
\bar{c}^{\prime}&=\frac{1}{2}(3-2(\mathrm{cos}k_{1}+\mathrm{cos}k_{2})-\mathrm{cos}(k_{1}+k_{2})).\end{aligned}$
(S67)

The results of the minimal model with $(\chi_{1},\chi_{2})=(3,1)$ are
illustrated in Fig. S5. In this case, the unbalanced
$|\chi_{1}|\neq|\chi_{2}|$ leads to the lack of additional symmetry of the
system [95]. Consequently, although the system is a topological phase with
nontrivial Stiefel-Whitney number $w_{2}=1$ because of the odd Euler number of
the occupied bands, there is no additional symmetry to ensure the localization
at the corner. Therefore, this phase does not exhibit the higher-order corner
characteristics of conventional Stiefel-Whitney insulators [96, 97, 98, 99,
100].

## References

  * Klitzing  _et al._ [1980] K. v. Klitzing, G. Dorda, and M. Pepper, New method for high-accuracy determination of the fine-structure constant based on quantized hall resistance, Phys. Rev. Lett. 45, 494 (1980).
  * Thouless  _et al._ [1982] D. J. Thouless, M. Kohmoto, M. P. Nightingale, and M. den Nijs, Quantized hall conductance in a two-dimensional periodic potential, Phys. Rev. Lett. 49, 405 (1982).
  * B [1985] M. K. A. B, Topological invariant and the quantization of the hall conductance, Annals of Physics 160, 343 (1985).
  * Halperin [1982] B. I. Halperin, Quantized hall conductance, current-carrying edge states, and the existence of extended states in a two-dimensional disordered potential, Phys. Rev. B 25, 2185 (1982).
  * Hatsugai [1993] Y. Hatsugai, Chern number and edge states in the integer quantum hall effect, Phys. Rev. Lett. 71, 3697 (1993).
  * Xiao  _et al._ [2010] D. Xiao, M.-C. Chang, and Q. Niu, Berry phase effects on electronic properties, Rev. Mod. Phys. 82, 1959 (2010).
  * Hasan and Kane [2010] M. Z. Hasan and C. L. Kane, Colloquium: Topological insulators, Rev. Mod. Phys. 82, 3045 (2010).
  * Qi and Zhang [2011] X.-L. Qi and S.-C. Zhang, Topological insulators and superconductors, Rev. Mod. Phys. 83, 1057 (2011).
  * Fukui  _et al._ [2005] T. Fukui, Y. Hatsugai, and H. Suzuki, Chern numbers in discretized brillouin zone: Efficient method of computing (spin) hall conductances, J. Phys. Soc. Japan 74, 1674 (2005).
  * Kitaev [2006] A. Kitaev, Anyons in an exactly solved model and beyond, Ann. Phys. 321, 2 (2006).
  * Bianco and Resta [2011] R. Bianco and R. Resta, Mapping topological order in coordinate space, Phys. Rev. B 84, 241106 (2011).
  * Prodan [2010] E. Prodan, Non-commutative tools for topological insulators, New J. Phys. 12, 065003 (2010).
  * Loring and Hastings [2011] T. A. Loring and M. B. Hastings, Disordered topological insulators via c*-algebras, Europhys. Lett. 92, 67004 (2011).
  * Toniolo [2017] D. Toniolo, On the equivalence of the bott index and the chern number on a torus, and the quantization of the hall conductivity with a real space kubo formula, arXiv:1708.05912 (2017).
  * Toniolo [2022] D. Toniolo, On the bott index of unitary matrices on a finite torus, Lett. Math. Phys. 112, 126 (2022).
  * Hastings and Loring [2011] M. B. Hastings and T. A. Loring, Topological insulators and c*-algebras: Theory and numerical practice, Ann. Phys. 326, 1699 (2011).
  * Loring [2015] T. A. Loring, K-theory and pseudospectra for topological insulators, Ann. Phys. 356, 383 (2015).
  * Prodan [2011] E. Prodan, Disordered topological insulators: a non-commutative geometry perspective, J. Phys A: Math. Theor. 44, 113001 (2011).
  * Prodan and Schulz-Baldes [2016] E. Prodan and H. Schulz-Baldes,  _Bulk and Boundary Invariants for Complex Topological Insulators: From K-Theory to Physics_ (Springer, 2016).
  * Caio  _et al._ [2019] M. D. Caio, G. Möller, N. R. Cooper, and M. J. Bhaseen, Topological marker currents in chern insulators, Nature Physics 15, 257 (2019).
  * Prodan  _et al._ [2010] E. Prodan, T. L. Hughes, and B. A. Bernevig, Entanglement spectrum of a disordered topological chern insulator, Phys. Rev. Lett. 105, 115501 (2010).
  * Fulga  _et al._ [2016] I. C. Fulga, D. I. Pikulin, and T. A. Loring, Aperiodic weak topological superconductors, Phys. Rev. Lett. 116, 257002 (2016).
  * Mondragon-Shem  _et al._ [2014] I. Mondragon-Shem, T. L. Hughes, J. Song, and E. Prodan, Topological criticality in the chiral-symmetric aiii class at strong disorder, Phys. Rev. Lett. 113, 046802 (2014).
  * Velury  _et al._ [2021] S. Velury, B. Bradlyn, and T. L. Hughes, Topological crystalline phases in a disordered inversion-symmetric chain, Phys. Rev. B 103, 024205 (2021).
  * Claes and Hughes [2020] J. Claes and T. L. Hughes, Disorder driven phase transitions in weak aiii topological insulators, Phys. Rev. B 101, 224201 (2020).
  * Huang and Liu [2018a] H. Huang and F. Liu, Quantum spin hall effect and spin bott index in a quasicrystal lattice, Phys. Rev. Lett. 121, 126401 (2018a).
  * Huang and Liu [2018b] H. Huang and F. Liu, Theory of spin bott index for quantum spin hall states in nonperiodic systems, Phys. Rev. B 98, 125130 (2018b).
  * Huang  _et al._ [2020] H. Huang, Y.-S. Wu, and F. Liu, Aperiodic topological crystalline insulators, Phys. Rev. B 101, 041103 (2020).
  * Huang and Liu [2019] H. Huang and F. Liu, Comparison of quantum spin hall states in quasicrystals and crystals, Phys. Rev. B 100, 085119 (2019).
  * Agarwala and Shenoy [2017] A. Agarwala and V. B. Shenoy, Topological insulators in amorphous systems, Phys. Rev. Lett. 118, 236402 (2017).
  * Kim  _et al._ [2023] S. Kim, A. Agarwala, and D. Chowdhury, Fractionalization and topology in amorphous electronic solids, Phys. Rev. Lett. 130, 026202 (2023).
  * Wang  _et al._ [2020] X. S. Wang, A. Brataas, and R. E. Troncoso, Bosonic bott index and disorder-induced topological transitions of magnons, Phys. Rev. Lett. 125, 217202 (2020).
  * Titum  _et al._ [2015] P. Titum, N. H. Lindner, M. C. Rechtsman, and G. Refael, Disorder-induced floquet topological insulators, Phys. Rev. Lett. 114, 056801 (2015).
  * Toniolo [2018] D. Toniolo, Time-dependent topological systems: A study of the bott index, Phys. Rev. B 98, 235425 (2018).
  * Kang  _et al._ [2021] B. Kang, W. Lee, and G. Y. Cho, Many-body invariants for chern and chiral hinge insulators, Phys. Rev. Lett. 126, 016402 (2021).
  * Yang  _et al._ [2019] Y.-B. Yang, T. Qin, D.-L. Deng, L.-M. Duan, and Y. Xu, Topological amorphous metals, Phys. Rev. Lett. 123, 076401 (2019).
  * Hannukainen  _et al._ [2022] J. D. Hannukainen, M. F. Martínez, J. H. Bardarson, and T. K. Kvorning, Local topological markers in odd spatial dimensions and their application to amorphous topological matter, Phys. Rev. Lett. 129, 277601 (2022).
  * Chen [2023] W. Chen, Universal topological marker, Phys. Rev. B 107, 045111 (2023).
  * Sykes and Barnett [2021] J. Sykes and R. Barnett, Local topological markers in odd dimensions, Phys. Rev. B 103, 155134 (2021).
  * Markov and Rubtsov [2021] A. A. Markov and A. N. Rubtsov, Local marker for interacting topological insulators, Phys. Rev. B 104, L081105 (2021).
  * Irsigler  _et al._ [2019] B. Irsigler, J.-H. Zheng, and W. Hofstetter, Microscopic characteristics and tomography scheme of the local chern marker, Phys. Rev. A 100, 023610 (2019).
  * Mondragon-Shem and Hughes [2019] I. Mondragon-Shem and T. L. Hughes, Robust topological invariants of topological crystalline phases in the presence of impurities, arXiv preprint arXiv:1906.11847 (2019).
  * Grushin and Repellin [2023] A. G. Grushin and C. Repellin, Amorphous and polycrystalline routes toward a chiral spin liquid, Phys. Rev. Lett. 130, 186702 (2023).
  * Zhao  _et al._ [2016] Y. X. Zhao, A. P. Schnyder, and Z. D. Wang, Unified theory of $pt$ and $cp$ invariant topological metals and nodal superconductors, Phys. Rev. Lett. 116, 156402 (2016).
  * Zhao and Lu [2017] Y. X. Zhao and Y. Lu, $pt$-symmetric real dirac fermions and semimetals, Phys. Rev. Lett. 118, 056401 (2017).
  * Ahn and Yang [2017] J. Ahn and B.-J. Yang, Unconventional topological phase transition in two-dimensional systems with space-time inversion symmetry, Phys. Rev. Lett. 118, 156401 (2017).
  * Ahn  _et al._ [2018] J. Ahn, D. Kim, Y. Kim, and B.-J. Yang, Band topology and linking structure of nodal line semimetals with ${Z}_{2}$ monopole charges, Phys. Rev. Lett. 121, 106403 (2018).
  * Wu  _et al._ [2019] Q. Wu, A. A. Soluyanov, and T. Bzdušek, Non-abelian band topology in noninteracting metals, Science 365, 1273 (2019).
  * Bouhon  _et al._ [2020] A. Bouhon, Q. Wu, R.-J. Slager, H. Weng, O. V. Yazyev, and T. Bzdušek, Non-abelian reciprocal braiding of weyl points and its manifestation in zrte, Nat. Phys. 16, 1137 (2020).
  * Ahn and Yang [2019] J. Ahn and B.-J. Yang, Symmetry representation approach to topological invariants in ${C}_{2z}t$-symmetric systems, Phys. Rev. B 99, 235125 (2019).
  * Ahn  _et al._ [2019a] J. Ahn, S. Park, and B.-J. Yang, Failure of nielsen-ninomiya theorem and fragile topology in two-dimensional systems with space-time inversion symmetry: Application to twisted bilayer graphene at magic angle, Phys. Rev. X 9, 021013 (2019a).
  * Ahn  _et al._ [2019b] J. Ahn, S. Park, D. Kim, Y. Kim, and B.-J. Yang, Stiefel–whitney classes and topological phases in band theory, Chin. Phys. B 28, 117101 (2019b).
  * Po  _et al._ [2018] H. C. Po, H. Watanabe, and A. Vishwanath, Fragile topology and wannier obstructions, Phys. Rev. Lett. 121, 126402 (2018).
  * Ünal  _et al._ [2020] F. N. Ünal, A. Bouhon, and R.-J. Slager, Topological euler class as a dynamical observable in optical lattices, Phys. Rev. Lett. 125, 053601 (2020).
  * Guan  _et al._ [2022] Y. Guan, A. Bouhon, and O. V. Yazyev, Landau levels of the euler class topology, Phys. Rev. Res. 4, 023188 (2022).
  * Takahashi and Ozawa [2023] R. Takahashi and T. Ozawa, Bulk-edge correspondence of stiefel-whitney and euler insulators through the entanglement spectrum and cutting procedure, Phys. Rev. B 108, 075129 (2023).
  * Wang  _et al._ [2019] Z. Wang, B. J. Wieder, J. Li, B. Yan, and B. A. Bernevig, Higher-order topology, monopole nodal lines, and the origin of large fermi arcs in transition metal dichalcogenides $x{\mathrm{te}}_{2}$ ($x=\mathrm{Mo},\mathrm{W}$), Phys. Rev. Lett. 123, 186401 (2019).
  * Fang and Fu [2015] C. Fang and L. Fu, New classes of three-dimensional topological crystalline insulators: Nonsymmorphic and magnetic, Phys. Rev. B 91, 161105 (2015).
  * Wang  _et al._ [2022a] C. Wang, F. Liu, and H. Huang, Effective model for fractional topological corner modes in quasicrystals, Phys. Rev. Lett. 129, 056403 (2022a).
  * Huang  _et al._ [2021] H. Huang, J. Fan, D. Li, and F. Liu, Generic orbital design of higher-order topological quasicrystalline insulators with odd five-fold rotation symmetry, Nano Lett. 21, 7056 (2021).
  * Chen  _et al._ [2020] R. Chen, C.-Z. Chen, J.-H. Gao, B. Zhou, and D.-H. Xu, Higher-order topological insulators in quasicrystals, Phys. Rev. Lett. 124, 036803 (2020).
  * Varjas  _et al._ [2019] D. Varjas, A. Lau, K. Pöyhönen, A. R. Akhmerov, D. I. Pikulin, and I. C. Fulga, Topological phases without crystalline counterparts, Phys. Rev. Lett. 123, 196401 (2019).
  * Spurrier and Cooper [2020] S. Spurrier and N. R. Cooper, Kane-mele with a twist: Quasicrystalline higher-order topological insulators with fractional mass kinks, Phys. Rev. Res. 2, 033071 (2020).
  * Else  _et al._ [2021] D. V. Else, S.-J. Huang, A. Prem, and A. Gromov, Quantum many-body topology of quasicrystals, Phys. Rev. X 11, 041051 (2021).
  * Li  _et al._ [2020] C.-A. Li, B. Fu, Z.-A. Hu, J. Li, and S.-Q. Shen, Topological phase transitions in disordered electric quadrupole insulators, Phys. Rev. Lett. 125, 166801 (2020).
  * Benalcazar and Cerjan [2022] W. A. Benalcazar and A. Cerjan, Chiral-symmetric higher-order topological phases of matter, Phys. Rev. Lett. 128, 127601 (2022).
  * Agarwala  _et al._ [2020] A. Agarwala, V. Juričić, and B. Roy, Higher-order topological insulators in amorphous solids, Phys. Rev. Res. 2, 012067 (2020).
  * Wang  _et al._ [2021] J.-H. Wang, Y.-B. Yang, N. Dai, and Y. Xu, Structural-disorder-induced second-order topological insulators in three dimensions, Phys. Rev. Lett. 126, 206404 (2021).
  * Tao  _et al._ [2023] Y.-L. Tao, J.-H. Wang, and Y. Xu, Average symmetry protected higher-order topological amorphous insulators, arXiv preprint arXiv:2306.02246 (2023).
  * Yang  _et al._ [2023] Y.-B. Yang, J.-H. Wang, K. Li, and Y. Xu, Higher-order topological phases in crystalline and non-crystalline systems: a review, arXiv preprint arXiv:2309.03688 (2023).
  * Nakahara [2018] M. Nakahara,  _Geometry, topology and physics_ (CRC press, 2018).
  * Hatcher [2003] A. Hatcher, Vector bundles and k-theory, Im Internet unter http://www. math. cornell. edu/~ hatcher (2003).
  * Note [1] See Supplemental Material at http://link.aps.org/supplemental/xxx, for more details about the derivation and numerical calculations of the real-space formula of the Euler number, which include Refs. [83, 91, 92, 93, 15, 11, 78, 51, 74, 71, 14, 16, 75, 47, 96, 97, 98, 99, 100].
  * Marzari and Vanderbilt [1997] N. Marzari and D. Vanderbilt, Maximally localized generalized wannier functions for composite energy bands, Phys. Rev. B 56, 12847 (1997).
  * Marzari  _et al._ [2012] N. Marzari, A. A. Mostofi, J. R. Yates, I. Souza, and D. Vanderbilt, Maximally localized wannier functions: Theory and applications, Rev. Mod. Phys. 84, 1419 (2012).
  * Soluyanov and Vanderbilt [2011] A. A. Soluyanov and D. Vanderbilt, Wannier representation of ${\mathbb{z}}_{2}$ topological insulators, Phys. Rev. B 83, 035108 (2011).
  * Brouder  _et al._ [2007] C. Brouder, G. Panati, M. Calandra, C. Mourougane, and N. Marzari, Exponential localization of wannier functions in insulators, Phys. Rev. Lett. 98, 046402 (2007).
  * Prodan [2015] E. Prodan, On the generalized Wannier functions, J. Math. Phys. 56, 113511 (2015).
  * Cornean  _et al._ [2016] H. D. Cornean, I. Herbst, and G. Nenciu, On the construction of composite wannier functions, in  _Annales Henri Poincaré_ , Vol. 17 (Springer, 2016) pp. 3361–3398.
  * Fiorenza  _et al._ [2016] D. Fiorenza, D. Monaco, and G. Panati, Construction of real-valued localized composite wannier functions for insulators, in  _Annales Henri Poincaré_ , Vol. 17 (Springer, 2016) pp. 63–97.
  * Gunawardana  _et al._ [2023] T. M. Gunawardana, A. M. Turner, and R. Barnett, Optimally localized wannier functions for 2d chern insulators, arXiv preprint arXiv:2309.07242 (2023).
  * Monaco  _et al._ [2018] D. Monaco, G. Panati, A. Pisante, and S. Teufel, Optimal decay of wannier functions in chern and quantum hall insulators, Commun. Math. Phys. 359, 61 (2018).
  * Zhu  _et al._ [2015] J. Zhu, Z. Chen, and B. Wu, Construction of wannier functions in disordered systems (2015), arXiv:1512.02043 [cond-mat.dis-nn] .
  * Slater and Koster [1954] J. C. Slater and G. F. Koster, Simplified lcao method for the periodic potential problem, Phys. Rev. 94, 1498 (1954).
  * Li  _et al._ [2022] D. Li, M. Pan, C. Wang, and H. Huang, Angular momentum invoked band inversions in mirror symmetry protected topological states, Phys. Rev. B 105, 195133 (2022).
  * Harrison [2012] W. A. Harrison,  _Electronic structure and the properties of solids: the physics of the chemical bond_ (Courier Corporation, 2012).
  * Takagi [1924] T. Takagi, On an algebraic problem reluted to an analytic theorem of carathéodory and fejér and on an allied theorem of landau, in  _Japanese journal of mathematics: transactions and abstracts_ , Vol. 1 (The Mathematical Society of Japan, 1924) pp. 83–93.
  * Lenggenhager  _et al._ [2022] P. M. Lenggenhager, X. Liu, T. Neupert, and T. c. v. Bzdušek, Universal higher-order bulk-boundary correspondence of triple nodal points, Phys. Rev. B 106, 085129 (2022).
  * Jankowski  _et al._ [2023] W. J. Jankowski, M. Noormandipour, A. Bouhon, and R.-J. Slager, Disorder-induced topological quantum phase transitions in euler semimetals (2023), arXiv:2306.13084 [cond-mat.mes-hall] .
  * Wang  _et al._ [2023] F.-J. Wang, Z.-Y. Xiao, R. Queiroz, B. A. Bernevig, A. Stern, and Z.-D. Song, Anderson critical metal phase in trivial states protected by $c\\_${$2z$}$t$ symmetry on average, arXiv preprint arXiv:2306.04683 (2023).
  * Huang and Liu [2020] H. Huang and F. Liu, A unified view of topological phase transition in band theory, Research 2020, 7832610 (2020).
  * Ni  _et al._ [2020] X. Ni, H. Huang, and F. Liu, Robustness of topological insulating phase against vacancy, vacancy cluster, and grain boundary bulk defects, Phys. Rev. B 101, 125114 (2020).
  * Wang  _et al._ [2022b] C. Wang, T. Cheng, Z. Liu, F. Liu, and H. Huang, Structural amorphization-induced topological order, Phys. Rev. Lett. 128, 056401 (2022b).
  * Langbehn  _et al._ [2017] J. Langbehn, Y. Peng, L. Trifunovic, F. von Oppen, and P. W. Brouwer, Reflection-symmetric second-order topological insulators and superconductors, Phys. Rev. Lett. 119, 246401 (2017).
  * Bouhon and Slager [2022] A. Bouhon and R.-J. Slager, Multi-gap topological conversion of euler class via band-node braiding: minimal models, $pt$-linked nodal rings, and chiral heirs (2022), arXiv:2203.16741 [cond-mat.mes-hall] .
  * Park  _et al._ [2019] M. J. Park, Y. Kim, G. Y. Cho, and S. Lee, Higher-order topological insulator in twisted bilayer graphene, Phys. Rev. Lett. 123, 216803 (2019).
  * Lee  _et al._ [2020] E. Lee, R. Kim, J. Ahn, and B.-J. Yang, Two-dimensional higher-order topology in monolayer graphdiyne, npj Quantum Mater. 5, 1 (2020).
  * Sheng  _et al._ [2019] X.-L. Sheng, C. Chen, H. Liu, Z. Chen, Z.-M. Yu, Y. X. Zhao, and S. A. Yang, Two-dimensional second-order topological insulator in graphdiyne, Phys. Rev. Lett. 123, 256402 (2019).
  * Pan and Huang [2022] M. Pan and H. Huang, Phononic stiefel-whitney topology with corner vibrational modes in two-dimensional xenes and ligand-functionalized derivatives, Phys. Rev. B 106, L201406 (2022).
  * Pan  _et al._ [2022] M. Pan, D. Li, J. Fan, and H. Huang, Two-dimensional stiefel-whitney insulators in liganded xenes, npj Comput. Mater. 8, 1 (2022).