A geometric construction of isospectral magnetic graphs

We present a geometrical construction of families of finite isospectral graphs labelled by different partitions of a natural number r of given length s (the number of summands). Isospectrality here refers to the discrete magnetic Laplacian with normalised weights (including standard weights). The construction begins with an arbitrary finite graph G\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\varvec{G}}$$\end{document} with normalised weight and magnetic potential as a building block from which we construct, in a first step, a family of so-called frame graphs (Fa)a∈N\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$({\varvec{F}}_a)_{a \in {\mathbb {N}}}$$\end{document}. A frame graph Fa\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\varvec{F}}_a$$\end{document} is constructed contracting a copies of G along a subset of vertices V0\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$V_0$$\end{document}. In a second step, for any partition A=(a1,⋯,as)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$A=(a_1,\dots ,a_s)$$\end{document} of length s of a natural number r (i.e., r=a1+⋯+as\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$r=a_1+\dots +a_s$$\end{document}) we construct a new graph FA\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\varvec{F}}_A$$\end{document} contracting now the frames Fa1,⋯,Fas\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\varvec{F}}_{a_1},\dots ,{\varvec{F}}_{a_s}$$\end{document} selected by A along a proper subset of vertices V1⊂V0\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$V_1\subset V_0$$\end{document}. All the graphs obtained by different s-partitions of r≥4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$r\ge 4$$\end{document} (for any choice of V0\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$V_0$$\end{document} and V1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$V_1$$\end{document}) are isospectral and non-isomorphic. In particular, we obtain increasing finite families of graphs which are isospectral for given r and s for different types of magnetic Laplacians including the standard Laplacian, the signless standard Laplacian, certain kinds of signed Laplacians and, also, for the (unbounded) Kirchhoff Laplacian of the underlying equilateral metric graph. The spectrum of the isospectral graphs is determined by the spectrum of the Laplacian of the building block G and the spectrum for the Laplacian with Dirichlet conditions on the set of vertices V0\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$V_0$$\end{document} and V1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$V_1$$\end{document} with multiplicities determined by the numbers r and s of the partition.


Introduction
Since Weyl's seminal article in 1912 on the asymptotic distributions of eigenvalues of the Laplacian on a compact Riemannian manifold ( [Wey12], see also [Iv16]) and, in particular, since Kac's celebrated article "Can one hear the shape of a drum?" [Kac66], the relation between the spectrum of the Laplacian and the geometric properties of the underlying space has been studied from many different perspectives.The problem was proposed by Kac for the usual Laplacian on two-dimensional bounded domains with Dirichlet condition at the boundary.The first negative answer to Kac's original question for two-dimensional flat domains was presented in [GWW92].We refer to [GPS05, LR15,Z14] for some surveys on different aspects of isospectrality and inverse spectral problems.An operator-theoretic point of view to the problem of finding non-isometric isospectral domains can be found in [A02].Also, the references [AFM22, LKB + 21, PLK22] show the importance and timeliness of isospectrality in physics.
Recall that two linear operators with discrete spectrum are called isospectral (or cospectral ), if their spectra coincide, i.e. they have the same eigenvalues with the same multiplicity.In order to avoid trivial cases, it is important that the underlying spaces are non-isomorphic (in the corresponding category).Sunada presented in [Sun85] a systematic method for constructing non-isometric manifolds where the corresponding Laplacians have the same eigenvalues, answering negatively Kac's original question.Sunada's method is based on certain quotients of a Riemannian normal coverings and group theoretic properties of the covering groups.An application to discrete graphs and examples that do not arise from Sunada's method can be found in [Br99].We refer to Section 7 for further remarks and for a comparison of our method with Sunada's method.
An extension of Sunada's method is presented in [BPBS09] together with examples of isospectral quantum graphs (see also [vB01,GS01,KM21]).If one considers families of magnetic graphs with fixed underlying discrete graph and the magnetic potential as a parameter, then certain metric graphs that are isospectral for the entire family are isomorphic, cf.[Rü13].An approach using the Dirichletto-Neumann map of certain subgraphs is used in [KM21,Section 4] in order to construct isospectral quantum graphs leading to similar examples as ours (see also the last paragraph of Section 7).Additional references including the relation between isospectral metric and discrete graphs and the refinement of nodal or flip counts are, for example, [GSS05,OB12,JJ18].In [CP20] it is shown that equilateral quantum graphs with only a few number of vertices are determined by their spectrum; and in [Pi23] isospectral equilateral quantum graphs are determined with the help of a computer algebra programme.Another systematic approach for constructing isospectral finite-dimensional operators using quotients is given in [BBJL17].
In the context of discrete graphs isospectral constructions refer to different operators: typically, to the adjacency matrix or the combinatorial Laplacian (and its signless version), see e.g.[GM82, CDS95, Mer97, Tan98, Br99, HH99, vDH03, HS04, BrH12] or the normalised Laplacian (see e.g.[Tan98, Bu10, Ca10, BuG11, Bu15, BuH16, DSG17, HL22]).Since there is in general no simple relation between these spectra for non-regular graphs, isospectrality for discrete graphs strongly depends on the operator chosen.In this article we will focus on Laplacians with normalised weights (see Subsection 2.4 for a precise definition) and there are several reasons for it: 1• First, standard Laplacians have a direct connection to spectral geometry and stochastic processes (cf.[Ch97]) and their eigenvalues are sometimes called geometric (cf.[BaJ08]).• Second, there is an explicit relation between the eigenvalues of the standard (discrete) Laplacian and the Kirchhoff Laplacian of the corresponding compact equilateral metric graph (see e.g.[vB01,LP08] and references therein; in [LP08] also the relation between Laplacians with Dirichlet conditions on subsets of vertices are described).• Third, the construction of isospectral graphs for normalised weights has been studied less than for other operators like the combinatorial Laplacian or the adjacency matrix (cf.[BuG11]).• Finally, it seems that there is a relatively small number of isospectral graphs with normalised weights compared to other cases.Table 1 (taken from [BuG11] and based on results for the combinatorial operators by [HS04]) shows the number of simple graphs of order at most 9 with an isospectral mate for different types of Laplacians: for the combinatorial Laplacian, the signless (combinatorial) Laplacian and for the standard (sometimes also called normalised or geometric) Laplacian.Specific construction techniques of isospectral discrete graphs are presented in [BuG11] where the gluing of certain blocks of graphs including some bipartite blocks resulted in pairs of isospectral graphs for the standard Laplacian.In [BuH16] the authors present a technique based on toggling of three basic blocks to produce isospectral graphs with different number of edges, see also the construction technique presented in [Bu15] using twin graphs and a scaling technique on general vertex and edge weights.Cavers shows in [Ca10] that a variation of the Godsil-McKay switching also preserves the spectrum of the standard Laplacian.In [DSG17] the authors give necessary conditions for a graph to be isospectral with a subgraph with one edge deleted; moreover, they give classes of graphs where this cannot happen.In [HL22] the authors construct isospectral graphs for the normalised Laplacian by partitioning the vertices into several blocks and allowing edges only between consecutive blocks in certain proportions.Isospectrality  In this article we propose to extend the question of isospectrality to the discrete magnetic Laplacian with normalised weights on discrete graphs.Recall that the magnetic field is described in this context in terms of a magnetic potential function α on the oriented edges (arcs) with values in R/2πZ and we call these graphs simply magnetic graphs (see [Shu94,Sun94] in the case of magnetic Laplacians on the lattice graph Z2 ).Isospectrality of magnetic graphs refers to this operator.One important advantage of the use of the magnetic potential is that it interpolates between different types of Laplacians including the usual normalised Laplacian (if α = 0), the signless Laplacian (if α e = π, e ∈ A) or the signed Laplacian (if α e ∈ {0, π}).Therefore, the graphs constructed here will be isospectral for these Laplacians and, also, for the Kirchhoff Laplacian of the corresponding equilateral graphs, see Subsection 2.6.We refer to [FCLP18,FCLP22c] for additional motivation and the use of the magnetic potential in periodic graphs and for the generation of spectral gaps.Moreover, we refer to [FCLP22b] for the use of magnetic potentials to give spectral obstructions for the graph having Hamiltonian cycles or perfect matchings.In [FCLP22a] we present a perturbative method using only spectral information (and no eigenfunctions) to construct isospectral graphs for the normalised Laplacian (for simplicity without magnetic field).
We illustrate first our general construction procedure through a motivating family of examples presented in Section 3. In Figure 1 we show, and briefly explain, a concrete example of two isospectral graphs constructed from a kite graph as a building block G and frame graphs F 1 = G, F 2 and F 3 .In this example, the frame graphs are then glued together along certain vertices and according to the two partitions 2 A = ⦃1, 3⦄ and B = ⦃2, 2⦄ of the natural number r = 4 with length s = 2, i.e., gluing F 1 = G with F 3 and F 2 with itself to produce the isospectral mates F A and F B .Making contact with Kac's original question, our construction shows that for any r ∈ N one can hear the length of the partition s but not the particular decomposition summing up to r.In addition, our graphs will be isospectral for the the standard Laplacian, the signless standard Laplacian, the signature Laplacian corresponding to arbitrary signatures of the building block and, more generally, arbitrary magnetic potentials on the building block.Our construction also determines the spectrum of the isospectral graphs in terms of the spectrum of G and the spectra of the Laplacian on G with Dirichlet conditions of the selected sets of vertices V 0 and V 1 .Nevertheless, we emphasise the geometrical The construction of pairs of isospectral graphs: Top row from left to right: the building block G (a so-called kite graph), the frame members F 1 = G, F 2 and F 3 .Bottom row: The two graphs F A,V 1 and F B,V 1 are isospectral but not isomorphic.Note that this is the smallest possible choice of non-trivial partitions, namely the two different 2-partitions of A = ⦃1, 3⦄ (left) and B = ⦃2, 2⦄ (right) (4 = 1 + 3 = 2 + 2).Note that the kite graph can also carry a magnetic potential; here given by three parameters, see Example 6.9.
construction leading to the families of mutually isospectral graphs rather than the determination of the corresponding spectra.Our isospectral graphs will have the same number of edges.
Let us finally mention that all our isospectral, but not isomorphic discrete graphs with standard weight (and no magnetic field) directly lead to equilateral metric graphs which are isospectral, but not isomorphic (see Corollary 5.9).
Structure of the article.The following section introduces the basic notions and results on multidigraphs and discrete magnetic Laplacians needed in this article.We also introduce here the two basic graph operations needed in our construction: vertex contraction and vertex virtualisation leading to the corresponding Dirichlet Laplacian.In Section 3 we present our construction first in a family of examples with a concrete building block graph and illustrate some of the key ideas of the general proof in these prototypes.The following section focuses on the notion of a frame obtained from a generic building block (magnetic graph) with some distinguished subset of vertices V 0 .We also calculate the spectrum of a frame member and give a group theoretical explanation of the different multiplicities that appear in the spectrum of the isospectral graphs.In Section 5 the general construction is presented and the main results on isospectrality (Theorem 5.8 and Corollary 5.9) are proved.In the next section we present many families of isospectral graphs exploiting systematically the combinatorial freedom in our construction procedure.In Appendix A we recall basic facts on partitions and multisets that will be used throughout the article.
Acknowledgements.It is a pleasure to thank an anonymous referee for a careful reading of the manuscript and many useful suggestions and remarks on the first version of the manuscript.

Magnetic discrete graphs and their Laplacians
In this section, we introduce briefly the discrete structures and operations needed for the construction for families of isospectral graphs.We will consider discrete locally finite graphs having normalised weights on vertices and edges.We will also consider a magnetic potential on the graph in terms of an R/2πZ-valued function α on the edges.Finally we will specify the discrete normalised magnetic Laplacian as a second order discrete analogue of the usual Laplace operator on a Riemannian manifold with magnetic potential.
2.1.Discrete graphs.In this subsection, we fix the notation for discrete graphs following the notation of Sunada (cf.[Sun13, Chapter 3]), see also our previous articles [FCLP18,FCLP22c], where certain aspects are explained in more detail.
A (discrete multidi-)graph G = (V, E, ∂) is given by two disjoint and (in this article) finite sets V and E (the set of vertices and of (directed) edges or arcs) together with an incidence map ∂ : For a vertex v ∈ V , the set of directed edges with origin v is denoted as E v (G) or simply E v , i.e.
The degree of a vertex v is the cardinality of E v , denoted by deg v := |E v |.Observe that loops are counted twice in each set E v (as e = e).We exclude isolated vertices and vertices with infinite degree, i.e., we assume that 0 is called the degree multiset of G (see Appendix A.1 for more details on multisets).A graph G is connected if for any two vertices u, v there exists a path from u to v, i.e., there is a sequence of distinct vertices (u, v 1 , . . ., v n−1 , v) and of directed edges (e 1 , e 2 , . . ., e n ) with )) is given by two maps ϕ : V (G) −→ V (G ′ ) and ϕ : E(G) −→ E(G ′ ) respecting the incidence and inversion maps, i.e., they fulfil ∂ ± (ϕ(e)) = ϕ(∂ ± e) and ϕ(e) = ϕ(e) for all e ∈ E(G).The map ϕ is a graph isomorphism if ϕ is a bijection on the vertex and edge sets; in this case, G and G ′ are called isomorphic (discrete) graphs.Note that the degree multiset (2.1) is a graph invariant, i.e., if the degree sequence or the degree multiset of two graphs differ, then the graphs cannot be isomorphic.

2.2.
Graphs with normalised weights and magnetic potentials.We briefly define here discrete graphs with normalised weights.As before, details can be found in [FCLP18,FCLP22c] and references therein.An (edge) weight is a function w : E −→ (0, ∞) such that w e = w e for all e ∈ E, the associated weighted degree is defined by (2.2) The edge weight w and vertex weight deg w G are called normalised in the terminology of [FCLP18, FCLP22c, Section 2.2].A particular case is w e = 1 for all e ∈ E and hence deg w G v = deg G v is the usual degree of v; this weight is called standard. 3We extend w and deg w G naturally as discrete measures on E(G) and V (G).
Next, we define magnetic potentials on discrete graphs (see [FCLP18,FCLP22c] and references therein for details).A magnetic potential is a function α : E −→ R/2πZ such that α e = −α e for all e ∈ E. We call G = (G, α, w) a magnetic graph (with normalised weights).For the standard weight and no magnetic potential (i.e., w e = 1 and α e = 0 for all e ∈ E) we simply write G for the corresponding magnetic graph G = (G, 0, 1).

