tqecd.boundary.BoundaryStabilizer#
- class BoundaryStabilizer(stabilizer: PauliString, collapsing_operations: Iterable[PauliString], measurements: list[RelativeMeasurementLocation], reset_qubits: frozenset[int], forward: bool)[source]#
- __init__(stabilizer: PauliString, collapsing_operations: Iterable[PauliString], measurements: list[RelativeMeasurementLocation], reset_qubits: frozenset[int], forward: bool)[source]#
- Represents a stabilizer that has been propagated and is now at the boundary of a - Fragment.- Raises:
- TQECDException – if - source_qubitsis empty.
- Parameters:
- stabilizer – The propagated stabilizer before any collapsing operation has been applied. 
- collapsing_operations – The collapsing operations the stabilizer will have to go through to exit the - Fragment.
- measurements – measurement offsets relative to the end of the fragment (even if the created - BoundaryStabilizerinstance represents a stabilizer on the beginning boundary) of measurements that are involved in this stabilizer.
- reset_qubits – index of the qubit on which reset operations touching the flow are applied. Depending on the value of - forward, these indices can either be sources of the stabilizer (if- forwardis- True) or sinks that may or may not commute with the resulting stabilizer.
- forward – - Trueif the stabilizer propagated forward (i.e., ends on measurements), else- False.
 
 
 - Methods - __init__(stabilizer, collapsing_operations, ...)- Represents a stabilizer that has been propagated and is now at the boundary of a - Fragment.- coordinates(qubit_coordinates)- Compute and return the coordinates of the boundary stabilizer. - is_trivial()- merge(other)- Merge two boundary stabilizers together. - with_measurement_offset(offset)- Attributes - after_collapse- Compute the stabilizer obtained after applying the collapsing operations. - before_collapse- Return the stabilizer obtained before applying the collapsing operations. - collapsing_operations- Iterator on all the collapsing operations defining the boundary this stabilizer is applied to. - has_anticommuting_operations- Check if the instance represents a stabilizer that anti-commutes with at least one of its collapsing operations. - measurements- resets_qubits- source_qubits