Symplectic geometry and circuit quantization

Circuit quantization is an extraordinarily successful theory that describes the behavior of quantum circuits with high precision. The most widely used approach of circuit quantization relies on introducing a classical Lagrangian whose degrees of freedom are either magnetic fluxes or electric charges in the circuit. By combining nonlinear circuit elements (such as Josephson junctions or quantum phase slips), it is possible to build circuits where a standard Lagrangian description (and thus the standard quantization method) does not exist. Inspired by the mathematics of symplectic geometry and graph theory, we address this challenge, and present a Hamiltonian formulation of non-dissipative electrodynamic circuits. The resulting procedure for circuit quantization is independent of whether circuit elements are linear or nonlinear, or if the circuit is driven by external biases. We explain how to re-derive known results from our formalism, and provide an efficient algorithm for quantizing circuits, including those that cannot be quantized using existing methods.


The standard approach to circuit quantization
The standard resolution in the literature is to begin by studying the classical Lagrangian mechanics of the circuit.In the Lagrangian formalism, we efficiently remove non-dynamical degrees of freedom by integrating them out; after this step, we perform a Legendre transformation to a classical Hamiltonian for the genuinely dynamical degrees of freedom.Since the Legendre transformation reveals the canonical momenta for each coordinate, we can quantize a Hamiltonian self-consistently.
As a simple example, consider an inductor, L, with two capacitors, C 1 and C 2 , all in parallel [see Fig. 1(a)].There is one degree of freedom, which can be identified as the flux φ across the inductor.Since φ is the voltage drop across the capacitor, one writes down a Lagrangian This Lagrangian is interpreted as a "kinetic energy minus potential energy" term, and is mathematically equivalent to a simple pendulum.Note that we are also able to elegantly handle the two capacitors in parallel -the Lagrangian automatically adds them into a single effective capacitor for us.With a Lagrangian at hand, we find the conjugate momentum and finally the Hamiltonian reads where φ and q are conjugate variables, and their Poisson bracket is {φ, q} = 1.We can quantize the circuit based on these conjugate pairs by imposing canonical commutation relations φ, q = i , (1.4) where is the reduced Planck constant, φ is the flux operator, and q is the charge operator.
In the example above, we have linear capacitors and inductors.Circuits might also contain a combination of nonlinear and noninvertible capacitive and inductive elements, for example, Josephson junctions (JJs) [22,23] and quantum phase slips (QPSs) [24][25][26][27].Treating both of these nonlinear and noninvertible elements in the same circuit is still an open problem: because the energy of the JJs depends on the flux φ as E ∼ cos(2πφ/φ 0 ), while the energy of the QPSs on the charge q across the element as E ∼ cos(2πq/2e), one can prove that no Lagrangian of the circuit with a single type of variable (flux or charge) exists in general. 1 Here, φ 0 = h/2e is the fundamental flux quantum, h 1: Examples of quantum circuits with Lagrangians using one or two types of generalized coordinates.(a) An inductor shunted by two capacitors: the Lagrangian of the circuit contains a single type of variable, the flux across the inductor, such that L(φ, φ).The charge-flux conjugate pairs are defined at the Lagrangian level.(b) A Josephson junction and a quantum phase slip junction forming a loop.This quantum circuit can not be described by a Lagrangian using a single type of variable but only with a Lagrangian that contains both charge and flux variables, L(φ, φ, q, q).(c) A more complex circuit of multiple Josephson junctions and quantum phase slips, where writing down a Hamiltonian requires geometrical arguments.
is the Planck constant, and e is the electron charge.Although for the minimal circuit of one JJ and one QPS included in a loop [see Fig. 1(b)], one can immediately write down a Hamiltonian [28] circuits involving even a few of these elements can involve non-trivial constraints [see Fig. 1(c)].For example, the number of degrees of freedom is not equal to the number of JJs or QPSs; worse, the fluxes and charges across the different elements may not be conjugate pairs.Understanding how to even identify the dynamical degrees of freedom, let alone quantize the circuit, is an open problem.

