1. Introduction
Neutrino flavor oscillations in the presence of matter are described by a continuously varying, finite-dimension set of Schrödinger equations along a propagation path, in what is known as the Mikheyev–Smirnov–Wolfenstein (MSW) effect [
1,
2]. The varying nature of such backgrounds prevents any practical case from being solved analytically, with numerical methods being the only option. Although these computations by themselves are not intensive, the problem scales in complexity when dealing with any sort of model fitting or any situation requiring the system to be solved for a large number of configurations. Moreover, knowing the values of the oscillation parameters, mixing angles and mass differences as a function of a model’s parameter space gives valuable insights into neutrino physics itself. In order to map the oscillation parameters, the solutions are used to find the eigenvalues and eigenvectors of the mixing matrix, which adds a second numerical task to the computational load. This second step has an inherent complication: by definition, linear algebra algorithms are agnostic to eigenvalues and eigenvector ordering. In fact, the output of a numerical diagonalization algorithm has unpredictable ordering, forming what is known as Newton’s Fractal [
3]. However, this ordering has implications for neutrino physics. The Pontecorvo—Maki—Nakagawa—Sakata (PMNS) parametrization assumes a mass/flavor ordering when defining the mixing matrix in vacuum, and this ordering has to be known when matter effects are present in order to properly recover the oscillation parameters. This work makes the case for the use of Jacobi’s diagonalization algorithm [
4,
5,
6], which finds both the set of eigenvalues and eigenvectors at the same time. This is accomplished by swapping the diagonalizing with the integration steps, finding the eigenvectors before solving the Schrödinger equation. This allows us to find the correct ordering of its eigenvalues by a simple comparison to neighbors, maintaining the PMNS parametrization which connects the matter-affected oscillation parameters to their vacuum counterparts. By storing the eigenvectors in a look-up table (LUT), the strategies proposed here can trivially offload the computation of fitting and mapping tasks. This procedure is particularly advantageous for exploring exotic matter backgrounds and flavor-changing Beyond Standard Model (BSM) interactions, which are common avenues of study in the neutrino research field. Since future experiments such as the Deep Underground Neutrino Experiment (DUNE) [
7] will be able to explore BSM physics, new algorithms with better computational complexity are required.
The modern version of the Jacobi method for the diagonalization of Hermitian matrices is reviewed, followed up by the addition of extra steps with the goal of preserving any pre-existing parametrization. This is the Sequential Diagonalization Strategy (SDS), which is accomplished by successively comparing the eigenvalues over an arbitrary smooth path in small, discrete steps, transporting the ordering of the eigenvector across the parameter space. This algorithm offers advantages to neutrino physicists, mainly when studying adiabatic evolution in active interacting media. See Refs. [
8,
9,
10] for excellent reviews. Although analytical solutions do exist for the most common scenarios [
11,
12], these are Standard Model (SM)-dependent and cannot be easily expanded for more general models, such as the study of Non-Standard Neutrino Interactions (NSNIs) and sterile neutrinos. It has been shown that sequential diagonalizations can replace first- and second-order terms when perturbatively calculating the oscillation parameters [
13], though this is limited to uniform backgrounds. The methods discussed here are not limited by the model being considered, nor by the medium’s uniformity.
Although the methods described here are aimed at neutrino physicists, this paper is organized in such a way that the methodology can be appreciated by a more general reader.
Section 2 defines the ordering problem and its implications;
Section 3 reviews the original Jacobi algorithm for a Hermitian matrix;
Section 4 outlines the SDS, which ensures parametrization over a continuous path and; Finally,
Section 5 illustrates an example application in neutrino physics using an example which can also be compared with an analytical solution, followed by
Section 6 with the conclusions. After this, two appendices showcase discussions and details that might not be of interest for the general reader:
Appendix B performs a benchmark test by solving a random case and comparing it with its analytical solution and; finally,
Appendix A contains an analysis of the convergence, precision and stability of the algorithm.
2. Parametrized Hermitian Matrices
Consider a Hermitian matrix
A of order
n, with
independent elements
. While developing a physical model, one may want to describe each element as a continuous function over a
p-dimensional parameter space, i.e.,
, with
. In this situation, its real eigenvalues
and corresponding eigenvectors
are also functions of
. By the spectral theorem, all Hermitian matrices are normal matrices and, as such, can be written as
, where
and
where
U is a unitary transformation, i.e.,
. The ordering of the
in
D might be arbitrary but is assumed to have physical meaning, and so it has to be preserved. Note that, by choosing to represent the eigenvalues as the elements of
D and the eigenvector as a column of
U, their ordering is preserved in these matrices by definition, and the relation
becomes equivalent to
. For the sake of brevity, the pair
will be referred to as the eigensystem of
A.
We are interested in describing the eigensystem of Hermitian matrices as a function of the original parametrization
, i.e, since
, so it must be that
and
. The Jacobi diagonalization method is well suited for this goal since it results in the complete eigensystem, already in the form
. However, the resulting ordering of their columns is never guaranteed since this information is arbitrary and not related to the method’s input,
A. In fact, the resulting ordering is unpredictable, and its dependence on the elements
is fractal-like, presenting self-similarity and recursive characteristics [
3]. In practice, this means that by defining the first element of
as
, one should not assume that the first element of
is still
, even after an arbitrarily small step
. This implication prevents us from reconstructing the functions
and
, unless we transport the ordering information along, with every step. This strategy will be addressed in
Section 4, after the following review of the Jacobi method.
3. Jacobi’s Algorithm
The original algorithm proposed by Carl G. J. Jacobi in 1845 [
4] established a numerical procedure to calculate eigenvalues of a real, symmetric matrix. Since then, several variations have been developed in the literature, including an extension to a general complex matrix [
5,
6]. The focus of this work is the diagonalization of Hermitian matrices, which is reviewed in this section for completion’s sake, using notation and steps mainly based on ref. [
14]. For a more comprehensive review, see ref. [
15].
Let us start by defining a way to measure the magnitude of a matrix’s off-diagonal elements,
given by
Jacobi proved that for all Hermitian matrices
A, there is an infinite sequence
,
, ⋯
,
⋯, with off-diagonal magnitudes
for any
k, meaning that
converges to a diagonal matrix as
. The sequence in Equation (
2) has a general term given by
with each matrix
being a unitary transformation that has to be constructed. The strategies for constructing
will be discussed in a moment. From the definitions in
Section 2,
A can be factored as a diagonal matrix
D and a unitary transformation
U, as
. This relation can be inverted in order to express
D as a function of
A and
U,
which is recognizable as the limit of Equation (
3) when
, with
and
. From the perspective of a numerical approximation, one may stop the sequence
when the condition
is met, for an arbitrary precision
. In this case, Equation (
3) can be read as
and
with a global truncation error
.
Several strategies are available for constructing the sequence of rotations that satisfies these definitions. The total computational complexity depends on the number of steps in the sequence and which decisions are considered between each one. In particular, the
can be organized in groups called sweeps where all the off-diagonal elements are systematically rotated, one by one, in what is known as the Cyclic Jacobi Method (CJM) [
6,
16,
17]. This strategy requires no decision making regarding the elements themselves, thus employing the least amount of time per step. Another known strategy is to eliminate the largest remaining off-diagonal element with each rotation, which is Jacobi’s original strategy [
4]. This strategy is proven to have quadratic convergence [
15], at the cost of a search for the largest element, between rotations. This is the implementation chosen for this work, which was confirmed to achieve quadratic convergence, with the test and its results presented in the
Appendix A. For a modern review and variations on the implementation presented here, please refer to refs. [
14,
15] and references therein.
A Jacobi rotation
represents a single step in the process of diagonalizing the target matrix
A, and according to the chosen strategy, it is applied to the largest off-diagonal element,
, with
. Each
can be decomposed into two consecutive rotations,
, which was first introduced by W. Givens [
14], with
K and
G known as Givens rotations [
14]. Each of these independent rotations,
K and
G, is responsible for rotating away one of the two degrees of freedom of this element, since
is a complex number. In other words, the first rotation
makes the resulting element
real, while the second one
is responsible for vanishing with
. Under these requirements,
may be written as
with the main elements given by
,
, and
for the diagonal elements, except at
and
. All other elements are zero. By imposing that
, the rotation angle
becomes
One can verify that, in the case where the target matrix
A is already real,
and
becomes the identity 1. The second transformation
must be a real rotation,
with notation analogous to the one used in Equation (
7),
,
, with
for the diagonal elements, except at
and
, with all others being zero. The rotation angle
responsible for vanishing with the element in position
is given by
Extra care should be taken when calculating the angles
and
since Equations (
8) and (
10) are prone to overflow when numerically evaluating
. The final implementation was tested with random
matrices, so that the numerical results could be compared to the analytical ones (see
Appendix B). In the next section, the discussion returns to how to preserve the eigenvalues ordering, making the Jacobi’s algorithm suitable for studying adiabatic matter effects in neutrino physics.
4. Sequential Diagonalization Strategy
As previously discussed in
Section 2, once the parametrization of a Hermitian matrix is defined, the objective is to obtain its eigensystem as a function of a given model’s parameters, correcting for the randomness in the eigensystem ordering. The solution proposed here was loosely inspired by the parallel transport of the tangent vector, in Riemannian geometry. Since the change in both eigenvalues and eigenvectors is continuous, it should be possible to detect any unwanted reordering by a simple comparison of neighboring results. This requires connecting the point of study in the parameter space with another where the ordering is known, diagonalizing and correcting the ordering along the way, transporting the eigensystem from one point to the other. This method will be referred to as the Sequential Diagonalization Strategy (SDS) which can be summarized as follows:
Starting from a point in the parameter space where the eigensystem is known (including ordering), a small step is taken to a new position;
The eigensystem is obtained in this new position, and a comparison is drawn between the original set of eigenvalues and the new ones;
Assuming that the step is short enough, it is always possible to arrive at a one-to-one match between the two sets, which allows the post-step eigensystem to be reordered following their pre-step counterparts;
This is now regarded as a new reference value, and the process is repeated over a predefined path, transporting the known ordering along it.
Figure 1 illustrates this strategy with a graphical example. In what follows, a formal definition of SDS is presented.
From
Section 2, the relation
defines the eigensystem of
A as
, where its eigenvalues are represented as the matrix
, with
, while its collection of eigenvectors
is organized as the columns of
as defined in Equation (
1). In order to obtain
at a given point
, a path between the two points is drawn,
, as a function of a single parameter
t. This new parametrization has no physical meaning, and it is unrelated to how
A is parametrized over
. This relation is introduced to reduce the number of degrees of freedom (d.o.f.) from
p parameters to a single one,
t. The path is then divided into smaller steps
in a total of
. Without any loss of generality, one might consider a straight line,
as long as
never leaves the domain of
. When this is not feasible, Equation (
11) can be generalized by a series of line segments or a curve of any kind. Nevertheless, the reader should keep in mind that the resulting
are independent of the taken path, so the curve
should be as simple as possible. From this point forward, consider that Equation (
11) is enough to define
. In this case, a short step
leads to a step
, with
with
being the discrete representation of the chosen path. At any given step
i, the next step will lead to
. When diagonalized, the resulting eigenvalue set
should have the form
This relation can be used as a tool to correct for the ordering of
by defining the quantity
it is possible to search for the correct ordering of
among all possible permutations. Given that
is small enough, the relation
can only be true if the ordering of
matches the previous one for
. This is performed by simple inspection, placing all permutations of
in the definition of
and choosing the smallest one. Once the correct permutation is known, both
and
can be reordered and stored in
. This procedure is repeated until the endpoint is reached, leading to the desired
.
The combination of SDS and Jacobi’s diagonalization will be referred to as Sequential Jacobi Diagonalization (SJD). Although the SDS can be used with any diagonalization method, it is worth noting that Jacobi’s is the most suitable one for neutrino physics since it offers the possibility of evaluating both
D and
U at the same time with precision
, predefined only by the stopping condition. In fact, since no other information is kept from one point to the next, besides the ordering, there are no cumulative numerical errors involved. In other words, the only errors affecting
are those coming from the last diagonalization, at the point
(see
Appendix A for an in-depth discussion about precision).
A few remarks are in order. A major advantage of the SDS is that all the diagonalizations over a path can be computed concurrently, with the reordering performed afterwards, in a serialized fashion. Also, if the intention is to map the eigensystem over a volume of parameter space, finding a way to run over such space in a continuous manner becomes a trivial task. Yet, this method is not without its limitations. The SDS relies on the premise that there is a reference order. As a consequence, the eigenvalues have to be non-degenerate to begin with. Not only that, they also have to be different enough so Equation (
15) is applicable. It could be the case, however, that some particular parametrization causes two or more eigenvalues to cross each other, becoming degenerate at that point. This kind of ambiguity can be solved by adopting a higher order discriminant, such as comparing
with
, which is equivalent to comparing the derivatives of
.
5. Neutrino Physics Application
This section offers an example application of SJD in neutrino physics. The goal is to obtain the mixing (oscillation) parameters, defined by the PMNS parametrization, as a function of the matter background in the MSW effect. (see refs. [
10,
18] for a modern review). In it, the presence of an interacting medium shifts the energy levels of the Hamiltonian, which in turn leads to a new set of effective values for the neutrino mixing parameters, either enhancing or suppressing the oscillation pattern, depending on the matter profile along the propagation path. In what follows, the MSW effect is briefly reviewed, and the usage of the SJD is illustrated for a 3-neutrino, SM case.
As the mass-flavor mixing model states [
18], a three-neutrino system can be represented by a free Hamiltonian which is diagonal when expressed in the mass basis,
, with
and the
as the squared-mass differences between the neutrino mass-states. The unitary mixing matrix
U takes the diagonal
to the flavor basis via a similarity transformation,
with
U being the result of three real rotations (with Euler angles
,
and
) and at least one complex phase
. In the presence of an interacting background, represented by a potential matrix
V, the total Hamiltonian of the system becomes
where the ∼ sign represents non-vacuum values, with
V being a general real matrix, encoding how each neutrino flavor interacts with the medium. The physical observables are those related to the neutrino oscillation pattern, namely the oscillation length and amplitudes, given by the eigenvalues and eigenvectors of
, respectively. Let
be the diagonalizing transformation that realizes the following,
where
, and
, when
. Equation (
18) is equivalent to Equation (
4), with
and
. This single realization evokes the motivation behind this study, since while Equation (
4) is just the starting point of a diagonalization tool, Equation (
18) has actual meaning in neutrino physics.
Consider
as the diagonal form of
, with
as the relevant factors of its eigenvalues. From the elements of the diagonalizing transformation of
U (or
), it is possible to define three Mixing Amplitudes,
and
representing how the mass-eigenstates are mixed into the flavor states. This notation corresponds to the PMNS parametrization [
10]. It is also possible to isolate the effects of CP-violation, represented by the Jarlskog invariant,
where
represents the difference between neutrino and antineutrino oscillation.
The angles in Equation (
19) and the Jar Equation (
20) will lead to different values, depending on the elements of the potential
V. As an example, in non-standard interaction searches, the elements of
V can be either independent of each other or given by an underlying model. In the case of an ordinary-matter background, however, the potential can be as simple as
, with
(more on
in a moment). Regardless of the model, be it SM or BSM, SJD can be used to obtain the behavior of
’s eigensystem as a function of a specific model parameter or even the complete set of
V elements, which would be model-independent. In the case of a constant and uniform background, these definitions are enough to completely define the system. When this is not the case, it becomes necessary to also know how
varies along the neutrino’s trajectory
x, i.e.,
This is the scenario where the SJD can provide a sizable improvement over other methods. The values of
can be obtained prior to a full model analysis since they should be recalculated less frequently, if ever conducted twice in a single study. Monte Carlo productions, as well as model fitting, can make use of a LUT instead of performing thousands of diagonalizations at every step. The more demanding simulations for the next generation of neutrino detectors, such as DUNE [
7], should benefit from this approach.
To take a concrete example, we can appreciate an application using only Standard Model physics, for which there are analytical solutions. In this case, the relevant matter potential is , with being the charged current potential between electrons in the medium and the electron-(anti)neutrino. For neutral baryonic matter, , where is the background’s electron density, and is Fermi’s constant. Since global phases do not influence the final oscillation probabilities, we can place in evidence, writing , with . The parameter a encodes all the background description such as density, interaction strength and uniformity. By using SJD, it is possible to obtain all the relevant observables and still be agnostic with respect to the background properties, which can be added at a later point of the computation.
The total Hamiltonian to be diagonalized is
, where
means that both the neutrinos and the background are of the same nature, i.e., either both matter or both antimatter, while
represents the matter/antimatter combination. Using the vacuum values on
Table 1, it is possible to obtain two distinct values for
,
and
, corresponding to Normal Hierarchy (NH) and Inverted Hierarchy (IH), respectively. All results that follow will show four distinct cases:
and NH/IH.
The analytical solutions for the Mixing Amplitudes [
11,
12] are compared to the SJD, being in agreement up to the chosen precision (
).
Figure 2a shows the mixing amplitudes
and
as a function of
(
is not shown since it is indistinguishable from 1 in this scale). It is possible to observe the resonant MSW effect, related to the two mass-scales. The lower resonance
affects
, while the higher one
affects
and
. The latter is not shown on the plots since it would be indistinguishable from the unit due to its large vacuum value.
In
Figure 3, we observe the eigenvalues of
for NH and IH. The vacuum eigenvalues are
,
and
, and it is possible to see that resonances
and
represent the points where the eigenvalues change asymptotes.
Finally,
Figure 2b shows how the Jarskog invariant is affected by the background. Regardless of the hierarchy case,
represents a resonant minimum for
, and
will always lead to
, meaning that neutrinos and antineutrinos would behave the same. It is worth noting that the existence of Charge-Parity (CP)-violation in neutrino oscillations is not confirmed, and the results shown here only consider the best fit values for
, which are still compatible with zero. No matter what the true
is, it affects
with all the previous observables remaining unchanged.