Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
+1 vote

It seems that there is a bug in the string_states example: the third block of code defines $\delta$ as:


but it seems that this directly sets any off-diagonal component to zero:

X := \delta_{m}^{n};

gives $0$.

By comparing with other notebooks or arxiv:1912.08839 it seems that the Diagonal property should not be there. Is this correct?

in Bug reports by (240 points)

1 Answer

+2 votes
Best answer

Ouch, that's a brown paper bag one! What should happen is that a delta with different indices which have a Coordinate property becomes zero. Instead, it did it for every symbolic index. No idea how this slipped through the automatic tests...

Now fixed in github master. Since this wrong cleanup happened only for Diagonal objects, simply not using that property also avoids the problem (as you already observed). Thanks for reporting this.

by (64.9k points)
selected by