Loom + Entwine = Loom Design¶
Entwine and Loom are designed to complement one another, forming a natural workflow for both designing and executing lattice surgery protocols. Entwine gives you an interactive, visual environment to build and explore ideas, while Loom provides the verification and programmatic backend to make those ideas rigorous and executable.
The Two-Step Process¶
-
Lattice surgery checker inside Entwine
- Loom is actively running while you draw and edit within Entwine.
- Every proposed lattice surgery operation is checked against Loom’s verification rules, ensuring correctness.
- This means that your constructions are both intuitive and formally validated in real time.
-
Code generation for execution
- Entwine can generate the corresponding Loom code for any construction.
- You can copy and paste this directly into a Python script or Jupyter notebook to run with Loom.
- If you prefer, Entwine can also generate EKA representations.
An example¶
GUI + Python¶
Using Entwine and Loom together gives you the best of both worlds:
-
Interactive exploration
Entwine is ideal for quickly sketching and testing out complex lattice surgery constructions, where having a visual interface makes it easier to reason about patch geometry and operations. -
Scalability
There is technically no limit to the number of patches you can define in Entwine.
In practice, once you go beyond about 60–70 patches, the visualisation becomes challenging to follow — but we’re eager to see how far users will push this. -
Bridging design and execution
By exporting Loom code, you can design the bulk of your logic interactively in Entwine, and then refine or extend it programmatically in Loom.
This workflow allows you to polish, automate, and reproduce your results with the precision of code.
The Sweet Spot¶
Entwine is the place to prototype and visualise. Loom is the place to validate and execute.
Together, they provide a complete workflow for anyone working with surface codes and lattice surgery — from the early sketch to the final simulation.