Skip to content

Pauli

PauliString parsing and algebra

8/8 passed in 0ms

TestWhat it doesResult
test_commutationX and Z anticommute; XX and ZZ commute.✅ pass
test_from_sparsefrom_sparse places single-qubit Paulis.✅ pass
test_identityidentity(n) is +I...I.✅ pass
test_mul_signs(-X)*(Y) carries the - through: = -iZ.✅ pass
test_mul_xy_is_izX * Y = +iZ.✅ pass
test_mul_yx_is_minus_izY * X = -iZ.✅ pass
test_mul_zz_is_identityZ * Z = +I.✅ pass
test_parse_repr_roundtripParsing then repr is the identity for signed Paulis.✅ pass