In Stim, TICK
is an instruction that does nothing except indicate the passage of time. Conceptually, ticks split the circuit up into steps. Ticks have no effect on simulations, but are very useful for other purposes. For example:
- A function adding noise annotations to a circuit can use
TICK
instructions as a signal to insert errors related to idling.
- A function creating a diagram of a circuit can use
TICK
instructions to divide the diagram into steps, instead of drawing one big ball of operations.
- An error diagnostic can say the
TICK
closest to a problem.
could someone explain to me what the ValueError message is saying?
The error message is saying that you asked for errors to be decomposed into graphlike pieces, but it can't figure out how to do that. Probably the 3 listed symptoms always come together, never as just 1 or 2, so it's impossible to tell if one is safe to separate from the others without breaking some important invariant (like color conservation in the color code). Typically you'd fix this by correcting a detector declaration, or by not passing decompose_errors=True
if you're not using a graphlike code, or by passing ignore_decomposition_failures=True
to just YOLO forward.
What is the TICK layer referring to here?
The TICK part of the message is telling you roughly where the problem is happening by telling you how many TICK instructions were executed in the circuit before running into the problem. You can use this information to debug the problem.
The error message says the problem is near TICK 773 and involves detectors D1368 D1369 D1424. For example, you can use this with stim.Circuit.diagram
. Running
circuit.diagram(
"detslice-with-ops-svg",
tick=range(770, 790),
filter_coords=["D1368", "D1369", "D1424"],
)
should give you an SVG image of what's going on with those three detectors at that time.