Contraction of vertices.
An important operation we need in this article is the contraction of vertices (also called gluing or merging of vertices in the literature).We introduce the shrinking number s that quantifies the reduction of the number of vertices in the quotient graph.Note that if we contract two adjacent vertices v 1 and v 2 , all edges joining v 1 and v 2 become loops in G/∼ (in contrast to some conventions in combinatorics where only simple graphs are allowed).
Given a discrete graph G = (V, E) with (edge) weight w, we choose w also as weight on the quotient graph G/∼ = (V /∼, E) (denoted by the same symbol w).For the quotient, we have where ⊔ means that the union is disjoint.Hence the weighted degree is It follows that the quotient map π : G −→ G/∼ given by v → [v] is a measure preserving map, since the edge weights are the same (the edges are actually not changed) and since for any V ⊂ V (G/∼).Similarly, a magnetic potential α on G will be lifted to G/∼.
2.4.Normalised magnetic Laplacians.For a graph (G, w), we associate the following natural Hilbert space as our graphs are finite, ℓ 2 (V, deg w ) is a |G|-dimensional space.
Definition 2.2 (discrete (normalised) magnetic Laplacian and its spectrum).Let G = (G, α, w) be a magnetic graph with normalised weights.The (normalised) magnetic Laplacian is the operator w e e iαe f (∂ + e) , v ∈ V, (2.5) where the sum in Eq. (2.5) is taken over all edges starting at v and loops are counted twice; deg w v = e∈Ev w e is the weighted degree (see (2.2)).If G has order n, then we write the spectrum of the corresponding Laplacian ∆ G as the multiset (see Appendix A.1 below) where the eigenvalues λ 1 (G), . . ., λ n (G) are written in ascending order and repeated according to their multiplicities.
Remark 2.3 (matrix representation of the Laplacian).Note that the matrix representation of ∆ G with respect to the orthonormal basis If the graph is simple and has no magnetic potential, we have For a graph with loops and standard weight w e = 1, we have if there are 2ℓ(v) loops at a vertex v (note that we distinguish between e and ē), so a loop counts twice.
As an example the (non-simple) magnetic graph G θ in Figure 2 with three vertices has the matrix representation (2.7) Definition 2.4 (isospectral magnetic graphs).Let G and G be two finite magnetic graphs.We say that G and G are isospectral (or cospectral) if their spectra agree as multiset, i.e., if all eigenvalues agree including their multiplicities.
Remark 2.5 (multiple edges versus weighted graphs without multiple edges).A weighted graph G with multiple edges can be turned into a graph G without multiple edges.On the other hand, a weighted graph with integer (edge) weights can be turned into a graph with multiple edges and standard weights.We discuss for simplicity only the case of graphs without loops and magnetic potential.
It turns out that both graphs (with or without multiple edges) have the same Laplacian.This leads us to the following definition: We say that two weighted graphs G = (G, 0, w) and G = ( G, 0, w) on the same vertex set or, equivalently, if the matrix representation of their Laplacians is the same.
Clearly, isomorphic magnetic graphs are isolaplacian, and isolaplacian magnetic graphs are isospectral (as the corresponding matrices are the same), but not vice versa.
(a) Assume that G = (G, 0, w) is a weighted graph without magnetic potential.If G has multiple edges, we define a weighted graph G = ( G, 0, w) as follows: Denote by Then the graphs G and G are isolaplacian.We call G the underlying simple weighted graph.
Note that the graphs G and G are not isomorphic (as a multiple edge changes the Betti number).(b) On the other hand, a weighted graph G with weights w e ∈ N can be turned into a graph with standard weights G ′ by replacing an edge e by w e multiple edges e ′ with weight w ′ e ′ = 1.Again, it is easy to see that the graphs G and G ′ are isolaplacian, but again not isomorphic (if at least one weight fulfils w e = 1).
Remark 2.6 (signed graphs as a special case of magnetic graphs).If the magnetic potential α has values only in {0, π}, then the magnetic potential is also called a signature and G is called a signed graph (see e.g.[LLPP15] and references therein).The corresponding Laplacians (see below) are called signed Laplacian, including the so-called signless Laplacian, where α e = π for all e ∈ E. In this sense the magnetic potential can be interpreted as a parameter interpolating different Laplacians.
The construction presented later shows isospectrality for magnetic Laplacians including signed and signless Laplacians.
The next proposition collects some well-know properties of the discrete magnetic Laplacian (for a proof, see e.g.[FCLP18, Section 3]): Proposition 2.7 (magnetic Laplacians and cohomologous magnetic potentials).Let G = (G, α, w) be a normalised magnetic graph and ∆ G its associated Laplacian.
(d) If the underlying graph of G is a tree, then α ∼ 0 and ∆ (G,α,w) and ∆ (G,0,w) are unitarily equivalent for any magnetic potential α.(e) Let α = π and G be connected.Then α ∼ 0 if and only if G is bipartite.
"⇐": Let V = A ⊔ B be a disjoint decomposition of the bipartite graph (i.e., there are no edges between vertices in A respectively B).We define 2.5.Dirichlet magnetic Laplacians.We define here the notion of a "Dirichlet boundary condition" on a subset V 0 of vertices for a discrete graph.We call this process vertex virtualisation.Concretely, let G = (G, α, w) be a magnetic graph and , where E(V 0 ) is the set edges starting and ending in V 0 .
The weight function and the magnetic potential are defined as the restriction to E(G + ), namely w + := w↾ E(G + ) and α + := α↾ E(G + ) .For simplicity of notation we will not distinguish the restriction by the label (•) + , and use w resp.α instead of w + resp.α + .We denote the normalised magnetic partial subgraph with virtualised vertices V 0 obtained from G hence by For an example as matrix representation see the end of this subsection.
Definition 2.8 ((normalised) magnetic Dirichlet Laplacian).Let G = (G, α, w) be a magnetic graph and V 0 ⊂ V (G).The (normalised) magnetic Dirichlet Laplacian with Dirichlet conditions on V 0 is defined as Note that the k-th eigenvalue of the Dirichlet Laplacian (written in ascending order) is larger than the corresponding k-th eigenvalue of the Laplacian without restrictions, a consequence of the interlacing theorem for eigenvalues.This justifies the superscript (•) + in the notation.The relation between both Laplacians is as follows: if both Laplacians are represented as a matrix, then the Dirichlet Laplacian corresponds to a principal submatrix of the original Laplacian.
As an example we consider again the graph G θ in Figure 2, now with is now the principal submatrix obtained from the original matrix (2.7) by deleting the row and column corresponding to the Dirichlet vertex v 1 , here the first one, i.e., Note that this graph is now independent of the magnetic potential θ (see also Section 3).
4 For a partial subgraph, the incidence function may not map all initial or final vertices into V (G) \ V 0 (see Section 2 of [FCLP18] for additional results and motivation).Mohar [Moh92] also calls edges with one vertex not in the graph also "free edges".
The metric graph G is then the quotient space e∈E • [0, 1] × {e}/ψ, where the interval endpoints are identified according to the graph G.In particular, we consider V as subset of G, and it makes sense to speak of a continuous function at a vertex in G.We have a natural coordinate x e ∈ [0, 1] and a natural measure on G, the Lebesgue measure on each interval.For a function f : G −→ C we define f e (x) := f (x, e) for e ∈ E • and f e (x) : The Kirchhoff (sometimes also called standard or e for functions f e and their two weak derivatives in L 2 ([0, 1]) satisfying f continuous at each vertex v and ).For more details on metric graphs, we refer for example to [BeK13].For simplicity, we consider graphs without magnetic potentials here only.
We use a beautiful relation between the spectra of the standard Laplacian and the Kirchhoff Laplacian (see for example ).As the homology of the graph is determined by the number of vertices and edges, and as the number of bipartite connected component can be detected from the spectrum of ∆ G , the stated equivalence follows.

