Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/majoranaalgebras/tst/   (GAP Algebra Version 4.15.1©)  Datei vom 7.6.2024 mit Größe 4 kB image not shown  

Quelle  MajoranaAlgebras.tst   Sprache: unbekannt

 
Spracherkennung für: .tst vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

gap> SetInfoLevel(InfoMajorana, 0);

##
## Test each part of main loop on A5 shape 4
##
gap> ex := MAJORANA_Example_A5();;
gap> rep := MAJORANA_SetUp(ex, 4, rec( axioms := "AllAxioms"));;
gap> MAJORANA_FindInnerProducts(rep);;
gap> AsSet(rep.innerproducts) = AsSet([ 11/813/2563/1283/1281/48/50875/5242881/91/181/1849/16384, -49/16384, false, 16/40535/4608, -35/4608203/524288 ]);
true
gap> MAJORANA_Fusion(rep);;
gap> Nrows(rep.evecs[1].("0"));
9
gap> dim := Size(rep.setup.coords);;
gap> mat := SparseMatrix(00, [], [], Rationals);;
gap> vec := SparseMatrix(0, dim, [], [], Rationals);;
gap> unknowns := [];;
gap> system := rec( mat := mat, vec := vec, unknowns := unknowns );;
gap> MAJORANA_EigenvectorsAlgebraUnknowns(system, rep);;
gap> MajoranaAlgebraTest(rep);
true
gap> MAJORANA_FindInnerProducts(rep);;
gap> MAJORANA_Fusion(rep);;
gap> MAJORANA_FindAlgebraProducts(rep);;
gap> MajoranaAlgebraTest(rep);
true

##
## Now test all of the smaller components on A5 shape 4
##
gap> ex := MAJORANA_Example_A5();;
gap> rep := MAJORANA_SetUp(ex, 4, rec(axioms := "AllAxioms"));;

##
## Test bad indices func
##
gap> u := SparseMatrix( 121, [[16]], [[1]], Rationals);;
gap> Size(MAJORANA_FindBadIndices(u, rep));
27

##
## Test add evec func
##
gap> mat := SparseIdentityMatrix(5, Rationals);;
gap> u := SparseMatrix( 15, [[1]], [[2]], Rationals);;
gap> MAJORANA_AddEvec(mat, u);;
gap> Nrows(mat);
5
gap> u := SparseMatrix( 15, [[12]], [[11]], Rationals);;
gap> MAJORANA_AddEvec(mat, u);;
gap> Nrows(mat);
5

##
## Test conjugate vec func
##
gap> v := rep.algebraproducts[8];;
gap> g := rep.setup.pairconjelts[55];;
gap> v := MAJORANA_ConjugateVec( v, g );;
gap> v!.indices;
[ [ 1591526 ] ]
gap> v!.entries;
[ [ -7/40967/4096, -7/40967/40967/32 ] ]

##
## Test algebra product func
##
gap> u := SparseMatrix( 121, [[1]], [[1]], Rationals);;
gap> v := SparseMatrix( 121, [[19]], [[1]], Rationals);;
gap> MAJORANA_AlgebraProduct(u, v, rep.algebraproducts, rep.setup);
false
gap> v := SparseMatrix( 121, [[16]], [[1]], Rationals);;
gap> v := MAJORANA_AlgebraProduct(u, v, rep.algebraproducts, rep.setup) ;;
gap> v!.indices;
[ [ 14716 ] ]
gap> v!.entries;
[ [ 2/9, -1/9, -1/95/32 ] ]

##
## Test inner product func
##
gap> u := SparseMatrix( 121, [[1]], [[1]], Rationals);;
gap> v := SparseMatrix( 121, [[19]], [[1]], Rationals);;
gap> MAJORANA_InnerProduct(u, v, rep.innerproducts, rep.setup);
false
gap> v := SparseMatrix( 121, [[16]], [[1]], Rationals);;
gap> MAJORANA_InnerProduct(u, v, rep.innerproducts, rep.setup);
1/4

##
## Test fill Gram matrix function
##
gap> gram := MAJORANA_FillGramMatrix( [1..15], rep.innerproducts, rep.setup);;
gap> Determinant( ConvertSparseMatrixToMatrix(gram) );
242191370790963017483378115234375/324518553658426726783156020576256

##
## Test IntersectEigenspaces
##
gap> ex := MAJORANA_Example_S4T1();;
gap> rep := MAJORANA_SetUp(ex, 2, rec( axioms := "AllAxioms"));;
gap> MAJORANA_IntersectEigenspaces(rep);;
gap> MAJORANA_Dimension(rep);
0

##
## Test the unknown inner product functions
##
gap> mat := SparseMatrix( 15, [ [ 14 ] ], [ [ 1, -1 ] ], Rationals );;
gap> vec := SparseMatrix( 11, [ [ 1 ] ], [ [ 7123/518400 ] ], Rationals );;
gap> unknowns := [1..5];;
gap> innerproducts := [false, 289/576001321/518400, false, 23/5184 ];;
gap> system := rec(mat := mat, vec := vec, unknowns := unknowns);;
gap> MAJORANA_RemoveKnownInnProducts(system, innerproducts);;
gap> system.unknowns;
14 ]
gap> eq := [ SparseMatrix( 13, [ [ 1 ] ], [ [ -1 ] ], Rationals ), SparseMatrix( 11, [ [ 1 ] ], [ [ -1/8192 ] ], Rationals ) ];;
gap> mat := SparseMatrix( 03, [  ], [  ], Rationals );;
gap> vec := SparseMatrix( 01, [  ], [  ], Rationals );;
gap> unknowns := [ 123 ];;
gap> system := rec(mat := mat, vec := vec, unknowns := unknowns);;
gap> innerproducts := [ false, false, false ];;
gap> MAJORANA_SingleInnerSolution( eq, system, innerproducts );;
gap> innerproducts;
1/8192, false, false ]
gap> mat := SparseMatrix( 11, [ [ 1 ] ], [ [ 1 ] ], Rationals );;
gap> vec := SparseMatrix( 11, [ [ 1 ] ], [ [ 1/2 ] ], Rationals );;
gap> unknowns := [ 1 ];;
gap> innerproducts := [ false ];;
gap> system := rec(mat := mat, vec := vec, unknowns := unknowns);;
gap> MAJORANA_SolutionInnerProducts(system, innerproducts);;
gap> innerproducts;
1/2 ]

[Dauer der Verarbeitung: 0.3 Sekunden, vorverarbeitet 2026-06-17]