measure_single_logical_qubit

measure_single_logical_qubit#

ssip.auto_surgeries.measure_single_logical_qubit(C: CSScode, indices: list[int], basis: str = 'Z', depth: int = 1, return_data: bool = False) CSScode | MergeResult[source]#

Takes a CSS code and measures a logical qubit in the manner of https://arxiv.org/abs/2110.10794, in either the Z or X basis.

Parameters:
  • C – The CSScode.

  • indices – The indices of the logical operator to be measured out.

  • basis – The basis of the measurement.

  • depth – Controls the size of the ancilla code used for measurement.

  • return_data – Whether to return a MergeResult or a CSScode object.

Returns:

The merged CSScode, or the MergeResult object which contains the CSScode.