A motivating family of examples
Before going into a formal description of the construction of isospectral magnetic graphs in Section 5 we illustrate the main idea of the construction with a class of examples.This motivating family of examples of isospectral graphs generalise those given by Butler and Grout in [BuG11, Example 2] allowing multiple edges, a general magnetic potential and dropping the bipartiteness condition.The construction begins with the choice of a building block, out of which we will assemble the frame members.The building block G in the example is given by a graph with three vertices {v 1 , v 2 , v 3 }, and three edges, two of which are multiple joining v 1 and v 2 (see Figure 2).For θ ∈ R/2πZ we add a magnetic potential α θ e = θ on one of the two parallel edges e and α θ e = 0 on the remaining two edges, and call the resulting magnetic graph G θ = (G, 1, α θ ). 6Examples with simple graphs (i.e.without multiple edges or loops) are given in Section 6 Let V 0 = {v 1 , v 3 } be the set the two non-adjacent vertices of G.For each a ∈ N we contract a copies of G by merging v 1 (respectively v 3 ) in each copy to one vertex.The edge weight and the magnetic potential remains the same after identification on each copy.The resulting magnetic graph is called a-th frame member F θ a := F a (G θ , V 0 ), as in Figure 2 (see also the general Definition 4.1).We denote by (F a ) a∈N the frame obtained by the building block G and the choice of merging vertices V 0 .
Figure 2. The frame (F θ a ) a∈N given by the frame members F θ a for a ∈ N.Each graph F θ a has a so-called distinguished bottom vertex (outlined); it will be used in the next step for the contracted frame union.
Note that the graphs in the family given in Figure 2 have a high degree of symmetry, and this fact is reflected in the spectrum through eigenvalues with high multiplicity (see Remark 4.6).The idea of the construction is to use the frame (F θ a ) a∈N to construct new non-isomorphic graphs that preserve most of the eigenvalues of the initial frame.The geometric procedure to assemble different frame members to specify the families of isospectral graphs are determined by s-partitions of a natural number r ∈ N (cf.Definition A.1 for a formal definition).
To be concrete, we construct two isospectral graphs using the family given in Figure 2 as follows.Consider, for example, the two different 2-partitions of the number 4, namely A = ⦃1, 3⦄ and B = ⦃2, 2⦄, i.e., 4 = 1 + 3 = 2 + 2 (here ⦃2, 2⦄ is the multiset with one element 2 of multiplicity 2, see Appendix A.1).We choose the vertex v 1 ∈ V 0 of degree 2 (due to the double edge) as distinguished vertex, and we construct a graph F θ A,v 1 (called later v 1 -contracted frame union, see Definition 5.5) associated with the first partition A = ⦃1, 4⦄ as follows (see Figure 3): contract the copies of the distinguished vertex v 1 (outlined vertices) from the frame members F θ 1 and F θ 3 in Figure 2. Similarly, define F θ B,v 1 by contracting two copies of F θ 2 along the distinguished vertex v 1 .An explicit computation of the eigenvalues of the corresponding standard Laplacians shows that both graphs F θ A,v 1 and F θ B,v 1 are isospectral with 6 Note that if θ = π, then the entry in the matrix of ∆ G θ corresponding to the edges joining v 1 and v 2 (cf.(2.6)) is actually 0, due to the two parallel edges, one of them with magnetic potential π, the other one 0, hence e 0 + e iπ = 0.In particular, G π is isolaplacian (see Remark 2.5) with the disjoint union of a graph with one isolated vertex (having spectrum 1 by definition), and G + v1 ; in accordance with the spectrum ⦃1 − 1/ √ 3, 1, 1 + 1/ √ 3⦄ given in (3.2) for θ = π.This special case is hence a procedure to "delete" edges while keeping the original degrees.
The contracted frame unions F θ A,v 1 and F θ B,v 1 for the two different 2partitions A = ⦃1, 3⦄ and B = ⦃2, 2⦄ of 4 are isospectral, but not isomorphic for each value θ ∈ R/2πZ of the magnetic potential.
where 1 (3) means that 1 has multiplicity 3, but the corresponding discrete graphs are not isomorphic.We actually prove in Theorem 5.7 the general result that for an s-partition of r the spectrum of the normalised magnetic Laplacian is given by where ⊎ denotes the multiset union, see Appendix A.1.In our example we have r = 4 and s = 2 and the spectra of the building block G θ and the magnetic graphs with vertices v 1 and V 0 = {v 1 , v 3 } virtualised are given respectively by Remark 3.1 (explanation of spectrum).We give here some heuristic reasons for the spectrum having the form as in (3.1) and will formalise them in the proofs of the main results of the following sections (see Proposition 4.5 and Theorem 5.7).
(a) Each eigenfunction of the building block G θ carries over to F θ A,v 1 by symmetrically extending it to each copy of G θ with the same eigenvalue; hence each eigenvalue of G θ contributes one time its original multiplicity.This gives three eigenvalues in our concrete example.(b) Each eigenfunction of (G θ ) + v 1 carries over to symmetric copies on each member F θ a of F θ A,v 1 for a ∈ A with the same eigenvalue.We can suitably choose s − 1 copies of them being orthogonal to the symmetric ones constructed in the first item.This gives 2 • (s − 1) = 2 eigenvalues in our case as s = 2. (c) Finally, each eigenfunction of (G θ ) + V 0 carries over to an eigenfunction on each F θ a for a ∈ A with the same eigenvalue.There are a−1 of them on F θ a orthogonal to the symmetric ones.As they vanish on the contracted vertices V 0 , they remain eigenfunctions on F θ A,v 1 , and there are a∈A (a − 1) = r − s of them, again orthogonal to the previously constructed ones.Therefore we obtain 1 • (r − s) = 2 new eigenvalues in our case.A,v 1 .Hence, the three eigenfunctions (in the picture, it is the constant one) become three eigenfunctions on F θ A,v 1 .Middle: each eigenfunction of (G θ ) + v 1 becomes a symmetric copy on each member ( To make them orthogonal to the symmetric ones, we can choose only s − 1 = 1 one here for each of the two eigenfunctions of (G θ ) + v 1 , hence 2(s − 1) = 2 eigenvalues of F θ A,v 1 are captured.Bottom: we consider the eigenfunctions of (G θ ) + V 0 (here only one) onto each copy of (G θ ) + V 0 in (F θ a ) + v 1 for a ∈ ⦃3, 1⦄.There are here r − s = (3 − 1) + (1 − 1) = 2 such eigenfunctions orthogonal to the previous ones, supported here only on (F θ 3 ) + v 1 .
One can see that all eigenvalues are captured via this procedure (here r + s + 1 = 7 = 3 + 2 + 2).In addition, the two graphs are not isomorphic, as F θ A,v 1 has a pendant vertex while F θ B,v 1 has no vertex of degree 1.
The important feature for the construction of families of isospectral graphs in the preceding example is the partition of a natural number that selects members of a frame (F θ a ) a∈N that will be contracted at the distinguished vertices (the outlined vertex v 1 in our example).In fact, there is an infinite collection of (finite) families of isospectral graphs that can be constructed similarly.We illustrate this with all different 4-partitions of 8: For each of the different s-partitions A q (q ∈ {1, 2, 3, 4, 5}) (s = 4) of r = 8 construct the graphs F θ Aq,v 1 as before (see Figure 5).An explicit computation of the eigenvalues of the Laplacian of F θ Aq,v 1 Figure 5.The graphs F θ Aq,v 1 defined by the 4-partitions 2, 3⦄ and A 5 = ⦃2, 2, 2, 2⦄ of r = 8.All graphs have r + s + 1 = 13 vertices (s = 4) and 3r = 24 edges.There are five different 4-partitions of 8 (all listed above).
shows again that the five graphs are isospectral for q ∈ {1, . . ., 5} and with spectrum in accordance with (3.1) for r = 8 and s = 4.Note that isospectrality is guaranteed for any constant value of the magnetic potential on one of the multiple edges.Finally, all graphs F θ Aq,v 1 in Figure 5 are mutually non-isomorphic, as their corresponding degree multisets (see (2.1)) contain the corresponding partition A q (highlighted as bold numbers), and hence are different.In fact, the degree sequences of the graphs F θ Aq,v 1 are given by Graph Degree multiset

Frames constructed from a building block and their spectra
We construct formally in this section a family of magnetic graphs, called a frame, constructed from a given magnetic graph as a building block and a subset of its vertex set along which we identify copies of the given graph.In particular, the spectrum of this family depends only on the given magnetic graph and the subset of vertices.
Given a magnetic graph G and a subset V 0 of its vertices, we define a geometrical construction of graphs with a symmetric structure: Definition 4.1 (frame members and frames).Let G = (G, α, w) be a magnetic graph (which we call building block ), V 0 ⊂ V (G) and a ∈ N.
(a) Define the a-th frame member obtained from G identified along V 0 by where G a := j∈{1,...,a} is the disjoint union of a copies of G with vertex set V (G a ) = V (G) × {1, . . ., a} and edge set E(G a ) = E(G) × {1, . . ., a}.The equivalence relation ∼ V 0 on the vertex set V (G a ) of the disjoint union is given by and all other pairs are equivalent only to itself, i.e., we contract each vertex v ∈ V 0 of all copies to one vertex.Denote by [(v, j)] the corresponding class specifying a vertex in F a .Moreover, we call the a-th (G-)frame member obtained from the magnetic graph G identified along V 0 , where the weights and vector potentials are the same on each copy (and also denoted by the same symbol), i.e., w (e,j) := w e and α (e,j) := α e for all e ∈ E(G) and j ∈ {1, . . ., a}.(b) The family (F a (G, V 0 )) a∈N is called a (G-)frame identified along V 0 .
If the dependence on G and V 0 are clear from the context we will denote a frame member and a frame simply by F a and (F a ) a∈N , respectively.Remark 4.2.It is easily seen that for a simple graph G and a ≥ 2, the frame F a (G, V 0 ) is simple if and only if there are no edges inside the identified vertex set V 0 .
Remark 4.3 (frames with virtualised vertices).We also allow that G has virtualised vertices V 1 ⊂ V (G), i.e., vertices on which we impose Dirichlet boundary conditions (see Definition 2.8).We write The following result is a direct result of the preceding definitions.
Lemma 4.4 (order and degree multiset of frame members).Let G + V 1 be a magnetic graph with virtualised vertices V 1 ⊂ V (G).Moreover, let V 0 be a subset of vertices such that V 1 ⊂ V 0 ⊂ V .Then the order and the number of edges of the a-th frame member We prove next, that the spectrum of the magnetic graph Basically, we use the cyclic symmetry of the a-th frame member.

Proposition 4.5 (spectrum of frame members). Let G +
V 1 be a magnetic graph with virtualised vertices Proof.We assume for ease of notation that V 1 = ∅, i.e., G + V 1 = G, the general case can be treated exactly in the same way.
Let n = |G| = |V | and σ(G) = ⦃ρ 1 , ρ 2 , . . ., ρ n ⦄ be eigenvalues of ∆ G with corresponding orthonormal eigenfunctions given by {f 1 , f 2 , . . ., f n }.For each k ∈ {1, . . ., n}, we extend first the eigenfunction f k onto the disjoint union G a to a function f k : V (G a ) −→ C by f k (v, j) = f k (v) for j ∈ {1, . . ., a}.With a little abuse of notation we write by f k also the corresponding function on the a-th frame member F a = F a (G, V 0 ), which is naturally defined since the functions have the same value on the contracted vertices V 0 .The proof of the multiset inclusion σ G ⊂ σ F a (G, V 0 ) is then a special case of the first part of the proof in Theorem 5.7 (choose A = ⦃a⦄ in the construction of the symmetric functions).
To show that also the eigenvalues of G + V 0 with Dirichlet conditions on V 0 lift to eigenvalues on the frame member with corresponding orthonormal eigenfunctions h 1 , h 2 , . . ., h n ′ .Moreover, let η ∈ C be a non-trivial a-th root of unity, i.e., η = 1 and η a = 1.For each such η we extend the eigenfunction Note that this choice is also well-defined on the quotient as as a j=1 η j = 0 since η = 1.If v ∈ V \ V 0 , all equivalence classes [(v, j)] contain only one element, again denoted by (v, j).In this case, we have This shows that h k ′ ,η is an eigenfunction of ∆ Fa with eigenvalue λ k ′ as claimed.
Next we will show that the constructed eigenfunctions on the frame member are mutually orthogonal.First, recall that a j=1 η j = 0 since η = 1.Therefore, we have Second, the eigenfunctions corresponding to different non-trivial roots of unity are also orthogonal since Here, η = 1 = η ′ and η = η ′ , so that the product ηη ′ also determines a non-trivial root of unity.Therefore, we have shown that the functions f k and h k ′ ,η for k ∈ {1, . . ., n}, k ′ ∈ {1, . . ., n ′ } and η a = 1 with η = 1 are mutually orthogonal.In particular, we have shown that σ the multiplicity a − 1 coming from the fact that there are a − 1 solutions of η a = 1 with η = 1.Altogether we have n + (a − 1)n ′ mutually orthogonal eigenfunctions and by Lemma 4.4, the order of F a is precisely hence we have found all eigenvalues.
We next present several examples that illustrate how different choices of V 0 of the same underlying graph G lead to different families of graphs.We apply the preceding proposition to determine their spectra.We will mention examples with a tree as building block (hence the magnetic potential has no effect) and building blocks with cycles and a non-trivial magnetic potential.

Remark 4.6 (group-theoretical justification).
There is an elegant group-theoretical justification for the multiplicities appearing in the spectrum of the magnetic Laplacian of a frame member.In fact, in the proof of Proposition 4.5 there is a cyclic group Z a acting on the vertices of F a by shifting the label j, j ∈ Z a , numbering the branches of the frame member.This induces naturally an action of Z a on the corresponding ℓ 2 space which defines the regular representation U of Z a .Since Z a is a finite Abelian group the unitary dual satisfies Z a ∼ = Z a and U decomposes into a direct sum of onedimensional representations which consist of multiplication with a-th root of unity (see e.g.[HR79, Section 23.27]).The arguments in the proof of Proposition 4.5 essentially show that the lifted f -and h-eigenfunctions not only reduce the Laplacian but also reduce the regular representation U.In fact, one has the following decomposition of the Laplacian explaining the multiplicity (a − 1) of the eigenvalues of ∆ G + V 0 in the spectrum of the Laplacian on the frame F a .Note that the first summand arises from the trivial representation and recall that the constant function is excluded as eigenfunction of the Dirichlet Laplacian due to the Dirichlet conditions on V 0 .
We start with a simple building block; here a tree, hence any magnetic potential is cohomologous to 0.
Example 4.7 (complete bipartite graphs).Let G = K m,1 be the complete bipartite graph with m+ 1 vertices and m edges (it is also called a star graph).We draw m − 1 of the pendant vertices on the bottom and one vertex on top.Let V 0 be the set of vertices of degree 1 (the bottom and top ones).Again we choose standard weights.The spectrum of ∆ G and ∆ G + V 0 is given respectively by σ(K m,1 ) = ⦃0, 1 (m−1) , 2⦄ and σ (K m,1 ) + V 0 = ⦃1⦄.Note that the frame member F a = F a (G, V 0 ) is obtained from the complete bipartite graph K m−1,a by decorating each of the a vertices on top with a pendant vertex, and that the pendant a vertices are all identified into a single vertex.Proposition 4.5 implies that the spectrum of the standard Laplacian on F a is given by σ Actually, F a is just the complete bipartite graph K m+1,a if one draws the top vertex also on the bottom.Nevertheless, we draw F a in this way as we will use only the m − 1 bottom vertices (outlined) as distinguished ones in Section 5.
Figure 6.The frame members leading to complete bipartite graphs, here for m = 3.
Example 4.8 (a diamond-like graph with magnetic potential).We start with a path graph with three vertices and add a loop with magnetic potential to the middle vertex v 2 .For θ ∈ R/2πZ, we let G θ := (G, α θ , 1) be the magnetic graph with standard weights (w e = 1 for all e ∈ E(G)), where G is the path graph P 3 with a loop e 0 attached at the middle vertex v 2 .We set α θ e 0 = θ and α θ e = 0 for the other two edges.In this case, the spectrum of G θ is given by the eigenvalues of The spectrum of the frame member Example 4.9 (kite graphs).Let G be the complete graph on four vertices with one pendant vertex added (so G has five vertices).The vertex set V 0 consists now of the pendant vertex and one of the remaining four vertices (see Figure 8).Let G be the corresponding weighted graph with standard weights.We then have for the standard Laplacian without magnetic potential.As building block G = (G, α, 1) one can also choose an arbitrary magnetic potential α : E −→ R/2πZ.Note that as the Betti number of the building block is 3, it can be seen that it is enough to consider magnetic potentials only which are supported on three edges only, leading to three parameters in R/2πZ; any other magnetic potential leads to a unitarily equivalent Laplacian by Proposition 2.7 (b).
Figure 8.The frames starting from a so-called kite graph.

Graphs constructed from frames and partitions
In this section we present the construction of an infinite collection of families of magnetic graphs, where all the elements in each family are isospectral, but non-isomorphic graphs for the magnetic Laplacian with normalised weights.Each family consists of finitely many graphs.Given a frame (F a ) a∈N constructed as in the previous section we will determine these families by assembling the members of the frame according to different s-partitions of the natural number r (see Definition A.1 and Section 3).We present the construction in two steps.5.1.Disjoint frame unions.We start with a simple construction of isospectral, but non-isomorphic graphs.Note that these graphs are not connected.The construction in this subsection is a special case of the one in Subsection 5.2, namely when V 1 = ∅.Definition 5.1 (disjoint frame unions).Let G = (G, α, w) be a magnetic graph (building block) and choose a subset V 0 ⊂ V (G).Consider the frame (F a (G, V 0 )) a∈N = (F a ) a∈N as specified in Definition 4.1 and let A = ⦃a 1 , . . ., a s ⦄ be an s-partition of the natural number r.The disjoint A-union of the frame (F a ) a∈N is defined as (5.1) Note that disjoint frame unions associated to a partition A can be similarly defined for building block graphs that have Dirichlet conditions on some vertices, say V 0 .We denote the corresponding disjoint frame union by F A (G + V 0 , V 0 ).In fact, in the proof of Theorem 5.7 we will consider disjoint A-unions of frames constructed from building block graphs that have Dirichlet conditions on V 0 .Note that F A (G + V 0 , V 0 ) is actually also the disjoint union of r copies of G + V 0 , but we need the grouping into the partition members a ∈ A in the proof of Theorem 5.7.
We need the order and degree multiset of the disjoint union of frames.
Lemma 5.2 (order and degree multiset of disjoint frame unions).Let A be an s-partition of r and consider the disjoint A-union of frames F A defined before.Its order is given by The degree multiset of F A is given by Proof.The first result follows from Lemma 4.4 since F A is a disjoint union of frames.In particular, where we used (A.1).The second statement follows similarly.
As the map A → deg F A is injective, graphs with different s-partitions A and B of r cannot be isomorphic.Note that in order to have two different s-partitions of r, we need r ≥ 4 and 2 ≤ s ≤ r−2.
Lemma 5.3.Let A and B be two different s-partitions of r with r ≥ 4 and 2 ≤ s ≤ r − 2. Then the graphs F A and F B are not isomorphic.
As a prelude (or a special case) of the main theorem (Theorem 5.7) we mention next a first family of isospectral non-isomorphic graphs labelled by different s-partitions of r.Note that these graphs are not connected.
Proposition 5.4.The spectrum of F A is given by In particular, for two different s-partitions A and B of r with r ≥ 4 and s ≥ 2, the graphs F A and F B are isospectral, but not isomorphic.
Proof.The spectrum of a disjoint union of graphs is the multiset sum of its spectra, hence the first equality holds.For the second, we use Proposition 4.5 and (A.1).As only r and s enter in σ(F A ), we have σ(F A ) = σ(F B ).By Lemma 5.3, the graphs are not isomorphic.
5.2.Contracted frame unions.Next, we construct contracted frame unions by merging a subset of distinguished vertices V 1 ⊂ V 0 .
Definition 5.5 (contracted frame union).Let G = (G, α, w) be a magnetic graph (building block) and choose a subset V 0 ⊂ V (G).Consider the frame (F a (G, V 0 )) a∈N = (F a ) a∈N as specified in Definition 4.1 and let A = ⦃a 1 , . . ., a s ⦄ be an s-partition of the natural number r.For a subset V 1 ⊂ V 0 , called the set of distinguished vertices, we define the V 1 -contracted A-union of the frame (F a ) a∈N by where The next result establishes the order of the graphs constructed before.It follows directly from the definition.
Lemma 5.6 (order and degree multiset of contracted frame union).The order of and the degree multiset is We now calculate the spectrum of the V 1 -contracted A-union of the frame (F a ) a∈N in terms of its building block G and certain Dirichlet conditions.Theorem 5.7 (Spectrum of contracted frame unions).Let G = (G, α, w) be a magnetic graph, with underlying discrete graph G = (V, E, ∂), V 0 ⊂ V , and let (F a ) a∈N with F a = F a (G, V 0 ) be a frame constructed from the building block G by identifying vertices along V 0 .Moreover, let A be an s-partition of the natural number r, and choose a subset of distinguished vertices V 1 ⊂ V 0 .Then the spectrum of the normalised Laplacian of the Proof.The graphs given in (5.2) come from two successive vertex contractions; we hence denote a generic vertex by where v ∈ V is a vertex in the building block graph G, j labels the branch in the frame member F a i and i numerates the frame member determined by the partition A = ⦃a 1 , . . ., a s ⦄.Symmetric eigenfunctions.We start with the "symmetric" functions obtained from eigenfunctions of G extended symmetrically to F A,V 1 : Let n = |G| and denote by {f 1 , f 2 , . . ., f n } the orthonormal eigenfunctions of ∆ G with eigenvalues {ρ 1 , . . ., ρ n }, respectively.For each k ∈ {1, . . ., n}, we extend the eigenfunction f k onto the disjoint union F A to a function With a little abuse of notation we write by f k also the corresponding function on the quotient F A,V 1 , which is well-defined since f takes the same value on all contracted vertices.We show that f k is an eigenfunction of ∆ F A,V 1 with the same eigenvalue ρ k considering three different cases for the vertex v.If v ∈ V 1 , then the equivalence class v consists of r = s i=1 a i vertices all contracted into a single vertex, while the adjacent edges remain.In particular, deg w ] consists of a i elements, denoted for simplicity by (v, i).Moreover, we have deg w e e iαe f k (∂ + e) w e e iαe f k (∂ + e) Finally, if v ∈ V \ V 0 , the equivalence class v = [([(v, j)], i)] has just one element which is denoted simply by (v, j, i).In this case we have deg w w e e iαe f k (∂ + e) This shows that σ(G) is contained in σ F A,V 1 as a multiset.
Eigenfunctions with Dirichlet conditions on V 1 .Dirichlet conditions on V 1 will disconnect the graph F A,V 1 into s frame member components determined by the partition A.
with eigenvalues {µ 1 , . . ., µ n ′ }.We will lift the eigenfunctions g k ′ to eigenfunctions of ∆ F A,V 1 supported on each frame member F a i .Denote now by ε a non-trivial s-th root of unity, i.e., ε = 1 and ε s = 1.For v = [([(v, j)], i)] we define Note that now the function value of a vertex [(v, j)] on F a i is the same for all j ∈ {1, . . ., a i } as the root of unity takes the same value on each frame member.It can be seen similarly as before (and as in the proof of Proposition 4.5) that for all v ∈ V (F A,V 1 ).Moreover, since ε = 1 we have s i=1 ε i = 0 and, therefore, the functions f k and g k ′ ,ε are mutually orthogonal, as we have In particular, the eigenfunctions f k are orthogonal to the eigenfunctions g k ′ ,ε with k = 1, . . ., n, k ′ = 1, . . ., n ′ and ε = 1 with ε s = 1.Eigenfunctions with Dirichlet conditions on V 0 .Since V 1 ⊂ V 0 we have by construction that eigenfunctions on F A,V 1 with Dirichlet conditions on V 0 are eigenfunctions of the disjoint union F A (G + V 0 , V 0 ) (see Definition 5.1).In fact, we have with eigenvalues {λ 1 , . . ., λ n ′′ }.For each i ∈ {1, . . ., s} we will lift the eigenfunctions h k to eigenfunctions of ∆ F A,V 1 supported on each frame member F a i .Denote by η a non-trivial a i -th root of unity, i.e., η = 1 and and extend by 0 if the label of the frame member is different from i. Since the functions h k ′′ ,η,i are supported on each frame member the proof that the preceding functions are eigenfunctions of ∆ F A,V 1 with eigenvalue λ k ′′ can be reduced to the analysis on each frame F a i .This was shown in the proof of Proposition 4.5, and the inclusion of multisets σ G + V 0 (a i −1) ⊂ σ F a i (G + V 0 ) follows.Since this inclusion holds for each i ∈ {1, . . ., s} and since a 1 + • • • + a s = r we conclude that As in the proof of Proposition 4.5 we also see that the functions f k and h k ′′ ,η,i are mutually orthogonal since the functions h are supported on each frame member.Moreover, the eigenfunctions g k ′ ,ε constructed in the second step and h k ′′ ,η,i turn out to be also mutually orthogonal with a similar computation with the root of unity as in the second step.This shows that eigenvalues corresponding to a mutually orthogonal set of eigenfunctions.Since, according to Lemma 5.6, the order of we conclude that we found all eigenvalues and the spectrum of the magnetic Laplacian is determined.
We can now formulate our main result on the construction of isospectral, non-isomorphic and, now, connected graphs.
Theorem 5.8 (main theorem).Let G = (G, α, w) be a magnetic graph, V 0 ⊂ V (G) and let V 1 ⊂ V 0 be a set of distinguished vertices.For any different pair A and B of s-partitions of a natural number r ≥ 4 the graphs F A,V 1 and F B,V 1 (the V 1 -contracted A-respectively B-union of (F a (G, V 0 )) a∈N , cf.Definition 5.5) are isospectral and not isomorphic.
Proof.In the calculation of the spectrum in Theorem 5.7, only the natural number r and the length s of the partition are relevant and not the concrete partitions A and B. Therefore different s-partitions of r lead to isospectral graphs.Moreover, the fact that two graphs determined by different partitions are not isomorphic follows from Lemma 5.6 since the corresponding degree multisets are different.
Corollary 5.9 (isospectral equilateral metric graphs).Let G be a discrete graph (with standard weights), V 0 ⊂ V (G) and let V 1 ⊂ V 0 be a set of distinguished vertices.For any different pair A and B of s-partitions of a natural number r ≥ 4 the corresponding equilateral metric graphs F A,V 1 and F B,V 1 constructed according to the corresponding discrete graphs are isospectral and not isomorphic.
Proof.The proof follows from Theorem 5.8 and Proposition 2.9, as in our construction, F A,V 1 and F B,V 1 have the same number of edges.