Our quantization method
In this paper, we present an alternative approach to circuit quantization.Our approach is inspired by earlier work [29] that links graph theory to circuit quantization.However, rather than using Lagrangian mechanics as the starting point, we instead appeal to the mathematics of symplectic geometry [30,31], which generalizes textbook Hamiltonian mechanics to more abstract/general settings.We will show that this more abstract perspective elegantly resolves the puzzle of how to choose canonical coordinates, without relying on any assumptions about the constitutive relations of the inductive or capacitive elements in the circuit.Hence, our approach is universal for quantum circuits made out of nonlinear inductive and capacitive elements and capable of resolving the puzzle above.
The key insight of our theory is that the most natural quantization prescription involves building conjugate degrees of freedom out of charge variables on branches (q e ) and flux variables on nodes (φ v ) of the capacitive subgraph of the circuit (see Fig. 2).To understand our construction, let us remind the reader how one usually models circuits.The degrees of freedom are voltages V and currents I, which can be integrated in time to give flux φ and charge q.In circuits, φ and q are canonically conjugate variables, similar to position and momentum: recall Eq. (1.4).Of course, a typical circuit involves multiple elements and therefore multiple flux and charge variables.Due to Kirchhoff's voltage law (the sum of the voltage drops around a loop vanishes in the absence of external magnetic fields), it is natural to define voltages on nodes (or vertices) v of the circuit.On the other hand, currents I are naturally defined on branches (or edges) e in the circuit.In general, there is not a one-to-one mapping between the branches v and nodes e of a circuit.How, therefore, can we possibly find the conjugate pairs?
The mathematical puzzle above is not entirely semantic.In classical and quantum Hamiltonian mechanics, there must be an equal number of position and momentum coordinates.As we described above, the prior resolution in the literature has been to use Lagrangian mechanics to avoid tackling this issue head-on.The Lagrangian is written using only one type of variable (for example, branch fluxes), and then the conjugate momenta is found at the Lagrangian level.Any excess in degrees of freedom is dealt with by integrating out non-dynamical variables.However, writing down a Lagrangian as a first step is not always possible.A simple example is the circuit that we discussed above, the dualmon qubit [28] shown in Fig. 1(b).The Hamiltonian in Eq. (1.5) is only known because there is just one dynamical degree of freedom.
What this paper provides is a way of solving the constraints on φ and q variables, directly in a Hamiltonian formulation, such that we can find suitable linear combinations of charge and flux variables that are canonically Capacitive subgraph A ev Ω ev FIG. 2: Graph theory and quantum circuits.(a) An arbitrary circuit containing all four types of superconducting circuit elements: capacitors, inductors, Josephson junctions and quantum phase slips.The node fluxes are φ vi , while the branch charges across the capacitive elements are q ei .(b) The graph of the full circuit.The vertices of the graph are label as v i , while the edges are denoted as e i .Inductive branches are colored with blue lines, while capacitive ones are highlighted with red lines.The incidence matrix of the graph of the full circuit is A ev .(c) The capacitive subgraph of the circuit containing only capacitive edges.The capacitive incidence matrix is Ω ev .
conjugate (and equal in number).As stated above, the approach is inspired by symplectic geometry, together with the simple observation that the equations of motion for a circuit follow from the action q e Ω ev φv . (1.6) Note that this action involves both branch charges q e and node fluxes φ v .Remarkably, this action encodes within it the Hamiltonian mechanics of the circuit.The function E tot (upon fixing all constrained variables, which we provide a generic prescription to do) is the Hamiltonian itself, and equal to the sum of inductive and capacitive energies in the circuit.Critically, the energy of elements are expressed in their native coordinates: inductive elements' energies are expressed in terms of fluxes φ v , while capactive elements' energies are expressed in terms of charges q e .Furthermore, Ω ev is the incidence matrix for the capacitive subgraph of the circuit (see Fig. 2).q e Ω ev φv is naturally interpreted using symplectic geometry, and implies both a classical Poisson bracket, and a quantization prescription.The rest of the paper will derive Eq. (1.6) in Section 2, explain how to subsequently quantize circuits in Section 3, and then show how to identify the physical degrees of freedom in numerous example circuits in Section 4. We have written this paper in a pedagogical and self-contained way; no prior knowledge is required in either circuit quantization or mathematical physics (beyond textbook Lagrangian and Hamiltonian mechanics).

CLASSICAL FORMALISM
We now begin a gentle introduction to the classical mechanics of quantum circuits.Our focus will be to motivate the derivation of Eq. (1.6); however, we provide background knowledge both into the experimental systems and also the mathematics of Hamiltonian mechanics, as is necessary to appreciate Eq. (1.6).FIG.3: Circuit elements and their constitutive relations.The circuit elements that we consider in this work connect two variables (flux, charge, and their derivatives).Inductive elements relate flux φ and the current q, such as linear inductors (L) and Josephson junctions (JJ).On the other hand, capacitive elements connect charge q with voltage φ, such as linear capacitors (C) and quantum phase slip elements (QP S).The memristor (M ) and resistor (R) connect directly charge with flux or their derivatives.

Circuit elements and degrees of freedom
First, we review the definition of branch charges and node fluxes.When describing superconducting circuits, we assume that the circuit elements are connected by perfect superconducting wires without inductive or resistive contributions.We call a part of the circuit that contains a circuit element a branch, and an intersection of the superconducting wires a node.We will soon mathematically describe the circuits as graphs, where branches will be associated to edges in the graph, and nodes as vertices of the graph.We will use the former terminology throughout the paper to conform with the tradition used in quantum circuits.As an homage to the mathematics, however, we will use the letter e to denote a generic branch (edge), and v to denote a generic node (vertex).Now, consider a two-terminal superconducting circuit element defined between two nodes of a circuit.The node voltage V v (t) is the voltage at a given node, and the branch current I e (t) is the current flowing through the circuit element.We assume that it is sufficient to use only the voltage at nodes and the current across the element to describe the system and ignore the current and voltage distribution inside the elements, i. e., we use a lumped element approximation for the circuit. 2 Next, we define the generalized node flux φ v and the branch charges q e as the time integral of the voltage and the current ) dτ I e (τ ). (2.1b) It is also common to define the generalized branch fluxes, as the difference between the fluxes of the corresponding nodes; if branch e connects nodes v i and v j , the branch flux is The most standard variables in which one performs circuit quantization are φ v or φ e , starting in the Lagrangian formalism.However, such coordinates cannot describe circuits with quantum phase slip elements due to their noninvertible charge-voltage relationship.To address that challenge, loop charges have been also used as an alternative approach to describe charge degrees of freedom in the Lagrangian description, in the special case where the graph of the circuit is planar [16].
The various circuit elements establish different relations between the branch variables and their derivatives [see Fig. 3].For example, linear capacitors and inductors connect linearly two variables where C is the capacitance, L is the inductance, and for simplicity, we dropped the explicit time-dependence of the variables in the notations.The two most well-known nonlinear and nondissipative circuit elements are the (multi-channel, low-transmission) Josephson junctions and the quantum phase slip junctions, where the connection between the variables is sinusoidal instead of linear qe = I C sin 2π φ e φ 0 , (2.4a) φe = V Q sin 2π q e 2e . (2.4b) Here, I C is the critical current of the Josephson junction, and V Q is the voltage amplitude of the quantum phase slip junction.There are other more complicated relations, e.g. for high-transmission Josephson junctions, containing higher harmonics in the current-phase relationship [32].
In this work, we focus only on non-dissipative circuits; thus, the two types of elements that we are concerned with are the capacitive and inductive elements.The energy stored in the elements can be expressed as (2.5) We then see that the energy of the capacitive elements E C depends only on the branch charge q e such that E C = E C (q e ), while the energy of the inductive elements E I is a function of only the branch flux φ e and E I = E I (φ e ).For example, linear capacitor : quantum phase slip : linear inductor : Josephson junction : where E J = φ 0 I C /(2π) and E Q = 2eV Q /(2π) are the Josephson and quantum phase slip energies.The derivative of the energy with respect to the coordinates gives the voltage for capacitive elements, and the current for inductive elements ) (2.7b)

Circuits and graph theory
Electrical network graph theory [33] has played an important role in the existing theory of circuit quantization [13,14,29,34].Following this approach, a quantum circuit can be considered as a directed graph, where the two-node circuit elements correspond to the edges of the graph, and the vertices of the graph are the points of the circuit where the elements connect.We consider an arbitrary circuit (see Fig. 2) that has k nodes and K branches, and we denote the set of nodes as V and the set of branches as E. We assume that we do not lump together inductive and capacitive elements, so that we can classify each branch as one or the other.Suppose there are N capacitive branches and K − N inductive branches.The set of capacitive branches is C ⊂ E, and the set of inductive branches is A key object of the graph is the incidence matrix A ev that provides information on the interconnection of the circuit elements.In particular, the rows/columns of the matrix correspond to the edges/vertices, and the value of a matrix element is +1 (−1) if an edge points toward (from) a vertex, otherwise it is 0: otherwise. (2.8) By using A ev , we can write down equations of motion in a compact way, which will eventually lead us to our quantization prescription.
To see this, we define the branch charges q e only on the capacitive edges of the graph, whereas we assign node fluxes φ v to all nodes.We consider circuits without time-dependent external fluxes and gate voltages for now.
Let us first explain why, in fact, the flux variables should naturally live on vertices.Kirchhoff's voltage rule states that in the absence of external magnetic fields around any loop of branches e 1 → e 2 → • • • → e n → e 1 of (any) length n: (2.9) 2)], then this constraint would automatically be obeyed.Mathematically, one can actually prove that all solutions to the constraints in Eq. (2.9) are of this form. 3t thus makes sense to think of the dynamical variables as the φ v , which are much less constrained, rather than φ e s, which obey all of the constraints in Eq. (2.9).Kirchhoff's current law states that for any node v, the exiting and entering currents are equal To obtain a more explicit version of Kirchhoff's laws, we need to consider the energy of the various elements.The total inductive energy of the system is where we have defined E I,e to be the energy function for the inductor on edge e.Similarly, there is energy stored in the capacitive branches: and the total energy of the system is Here, we emphasize that the energies can be general functions of the charge branch variables or node flux variables.Note also that E tot is not necessarily a Hamiltonian function, since the variables φ v and q e are not conjugate in any obvious way.We will explain how to obtain a Hamiltonian from E tot by the end of the section.Now, we describe the final equations of motion, which provide the glue between the charge and flux variables, and link time derivatives of φ v and q e to the energies above.First, if e = u → v ∈ C is a pair of nodes that are connected through a capacitive branch e, the voltage between the nodes equals to the voltage drop across the connecting capacitors.Using (2.7a), we find φv − φu − ∂E C,e (q e ) ∂q e = 0 for all e = u → v ∈ C. (2.15) Second, at each node, we apply Kirchhoff's current law.For a capacitive edge we have I e = qe , while for an inductive edge Eq. (2.7b) implies that Hence we arrive at our second equations of motion upon plugging in to Eq. (2.11) (2.17) Observe that these equations of motion follow from the following Lagrangian where Ω ev is the incidence matrix whose rows correspond to capacitive edges only, and columns correspond to all vertices.While entry-wise Ω ev = A ev , we use the Ω ev notation to emphasize that now we only care about capacitive edges.E tot is simply the energy of all circuit elements.Indeed, Eq. (2.15) comes from the Euler-Lagrange equation of motion of φ v , while Eq.(2.17) comes from the equation of motion of q e .This may seem like a miracle!But we hope that by the end of this paper, the reader will walk away thinking that Eq. (2.18) is in fact the most natural Lagrangian for a circuit.Firstly, it elegantly allows us to encode φ v as degrees of freedom on nodes, while q e are degrees of freedom on branches.Secondly, and much more importantly, it also encodes within it the universal prescription for circuit quantization.
As we describe in the upcoming sections, it is possible to remove non-dynamical degrees of freedom relying on the geometrical properties of the capacitive incidence matrix Ω ev .After removing those variables, we arrive at a set of q i and φ j variables that are the linear combination of the original charge branch and flux node variables, where, crucially, the number of charge and flux variables are equal.With these variables, the Lagrangian reads where the total energy term corresponds to the Hamiltonian function H(q i , φ j ) = E tot (q i , φ j ) and the second term in the Lagrangian contains a square invertible matrix Ωij that is linked to the symplectic matrix of the circuit.In fact, we will show in Section 2.5 how to choose variables wherein Ωij is the identity matrix.

