43 lines
1.3 KiB
C#
43 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Numerics;
|
|
using Skeleton.Constants;
|
|
|
|
namespace Skeleton.Test.tests;
|
|
|
|
public static class LieSU3FastEigenValueTest
|
|
{
|
|
private static IEnumerable<Complex> FastEigen(LieSU3 a)
|
|
{
|
|
yield return (a[2, 3] - a[3, 2]) * Complex.ImaginaryOne;
|
|
yield return (a[3, 1] - a[1, 3]) * Complex.ImaginaryOne;
|
|
yield return (a[1, 2] - a[2, 1]) * Complex.ImaginaryOne;
|
|
}
|
|
|
|
[Test]
|
|
public static void FastEigenTest()
|
|
{
|
|
LieSU3 a = new LieSU3(
|
|
0.44879894874697296 * AlgebraConstant.I, 0, 0,
|
|
0, 0 - 0.11636159072063412 * AlgebraConstant.I, -0.5651605390583659 + 0.3494531429928127 * AlgebraConstant.I,
|
|
0, 0.5651605403306819 + 0.34945314093513263 * AlgebraConstant.I, 0 - 0.33243736223309456 * AlgebraConstant.I);
|
|
|
|
Console.WriteLine(a.PythonRepresentation);
|
|
Console.WriteLine("===============");
|
|
|
|
Console.WriteLine((a + a.Hermitian()).Representation);
|
|
Console.WriteLine("00000000000000000000");
|
|
foreach (Complex ev in a.EigenValues())
|
|
{
|
|
Console.WriteLine(ev);
|
|
}
|
|
|
|
Console.WriteLine("===================");
|
|
foreach (Complex ev in FastEigen(a))
|
|
{
|
|
Console.WriteLine(ev);
|
|
}
|
|
|
|
}
|
|
|
|
} |