Skip to content

Introduction to Entwine

Entwine is a visual and interactive environment for designing and executing lattice surgery protocols. It combines drawing tools with live code generation and powerful visualisation, making it easier to bridge the gap between conceptual design and executable quantum error correction workflows.


The Draw Tab

At the heart of Entwine is the Draw tab.

  • On the canvas, you can create logical qubits as blocks of stabilisers, choosing between X and Z stabilisers to define the structure of your surface code patches.
  • Once defined, you can perform logical operations on these blocks through sequences of lattice surgery steps: grow, split, merge, and shrink.
  • The canvas gives you real-time feedback on stabilisers, patches, and logical qubits, allowing you to explore complex constructions interactively.

To the right of the canvas, Entwine displays the Loom code corresponding to your current design.

  • Every stabiliser, logical block, and lattice surgery operation you draw is translated on-the-fly into valid Loom syntax.
  • This allows you to see immediately how your graphical design maps to the underlying executable code.
  • The code is fully copy-pasteable, making it simple to export into a Python script or Jupyter notebook for further refinement or execution in Loom.

The draw tab in entwime


The Output Tab

The Output tab provides multiple representations of your design:

  • The raw Loom code, ready to run in Python.
  • Translated code in a variety of formats, including:
  • QASM
  • Stim
  • EKA

This means you can use Entwine to easily generate code for Loom, Stim, and Qiskit simulators!

The output tab in entwime


The 3D Visualiser

The third tab of Entwine features a 3D visualiser.

  • This visualisation shows the evolution of patches over time, with time represented on the z-axis.
  • It allows you to see lattice surgery protocols unfold as a sequence of operations, making the dynamics of patch manipulation more intuitive.

The 3D tab in entwime


Putting It All Together

  • Use the Draw tab to create logical qubits and design operations visually.
  • Watch as Entwine generates the corresponding Loom code in real time.
  • Inspect or export the code and derived outputs (QASM, Stim, EKA) from the Output tab.
  • Explore the 3D visualiser to better understand how your patches evolve over time.