Skip to content

Transform external interface to a modular and extensible design - #579

Draft
Krzmbrzl wants to merge 61 commits into
ValeevGroup:masterfrom
Krzmbrzl:revamp-ext-intface-design
Draft

Transform external interface to a modular and extensible design#579
Krzmbrzl wants to merge 61 commits into
ValeevGroup:masterfrom
Krzmbrzl:revamp-ext-intface-design

Conversation

@Krzmbrzl

Copy link
Copy Markdown
Collaborator

All processing is now performed in terms of individual processing steps and the flow across those is completely defined in the JSON driver. This replaces the C++ code that drove the processing and only took options from the JSON file.

This changes makes it much simpler to extend the external interface to add new types of processing steps or to adapt existing ones as the required changes will be quite localized to the associated step implementations.

Krzmbrzl added 30 commits July 27, 2026 12:12
This handler takes care of looping over data inputs and converting them
to the appropriate data types. Furthermore, this wrapper takes care of
propagating user-created aliases from one step to another.

This allows for a much more streamlined implementation of specific
processing steps, provided they process one data input at a time.
This assertion is doubly wrong in case the symmetrizer is not
particle-number conserving. First, because calling rank() on a tensor
that has unequal number of bra and ket indices will throw an exception.
And second, the code flow up to this point guarantees rank > 1 only in
the particle-number conserving case anyway. Hence, even if calling
rank() wasn't ill-defined the logic would be flawed.
This gets rid of the unnecessary lambda function (that is only called
exactly once and immediately after its declaration) in order to change
the control flow to eliminate redundant simplify steps as well as to
move the expression expansion up to be the very first step in
processing.
The verification code can't properly deal with "partial" symmetrizers
(where the number of bra and ket indices differ) as in those cases the
symmetrizer doesn't actually contain all external indices but the
affected code will think so. Since messing up the external indices in a
ResultExpr is somewhat less likely than when specifying the indices on a
per-function-call basis, we just disable the verification code in this
case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant