Skip to content

bloqade.lanes.bytecode.Instruction

← Module overview

classInstructionsource

bloqade.lanes.bytecode.Instruction

A single bytecode instruction.

class Instruction

Instructions are created via static factory methods — there is no direct constructor. All instances are immutable.

Instruction categories:

  • Constants: Push typed values onto the stack.
  • Stack: Manipulate the operand stack (pop, dup, swap).
  • Atom ops: Fill sites and move atoms (initial_fill, fill, move).
  • Gates: Quantum gate operations (local_r, local_rz, global_r, global_rz, cz).
  • Measurement: Measure atoms and await results.
  • Arrays: Construct and index arrays (new_array, get_item).
  • Data: Build detector and observable records.
  • Control flow: Return and halt.