pygsti.objects.WeightedGateString.from_pythonstr¶
-
WeightedGateString.
from_pythonstr
(pythonString, gateLabels)¶ Create a GateString from a python string where each gate label is represented as a single character, starting with ‘A’ and contining down the alphabet. This performs the inverse of to_pythonstr(...).
Parameters: - pythonString (string) – string whose individual characters correspond to the gate labels of a gate string.
- gateLabels (tuple) – tuple containing all the gate labels that will be mapped to alphabet characters, beginning with ‘A’.
Returns: Return type: Examples
“AABA” => (‘Gx’,’Gx’,’Gy’,’Gx’)