magnus.hamiltonians.hamiltonians3nu

hamiltonians3nu.py

Compute three-neutrino Hamiltonians for selected scenarios.

This module contains the routines to compute the three-neutrino Hamiltonians for the following scenarios: oscillations in vacuum, in matter of constant density, in matter with non-standard interactions (NSI), and in a CPT-odd Lorentz invariance-violating background (LIV).

Routine listings

  • pmns_mixing_matrix - Returns the 3x3 PMNS mixing matrix

  • mixing_matrix_3x3 - Alias of pmns_mixing_matrix

  • hamiltonian_3nu_vacuum_energy_independent - Returns H_vac (no 1/E)

  • hamiltonian_3nu_vacuum_energy_independent_td - Returns H_vac (no

    1/E), as a function of position

  • hamiltonian_3nu_vacuum - Returns H_vac

  • hamiltonian_3nu_vacuum_td - Returns H_vac, as a function of position

  • hamiltonian_3nu_matter - Returns H_matter

  • hamiltonian_3nu_matter_td - Returns H_matter, as a function of position

  • hamiltonian_3nu_nsi - Returns H_NSI

  • hamiltonian_3nu_nsi_td - Returns H_NSI, as a function of position

  • hamiltonian_3nu_liv - Returns H_LIV

  • hamiltonian_3nu_liv_energy_independent - Returns H_LIV (no energy

    dependence)

Functions

pmns_mixing_matrix(→ numpy.ndarray)

Returns the 3x3 PMNS mixing matrix.

mixing_matrix_3x3(→ numpy.ndarray)

Returns the 3x3 PMNS mixing matrix.

hamiltonian_3nu_vacuum_energy_independent(→ numpy.ndarray)

Returns the three-neutrino Hamiltonian for vacuum oscillations.

hamiltonian_3nu_vacuum_energy_independent_td(...)

Returns the three-neutrino Hamiltonian for vacuum oscillations, as a function of distance,

hamiltonian_3nu_vacuum(→ numpy.ndarray)

Returns the three-neutrino Hamiltonian for vacuum oscillations.

hamiltonian_3nu_vacuum_td(→ numpy.ndarray)

Returns the three-neutrino Hamiltonian for vacuum oscillations, as a function of distance,

hamiltonian_3nu_matter(→ numpy.ndarray)

Returns the three-neutrino Hamiltonian for matter oscillations.

hamiltonian_3nu_matter_td(→ numpy.ndarray)

Returns the three-neutrino Hamiltonian for matter oscillations, as a function of distance.

hamiltonian_3nu_nsi(→ numpy.ndarray)

Returns the three-neutrino Hamiltonian for oscillations w/ NSI.

hamiltonian_3nu_nsi_td(→ numpy.ndarray)

Returns the three-neutrino NSI Hamiltonian as a function of position.

hamiltonian_3nu_liv(→ numpy.ndarray)

Returns the three-neutrino Hamiltonian for oscillations w/ LIV.

hamiltonian_3nu_liv_energy_independent(→ numpy.ndarray)

Returns the three-neutrino Hamiltonian for oscillations w/ LIV.

Module Contents

magnus.hamiltonians.hamiltonians3nu.pmns_mixing_matrix(s12: float, s23: float, s13: float, dCP: float) numpy.ndarray[source]

Returns the 3x3 PMNS mixing matrix.

Computes and returns the 3x3 complex PMNS mixing matrix parametrized by three rotation angles, \(\theta_{12}\), \(\theta_{23}\), \(\theta_{13}\), and one CP-violation phase, \(\delta_\text{CP}\).

Added in version 1.0.0.

Parameters:
  • s12 (float) – Sine of the mixing angle \(\theta_{12}\).

  • s23 (float) – Sine of the mixing angle \(\theta_{23}\).

  • s13 (float) – Sine of the mixing angle \(\theta_{13}\).

  • dCP (float) – \(\delta_\text{CP}\) [radian].

Returns:

3x3 PMNS mixing matrix.

Return type:

np.ndarray

Examples

import numpy as np

import magnus.globaldefs as gd
from magnus.hamiltonians import hamiltonians3nu

p = gd.OSC_PARAMS_PREDEFINED['OSC_PARAMS_DEFAULT']
U = np.asarray(hamiltonians3nu.pmns_mixing_matrix(
    p['s12'], p['s23'], p['s13'], p['dCP']))

print('|U_e2|^2 = %.4f   (sin^2 th12 = %.3f)' % (abs(U[0][1])**2,
                                                 p['s12']**2))
print('unitary to %.1e' % np.max(np.abs(U.conj().T @ U - np.eye(3))))
|U_e2|^2 = 0.3012   (sin^2 th12 = 0.308)
unitary to 1.1e-16
magnus.hamiltonians.hamiltonians3nu.mixing_matrix_3x3(s12: float, s23: float, s13: float, dCP: float) numpy.ndarray[source]

Returns the 3x3 PMNS mixing matrix.

Alias of pmns_mixing_matrix(), kept for naming parity with magnus.hamiltonians.hamiltonians4nu.mixing_matrix_4x4() and magnus.hamiltonians.hamiltonians5nu.mixing_matrix_5x5().

Added in version 1.0.0.

Parameters:
  • s12 (float) – Sine of the mixing angle \(\theta_{12}\).

  • s23 (float) – Sine of the mixing angle \(\theta_{23}\).

  • s13 (float) – Sine of the mixing angle \(\theta_{13}\).

  • dCP (float) – \(\delta_\text{CP}\) [radian].

Returns:

3x3 PMNS mixing matrix.

Return type:

np.ndarray

magnus.hamiltonians.hamiltonians3nu.hamiltonian_3nu_vacuum_energy_independent(s12: float, s23: float, s13: float, dCP: float, D21: float, D31: float, nubar: bool | None = False, compute_matrix_multiplication: bool | None = False) numpy.ndarray[source]

Returns the three-neutrino Hamiltonian for vacuum oscillations.

Computes and returns the 3x3 complex three-neutrino Hamiltonian for oscillations in vacuum, parametrized by three mixing angles (\(\theta_{12}\), \(\theta_{23}\), \(\theta_{13}\)), one CP-violation phase (\(\delta_\text{CP}\)), and two mass-squared difference (\(\Delta m_{21}^2\), \(\Delta m_{31}^2\)). The Hamiltonian is H = (1/2)*R.M2.R^dagger, with R the 3x3 PMNS matrix and M2 the mass matrix. The multiplicative factor 1/E is not applied.

Added in version 1.0.0.

Parameters:
  • s12 (float) – Sine of the mixing angle \(\theta_{12}\).

  • s23 (float) – Sine of the mixing angle \(\theta_{23}\).

  • s13 (float) – Sine of the mixing angle \(\theta_{13}\).

  • dCP (float) – \(\delta_\text{CP}\) [radian].

  • D21 (float) – Mass-squared difference \(\Delta m_{21}^2\).

  • D31 (float) – Mass-squared difference \(\Delta m_{31}^2\).

  • nubar (bool, optional) – If True, compute the Hamiltonian for antineutrinos (conjugates the PMNS matrix, equivalent to \(\delta_\text{CP}\) -> -\(\delta_\text{CP}\)). Default: False.

  • compute_matrix_multiplication (bool, optional) – If False (default), use the pre-computed expressions; otherwise, multiply R.M2.R^dagger live.

Returns:

Hamiltonian 3x3 matrix.

Return type:

np.ndarray

Examples

import numpy as np

import magnus.globaldefs as gd
from magnus.hamiltonians import hamiltonians3nu

p = gd.OSC_PARAMS_PREDEFINED['OSC_PARAMS_DEFAULT']
h = np.asarray(hamiltonians3nu.hamiltonian_3nu_vacuum_energy_independent(
    p['s12'], p['s23'], p['s13'], p['dCP'], p['D21'], p['D31']))

print('Hermitian to %.1e' % np.max(np.abs(h - h.conj().T)))
print('eigenvalues [eV^2]:', np.round(np.linalg.eigvalsh(h), 6))
Hermitian to 0.0e+00
eigenvalues [eV^2]: [0.000e+00 3.700e-05 1.256e-03]

The eigenvalues are \((0, \Delta m^2_{21}, \Delta m^2_{31})\): only mass-squared differences appear, which is why the first is zero.

magnus.hamiltonians.hamiltonians3nu.hamiltonian_3nu_vacuum_energy_independent_td(l: float, s12: float, s23: float, s13: float, dCP: float, D21: float, D31: float, compute_matrix_multiplication: bool | None = False) numpy.ndarray[source]

Returns the three-neutrino Hamiltonian for vacuum oscillations, as a function of distance, even if it does not depend on it.

Same as hamiltonian_3nu_vacuum_energy_independent(), included for interface parity with the other, genuinely position-dependent Hamiltonians (see, e.g., hamiltonian_3nu_matter_td()).

Added in version 1.0.0.

Parameters:
  • l (float) – Position at which the Hamiltonian is evaluated.

  • s12 (float) – Sine of the mixing angle \(\theta_{12}\).

  • s23 (float) – Sine of the mixing angle \(\theta_{23}\).

  • s13 (float) – Sine of the mixing angle \(\theta_{13}\).

  • dCP (float) – \(\delta_\text{CP}\) [radian].

  • D21 (float) – Mass-squared difference \(\Delta m_{21}^2\).

  • D31 (float) – Mass-squared difference \(\Delta m_{31}^2\).

  • compute_matrix_multiplication (bool, optional) – If False (default), use the pre-computed expressions; otherwise, multiply R.M2.R^dagger live.

Returns:

Hamiltonian 3x3 matrix.

Return type:

np.ndarray

magnus.hamiltonians.hamiltonians3nu.hamiltonian_3nu_vacuum(energy: float, s12: float, s23: float, s13: float, dCP: float, D21: float, D31: float, nubar: bool | None = False, compute_matrix_multiplication: bool | None = False) numpy.ndarray[source]

Returns the three-neutrino Hamiltonian for vacuum oscillations.

Same as hamiltonian_3nu_vacuum_energy_independent(), but with the 1/E factor applied.

Added in version 1.0.0.

Parameters:
  • energy (float) – Neutrino energy.

  • s12 (float) – Sine of the mixing angle \(\theta_{12}\).

  • s23 (float) – Sine of the mixing angle \(\theta_{23}\).

  • s13 (float) – Sine of the mixing angle \(\theta_{13}\).

  • dCP (float) – \(\delta_\text{CP}\) [radian].

  • D21 (float) – Mass-squared difference \(\Delta m_{21}^2\).

  • D31 (float) – Mass-squared difference \(\Delta m_{31}^2\).

  • nubar (bool, optional) – If True, compute the Hamiltonian for antineutrinos. Default: False.

  • compute_matrix_multiplication (bool, optional) – If False (default), use the pre-computed expressions; otherwise, multiply R.M2.R^dagger live.

Returns:

Hamiltonian 3x3 matrix.

Return type:

np.ndarray

magnus.hamiltonians.hamiltonians3nu.hamiltonian_3nu_vacuum_td(l: float, energy: float, s12: float, s23: float, s13: float, dCP: float, D21: float, D31: float, compute_matrix_multiplication: bool | None = False) numpy.ndarray[source]

Returns the three-neutrino Hamiltonian for vacuum oscillations, as a function of distance, even if it does not depend on it.

Same as hamiltonian_3nu_vacuum(), included for interface parity with the other, genuinely position-dependent Hamiltonians.

Added in version 1.0.0.

Parameters:
  • l (float) – Position at which the Hamiltonian is evaluated.

  • energy (float) – Neutrino energy.

  • s12 (float) – Sine of the mixing angle \(\theta_{12}\).

  • s23 (float) – Sine of the mixing angle \(\theta_{23}\).

  • s13 (float) – Sine of the mixing angle \(\theta_{13}\).

  • dCP (float) – \(\delta_\text{CP}\) [radian].

  • D21 (float) – Mass-squared difference \(\Delta m_{21}^2\).

  • D31 (float) – Mass-squared difference \(\Delta m_{31}^2\).

  • compute_matrix_multiplication (bool, optional) – If False (default), use the pre-computed expressions; otherwise, multiply R.M2.R^dagger live.

Returns:

Hamiltonian 3x3 matrix.

Return type:

np.ndarray

magnus.hamiltonians.hamiltonians3nu.hamiltonian_3nu_matter(VCC: float) numpy.ndarray[source]

Returns the three-neutrino Hamiltonian for matter oscillations.

Computes and returns the 3x3 real three-neutrino Hamiltonian for oscillations in matter with constant density.

Added in version 1.0.0.

Parameters:

VCC (float) – Potential due to charged-current interactions of nu_e with electrons.

Returns:

Hamiltonian 3x3 matrix.

Return type:

np.ndarray

Examples

import numpy as np

from magnus.hamiltonians import hamiltonians3nu

print(np.asarray(hamiltonians3nu.hamiltonian_3nu_matter(1.0e-13)))
[[1.e-13 0.e+00 0.e+00]
 [0.e+00 0.e+00 0.e+00]
 [0.e+00 0.e+00 0.e+00]]

Add it to the vacuum term divided by the energy to get the full Hamiltonian. For antineutrinos the potential arrives already negated by magnus.matter.vcc_func_from_rho_func(); do not negate it again.

magnus.hamiltonians.hamiltonians3nu.hamiltonian_3nu_matter_td(l: float, VCC_func: Callable) numpy.ndarray[source]

Returns the three-neutrino Hamiltonian for matter oscillations, as a function of distance.

Computes and returns the 3x3 real three-neutrino Hamiltonian for oscillations in matter with a given density as a function of position.

Added in version 1.0.0.

Parameters:
  • l (float) – Position at which the Hamiltonian is evaluated.

  • VCC_func (Callable) – Potential due to charged-current interactions of nu_e with electrons, as a function of position, l.

Returns:

Hamiltonian 3x3 matrix.

Return type:

np.ndarray

magnus.hamiltonians.hamiltonians3nu.hamiltonian_3nu_nsi(VCC: float, eps_ee: float, eps_em: complex, eps_et: complex, eps_mm: float, eps_mt: complex, eps_tt: float) numpy.ndarray[source]

Returns the three-neutrino Hamiltonian for oscillations w/ NSI.

Computes and returns the 3x3 complex three-neutrino Hamiltonian for oscillations with non-standard interactions (NSI) in matter with constant density.

Added in version 1.0.0.

Parameters:
  • VCC (float) – Potential due to charged-current interactions of nu_e with electrons.

  • eps_ee (float) – Diagonal NSI coupling of nu_e.

  • eps_em (complex) – Flavor-off-diagonal (nu_e-nu_mu) NSI coupling.

  • eps_et (complex) – Flavor-off-diagonal (nu_e-nu_tau) NSI coupling.

  • eps_mm (float) – Diagonal NSI coupling of nu_mu.

  • eps_mt (complex) – Flavor-off-diagonal (nu_mu-nu_tau) NSI coupling.

  • eps_tt (float) – Diagonal NSI coupling of nu_tau.

Returns:

Hamiltonian 3x3 matrix.

Return type:

np.ndarray

Examples

import numpy as np

from magnus.hamiltonians import hamiltonians3nu

h = np.asarray(hamiltonians3nu.hamiltonian_3nu_nsi(
    1.0e-13, 0.1, 0.05, 0.0, 0.0, 0.0, 0.0))

print(np.round(h/1e-13, 4), ' [1e-13 eV]')
[[0.1 +0.j 0.05+0.j 0.  +0.j]
 [0.05+0.j 0.  +0.j 0.  +0.j]
 [0.  +0.j 0.  +0.j 0.  +0.j]]  [1e-13 eV]

The couplings are dimensionless and multiply the same \(V_{CC}\), so eps_ee = 0.1 is a ten-per-cent correction to the standard potential and eps_em is an off-diagonal one the Standard Model does not have.

magnus.hamiltonians.hamiltonians3nu.hamiltonian_3nu_nsi_td(l: float, VCC_func: Callable, eps_ee: float, eps_em: complex, eps_et: complex, eps_mm: float, eps_mt: complex, eps_tt: float) numpy.ndarray[source]

Returns the three-neutrino NSI Hamiltonian as a function of position.

Same as hamiltonian_3nu_nsi(), but evaluates the position-dependent matter potential VCC_func(l) first.

Added in version 1.0.0.

Parameters:
  • l (float) – Position at which the Hamiltonian is evaluated.

  • VCC_func (Callable) – Potential due to charged-current interactions of nu_e with electrons, as a function of position, l.

  • eps_ee (float) – Diagonal NSI coupling of nu_e.

  • eps_em (complex) – Flavor-off-diagonal (nu_e-nu_mu) NSI coupling.

  • eps_et (complex) – Flavor-off-diagonal (nu_e-nu_tau) NSI coupling.

  • eps_mm (float) – Diagonal NSI coupling of nu_mu.

  • eps_mt (complex) – Flavor-off-diagonal (nu_mu-nu_tau) NSI coupling.

  • eps_tt (float) – Diagonal NSI coupling of nu_tau.

