magnus.hamiltonians.hamiltonians4nu

hamiltonians4nu.py

Compute four-neutrino (3+1 sterile) Hamiltonians for selected scenarios.

This module contains the routines to compute the four-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

  • mixing_matrix_4x4 - Returns 4x4 PMNS-like mixing matrix (3+1)

  • hamiltonian_4nu_vacuum_energy_independent - Returns H_vac (no 1/E)

  • hamiltonian_4nu_vacuum_energy_independent_td - Returns H_vac (no

    1/E), as a function of position

  • hamiltonian_4nu_vacuum - Returns H_vac

  • hamiltonian_4nu_vacuum_td - Returns H_vac, as a function of position

  • hamiltonian_4nu_matter - Returns H_matter

  • hamiltonian_4nu_matter_td - Returns H_matter, as a function of position

  • hamiltonian_4nu_nsi - Returns H_NSI

  • hamiltonian_4nu_nsi_td - Returns H_NSI, as a function of position

  • hamiltonian_4nu_liv - Returns H_LIV

  • hamiltonian_4nu_liv_energy_independent - Returns H_LIV (no energy

    dependence)

Functions

mixing_matrix_4x4(→ numpy.ndarray)

Returns the 4x4 (3+1 sterile) mixing matrix.

hamiltonian_4nu_vacuum_energy_independent(→ numpy.ndarray)

Returns the four-neutrino (3+1) Hamiltonian for vacuum oscillations.

hamiltonian_4nu_vacuum_energy_independent_td(...)

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

hamiltonian_4nu_vacuum(→ numpy.ndarray)

Returns the four-neutrino Hamiltonian for vacuum oscillations.

hamiltonian_4nu_vacuum_td(→ numpy.ndarray)

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

hamiltonian_4nu_matter(→ numpy.ndarray)

Returns the four-neutrino Hamiltonian for matter oscillations.

hamiltonian_4nu_matter_td(→ numpy.ndarray)

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

hamiltonian_4nu_nsi(→ numpy.ndarray)

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

hamiltonian_4nu_nsi_td(→ numpy.ndarray)

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

hamiltonian_4nu_liv(→ numpy.ndarray)

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

hamiltonian_4nu_liv_energy_independent(→ numpy.ndarray)

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

Module Contents

magnus.hamiltonians.hamiltonians4nu.mixing_matrix_4x4(s12: float, s23: float, s13: float, d13: float, s14: float, d14: float, s24: float, d24: float, s34: float, compute_matrix_multiplication: bool | None = False) numpy.ndarray[source]

Returns the 4x4 (3+1 sterile) mixing matrix.

Computes and returns the 4x4 complex mixing matrix for a 3+1 sterile-neutrino scenario, parametrized by the three standard mixing angles (\(\theta_{12}\), \(\theta_{23}\), \(\theta_{13}\)) and CP phase (\(\delta_{13}\)), plus three additional mixing angles (\(\theta_{14}\), \(\theta_{24}\), \(\theta_{34}\)) and two additional CP phases (\(\delta_{14}\), \(\delta_{24}\)) coupling the sterile state. Follows the parametrization \(U = R_{34} \tilde R_{24} \tilde R_{14} R_{23} \tilde R_{13} R_{12}\) of Kopp, Machado, Maltoni & Schwetz, arXiv:1103.4570 (see also arXiv:1105.3911).

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}\).

  • d13 (float) – \(\delta_{13}\) [radian].

  • s14 (float) – Sine of the mixing angle \(\theta_{14}\).

  • d14 (float) – \(\delta_{14}\) [radian].

  • s24 (float) – Sine of the mixing angle \(\theta_{24}\).

  • d24 (float) – \(\delta_{24}\) [radian].

  • s34 (float) – Sine of the mixing angle \(\theta_{34}\).

  • compute_matrix_multiplication (bool, optional) – If False (default), use the pre-computed closed-form expressions for each entry; otherwise, build the matrix by multiplying the five rotation matrices live. Both paths must (and do, see tests/test_hamiltonians.py) agree to machine precision.

Returns:

4x4 mixing matrix.

Return type:

np.ndarray

Examples

import numpy as np

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

p = gd.OSC_PARAMS_PREDEFINED['OSC_PARAMS_DEFAULT']
U = np.asarray(hamiltonians4nu.mixing_matrix_4x4(
    p['s12'], p['s23'], p['s13'], p['dCP'], 0.15, 0.0, 0.10, 0.0, 0.05))

print('shape', U.shape)
print('unitary to %.1e' % np.max(np.abs(U.conj().T @ U - np.eye(4))))
shape (4, 4)
unitary to 2.2e-16
magnus.hamiltonians.hamiltonians4nu.hamiltonian_4nu_vacuum_energy_independent(s12: float, s23: float, s13: float, d13: float, s14: float, d14: float, s24: float, d24: float, s34: float, D21: float, D31: float, D41: float, nubar: bool | None = False, compute_matrix_multiplication: bool | None = False) numpy.ndarray[source]

Returns the four-neutrino (3+1) Hamiltonian for vacuum oscillations.

Computes and returns the 4x4 complex four-neutrino Hamiltonian for oscillations in vacuum, parametrized by the six 3+1 mixing angles and two CP phases of mixing_matrix_4x4(), and three mass-squared differences (\(\Delta m_{21}^2\), \(\Delta m_{31}^2\), \(\Delta m_{41}^2\)). The Hamiltonian is H = (1/2)*R.M2.R^dagger, with R the 4x4 mixing 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}\).

  • d13 (float) – \(\delta_{13}\) [radian].

  • s14 (float) – Sine of the mixing angle \(\theta_{14}\).

  • d14 (float) – \(\delta_{14}\) [radian].

  • s24 (float) – Sine of the mixing angle \(\theta_{24}\).

  • d24 (float) – \(\delta_{24}\) [radian].

  • s34 (float) – Sine of the mixing angle \(\theta_{34}\).

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

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

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

  • nubar (bool, optional) – If True, compute the Hamiltonian for antineutrinos (conjugates the mixing matrix, equivalent to negating every CP phase). Default: False.

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

Returns:

Hamiltonian 4x4 matrix.

Return type:

np.ndarray

magnus.hamiltonians.hamiltonians4nu.hamiltonian_4nu_vacuum_energy_independent_td(l: float, s12: float, s23: float, s13: float, d13: float, s14: float, d14: float, s24: float, d24: float, s34: float, D21: float, D31: float, D41: float, nubar: bool | None = False, compute_matrix_multiplication: bool | None = False) numpy.ndarray[source]

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

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

Added in version 1.0.0.

Parameters:
Returns:

Hamiltonian 4x4 matrix.

Return type:

np.ndarray

magnus.hamiltonians.hamiltonians4nu.hamiltonian_4nu_vacuum(energy: float, s12: float, s23: float, s13: float, d13: float, s14: float, d14: float, s24: float, d24: float, s34: float, D21: float, D31: float, D41: float, nubar: bool | None = False, compute_matrix_multiplication: bool | None = False) numpy.ndarray[source]

Returns the four-neutrino Hamiltonian for vacuum oscillations.

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

Added in version 1.0.0.

Parameters:
Returns:

Hamiltonian 4x4 matrix.

Return type:

np.ndarray

magnus.hamiltonians.hamiltonians4nu.hamiltonian_4nu_vacuum_td(l: float, energy: float, s12: float, s23: float, s13: float, d13: float, s14: float, d14: float, s24: float, d24: float, s34: float, D21: float, D31: float, D41: float, nubar: bool | None = False, compute_matrix_multiplication: bool | None = False) numpy.ndarray[source]

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

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

Added in version 1.0.0.

Parameters:
Returns:

Hamiltonian 4x4 matrix.

Return type:

np.ndarray

magnus.hamiltonians.hamiltonians4nu.hamiltonian_4nu_matter(VCC: float) numpy.ndarray[source]

Returns the four-neutrino Hamiltonian for matter oscillations.

Computes and returns the 4x4 real four-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 4x4 matrix.

Return type:

np.ndarray

Examples

import numpy as np

from magnus.hamiltonians import hamiltonians4nu

print(np.asarray(hamiltonians4nu.hamiltonian_4nu_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 0.e+00 0.e+00 0.e+00]
 [0.e+00 0.e+00 0.e+00 0.e+00]]

The sterile state feels neither the charged- nor the neutral-current potential, which is what makes a 3+1 scenario more than a relabelling.

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

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

Computes and returns the 4x4 real four-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 4x4 matrix.

Return type:

np.ndarray

magnus.hamiltonians.hamiltonians4nu.hamiltonian_4nu_nsi(VCC: float, eps_ee: float, eps_em: complex, eps_et: complex, eps_es: complex, eps_mm: float, eps_mt: complex, eps_ms: complex, eps_tt: float, eps_ts: complex, eps_ss: float) numpy.ndarray[source]

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

Computes and returns the 4x4 complex four-neutrino Hamiltonian for oscillations with non-standard interactions (NSI) in matter with constant density. The additional ‘s’ subscript denotes the sterile flavor.

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_es (complex) – Flavor-off-diagonal (nu_e-nu_s) NSI coupling.

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

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

  • eps_ms (complex) – Flavor-off-diagonal (nu_mu-nu_s) NSI coupling.

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

  • eps_ts (complex) – Flavor-off-diagonal (nu_tau-nu_s) NSI coupling.

  • eps_ss (float) – Diagonal NSI coupling of nu_s.

Returns:

Hamiltonian 4x4 matrix.

Return type:

np.ndarray

