paulie.common.pauli_string_parser.pauli_string_parser#
- paulie.common.pauli_string_parser.pauli_string_parser(pauli_string)#
Parse a compact Pauli string representation and return the expanded form.
For example, X_4s10 is expanded to IIIXIIIIII and ZYX_4s10 is expanded to ZYIXIIIIII.
- Parameters:
pauli_string (str) – Compact string representation of the Pauli string.
- Returns:
Expanded Pauli string with I’s in unspecified positions.
- Return type:
- Raises:
ValueError – If the input string format is invalid.