external_merge_by_indices#
- ssip.pushouts.external_merge_by_indices(C: CSScode, D: CSScode, indices1: list[int], indices2: list[int], basis: str = 'Z', depth: int = 1, return_data: bool = False) CSScode | MergeResult | None [source]#
Construct an external merge between two CSS codeblocks, along two logical operators.
- Parameters:
C – The first CSS codeblock.
D – The second CSS codeblock.
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 could be found.