pdft.io.basis_hash

Contents

pdft.io.basis_hash#

pdft.io.basis_hash(basis)[source]#

SHA256 of a canonical string form, matching Julia’s basis_hash(QFTBasis).

Canonical form:

“QFTBasis:m=<m>:n=<n>:<re0>,<im0>;<re1>,<im1>;…”

Tensor elements are iterated tensor-by-tensor, column-major within each tensor. Floats are formatted with format_float_julia_like, which is Python’s repr adjusted to what Julia’s string(Float64) prints (the two agree on 0.7071067811865475 and differ on 5e-07 against 5.0e-7).

Parameters:

basis (QFTBasis)

Return type:

str