Skip to content

Refactor tensor arithmetic logic into backend modules #66

Description

@tran-go

Problem

CTArray currently mixes user-facing API methods with backend arithmetic logic. Some operations use __tensor_function__, while others call arithmetic operations directly inside the class.

Proposed change

Keep NumPy-style wrappers such as a.sum() inside CTArray, but move the actual arithmetic logic to backend modules such as matrix_arithmetic.py.

Expected structure:

CTArray.sum(...)
    -> __tensor_function__("sum", ...)
    -> registered backend function
    -> OpenFHE implementation

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions