internal_merge_by_indices#
- ssip.coequalisers.internal_merge_by_indices(C: CSScode, indices1: list[int], indices2: list[int], basis: str = 'Z', depth: int = 1, return_data: bool = False) CSScode | MergeResult | None [source]#
Construct an internal merge within one CSS codeblock, along two disjoint logical operators.
- Parameters:
C – The CSScode to merge within.
indices1 – The qubits in the support of the first logical operator.
indices2 – The qubits in the support of the second logical operator.
basis – The basis, X or Z, to perform the logical measurement in.
depth – The depth of the merge, i.e. how large to make the tensor product intermediate code.
return_data – Whether to calculate a MergeResult rather than a CSScode output. The MergeResult includes substantially more data about the merge.
- Returns:
The merged CSScode, or the MergeResult object which contains the CSScode, or None if no merge can be found.