magnus.hamiltonians.hamiltonians4nu.hamiltonian_4nu_nsi_td(l: float, VCC_func: Callable, eps_ee: float, eps_em: complex, eps_et: complex, eps_es: complex, eps_mm: float, eps_mt: complex, eps_ms: complex, eps_tt: float, eps_ts: complex, eps_ss: float) numpy.ndarray[source]

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

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

Added in version 1.0.0.

Parameters:
Returns:

Hamiltonian 4x4 matrix.

Return type:

np.ndarray

magnus.hamiltonians.hamiltonians4nu.hamiltonian_4nu_liv(energy: float, sxi12: float, sxi23: float, sxi13: float, dxi13: float, sxi14: float, dxi14: float, sxi24: float, dxi24: float, sxi34: float, b1: float, b2: float, b3: float, b4: float, Lambda: float, n_liv: int, nubar: bool | None = False, compute_matrix_multiplication: bool | None = False) numpy.ndarray[source]

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

Computes and returns the 4x4 complex four-neutrino Hamiltonian for oscillations in a CPT-odd Lorentz invariance-violating background. Same as hamiltonian_4nu_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) – Sines of the mixing angles between the space of the eigenvectors of the LIV operator B4 and the flavor states, parametrized as in mixing_matrix_4x4().

  • sxi23 (float) – Sines of the mixing angles between the space of the eigenvectors of the LIV operator B4 and the flavor states, parametrized as in mixing_matrix_4x4().

  • sxi13 (float) – Sines of the mixing angles between the space of the eigenvectors of the LIV operator B4 and the flavor states, parametrized as in mixing_matrix_4x4().

  • sxi14 (float) – Sines of the mixing angles between the space of the eigenvectors of the LIV operator B4 and the flavor states, parametrized as in mixing_matrix_4x4().

  • sxi24 (float) – Sines of the mixing angles between the space of the eigenvectors of the LIV operator B4 and the flavor states, parametrized as in mixing_matrix_4x4().

  • sxi34 (float) – Sines of the mixing angles between the space of the eigenvectors of the LIV operator B4 and the flavor states, parametrized as in mixing_matrix_4x4().

  • dxi13 (float) – CP-violation phases of the LIV operator B4 [radian].

  • dxi14 (float) – CP-violation phases of the LIV operator B4 [radian].

  • dxi24 (float) – CP-violation phases of the LIV operator B4 [radian].

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

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

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

  • b4 (float) – Eigenvalue b4 of the LIV operator B4.

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

  • 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). Default: False.

  • compute_matrix_multiplication (bool, optional) – Forwarded to mixing_matrix_4x4().

Returns:

Hamiltonian 4x4 matrix.

Return type:

np.ndarray

magnus.hamiltonians.hamiltonians4nu.hamiltonian_4nu_liv_energy_independent(sxi12: float, sxi23: float, sxi13: float, dxi13: float, sxi14: float, dxi14: float, sxi24: float, dxi24: float, sxi34: float, b1: float, b2: float, b3: float, b4: float, Lambda: float, n_liv: int, nubar: bool | None = False, compute_matrix_multiplication: bool | None = False) numpy.ndarray[source]

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

Computes and returns the 4x4 complex four-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) – Sines of the mixing angles between the space of the eigenvectors of the LIV operator B4 and the flavor states, parametrized as in mixing_matrix_4x4().

  • sxi23 (float) – Sines of the mixing angles between the space of the eigenvectors of the LIV operator B4 and the flavor states, parametrized as in mixing_matrix_4x4().

  • sxi13 (float) – Sines of the mixing angles between the space of the eigenvectors of the LIV operator B4 and the flavor states, parametrized as in mixing_matrix_4x4().

  • sxi14 (float) – Sines of the mixing angles between the space of the eigenvectors of the LIV operator B4 and the flavor states, parametrized as in mixing_matrix_4x4().

  • sxi24 (float) – Sines of the mixing angles between the space of the eigenvectors of the LIV operator B4 and the flavor states, parametrized as in mixing_matrix_4x4().

  • sxi34 (float) – Sines of the mixing angles between the space of the eigenvectors of the LIV operator B4 and the flavor states, parametrized as in mixing_matrix_4x4().

  • dxi13 (float) – CP-violation phases of the LIV operator B4 [radian].

  • dxi14 (float) – CP-violation phases of the LIV operator B4 [radian].

  • dxi24 (float) – CP-violation phases of the LIV operator B4 [radian].

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

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

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

  • b4 (float) – Eigenvalue b4 of the LIV operator B4.

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

  • n_liv (int) – Power of the energy dependence of the LIV operator; enters 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). Default: False.

  • compute_matrix_multiplication (bool, optional) – Forwarded to mixing_matrix_4x4().

Returns:

Hamiltonian 4x4 matrix.

Return type:

np.ndarray