From Hamiltonian mechanics to symplectic geometry
To understand how Eq. (2.19) leads us to circuit quantization, we need to take a step back and comment on a crucial analogy.Consider for the moment the classical mechanics textbook problem of an object with N degrees of freedom with coordinates (x 1 , . . ., x N ) and canonically conjugate momenta (p 1 , . . ., p N ) that is described by a Hamiltonian H(x i , p i ).In this section we will use raised or lowered indices to emphasize the connections with mathematics: raised indices correspond to vector fields on phase space, while lowered indices correspond to differential forms (this is historically known as contravariant vs. covariant vectors).Observe that if we define the Lagrangian as and the action as S = dt L, the Euler-Lagrange equations reproduce Hamilton's equations: Now, suppose that we have an invertible matrix M ij , and we define a "Lagrangian" such that Again we find a kind of Hamiltonian mechanics, but with a slightly modified form of Hamilton's equations.Denoting the elements of the matrix inverse M −1 with raised indices so that we find that In simple terms, the M matrix tells us that the canonical conjugate variables are not p i and x i , but rather p i and j M ij x j .If we define the Poisson bracket for two functions f and g as then Hamilton's equations can be re-written for an arbitrary function f as ḟ = {f, H}. (2.26) As we highlight in Section 3, such theories are straightforward to quantize.Importantly, with a few caveats, our classical Lagrangian for a circuit, which is L = −H(q i , φ j ) + i,j q i Ωij φj has precisely the form of Eq. (2.22).
It is helpful to re-formulate the previous paragraph in a more abstract language.Let us collect the position and momentum coordinates into a single variable ξ I = (x 1 , . . ., x N , p 1 , . . ., p N ), and define the matrix Note that ω IJ = −ω JI is antisymmetric, invertible, in our special case a constant, and it is called the symplectic form. 4Mathematicians define Hamiltonian mechanics in terms of a Hamiltonian function H, which generates time evolution via the Poisson brackets in Eq. (2.26), and a symplectic form ω. Defining the inverse of ω IJ as ω IJ as before: we can re-write the Poisson bracket as The pair of a manifold with coordinates ξ I and symplectic form ω is called a symplectic manifold.Such a symplectic manifold is required for a notion of Hamiltonian mechanics to exist [30,31].Importantly however, any symplectic manifold gives rise to the structures of Hamiltonian mechanics -even ones where there are no global canonical conjugate pairs of coordinates.The mathematical theory of geometric quantization [36] shows that there is a way to quantize all such systems.
The key point is that "Lagrangians" of the form of Eq. (2.22), which are similar to our circuit Lagrangian in Eq. (2.18), are immediately understood in the language of Hamiltonian mechanics and symplectic geometry.In particular, we simply read out the Hamiltonian function H(q i , φ j ) and a Poisson bracket {φ i , q j } = Ω−1 ji , which allows us to elegantly transition from classical to quantum mechanics.
Inductively shunted islands Capacitive loops Noether charge

Spanning tree
FIG. 4: Symplectic geometry of a circuit.When describing a circuit with its capacitive graph, we can define two types of geometrical objects that correspond to null vectors of the capacitive incidence matrix of the circuit: inductively shunted islands (green-filled rectangular), and capacitive loops (orange-filled rectangular).The variables associated with these null vectors must be removed to be able to quantize the circuit.Additional variables can be removed based on the Noether charges of the circuit.The edges that are part of a (non-unique) spanning tree are highlighted with wide lines.

Symplectic geometry of a circuit
After having reviewed the basics of symplectic geometry, we return to the question of how to construct the Hamiltonian H(q i , φ j ) function of an arbitrary circuit from its total energy E tot (q e , φ v ) and the connectivity of the elements Ω ev .In this section, we focus on the general approach, while in Sec. 4 we provide examples.A mathematically precise discussion, with proofs of all claims, is relegated to Appendix A.
To begin, it is important to notice that the incidence matrix Ω ev appearing in the Lagrangian of the circuit [see Eq. (2.18)] is not invertible.This is in contrast to the definition of the symplectic matrix, which is constructed from an invertible matrix M ij [see Eq. (2.22)].Thus, at this point, it is not possible to carry out a Legendre transformation to arrive from the Lagrangian to a Hamiltonian with conjugate flux and charge pairs.The root of the problem is that we overcounted the degrees of freedom the way we constructed the Lagrangian.However, as we prove in Appendix A and summarize in Section 2.5, we can consistently and efficiently remove variables associated with constraints to obtain an invertible matrix (and a symplectic form) from the incidence matrix.Crucially, this procedure only depends on the geometrical structure of the capacitive subgraph of the circuit: the locations of inductively shunted islands and capacitive loops (see Fig. 4).
There are three general methods to reduce the number of variables in our approach, which we highlight here (and give examples of in Sec. 4).Firstly, we may find a left null vector, l e , of the incidence matrix: a linear combination of the branches such that e l e Ω ev = 0. (2.32) Geometrically, these null vectors correspond to loops in the circuit, where all branches in a loop have capacitive elements on them (see proof in Appendix A).Physically, the Euler-Lagrange equations for these null vectors lead to the physical constraint that the voltages in such a capacitive loop vanishes e l e ∂E C ∂q e = 0. (2.33) This constraint fixes one of the charge variables in terms of the others in the loop.We denote the set of such capacitive loops as ∆ C .For a loop Z ∈ ∆ C , the form of the null vectors is The ±1 sign is based on the orientation of the edges in the loop: all signs are +1 when the edges are all oriented so they touch tip-to-tail: see the examples for more details in Sec. 4. Secondly, the right null vectors r v of Ω ev also imply constraints.These are the combinations of nodes such that v The geometrical meaning of these vectors is that they represent inductively shunted islands.The constraint associated with these vectors is that the total current entering the island must equal the current exiting the island.
In this case, the Euler-Lagrange equations read We denote the set of all subsets of vertices that correspond to such inductively shunted islands as Γ I .Note that for any such island J ∈ Γ I , we have J ⊆ V.The explicit form of the null vector r v becomes (2.37) These left and right null vectors correspond to non-dynamical variables that can be removed from the Lagrangian.After removing the variables associated with the left and right null vectors of Ω ev , the Lagrangian will have fewer coordinates.The linear combinations of coordinates which remain are the non-null vectors of Ω ev , which becomes a non-degenerate matrix Ωij in the subspace of remaining modes.The total energy E tot , restricted to the corresponding constrained subspace, is the Hamiltonian H for the circuit.Hence, we can find a symplectic form for the remaining coordinates, and a Hamiltonian function to quantize.
At this point, we can formally quantize the theory, as we describe in Sec. 3, by replacing Poisson brackets with quantum commutators.The two steps above are thus required prior to quantization, but there is another way to easily remove some degrees of freedom.Suppose that, as in Fig. 4, there is a vertex (or more generally, a set of vertices) that are only connected to the rest of the circuit via capacitive edges.For simplicity here, let us focus on the case where, as in Fig. 4, it is a single vertex v 2 .Then, the Lagrangian L in Eq. (2.18), and therefore the Hamiltonian H, is invariant under constant shifts in φ v2 : (2.38) Noether's Theorem states that such continuous symmetry allows one to remove one dynamical variable (i.e. one q and one φ) from the problem.5

Choosing canonically conjugate variables
As we will see when quantizing the theory, it is desirable to find n pairs of "canonical coordinates": This is because, in quantum mechanics, Poisson brackets become quantum mechanical commutators.However, when calculating the Poisson brackets using Eq.(2.25) in our formalism, we find that the Poisson brackets correspond to the element of the symplectic matrix This does not jeopardize our ability to quantize the circuit, but it is still desirable to find coordinates where Eq. (2.39) holds.In this section, we show how to find charge and flux variables that achieve this.For simplicity, we will focus on an example presented in Fig. 4, and relegate the general argument to Appendix A. Our argument is exclusively about the second term in the Lagrangian of the system in Eq. (1.6), which reads as e,v q e Ω ev φv .We aim to find a set of (Φ i , Q i ) variables for which this term takes the form of i Q i Φi .As we discussed before in Sec.2.4, in part this will mean removing all left and right null vectors.Remarkably, in the construction that follows, these null vectors will be automatically removed.
First, we choose a spanning tree T ⊆ C of the capacitive subgraph.Here a spanning tree corresponds to a set of capacitive branches T ⊂ C so that every node adjacent to some branch in C is adjacent to some branch in T , but without any cycles.Schematically, one can manufacture a spanning tree by simply choosing an edge to delete from every cycle in ∆ C .For example in Figure 4, we can take the spanning tree to be T = {e 1 , e 2 , e 3 }. (2.41) An alternative choice is {e 1 , e 2 , e 4 }, and the choice made does not affect the spectrum or dynamics of the resulting circuit (the resulting Hamiltonians differ by a canonical transformation).Recalling the definition of branch flux in Eq. (2.2), we define branch fluxes Φ f for f ∈ T as our fundamental degrees of freedom.One can explicitly show that where Q f is a linear combination of the original q e variables with integer coefficients 0, ±1.In our example, we find e∈C v∈V q e Ω ev φv = q e1 Φe1 + q e2 Φe2 + ( We will show how to use this procedure in the additional examples of Sec. 4. Observe that in this construction, we have immediately removed one linear combination of node fluxes on each disconnected subgraph of C. In Fig. 4, we can see the following right null vectors are no longer dynamical degrees of freedom: φ v6 , φ v1 + φ v2 + φ v3 , φ v4 + φ v5 .The three branch flux variables on the spanning tree are linearly independent to these non-dynamical modes.Similarly, the linear combinations of charges that are removed are the unphysical ones corresponding to charges flowing around capacitive loops.In our example, this combination of branch charges q e3 − q e4 is orthogonal to the physical degree of freedom Q e3 = q e3 + q e4 that arose in Eq. (2.43).Happily, all the needed left and right null vectors of Ω ev are automatically removed by this "spanning tree construction" of choosing good coordinates.

CIRCUIT QUANTIZATION
With the understanding of how to use our formalism to describe arbitrary non-dissipative circuits at the classical level, we now discuss how to carry out circuit quantization.Suppose that the circuit is described by the Lagrangian Note that we have used the spanning tree construction of Sec.2.5 to choose good variables to quantize.The equations of motion for the non-dynamical coordinates are constraints that should also be solved before quantization.
Referring to the definition of the Poisson brackets in Eq. (2.25), we see that To quantize the circuit, we define commutation relations between the charge operator Qi and the flux operator Φj as as long as both Qi and Φj are non-compact (i.e., not periodically identified) variables.
The quantum mechanical Hamiltonian is simply Ĥ( Qi , Φi ), where as in the classical setting, we must first restrict to the constrained subspace by solving for left/right null vectors of Ω ev .Since in our theory, all circuit elements are purely capacitive or purely inductive, there is no ambiguity about the operator ordering of non-commuting Qi and Φi , so Ĥ is a uniquely specified operator.This completes our formulation of circuit quantization for non-dissipative circuits.
Such a simple and intuitive solution to circuit quantization is possible because we are able to find a globally constant Poisson bracket on the classical phase space.There do exist Hamiltonian systems where this task cannot be achieved. 6he most notable property of our quantization procedure, and our formalism on the whole, is that Eq. (3.3) is agnostic to the form of the Hamiltonian; it depends only on the capacitive subgraph of the circuit.
When considering circuits, it is often the case that some of the flux coordinates are periodically identified: where φ 0 is the flux quantum.For example, it is generally assumed that flux across a Josephson junction shunted by a capacitor is periodic 7 .It is well-known [38] that in such circuits, Φ i is not a well-defined operator; the well-defined operators become exp[2πiΦ/φ 0 • n] for integer n.Our quantization prescription does not change in this scenario: one simply avoids writing Eq. ( 3.3) and instead writes which is now expressed in terms of globally-defined operators.
Let us remark on what has transpired from a mathematical perspective.For simplicity let us assume a single dynamical Q and Φ variables; the argument immediately generalizes to the higher dimensional case.The original classical phase space is M = R 2 .The periodic identification of Φ corresponds to identifying points in phase space when the Φ coordinates are related as in Eq. (3.4).At the classical level, this turns the phase space into R × S 1 , where Q ∈ R and Φ ∈ S 1 .Here Φ ∈ S 1 lives on a circle, which is equivalent to the real line with all points shifted by φ 0 identified.Because the manifold R × S 1 is a non-singular quotient of R 2 , there exists [39] a symplectic form ω on R × S 1 which is equal to the inclusion of the original symplectic form on R 2 .In more physical terms, this means that we can use the same commutation relations to quantize the reduced phase space, provided we only study well-defined functions as in Eq. (3.5).Note that in quantum mechanics, Φ becoming periodic means that Q becomes integer-valued; this has no classical analogue, and the theory of geometric quantization was developed to explain this phenomenon for general symplectic manifolds [36].In this paper, we will be dealing with classical phase spaces that are quotients of R 2n by periodically identifying Φ coordinates, so these subtleties will end up unimportant.

EXAMPLES AND GENERALIZATIONS
In this section, we provide examples of how to use our formalism to efficiently derive a quantizable Hamiltonian for various circuits.

Inductively and capacitively shunted islands
As a first example to understand how we can eliminate variables associated with unphysical degrees of freedom, we consider an inductively shunted island.An inductively shunted island contains a set of nodes that lie on a path consisting of only capacitive branches or a single node that is connected only to inductive elements.For formal definitions and other relevant discussions, see Appendix A. As we discussed before, an inductively shunted island corresponds to a right null vector of the incidence matrix Ω ev .Figure 5(a) shows an example of a circuit that has two inductively shunted islands: a node is connected to two inductors, L 1 and L 2 , and a quantum phase slip element with energy E Q is also shunted by the inductors.The circuit has three node variables but using the constraints for right null vectors [see Eq. (2.36)], we can eliminate two flux variables.
To start, we write down the incidence matrix of the capacitive subgraph FIG. 5: Inductively and capacitively shunted islands.(a) The inductively shunted island at node flux φ v2 corresponds to the right null vector of the incidence matrix Ω ev ; thus, we need to remove such variable to be able to arrive to a self-consistent Hamiltonian.(b) The capacitively shunted island at φ v2 corresponds to a Noether charge in the circuit.It is possible but not required to remove such a variable to be able to define conjugate pairs.
where the single row corresponds to the q e1 branch charge, and the three columns refer to the three flux node variables.
The capacitive and the inductive energies are Thus, based on Eq. (1.6) the Lagrangian is We notice that there are two inductively shunted islands and hence two right null vectors indicating that φ v1 + φ v3 and φ v2 are non-dynamical variables.Furthermore, based on the constraints imposed by the right null vectors 8 [see Eq. (2.36)], we can write that After some algebra, we can simplify the Lagrangian such as where Φ = φ v3 − φ v1 , and Q = q e1 .We can see that this geometrical method reproduced the well-known result of how to add inductors together.The system is left with one degree of freedom, and the symplectic form (the first term in the Lagrangian) indicates that the conjugate variables are {Φ, Q} = 1.Finally, the Hamiltonian is 8 The constraints provided by each of the two null vectors are the same in this example, but need not be in general.
We remark that the conjugate pairs in this example were necessarily Q and Φ because there is only one capacitive branch and thus it must have been included in any spanning tree.As a second example, we consider a capacitively shunted island, for example, a node between two capacitors [see Fig. 5(b)].A capacitively shunted island is a set of vertices that can be traversed by moving only along branches with inductive elements.As before, a node connected only to capacitors constitutes its own island.In our formalism, the presence of such an island does not lead to a null vector of the adjacency matrix.Thus, removing such variables is not necessary to define a symplectic form and to carry out quantization (see Appendix B for an example).However, we can remove such degrees of freedom since capacitively shunted islands correspond to Noether currents, which represent an additional constraint.Physically, this constraint corresponds to Kirchhoff's current law, i. e., the current through a network of capacitors is conserved.
In this example [see Fig. 5(b)], the circuit contains a Josephson junction and two capacitors in a loop; the Lagrangian describing this circuit is given by Eq. (1.6) Our spanning tree9 construction provides for us the fact that the variables form canonical conjugate pairs with Written in terms of these variables, the Lagrangian is At this point, the circuit can be quantized.However, we can remove one more variable by noticing that the constraint due to the Noether current is This is easy to understand as simply the conservation of charge on the two inner plates connecting the capacitors.A nonzero constant of integration would only represent a time-independent charge trapped between the plates therein.
In this case, we can write where we redefine This choice is just a reflection of the fact that a free particle is "integrated out" by using Eq.(4.12).Thus, the Hamiltonian reads In this way, we see that Noether charges provide instructions on how to add capacitive circuit elements in series.

The dualmon qubit
We continue the series of examples with the circuit that motivated our discussion, the dualmon circuit [28].In this device, a Josephson junction and a quantum phase slip element form a loop [see Fig. 6(a)].In the following, we analyze the circuit in the absence of offset charges and external fluxes.Later, we show how these external parameters can be added to our formalism.First, we define the flux variables at the two nodes, φ v1 and φ v2 , and the branch charge across the capacitive element, q e1 .The incidence matrix of the capacitive subgraph is simply The circuit has one inductively shunted island, and no capacitive loop, thus the nullvectors are Based on Eq. (2.36), the constraint arising from the right null vector is trivial, and does not reduce the number of variables in the circuit.However, the identification of the right null vector itself formally removes a degree of freedom, which can also be seen in that the variable φ v1 + φ v2 never appears in the Lagrangian.Formally, this null vector is appropriately removed by the spanning tree construction.
From the spanning tree construction, we see that Q = q e1 is conjugate to Φ = φ v2 − φ v1 so that {Φ, Q} = 1.Furthermore, if the Josephson energy is E J and the quantum phase energy is E Q , the capacitive and inductive energies in the circuit are ) Using Eq. (1.6), we write the Lagrangian of the circuit as Finally, the Hamiltonian function takes the form of  Now, we show how we can incorporate the offset charges in our description through the example of the offset-charge sensitive transmon or Cooper pair box [see Fig. 6(b)].The circuit contains a single Josephson junction with Josephson energy of E J shunted by a capacitor C, and coupled with capacitance C c to a classical gate voltage V g that models the effects of offset charges.A key observation is that in our formalism, we include voltage sources by treating them as additional capacitive edges.While they do not end up leading to new degrees of freedom, this is how they are straightforwardly handled in our framework.
In our example, the circuit has three nodes (v i , where i = 1, 2, 3), and three capacitive branches, including the voltage source (e i , where i = 1, 2, 3).Thus, the capacitive incidence matrix is where the columns correspond to the three vertices and rows to the three branches.By inspection, we note that the inductively shunted islands, capacitive loops, and the corresponding null vectors in the circuit are ) The capacitive and inductive energies are Thus, based on Eq. (1.6) the Lagrangian of the circuit reads (4.23) In this example, the choice of spanning tree is not unique.We will choose as a spanning tree, and because the sum of the branch fluxes in the loop vanishes Then we introduce the new variables We are free to rewrite Only the capacitive loop (left null vector) gives a nontrivial constraint based on Eq. (2.33) since which can be used to fix q e3 in terms of Q e1 and Q e2 .Further, there is a Noether current which produces the constraint Choosing the constant of integration to be zero, and defining Q = Q e1 and Φ = Φ e1 with {Φ, Q} = 1, we arrive at the Lagrangian in the form of after dropping a constant term.Thus, we can write the Hamiltonian function in the well-known form From this point, it is straightforward to quantize H even with compact variable Φ [see Eq. (3.5)].

External flux in the fluxonium
Now, we turn our attention to the case of external fluxes.It is generally straightforward to include external flux biases; here, we model it by coupling the circuit inductively to a loop with current I s flowing [see Fig. 6(c)].If the mutual induction is M , the relevant energy term is For the sake of brevity, we will simply write out the Lagrangian of the fluxonium following similar procedures as in the first two examples: which, after finding the spanning tree, can be further written as where Φ = φ v2 − φ v1 , Q = q e1 , and φ ext = −LM I s .We have neglected an overall constant contribution to L. Thus, the Hamiltonian of the circuit reads where the sole conjugate pair is consists of Q and Φ.Again, φ ext can be time-dependent.

Time-dependent external charges or fluxes
In the example above, we introduced the external flux by inductively coupling the circuit to an external current source.There is an alternative way in our description to introduce external flux: we can add one or more new branches with a voltage source to a loop.To understand this construction, we recall that Faraday's law states that in the presence of time-dependent magnetic fields, the sum of voltages in a loop equals the rate of change of the magnetic field.Thus, if e i (i = 1, 2, . . ., n) are the physical capacitive branches in a loop where φ ext is the external flux piercing the loop.This suggests that we can think of the external flux as just another branch in the loop with an additional fixed flux φ ext .However, a natural question arises at this point: where should The batteries are modeled as capacitive elements.
one put this additional branch in the loop?As discussed in Refs.[40,41], the various Hamiltonians are linked by a gauge transformation.Figure 7 shows an example of how one can place the "flux batteries" in a circuit to capture the external flux.The circuit is flux-tunable transmon, where two Josephson junctions, E J1 and E J2 , are shunted by capacitors C. Notice that we have the freedom to place the external flux batteries in various ways, for example, here we choose to put two batteries with fluxes of αφ ext and βφ ext in the loop.The condition of α + β = 1 ensures that the total external flux in the loop is φ ext .This approach makes the circuit artificially a four-node circuit, but using the constraints outlined in this paper, we can end up with a single degree of freedom.
To start, we recall that batteries are capacitive elements in our formalism, and using the variables in Fig. 7, we write down the Lagrangian where the last two lines are the contribution of the voltage sources.Using the constraint arising from the capacitive loop ∆ C = {{e 1 , e 4 , e 2 , e 3 }}, and integrating out q e3 and q e4 , we arrive at the Lagrangian where Q = q e1 − q e2 and Φ = φ v3 − φ v1 .And finally, the Hamiltonian is with conjugate pairs {Φ, Q} = 1.Notice that the last term in Eq. (4.39) depends on our choice of how to distribute the batteries in the loop.For example, in the "irrotational gauge" [40,41], when α = β = 1 2 , there is no term linear in Q.We can transform between the different gauges at the classical level by a time-dependent type-2 canonical transformation from (Q, Φ) → (Q , Φ ).For example, if we take α = 1 and β = 0, the Hamiltonian is while in the irrotational gauge Example for a one-mode circuit where a quantum phase element has no series inductance attached to it.The circuit has a capacitive loop, C = {{q e1 , q e2 }} leading to a non-analytical constraint.
(b) When a series inductance is included in the circuit, the capacitive loop is broken, and the system has two degrees of freedom and an analytical Hamiltonian.
In this particular example, the generating function is which implies

