Skip to content

Patches and Stabilisers

In Entwine, creating stabilisers is straightforward and interactive. Stabilisers are essential building blocks for defining the constraints of your quantum error-correcting codes, and the tool makes it easy to generate them directly on the lattice.


Creating a Stabiliser

To create a stabiliser in Entwine:

  1. Select vertices – Hold down your mouse (or trackpad) and drag over the vertices (qubits) you want to include in the stabiliser.
  2. Choose stabiliser type:
    • Z-type stabilisers – Select qubits normally.
    • X-type stabilisers – Select qubits while holding Shift.

This direct selection workflow allows you to quickly define stabilisers as you design and experiment with patch layouts.


Types of Stabilisers

Entwine supports the two common stabiliser types used in quantum error correction:

  • Z Stabilisers
    • Constructed by selecting qubits normally.
    • Appearance: Displayed in orange.
    • Use case: These measure products of Pauli-Z operators on selected qubits.

Creating an Z-Stabiliser

Z-stabilisers

  • X Stabilisers
    • Constructed by selecting qubits while holding Shift.
    • Appearance: Displayed in blue.
    • Use case: These measure products of Pauli-X operators on selected qubits.

Creating an X-Stabiliser

X-stabilisers


Freehand Mode

In addition to selecting qubits directly, Entwine also provides a Freehand Mode for more flexible stabiliser creation.

  • To toggle Freehand Mode, press the f key.
  • Once active, you can draw freely on the lattice, and any qubit circled by your drawing will be included in the stabiliser.
  • Both irregular and convex shapes are supported, allowing you to quickly outline clusters of qubits without needing to click them individually.

This feature is especially useful when working with larger or more complex patches, where manual selection would be time-consuming.

Tips and Best Practices

  • Use color cues to double-check the type of stabiliser you’ve created.
  • Remember that the choice of X vs Z stabilisers affects the code’s ability to detect and correct different error types.
  • Experiment with different patches to better understand stabiliser code layouts before committing to a full design.
  • Try out Freehand Mode for faster selection when dealing with irregular patterns or larger stabiliser regions.