Returns:

Hamiltonian 3x3 matrix.

Return type:

np.ndarray

magnus.hamiltonians.hamiltonians3nu.hamiltonian_3nu_liv(energy: float, sxi12: float, sxi23: float, sxi13: float, dxiCP: float, b1: float, b2: float, b3: float, Lambda: float, n_liv: int, nubar: bool | None = False, compute_matrix_multiplication: bool | None = False) numpy.ndarray[source]

Returns the three-neutrino Hamiltonian for oscillations w/ LIV.

Computes and returns the 3x3 complex three-neutrino Hamiltonian for oscillations in a CPT-odd Lorentz invariance-violating background. Same as hamiltonian_3nu_liv_energy_independent(), but with the \(E^{n_{\rm liv}}\) energy dependence of the LIV operator applied.

Added in version 1.0.0.

Parameters:
  • energy (float) – Neutrino energy.

  • sxi12 (float) – Sin(xi_12), with xi_12 the one of the mixing angles between the space of the eigenvectors of B3 and the flavor states.

  • sxi23 (float) – Sin(xi_23), with xi_23 the one of the mixing angles between the space of the eigenvectors of B3 and the flavor states.

  • sxi13 (float) – Sin(xi_13), with xi_13 the one of the mixing angles between the space of the eigenvectors of B3 and the flavor states.

  • dxiCP (float) – CP-violation angle of the LIV operator B3 [radian].

  • b1 (float) – Eigenvalue b1 of the LIV operator B3.

  • b2 (float) – Eigenvalue b2 of the LIV operator B3.

  • b3 (float) – Eigenvalue b3 of the LIV operator B3.

  • Lambda (float) – Energy scale of the LIV operator B3.

  • n_liv (int) – Power of the energy dependence of the LIV operator (dimension of the operator minus 3).

  • nubar (bool, optional) – If True, compute the Hamiltonian for antineutrinos (conjugates the LIV mixing matrix, equivalent to dxiCP -> -dxiCP). Default: False.

  • compute_matrix_multiplication (bool, optional) – Forwarded to hamiltonian_3nu_liv_energy_independent() (currently unused there; kept for interface parity with the vacuum Hamiltonian).

Returns:

Hamiltonian 3x3 matrix.

Return type:

np.ndarray

magnus.hamiltonians.hamiltonians3nu.hamiltonian_3nu_liv_energy_independent(sxi12: float, sxi23: float, sxi13: float, dxiCP: float, b1: float, b2: float, b3: float, Lambda: float, n_liv: int, nubar: bool | None = False, compute_matrix_multiplication: bool | None = False) numpy.ndarray[source]

Returns the three-neutrino Hamiltonian for oscillations w/ LIV.

Computes and returns the 3x3 complex three-neutrino Hamiltonian for oscillations in a CPT-odd Lorentz invariance-violating background, without the energy-dependent prefactor.

Added in version 1.0.0.

Parameters:
  • sxi12 (float) – Sin(xi_12), with xi_12 the one of the mixing angles between the space of the eigenvectors of B3 and the flavor states.

  • sxi23 (float) – Sin(xi_23), with xi_23 the one of the mixing angles between the space of the eigenvectors of B3 and the flavor states.

  • sxi13 (float) – Sin(xi_13), with xi_13 the one of the mixing angles between the space of the eigenvectors of B3 and the flavor states.

  • dxiCP (float) – CP-violation angle of the LIV operator B3 [radian].

  • b1 (float) – Eigenvalue b1 of the LIV operator B3.

  • b2 (float) – Eigenvalue b2 of the LIV operator B3.

  • b3 (float) – Eigenvalue b3 of the LIV operator B3.

  • Lambda (float) – Energy scale of the LIV operator B3.

  • n_liv (int) – Power of the energy dependence of the LIV operator (dimension of the operator minus 3); enters here through the \(\Lambda^{-n_{\rm liv}}\) normalization of the eigenvalues.

  • nubar (bool, optional) – If True, compute the Hamiltonian for antineutrinos (conjugates the LIV mixing matrix, equivalent to dxiCP -> -dxiCP). Default: False.

  • compute_matrix_multiplication (bool, optional) – Currently unused; accepted for interface parity with the vacuum Hamiltonian.

Returns:

Hamiltonian 3x3 matrix.

Return type:

np.ndarray