Pauli
PauliString parsing and algebra
8/8 passed in 0ms
| Test | What it does | Result |
|---|---|---|
test_commutation | X and Z anticommute; XX and ZZ commute. | ✅ pass |
test_from_sparse | from_sparse places single-qubit Paulis. | ✅ pass |
test_identity | identity(n) is +I...I. | ✅ pass |
test_mul_signs | (-X)*(Y) carries the - through: = -iZ. | ✅ pass |
test_mul_xy_is_iz | X * Y = +iZ. | ✅ pass |
test_mul_yx_is_minus_iz | Y * X = -iZ. | ✅ pass |
test_mul_zz_is_identity | Z * Z = +I. | ✅ pass |
test_parse_repr_roundtrip | Parsing then repr is the identity for signed Paulis. | ✅ pass |