Module bytecode

Module bytecode 

Source
Expand description

Bytecode instruction set, program format, and validation.

Every instruction is a fixed 16-byte word: a 32-bit opcode followed by three 32-bit data words, all little-endian. The opcode packs a device code (low byte) and instruction code (next byte).

§Modules

  • instruction — high-level instruction enum
  • opcode — device codes, instruction codes, opcode packing/decoding
  • encode — binary encoding/decoding of instructions to/from 16-byte words
  • programProgram type with BLQD binary serialization
  • text — SST text assembly format (human-readable parse/print)
  • validate — structural, address, and stack-simulation validation

Re-exports§

pub use crate::arch::addr::Direction;
pub use crate::arch::addr::LaneAddr;
pub use crate::arch::addr::LocationAddr;
pub use crate::arch::addr::MoveType;
pub use crate::arch::addr::ZoneAddr;
pub use encode::DecodeError;
pub use instruction::ArrayInstruction;
pub use instruction::AtomArrangementInstruction;
pub use instruction::CpuInstruction;
pub use instruction::DetectorObservableInstruction;
pub use instruction::Instruction;
pub use instruction::LaneConstInstruction;
pub use instruction::MeasurementInstruction;
pub use instruction::QuantumGateInstruction;
pub use opcode::DeviceCode;
pub use program::Program;
pub use program::ProgramError;
pub use text::ParseError;
pub use validate::ValidationError;
pub use value::ArrayValue;
pub use value::CpuValue;
pub use value::DeviceValue;
pub use value::Value;

Modules§

encode
instruction
opcode
program
text
SST text assembly format — human-readable parse and print for bytecode programs.
validate
Bytecode program validation: structural checks, address validation, and stack-type simulation.
value