string_operator
ΒΆ
Post-processing for string operator.
magsq_core
ΒΆ
Post Processing - String Operator - String Operator Core
(qurry.process.string_operator.strop_core
)
- qurry.process.string_operator.strop_core.add_or_reducer(bitstring)ΒΆ
The add or reduce function. If the sum of the bitstring is even, return 1. If the sum of the bitstring is odd, return -1.
- Parameters:
bitstring (str) β The bitstring.
- Returns:
1 or -1.
- Return type:
Literal[1, -1]
- qurry.process.string_operator.strop_core.string_operator_core(shots: int, counts: list[dict[str, int]], backend: Literal['Cython', 'Rust', 'Python'] | str = 'Rust') float | float64 [source]ΒΆ
The core function of magnet square by Python and Rust.
- Parameters:
- Returns:
String operator value.
- Return type:
Union[float, np.float64]
string_operator
ΒΆ
Post Processing - String Operator - String Operator
(qurry.process.string_operator.string_operator
)
- qurry.process.string_operator.string_operator.string_operator_order(shots: int, counts: list[dict[str, int]], backend: Literal['Cython', 'Rust', 'Python'] | str = 'Rust', pbar: tqdm | None = None) StringOperator [source]ΒΆ
Calculate the order of the string operator.
- Reference:
Note
Crossing a topological phase transition with a quantum computer -
Smith, Adam and Jobst, Bernhard and Green, Andrew G. and Pollmann, Frank, [PhysRevResearch.4.L022020](https://link.aps.org/doi/10.1103/PhysRevResearch.4.L022020)
- Parameters:
- Returns:
String Operator.
- Return type: