hadamard_2060.py is a SageMath reconstruction of an explicit Hadamard
matrix of order 2060.
The reproducible Nix environment is pinned by flake.nix and flake.lock.
Construct and verify the matrix with exact integer arithmetic directly:
nix run .To enter a shell containing SageMath:
nix develop
sage hadamard_2060.pyThe principal verification is the defining Hadamard identity:
H * H.transpose() == 2060 * identity_matrix(ZZ, 2060)
The program also independently checks all 2060 choose 2 = 2,120,770
distinct row pairs. Each pair differs in exactly 1030 positions, hence has
inner product zero.
To produce the explicit matrix in conventional Python list-of-lists format:
nix run . -- --output-python H2060.pyThe resulting file starts with H2060 = [ and can be loaded in SageMath with:
load("H2060.py")
H = matrix(ZZ, H2060)The checked H2060.py included here is 14,882,482 bytes and has SHA-256:
8c81090db76e2b503561ba82598b514e0c2e39940a3703783c5b1b2c6b80a37a
The constructor itself is available as:
from hadamard_2060 import hadamard_matrix_2060
H = hadamard_matrix_2060()