Singular circuits
When a Josephson junction is not accompanied by a parallel capacitor, or a quantum phase slip element has no series inductor attached to it, the resultant circuit can become singular [21].In this section, we analyze an example for such a singular circuit, which leads to a non-analytical Hamiltonian.
The circuit is presented in Fig. 8(a), and it has a quantum phase slip, a capacitor and an inductor all in parallel.Following our procedures, we arrive at a Lagrangian of L = q e1 ( φv2 − φv1 ) + q e2 ( φv1 − φv2 ) − 1 2C q 2 e1 + E Q cos 2π By looking at the geometry of the circuit, we notice that there is one capacitive loop C = {{q e1 , q e2 }}, which based on Eq. (2.33) gives rise to the constraint This constraint, however, connects the two branch charges in a multi-valued, non-analytical way, leading to a Hamiltonian that is nonanalytical and can be evaluated only using numerical approaches.A detailed discussion on this topic can be found in Ref. [21].We denote Q = q e1 − q e2 (4.46) and write By denoting the solution of Eq. (4.47) as q e2 (Q), and introducing Φ = φ v2 − φ v1 , the Hamiltonian becomes where the conjugate pairs are {Φ, Q} = 1.
In circuits which can be realized in current experiments, this singular behavior is not present because quantum phase slip elements always have a series inductor component L S [see Fig. 8(b)].This additional element transfers the singular one-mode circuit into a two-mode circuit that is analytical.The key observation is that the presence of the series inductance breaks the capacitive loop, and removes the left null vector of the circuit, thus, the constraint of Eq. (4.45) is lifted.After a few steps, the Hamiltonian reads where and the conjugate pairs are {Φ e1 , Q e1 } = 1 and {Φ e2 , Q e2 } = 1.A similar argument can be made for the case of parallel capacitors for Josephson junctions.Finally, let us briefly discuss how our formalism straightforwardly reproduces the existing Lagrangian formalism in suitable limits.As one example, consider a circuit with only linear capacitors, and inductive elements of any kind.The linear capacitor at the capacitive branch e ∈ C has capacitance C e , while the inductive element at an inductive branch e ∈ I is described by an energy function g e .In our formalism, the Lagrangian is L(q e , φ v , φv ) = e∈C,v∈V q e Ω ev φv − where Ω ev is the usual capacitive incidence matrix.Since L is a quadratic function of q e , but L does not depend on the time derivatives of the charges qe , we can easily "integrate out" q e .(This statement remains true in a quantum mechanical path integral).Solving the Euler-Lagrange equation for q e , we find Then defining a capacitance matrix as we find a Lagrangian expressed only in terms of node flux variables, as is standard in the literature [14]: In this paper, we have developed a universal theory of circuit quantization for all LC circuits.Our approach allows for the quantization of singular circuits, with arbitrary graph topology, and with arbitrary time-dependent sources.The approach is inspired by symplectic geometry and graph theory, and the quantization prescription depends only on the topology of the capacitive subgraph, but not on which elements are linear or nonlinear.The "spanning tree construction" leads to a straightforward quantization prescription using a set of canonically conjugate coordinates that could be efficiently implemented in future software packages that perform generic circuit quantization.
Looking forward, this approach will provide an efficient algorithm for computing the numerical spectra of complicated hybrid circuits simultaneously involving Josephson junctions, quantum phase slips, and other arbitrary nonlinear elements that can be classified as inductive or capacitive.Obtaining these spectra will be a critical step in identifying the behavior of quantum phase slip and other nonlinear capacitive elements in a circuit quantum electrodynamics setup, opening new avenues to design and create novel superconducting devices beyond the current architectures.Further, this formalism should extend naturally to nonlinear mechanical oscillators [42][43][44][45][46] and ideal non-reciprocal elements [47], and may also be extensible to the quantization of transmission lines [48].

FIG. 6 :
FIG. 6: Examples for quantum circuits in the framework of symplectic geometry.The branches are colored based on the type of element they contain; red: capacitive elements, blue: inductive elements.The circuits are (a) dualmon circuit, (b) offset-charge-sensitive transmon, (c) external-flux-sensitive fluxonium. )

4. 3 .
Offset-charges and external voltages in the transmon

φe β φe FIG. 7 :
FIG. 7: Circuit in time-dependent external flux.A flux-tunable transmon with two Josephson junctions shunted by two capacitors.The external flux in the loop enclosed by the two junctions can be modeled as one or more additional batteries in a loop, as long as the total flux provided by these batteries equals the external flux.The batteries are modeled as capacitive elements.

4. 7 .
Connecting to the existing Lagrangian formalism