SubSwapGate.decode_qudit_level_string

static SubSwapGate.decode_qudit_level_string(string)[source]

Decode the qudit level string into two pairs of integers.

Parameters:

string (str) – The qudit level string to decode. See the SubSwapGate documentation for more info on the format.

Returns:

The two two-qudit

levels to swap, i.e., “0,1;2,0” to swap |01> to |20>.

Return type:

tuple[tuple[int, int], tuple[int, int]]

Raises:

ValueError – See SubSwapGate documentation for more info.