Examples of isospectral magnetic graphs
In this section we give more examples of isospectral magnetic graphs constructed as contracted frame union from various building blocks.Let G = (G, α, w) be such a general building block, i.e., a discrete weighted magnetic graph.From G, we construct a frame (F a ) a∈N , where the frame members F a = F a (G, V 0 ) are identified along V 0 ⊂ V := V (G), cf.Definition 4.1.Moreover, let A be an s-partition of r ∈ N. As we need at least two different s-partitions of r we restrict ourselves to r ∈ {4, 5, 6, . . .} and s ∈ {2, 3, . . ., r − 2}.Our isospectral and non-isomorphic graphs will be given by the 6.1.Special cases and very small contracted frame unions.We start with some extreme or trivial cases for the choice of merging vertex sets V 0 and V 1 .Examples 6.1 (no distinguished vertex).If V 1 = ∅ in Definition 5.5, then F A,∅ = F A (:= a∈A F a (G, V 0 )), i.e., F A,∅ is the disjoint frame union of Definition 5.1.Note that the graph F A,∅ is not connected.In particular, for different s-partitions of r, we obtain two isospectral, non-isomorphic, but non-connected graphs F A and F B .Examples 6.2 (all vertices are distingued).If V 1 = V 0 , then F A,V 1 = F r is the r-th frame member.In particular, it depends only on r, but not on s any more, hence we will not obtain non-isomorphic graphs for different partitions of r.
We will hence assume in the sequel that V 1 is a non-trivial subset of V 0 , i.e., that Examples 6.3 (frames identified along all vertices).If V 0 = V (G), then F a (G, V (G)) is the r-fold edge copy of G, i.e., the vertex set is the same, but each edge is copied r times keeping its original weight and magnetic potential.Examples are the graphs from the building blocks labelled 2.1, 3.3, 3.3', 3.4, 3.4', 3.6, 3.6' in Tables 2 and 3.
Moreover, the order of the i.e., it does not depend on r.In particular, we obtain an infinite family of isospectral graphs, as an s-partition for any r ∈ {s + 2, s + 3, . . .} leads to another non-isomorphic graph (isomorphy as multigraph, of course).We have another class of examples in Example 6.11.
Remark 6.4 (frames identified along all vertices, weighted graphs).If G = (G, 0, 1) has standard weight, then the frames for V 0 = V (G) as in the previous example are the r-fold edge copy of G (i.e., each edge with standard weight is repeated r times).Note that G and its r-fold edge copy are isolaplacian (as the common factor r cancels out in the matrix representation of the Laplacian).Moreover, each frame member and also the V 1 -contracted frame union F A,V 1 for some proper subset V 1 ⊂ V 0 can be turned into a simple graph (called underlying simple weighted graph) with edge weights now given by the number of parallel edges in the original graph, see Remark 2.5.Note that as weighted graphs, two contracted frame unions for different s-partitions are still non-isomorphic (as weighted graphs), as the weights are given by the partition A.
A special case of the last example is the following: Examples 6.5 (the smallest non-trivial example).Let G be the graph on two vertices and one edge joining them with standard weight.Let V 0 = V = {v 1 , v 2 } and V 1 = {v 1 } (see the first row in Table 2).Moreover, let A = ⦃a 1 , . . ., a s ⦄ be an s-partition of r.Then F A,v 1 is a star graph with s + 1 vertices and multiple edges according to the partition A (a 1 edges joining the first non-central vertex, a 2 the second etc.).Note that for two different s-partitions, the corresponding contracted frame unions are not isomorphic (as multigraphs).
The spectrum of F A,v 1 is ⦃0, 1 (s−1) , 2⦄ for any s-partition A. For s = 2, the underlying simple weighted graph is a path graph with three vertices.Actually, it can be seen that the spectrum of this graph is always ⦃0, 1, 2⦄ for any weights on the two edges.6.2.Other small contracted frame unions.We now list all possible cases with standard weights leading to isospectral and non-isomorphic examples starting from building blocks G with two, three or four vertices.We start with a certain graph G as building block, and draw the vertices in V 0 on top and bottom; while the vertices in V 1 (the "distinguished" vertices, along the frames are contracted) are drawn on bottom and outlined).For one graph G one might hence have several possibilities of frames and contracted frame unions.
Table 2.All examples of tree building blocks with two or three vertices and their different contracted frame unions (including those with multiple edges) for the simplest non-trivial partition A = ⦃1, 3⦄, B = ⦃2, 2⦄.On the bottom there are the vertices in V 1 (outlined) and on top, there are the vertices If G has two or three vertices, we allow that the isospectral graphs have parallel edges (see Tables 2  and 3).If G has four vertices, we restrict ourselves to examples leading only to simple graphs, see Remark 4.2.Table 4 contains all examples with a building block being a tree with four vertices while Table 5 lists all remaining cases.
Examples 6.6 (all examples with building blocks with three vertices).Examples of building blocks with three vertices and standard weights can be seen in Tables 2 and 3 (labels starting with 3).Only All other examples leads to graphs with parallel edges.Note that one can always replace parallel edges by a single weighted edge with the number of parallel edges as weight, see Remark 2.5.The corresponding Laplacians are the same, hence we also obtain isospectral, but non-isomorphic examples; these examples are not isomorphic as weighted graphs as their lists of weights are different.
Examples 6.7 (all examples with building blocks with four vertices).For simplicity, we list here only those cases leading to simple isospectral examples.Table 4 contains all cases where the building block G is a tree while Table 5 contains the remaining cases with building blocks not being a tree.
Note that only the cases with label 4.2', 4,4 and 4.4' can be treated using Theorem 1 of [BuG11].In all other cases, the graphs G j [A ′ , B] (in the notation of [BuG11]) are not complete bipartite graphs as required by [BuG11, Thm .1].
The case with label 4.4 can also be treated with the perturbative technique described in [FCLP22a, Section 4.2], where we used the name fuzzy complete bipartite graph.With the method in the present paper, it is based on the frames used in Example 4.7.6.3.Some other examples with possible non-trivial magnetic potential.Here, we give examples where the underlying building block is not a tree, hence there exist magnetic potentials having an effect on the spectrum.Example 6.8 (a diamond-like graph with magnetic potential).Taking as building block the magnetic graph G θ of Example 4.8, and choosing as set V 1 = {v 1 } just the bottom (outlined) vertex, then the spectrum of (G θ ) + V 1 is given by For A = ⦃1, 3⦄ and B = ⦃2, 2⦄, we have the isospectral magnetic graphs as in Figure 9.
Example 6.9 (kite graphs).Let G be the complete graph on four vertices with one pendant vertex added (so G has five vertices) as in the frame construction of Example 4.9.The vertex set V 0 consists now of the pendant vertex and one of the remaining four.The set of distinguished vertices √ 3 ) (s−1) , 1 (r−s+2)) , 2⦄ Table 4.All examples of tree building blocks with four vertices and their different contracted frame unions leading to simple graphs.
just of the pendant vertex.Let G be the corresponding weighted graph with standard weights and no magnetic potential, then ⦄ .
An example of isospectral graphs is given in Figure 1 (right hand side).Note that this construction also works for any magnetic potential, see Example 4.9.
in particular isolaplacian with G (see second and third graph in Figure 10).Note that Butler [Bu15] also uses the idea of changing weights.Special cases are actually the graphs with label 2.1, 3.3', 3.4' and 3.6' in Tables 2 and 3 where G is a path graph with two or three vertices or a cycle graph with three vertices.Let now F A,V 1 = F A,V 1 (G, V (G)) be the contracted frame union for V 1 = V (G) \ {v * } and some s-partition of r.Here, v * ∈ V (G) is one chosen vertex.Its order is |F A,V 1 | = s + |V 1 | = |G| + s − 1 independently of r as in Example 6.3.The spectrum of G + V 1 is just ⦃1⦄, as V (G) \ V 1 = {v * } contains just one point.From Theorem 5.7 we conclude that σ(F A,V 1 ) = σ(G) ⊎ ⦃1⦄ (s−1) .
Note that the matrix representation of Laplacian on F A,V 1 (with standard weights) has the matrix representation of G * as principal submatrix, where G * denotes the graph G with v * and all adjacent edges removed.It could also be observed that passing to the corresponding simple weighted graphs (with weights r on all edges in G * ) and weights a ∈ A on the edges joining the s copies of v * .Dividing the weights by the common factor 1/r (this does not change the Laplacian), we end up with an isolaplacian graph G A,v * with standard weights (w e = 1) for all edges inside G * , and weights a/r (a ∈ A) for the remaining edges joining the extra s copies of v * (see Figure 10).In particular, we have a way of keeping the spectrum of G and adding eigenvalues 1.
On the right, the pair of isospectral weighted graphs with edge weights indicated (if different from 1).

Conclusions
Sunada's method [Sun85] as well as some of its generalisations [BPBS09, PB10, BBJL17] use representation theory as a key ingredient to construct the isospectral manifolds or graphs which appear as quotient graphs.It is worth to point out differences and similarities between the method presented here and the one given, for example, in [BPBS09] even if we think that both methods are different in nature.We do not exclude though that both approaches may be combined.
In [BPBS09] the metric graph considered first carries the action of a finite (in general noncommutative) group.Two different subgroups are chosen which will determine the isospectral quotient graphs provided the corresponding induced representations are equivalent.Neumann and Dirichlet conditions on the metric graph appear naturally.
The method presented in this article has a more combinatorial nature even if the underlying symmetry is, of course, expressed in terms of cyclic (commutative) groups acting on the copies of the building block as mentioned in Remark 4.6.But the construction of the quotient here goes through for any choice of the pair of subsets V 0 , V 1 , and we see no way to implement this freedom through subgroups of Z a .Another instance is that the action of the cyclic groups is not free on the quotient, as the vertices in V 0 are fixed points.An additional difference is the importance of the eigenfunctions with Dirichlet conditions on the vertices V 0 and V 1 and the specific form of the partition that appears explicitly in the degree lists of the different quotients but not in the where ∂ − e is the initial, and ∂ + e the terminal vertex of e ∈ E. The order of G is |G| := |V (G)|.An inversion map • : E −→ E is a map fulfilling e = e, e = e, ∂ + (e) = ∂ − e and ∂ − (e) = ∂ + e for all e ∈ E. The inversion map • introduces a Z 2 -action on E, the orbits {e, e} are called undirected edges; in the figures, we only plot the undirected edges; each comes with both directions e and e.A loop is an edge e such that ∂ + e = ∂ − e (note that a loop also has two different directed edges e and e).Two edges e 1 and e 2 are called parallel if e 1 = e 2 with ∂ + e 1 = ∂ + e 2 and ∂ − e 1 = ∂ − e 2 .A graph is simple if it has no loops or parallel edges.
[vB01,  Theorem 1], or [LP08,KM21,Ku08] and references cited therein (recall that G refers here to the weighted graph (G, 0, ½) with standard weights): Proposition 2.9.Let G resp.G ′ be two (finite) discrete graphs and G resp.G ′ the corresponding equilateral metric graphs.Then the following are equivalent: (a) G and G ′ are isospectral (with respect to the discrete standard Laplacian), and G and G ′ have the same number of edges; (b) the metric Kirchhoff Laplacians on G and G ′ are isospectral.Proof.The spaces N λ = ker(∆ G − λ) and N λ = ker(∆ G − λ) are isomorphic for λ = 1 − √ λ ∈ (0, 2) and √ λ / ∈ πN 0 (see e.g.[vB01, Theorem 1] or [LP08, Proposition 4.1] 5 and references therein).In particular, if G and G ′ are isospectral, then G and G ′ are isospectral up to the eigenvalues of the form λ n = n 2 π 2 and n ∈ N 0 .For n ∈ 2N 0 , an eigenfunction constant on a connected component of the discrete graph (with value 1, say) corresponds to the eigenfunction ϕ e (x) = cos(nπx) on each edge of the same connected component in G.For n ∈ 2N 0 + 1, the multiplicity of the correspondent discrete eigenvalue λ = 2 counts the number of connected bipartite components (see e.g.[LP08, Proposition 2.3] and references therein), and each such eigenfunction (with values ±1) leads to an eigenfunction ϕ e (x) = cos(nπx) on each edge of the corresponding connected bipartite component.The remaining eigenfunctions of ∆ G corresponding to eigenvalues λ n = n 2 π 2 are 0 on all vertices; we called them topological in [LP08, Definition 4.4].They are entirely determined by the homology and the bipartiteness of the discrete graph ([LP08, Lemma 5.1 and Proposition 5.2]

Figure 4 .
Figure 4.The three types of eigenfunctions (represented by dotted vertical lines with arrow pointing in a virtual third dimension); Dirichlet vertices are marked outlined with a bigger circle: Top:The eigenfunctions of G θ are copied symmetrically onto each copy of G θ in F θ A,v 1 .Hence, the three eigenfunctions (in the picture, it is the constant one) become three eigenfunctions on F θ A,v 1 .Middle: each eigenfunction of (G θ ) + v 1 becomes a symmetric copy on each member (F θ a ) + . Exploiting the symmetry of the frame members we will construct next a family of eigenfunctions which are lifted from eigenfunctions of the Laplacian on G with Dirichlet conditions on V 0 and which are orthogonal to the symmetric eigenfunctions f k constructed in the first step.Let n ′′ = |G + V 0 | = |V |−|V 0 | and denote by {h 1 , . . ., h n ′′ } the eigenfunctions of ∆ G + V 0

Table 1 .
of discrete graph Laplacians may be extended Number of simple graphs (not necessarily connected) having a nonisomorphic graph with isospectral Laplacian for different types of Laplacians.Note that the table contains also non-connected graphs. in several directions.Lim studies the Hodge Laplacian in [Lim20, Example 4.1 and Section 5.3], a higher order generalisation of the graph Laplacian mentioned before, and considers isospectral graphs for this operator.

Table 3 .
All examples of non-tree building blocks with three vertices and their different contracted frame unions (including those with multiple edges) for the simplest non-trivial partition A = ⦃1, 3⦄, B = ⦃2, 2⦄.one building block leads to simple isospectral examples (label 3.1); this example class was already presented in [BuG11, Example 2] under the name inflated stars there.