Skip to content

Would more detailed error message of SpaceMismatch be possible #347

@Chenqitrg

Description

@Chenqitrg

Hi developers,

Would a more detailed error message of SpaceMismatch in a tensor contraction be possible? The current one only reports those incompatible spaces, but currently I always need to add more tests mannually to find out tensors and legs that those incompatible spaces belongs to.

So will a more detailed output be more helpful? For example,

ERROR: SpaceMismatch("(Vect[IsingAnyon](:I=>1) ⊗ Vect[IsingAnyon](:σ=>1)') ≠ (Vect[IsingAnyon](:σ=>1) ⊗ Vect[IsingAnyon](:σ=>1)')")

may be more detailed output by

The x-th graded space of the domain of the tensor T: Vect[IsingAnyon](:I=>1) ⊗ Vect[IsingAnyon](:σ=>1)') is incompatible with the y-th graded space of the codomain of the tensor K: Vect[IsingAnyon](:σ=>1) ⊗ Vect[IsingAnyon](:σ=>1)')

Then the bug can be immediately traced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions