|
Uni20
Asynchronous tensor and runtime library.
|
Uni20 should keep a clear separation between:
The dense primitive layer should not know about symmetry. The symmetric layer should lower its work into dense primitive programs.
This separation is important because some optimizations that are natural at the raw arithmetic level look unnatural, or even ill-typed, if described as operations on a whole symmetric tensor. That is not a problem. It means the optimization belongs in the lowering step.
The dense layer should provide a small set of layout and arithmetic primitives:
These primitives should be expressed in terms of resolved dense data views. They should not mention quantum numbers, sectors, labels, fusion trees, or block sparsity.
For example, a trace over two dense axes is not fundamentally a special tensor operation. It is a synthetic diagonal view followed by a reduction over the diagonal axis.
The symmetric tensor layer owns:
The output of this layer should be a lowering plan: a sequence or graph of dense primitive operations on concrete block data.
In particular, it is valid for a symmetric operation to lower into raw arithmetic that does not resemble a single clean operation on the original symmetric tensor. Examples include:
These are not violations of the abstraction. They are the point of the abstraction boundary.
The symmetric layer may perform high-level algebraic rewrites, but the dense layer should remain simple and mechanical.
Do not add a dense primitive because it is meaningful for symmetric tensors. Add a dense primitive because it is a useful operation on raw tensor data.
Conversely, do not reject a raw primitive lowering because it looks strange at the symmetric tensor level. If it is algebraically valid after sector resolution and coupling coefficients are accounted for, then it is a legitimate lowering strategy.
The intended flow is:
This keeps the backend and kernel layers reusable, testable, and independent of quantum-number machinery.