OscProb
PMNS_OQS.cxx File Reference
#include <unsupported/Eigen/MatrixFunctions>
#include "PMNS_OQS.h"
#include "exceptions.h"
#include <iostream>

Go to the source code of this file.

Functions

void get_GM (const matrixC &A, vectorD &v)
 
void get_SU3 (const vectorD &v, matrixC &A)
 
void get_GMOP (const matrixC &A, matrixD &B)
 

Variables

constexpr int SU3_DIM = PMNS_OQS::SU3_DIM
 

Function Documentation

◆ get_GM()

void get_GM ( const matrixC A,
vectorD v 
)

Auxiliary function to convert Hermitian 3x3 matrices to GM representation vectors.

Parameters
A- The input Hermitian 3x3 matrix.
v- The output real 9-vector.

Definition at line 242 of file PMNS_OQS.cxx.

243{
244 v[0] = real(A[0][0] + A[1][1] + A[2][2]) / sqrt(6);
245 v[3] = real(A[0][0] - A[1][1]) / 2;
246 v[8] = real(A[0][0] + A[1][1] - 2. * A[2][2]) / sqrt(12);
247
248 v[1] = real(A[0][1]);
249 v[4] = real(A[0][2]);
250 v[6] = real(A[1][2]);
251
252 v[2] = -imag(A[0][1]);
253 v[5] = -imag(A[0][2]);
254 v[7] = -imag(A[1][2]);
255}

Referenced by OscProb::PMNS_OQS::BuildR().

◆ get_GMOP()

void get_GMOP ( const matrixC A,
matrixD B 
)

Auxiliary function to convert Hermitian 3x3 matrices to GM representation 9x9 operators.

Parameters
A- The input Hermitian 3x3 matrix.
B- The output real 9x9 matrix.

Definition at line 288 of file PMNS_OQS.cxx.

289{
290 B[1][2] = real(A[0][0] - A[1][1]);
291 B[1][3] = 2 * imag(A[0][1]);
292 B[1][4] = -imag(A[1][2]);
293 B[1][5] = -real(A[1][2]);
294 B[1][6] = -imag(A[0][2]);
295 B[1][7] = -real(A[0][2]);
296
297 B[2][3] = 2 * real(A[0][1]);
298 B[2][4] = real(A[1][2]);
299 B[2][5] = -imag(A[1][2]);
300 B[2][6] = -real(A[0][2]);
301 B[2][7] = imag(A[0][2]);
302
303 B[3][4] = -imag(A[0][2]);
304 B[3][5] = -real(A[0][2]);
305 B[3][6] = imag(A[1][2]);
306 B[3][7] = real(A[1][2]);
307
308 B[4][5] = real(A[0][0] - A[2][2]);
309 B[4][6] = -imag(A[0][1]);
310 B[4][7] = real(A[0][1]);
311 B[4][8] = sqrt(3) * imag(A[0][2]);
312
313 B[5][6] = -real(A[0][1]);
314 B[5][7] = -imag(A[0][1]);
315 B[5][8] = sqrt(3) * real(A[0][2]);
316
317 B[6][7] = real(A[1][1] - A[2][2]);
318 B[6][8] = sqrt(3) * imag(A[1][2]);
319
320 B[7][8] = sqrt(3) * real(A[1][2]);
321
322 for (int i = 1; i < SU3_DIM; ++i) {
323 for (int j = i + 1; j < SU3_DIM; ++j) { B[j][i] = -B[i][j]; }
324 }
325}
constexpr int SU3_DIM
Definition: PMNS_OQS.cxx:19

References SU3_DIM.

Referenced by OscProb::PMNS_OQS::BuildHGM().

◆ get_SU3()

void get_SU3 ( const vectorD v,
matrixC A 
)

Auxiliary function to convert GM representation vectors to Hermitian 3x3 matrices.

Parameters
v- The input real 9-vector.
A- The output Hermitian 3x3 matrix.

Definition at line 265 of file PMNS_OQS.cxx.

266{
267 A[0][0] = v[0] * sqrt(2 / 3.) + v[3] + v[8] / sqrt(3);
268 A[1][1] = v[0] * sqrt(2 / 3.) - v[3] + v[8] / sqrt(3);
269 A[2][2] = v[0] * sqrt(2 / 3.) - 2 * v[8] / sqrt(3);
270
271 A[1][0] = complexD(v[1], v[2]);
272 A[2][0] = complexD(v[4], v[5]);
273 A[2][1] = complexD(v[6], v[7]);
274
275 for (int i = 0; i < 3; i++) {
276 for (int j = 0; j < i; j++) { A[j][i] = conj(A[i][j]); }
277 }
278}
std::complex< double > complexD
Definition: Definitions.h:21

Referenced by OscProb::PMNS_OQS::UpdateRho().

Variable Documentation

◆ SU3_DIM

constexpr int SU3_DIM = PMNS_OQS::SU3_DIM
constexpr

Definition at line 19 of file PMNS_OQS.cxx.

Referenced by get_GMOP().