[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78273Y64AWMEQ5NTD7RB4E7":3,"skill-same:01M78273Y64AWMEQ5NTD7RB4E7":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":38,"ownerHtmlUrl":39,"ownerBlogUrl":6,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M78273Y64AWMEQ5NTD7RB4E7","aglais-xqvm-quantum-vm",null,"Expertise in Aglais XQVM, a hardware-agnostic Rust quantum virtual machine for QUBO\u002FIsing binary optimization models targeting quantum annealers.","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fskills_sh\u002Fs\u002Fskills-sh_aradotso_trending-skills_aglais-xqvm-quantum-vm\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: aglais-xqvm-quantum-vm\ndescription: Expertise in Aglais XQVM, a hardware-agnostic Rust quantum virtual machine for QUBO\u002FIsing binary optimization models targeting quantum annealers.\ntriggers:\n  - quantum virtual machine rust\n  - QUBO ising model bytecode\n  - xqasm assembler quantum\n  - quantum annealer optimization rust\n  - aglais xqvm bytecode\n  - binary optimization quantum vm\n  - xqbc bytecode format\n  - travelling salesman QUBO rust\n---\n\n# Aglais XQVM Skill\n\n> Skill by [ara.so](https:\u002F\u002Fara.so) — Daily 2026 Skills collection.\n\nAglais XQVM is a hardware-agnostic virtual machine for quantum computing written in Rust. It provides a unified bytecode intermediate representation for binary optimization problems (QUBO\u002FIsing formulations) targeting quantum annealers — think LLVM for quantum computing. The VM is stack-based with a 256-slot register file, supports `no_std + alloc` for WASM\u002Fbare-metal deployment, and ships four crates: bytecode, assembler, disassembler, and interpreter.\n\n## Installation & Setup\n\n### Prerequisites\n\n```sh\n# Install Rust stable\ncurl --proto '=https' --tlsv1.2 -sSf https:\u002F\u002Fsh.rustup.rs | sh\n\n# Install dev tools (cargo-nextest, clippy, etc.)\nmake deps\n```\n\n### Build from source\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002FQuipNetwork\u002Fxq-rs\ncd xq-rs\ncargo build --release\n# Binaries: target\u002Frelease\u002Fxqasm, target\u002Frelease\u002Fxqdism, target\u002Frelease\u002Fxqvm\n```\n\n### Add as a library dependency\n\n```toml\n# Cargo.toml\n[dependencies]\naglais-xqvm-bytecode = { path = \"crates\u002Fbytecode\" }\naglais-xqvm-vm       = { path = \"crates\u002Fvm\" }\n```\n\nFor `no_std` environments (WASM, bare-metal):\n\n```toml\n[dependencies]\naglais-xqvm-bytecode = { path = \"crates\u002Fbytecode\", default-features = false, features = [\"alloc\"] }\n```\n\n## Workspace Crate Overview\n\n| Crate | Binary | Role |\n|---|---|---|\n| `aglais-xqvm-bytecode` | — | Opcode table, instruction types, builder, binary codec, stream reader |\n| `aglais-xqvm-asm` | `xqasm` | Text assembler: `.xqasm` → `.xqbc` bytecode |\n| `aglais-xqvm-disasm` | `xqdism` | Bytecode → human-readable listing |\n| `aglais-xqvm-vm` | `xqvm` | Bytecode interpreter: stack, registers, QUBO\u002FIsing execution |\n\n## CLI Commands\n\n### `xqasm` — Assembler\n\n```sh\n# Assemble a source file to bytecode\nxqasm program.xqasm -o program.xqbc\n\n# Assemble with verbose output\nxqasm program.xqasm -o program.xqbc --verbose\n```\n\n### `xqdism` — Disassembler\n\n```sh\n# Inspect bytecode encoding as human-readable listing\nxqdism program.xqbc\n\n# Pipe to file\nxqdism program.xqbc > listing.txt\n```\n\n### `xqvm` — Interpreter\n\n```sh\n# Execute bytecode\nxqvm program.xqbc\n\n# Run with debug output (if supported)\nxqvm program.xqbc --debug\n```\n\n### Full pipeline\n\n```sh\nxqasm problem.xqasm -o problem.xqbc && xqdism problem.xqbc && xqvm problem.xqbc\n```\n\n## XQASM Language Reference\n\nThe assembler accepts `.xqasm` text files. The VM is stack-based; most instructions pop operands from the stack and push results.\n\n### Basic stack operations\n\n```asm\n; push two integers and add them\nPUSH 10\nPUSH 32\nADD\nHALT\n```\n\n### Registers (0–255)\n\n```asm\nPUSH 42\nSTORE 0        ; pop stack → register 0\nLOAD  0        ; push register 0 → stack\n```\n\n### Arithmetic\n\n```asm\nPUSH 10\nPUSH 3\nADD            ; stack: [13]\nPUSH 7\nSUB            ; stack: [6]\nPUSH 2\nMUL            ; stack: [12]\nPUSH 4\nDIV            ; stack: [3]\n```\n\n### Vectors \u002F integer arrays\n\n```asm\n; build a 3-element vector [1, 2, 3]\nPUSH 1\nPUSH 2\nPUSH 3\nPUSH 3         ; length\nVEC            ; stack: [Vec([1,2,3])]\nSTORE 1\n```\n\n### QUBO \u002F Ising model construction\n\n```asm\n; XQMX_NEW n creates an n-variable QUBO model\nPUSH 4\nXQMX_NEW       ; stack: [XqmxModel(4 vars)]\nSTORE 2\n\n; set quadratic coupling Q[i][j] = weight\nLOAD  2\nPUSH  0        ; i\nPUSH  1        ; j\nPUSH  -1       ; weight (integer encoding)\nXQMX_SET_Q    ; modifies model in reg 2\n\n; set linear bias h[i] = weight\nLOAD  2\nPUSH  0\nPUSH  5\nXQMX_SET_H\n\n; evaluate energy of a candidate solution\nLOAD  2        ; model\nPUSH  0        ; sample register (XqmxSample)\nXQMX_EVAL     ; pushes energy onto stack\n```\n\n### Control flow & iteration\n\n```asm\n; RANGE lo hi → loop stack entry, ITER steps through it\nPUSH 0\nPUSH 5\nRANGE          ; loop i in 0..5\nITER           ; advance; jumps past matching END_ITER when done\n  LOAD 0\n  PUSH 1\n  ADD\n  STORE 0\nEND_ITER\n\nHALT\n```\n\n### Labels and jumps\n\n```asm\n  PUSH 0\nloop:\n  PUSH 1\n  ADD\n  DUP\n  PUSH 10\n  LT\n  JMP_TRUE loop\nHALT\n```\n\n## Rust API: Bytecode Builder\n\nUse `aglais-xqvm-bytecode` to construct programs programmatically:\n\n```rust\nuse aglais_xqvm_bytecode::{BytecodeBuilder, Instruction, Opcode};\n\nfn build_add_program() -> Vec\u003Cu8> {\n    let mut builder = BytecodeBuilder::new();\n\n    builder.emit(Instruction::Push(10));\n    builder.emit(Instruction::Push(32));\n    builder.emit(Instruction::Add);\n    builder.emit(Instruction::Halt);\n\n    builder.finish()\n}\n```\n\n### Decoding bytecode (stream reader)\n\n```rust\nuse aglais_xqvm_bytecode::StreamReader;\n\nfn decode(bytes: &[u8]) {\n    let mut reader = StreamReader::new(bytes);\n    while let Some(instr) = reader.next_instruction().unwrap() {\n        println!(\"{:?}\", instr);\n    }\n}\n```\n\n## Rust API: Running the VM\n\n```rust\nuse aglais_xqvm_vm::Vm;\n\nfn main() {\n    \u002F\u002F Load bytecode from a file\n    let bytecode = std::fs::read(\"program.xqbc\").expect(\"read bytecode\");\n\n    let mut vm = Vm::new();\n    vm.load(&bytecode).expect(\"load\");\n    vm.run().expect(\"run\");\n\n    \u002F\u002F Inspect top of stack after execution\n    if let Some(val) = vm.stack_top() {\n        println!(\"Result: {:?}\", val);\n    }\n}\n```\n\n### Accessing registers after execution\n\n```rust\nuse aglais_xqvm_vm::{Vm, Value};\n\nfn run_and_inspect(bytecode: &[u8]) -> Value {\n    let mut vm = Vm::new();\n    vm.load(bytecode).unwrap();\n    vm.run().unwrap();\n    vm.register(0).cloned().unwrap_or(Value::Int(0))\n}\n```\n\n## Real-World Pattern: TSP as QUBO\n\nThe `crates\u002Fvm\u002Fexamples\u002Ftsp\u002F` directory contains a complete Travelling Salesman Problem encoded as a QUBO driven by a Rust harness. The pattern is:\n\n1. **Generate coefficients** in a Rust harness (problem-specific math).\n2. **Emit `.xqasm`** files parameterised by those coefficients.\n3. **Assemble + run** with `xqasm` \u002F `xqvm`.\n\n```rust\n\u002F\u002F crates\u002Fvm\u002Fexamples\u002Ftsp\u002Fmain.rs pattern\nuse std::process::Command;\n\nfn assemble_and_run(src: &str, out: &str) {\n    let asm = Command::new(\"xqasm\")\n        .args([src, \"-o\", out])\n        .status()\n        .expect(\"xqasm failed\");\n    assert!(asm.success());\n\n    let run = Command::new(\"xqvm\")\n        .arg(out)\n        .status()\n        .expect(\"xqvm failed\");\n    assert!(run.success());\n}\n\nfn main() {\n    assemble_and_run(\"init.xqasm\",    \"init.xqbc\");\n    assemble_and_run(\"problem.xqasm\", \"problem.xqbc\");\n    assemble_and_run(\"eval.xqasm\",    \"eval.xqbc\");\n}\n```\n\n## Common Patterns\n\n### Pattern: build a QUBO model in assembly\n\n```asm\n; 2-variable QUBO: minimise x0 - x1 + 2*x0*x1\nPUSH 2\nXQMX_NEW\nSTORE 0\n\nLOAD 0\nPUSH 0\nPUSH -1        ; h[0] = -1  (linear)\nXQMX_SET_H\n\nLOAD 0\nPUSH 1\nPUSH -1        ; h[1] = -1  (linear)\nXQMX_SET_H\n\nLOAD 0\nPUSH 0\nPUSH 1\nPUSH 2         ; Q[0][1] = 2 (quadratic)\nXQMX_SET_Q\n\nHALT\n```\n\n### Pattern: iterate over model variables\n\n```asm\nPUSH 4\nXQMX_NEW\nSTORE 0\n\nPUSH 0\nPUSH 4\nRANGE\nITER\n  ; register 1 holds current loop index after ITER\n  LOAD  0\n  LOAD  1      ; index i\n  LOAD  1      ; index i (diagonal → linear term)\n  PUSH  -1\n  XQMX_SET_Q\nEND_ITER\n\nHALT\n```\n\n### Pattern: no_std bytecode decoding (WASM)\n\n```rust\n#![no_std]\nextern crate alloc;\n\nuse alloc::vec::Vec;\nuse aglais_xqvm_bytecode::StreamReader;\n\npub fn decode_instructions(bytes: &[u8]) -> Vec\u003Calloc::string::String> {\n    let mut reader = StreamReader::new(bytes);\n    let mut out = Vec::new();\n    while let Ok(Some(instr)) = reader.next_instruction() {\n        out.push(alloc::format!(\"{:?}\", instr));\n    }\n    out\n}\n```\n\n## Development Workflow\n\n```sh\n# Run all lints and tests (mirrors CI)\nmake all\n\n# Run only tests\ncargo test --workspace\n\n# Run lints\ncargo clippy --workspace --all-targets -- -D warnings\n\n# Format\ncargo fmt --all\n\n# Run a specific example\ncargo run --example tsp --manifest-path crates\u002Fvm\u002FCargo.toml\n```\n\n## Instruction Set Quick Reference\n\nThe opcode table in `crates\u002Fbytecode\u002Fsrc\u002Ftypes\u002Ftable.rs` is the single source of truth for all **76 instructions**. Key categories:\n\n| Category | Instructions |\n|---|---|\n| Stack | `PUSH`, `POP`, `DUP`, `SWAP` |\n| Registers | `LOAD`, `STORE` |\n| Arithmetic | `ADD`, `SUB`, `MUL`, `DIV`, `NEG` |\n| Comparison | `EQ`, `LT`, `GT`, `LE`, `GE` |\n| Control flow | `JMP`, `JMP_TRUE`, `JMP_FALSE`, `CALL`, `RET`, `HALT` |\n| Iteration | `RANGE`, `ITER`, `END_ITER` |\n| Vectors | `VEC`, `VEC_GET`, `VEC_SET`, `VEC_LEN` |\n| QUBO\u002FIsing | `XQMX_NEW`, `XQMX_SET_Q`, `XQMX_SET_H`, `XQMX_EVAL`, `XQMX_SAMPLE` |\n\nAll operands are big-endian. The binary format is a bare instruction stream with no file header.\n\n## Troubleshooting\n\n### `xqasm: command not found`\n\nEnsure `target\u002Frelease` is on `$PATH` or use the full path:\n\n```sh\nexport PATH=\"$PWD\u002Ftarget\u002Frelease:$PATH\"\n```\n\n### Stack underflow at runtime\n\nThe VM is strictly stack-based. Every instruction that pops values requires them to be present. Check that `PUSH` \u002F `LOAD` precedes every operation, and that loops don't consume values without restoring the stack balance.\n\n### `ITER` never terminates\n\n`RANGE` pushes loop bounds onto the **loop stack** (separate from the value stack). Ensure every `RANGE` has a matching `END_ITER` and that the range bounds (`lo`, `hi`) are pushed in the correct order (`lo` first, `hi` second).\n\n### Build fails in `no_std` environment\n\nDisable default features and enable the `alloc` feature on `aglais-xqvm-bytecode`:\n\n```toml\naglais-xqvm-bytecode = { ..., default-features = false, features = [\"alloc\"] }\n```\n\nThe VM crate (`aglais-xqvm-vm`) requires `std` and is not suitable for bare-metal.\n\n### Inspecting unexpected bytecode\n\nUse `xqdism` to verify the assembler output before running:\n\n```sh\nxqasm suspect.xqasm -o suspect.xqbc\nxqdism suspect.xqbc   # check instruction sequence and operand values\nxqvm   suspect.xqbc\n```\n\n## License\n\nAGPL-3.0-or-later. Embedding in proprietary network services requires source disclosure under the AGPL.\n","# Aglais XQVM Skill\n\n> Skill by [ara.so](https:\u002F\u002Fara.so) — Daily 2026 Skills collection.\n\nAglais XQVM is a hardware-agnostic virtual machine for quantum computing written in Rust. It provides a unified bytecode intermediate representation for binary optimization problems (QUBO\u002FIsing formulations) targeting quantum annealers — think LLVM for quantum computing. The VM is stack-based with a 256-slot register file, supports `no_std + alloc` for WASM\u002Fbare-metal deployment, and ships four crates: bytecode, assembler, disassembler, and interpreter.\n\n## Installation & Setup\n\n### Prerequisites\n\n```sh\n# Install Rust stable\ncurl --proto '=https' --tlsv1.2 -sSf https:\u002F\u002Fsh.rustup.rs | sh\n\n# Install dev tools (cargo-nextest, clippy, etc.)\nmake deps\n```\n\n### Build from source\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002FQuipNetwork\u002Fxq-rs\ncd xq-rs\ncargo build --release\n# Binaries: target\u002Frelease\u002Fxqasm, target\u002Frelease\u002Fxqdism, target\u002Frelease\u002Fxqvm\n```\n\n### Add as a library dependency\n\n```toml\n# Cargo.toml\n[dependencies]\naglais-xqvm-bytecode = { path = \"crates\u002Fbytecode\" }\naglais-xqvm-vm       = { path = \"crates\u002Fvm\" }\n```\n\nFor `no_std` environments (WASM, bare-metal):\n\n```toml\n[dependencies]\naglais-xqvm-bytecode = { path = \"crates\u002Fbytecode\", default-features = false, features = [\"alloc\"] }\n```\n\n## Workspace Crate Overview\n\n| Crate | Binary | Role |\n|---|---|---|\n| `aglais-xqvm-bytecode` | — | Opcode table, instruction types, builder, binary codec, stream reader |\n| `aglais-xqvm-asm` | `xqasm` | Text assembler: `.xqasm` → `.xqbc` bytecode |\n| `aglais-xqvm-disasm` | `xqdism` | Bytecode → human-readable listing |\n| `aglais-xqvm-vm` | `xqvm` | Bytecode interpreter: stack, registers, QUBO\u002FIsing execution |\n\n## CLI Commands\n\n### `xqasm` — Assembler\n\n```sh\n# Assemble a source file to bytecode\nxqasm program.xqasm -o program.xqbc\n\n# Assemble with verbose output\nxqasm program.xqasm -o program.xqbc --verbose\n```\n\n### `xqdism` — Disassembler\n\n```sh\n# Inspect bytecode encoding as human-readable listing\nxqdism program.xqbc\n\n# Pipe to file\nxqdism program.xqbc > listing.txt\n```\n\n### `xqvm` — Interpreter\n\n```sh\n# Execute bytecode\nxqvm program.xqbc\n\n# Run with debug output (if supported)\nxqvm program.xqbc --debug\n```\n\n### Full pipeline\n\n```sh\nxqasm problem.xqasm -o problem.xqbc && xqdism problem.xqbc && xqvm problem.xqbc\n```\n\n## XQASM Language Reference\n\nThe assembler accepts `.xqasm` text files. The VM is stack-based; most instructions pop operands from the stack and push results.\n\n### Basic stack operations\n\n```asm\n; push two integers and add them\nPUSH 10\nPUSH 32\nADD\nHALT\n```\n\n### Registers (0–255)\n\n```asm\nPUSH 42\nSTORE 0        ; pop stack → register 0\nLOAD  0        ; push register 0 → stack\n```\n\n### Arithmetic\n\n```asm\nPUSH 10\nPUSH 3\nADD            ; stack: [13]\nPUSH 7\nSUB            ; stack: [6]\nPUSH 2\nMUL            ; stack: [12]\nPUSH 4\nDIV            ; stack: [3]\n```\n\n### Vectors \u002F integer arrays\n\n```asm\n; build a 3-element vector [1, 2, 3]\nPUSH 1\nPUSH 2\nPUSH 3\nPUSH 3         ; length\nVEC            ; stack: [Vec([1,2,3])]\nSTORE 1\n```\n\n### QUBO \u002F Ising model construction\n\n```asm\n; XQMX_NEW n creates an n-variable QUBO model\nPUSH 4\nXQMX_NEW       ; stack: [XqmxModel(4 vars)]\nSTORE 2\n\n; set quadratic coupling Q[i][j] = weight\nLOAD  2\nPUSH  0        ; i\nPUSH  1        ; j\nPUSH  -1       ; weight (integer encoding)\nXQMX_SET_Q    ; modifies model in reg 2\n\n; set linear bias h[i] = weight\nLOAD  2\nPUSH  0\nPUSH  5\nXQMX_SET_H\n\n; evaluate energy of a candidate solution\nLOAD  2        ; model\nPUSH  0        ; sample register (XqmxSample)\nXQMX_EVAL     ; pushes energy onto stack\n```\n\n### Control flow & iteration\n\n```asm\n; RANGE lo hi → loop stack entry, ITER steps through it\nPUSH 0\nPUSH 5\nRANGE          ; loop i in 0..5\nITER           ; advance; jumps past matching END_ITER when done\n  LOAD 0\n  PUSH 1\n  ADD\n  STORE 0\nEND_ITER\n\nHALT\n```\n\n### Labels and jumps\n\n```asm\n  PUSH 0\nloop:\n  PUSH 1\n  ADD\n  DUP\n  PUSH 10\n  LT\n  JMP_TRUE loop\nHALT\n```\n\n## Rust API: Bytecode Builder\n\nUse `aglais-xqvm-bytecode` to construct programs programmatically:\n\n```rust\nuse aglais_xqvm_bytecode::{BytecodeBuilder, Instruction, Opcode};\n\nfn build_add_program() -> Vec\u003Cu8> {\n    let mut builder = BytecodeBuilder::new();\n\n    builder.emit(Instruction::Push(10));\n    builder.emit(Instruction::Push(32));\n    builder.emit(Instruction::Add);\n    builder.emit(Instruction::Halt);\n\n    builder.finish()\n}\n```\n\n### Decoding bytecode (stream reader)\n\n```rust\nuse aglais_xqvm_bytecode::StreamReader;\n\nfn decode(bytes: &[u8]) {\n    let mut reader = StreamReader::new(bytes);\n    while let Some(instr) = reader.next_instruction().unwrap() {\n        println!(\"{:?}\", instr);\n    }\n}\n```\n\n## Rust API: Running the VM\n\n```rust\nuse aglais_xqvm_vm::Vm;\n\nfn main() {\n    \u002F\u002F Load bytecode from a file\n    let bytecode = std::fs::read(\"program.xqbc\").expect(\"read bytecode\");\n\n    let mut vm = Vm::new();\n    vm.load(&bytecode).expect(\"load\");\n    vm.run().expect(\"run\");\n\n    \u002F\u002F Inspect top of stack after execution\n    if let Some(val) = vm.stack_top() {\n        println!(\"Result: {:?}\", val);\n    }\n}\n```\n\n### Accessing registers after execution\n\n```rust\nuse aglais_xqvm_vm::{Vm, Value};\n\nfn run_and_inspect(bytecode: &[u8]) -> Value {\n    let mut vm = Vm::new();\n    vm.load(bytecode).unwrap();\n    vm.run().unwrap();\n    vm.register(0).cloned().unwrap_or(Value::Int(0))\n}\n```\n\n## Real-World Pattern: TSP as QUBO\n\nThe `crates\u002Fvm\u002Fexamples\u002Ftsp\u002F` directory contains a complete Travelling Salesman Problem encoded as a QUBO driven by a Rust harness. The pattern is:\n\n1. **Generate coefficients** in a Rust harness (problem-specific math).\n2. **Emit `.xqasm`** files parameterised by those coefficients.\n3. **Assemble + run** with `xqasm` \u002F `xqvm`.\n\n```rust\n\u002F\u002F crates\u002Fvm\u002Fexamples\u002Ftsp\u002Fmain.rs pattern\nuse std::process::Command;\n\nfn assemble_and_run(src: &str, out: &str) {\n    let asm = Command::new(\"xqasm\")\n        .args([src, \"-o\", out])\n        .status()\n        .expect(\"xqasm failed\");\n    assert!(asm.success());\n\n    let run = Command::new(\"xqvm\")\n        .arg(out)\n        .status()\n        .expect(\"xqvm failed\");\n    assert!(run.success());\n}\n\nfn main() {\n    assemble_and_run(\"init.xqasm\",    \"init.xqbc\");\n    assemble_and_run(\"problem.xqasm\", \"problem.xqbc\");\n    assemble_and_run(\"eval.xqasm\",    \"eval.xqbc\");\n}\n```\n\n## Common Patterns\n\n### Pattern: build a QUBO model in assembly\n\n```asm\n; 2-variable QUBO: minimise x0 - x1 + 2*x0*x1\nPUSH 2\nXQMX_NEW\nSTORE 0\n\nLOAD 0\nPUSH 0\nPUSH -1        ; h[0] = -1  (linear)\nXQMX_SET_H\n\nLOAD 0\nPUSH 1\nPUSH -1        ; h[1] = -1  (linear)\nXQMX_SET_H\n\nLOAD 0\nPUSH 0\nPUSH 1\nPUSH 2         ; Q[0][1] = 2 (quadratic)\nXQMX_SET_Q\n\nHALT\n```\n\n### Pattern: iterate over model variables\n\n```asm\nPUSH 4\nXQMX_NEW\nSTORE 0\n\nPUSH 0\nPUSH 4\nRANGE\nITER\n  ; register 1 holds current loop index after ITER\n  LOAD  0\n  LOAD  1      ; index i\n  LOAD  1      ; index i (diagonal → linear term)\n  PUSH  -1\n  XQMX_SET_Q\nEND_ITER\n\nHALT\n```\n\n### Pattern: no_std bytecode decoding (WASM)\n\n```rust\n#![no_std]\nextern crate alloc;\n\nuse alloc::vec::Vec;\nuse aglais_xqvm_bytecode::StreamReader;\n\npub fn decode_instructions(bytes: &[u8]) -> Vec\u003Calloc::string::String> {\n    let mut reader = StreamReader::new(bytes);\n    let mut out = Vec::new();\n    while let Ok(Some(instr)) = reader.next_instruction() {\n        out.push(alloc::format!(\"{:?}\", instr));\n    }\n    out\n}\n```\n\n## Development Workflow\n\n```sh\n# Run all lints and tests (mirrors CI)\nmake all\n\n# Run only tests\ncargo test --workspace\n\n# Run lints\ncargo clippy --workspace --all-targets -- -D warnings\n\n# Format\ncargo fmt --all\n\n# Run a specific example\ncargo run --example tsp --manifest-path crates\u002Fvm\u002FCargo.toml\n```\n\n## Instruction Set Quick Reference\n\nThe opcode table in `crates\u002Fbytecode\u002Fsrc\u002Ftypes\u002Ftable.rs` is the single source of truth for all **76 instructions**. Key categories:\n\n| Category | Instructions |\n|---|---|\n| Stack | `PUSH`, `POP`, `DUP`, `SWAP` |\n| Registers | `LOAD`, `STORE` |\n| Arithmetic | `ADD`, `SUB`, `MUL`, `DIV`, `NEG` |\n| Comparison | `EQ`, `LT`, `GT`, `LE`, `GE` |\n| Control flow | `JMP`, `JMP_TRUE`, `JMP_FALSE`, `CALL`, `RET`, `HALT` |\n| Iteration | `RANGE`, `ITER`, `END_ITER` |\n| Vectors | `VEC`, `VEC_GET`, `VEC_SET`, `VEC_LEN` |\n| QUBO\u002FIsing | `XQMX_NEW`, `XQMX_SET_Q`, `XQMX_SET_H`, `XQMX_EVAL`, `XQMX_SAMPLE` |\n\nAll operands are big-endian. The binary format is a bare instruction stream with no file header.\n\n## Troubleshooting\n\n### `xqasm: command not found`\n\nEnsure `target\u002Frelease` is on `$PATH` or use the full path:\n\n```sh\nexport PATH=\"$PWD\u002Ftarget\u002Frelease:$PATH\"\n```\n\n### Stack underflow at runtime\n\nThe VM is strictly stack-based. Every instruction that pops values requires them to be present. Check that `PUSH` \u002F `LOAD` precedes every operation, and that loops don't consume values without restoring the stack balance.\n\n### `ITER` never terminates\n\n`RANGE` pushes loop bounds onto the **loop stack** (separate from the value stack). Ensure every `RANGE` has a matching `END_ITER` and that the range bounds (`lo`, `hi`) are pushed in the correct order (`lo` first, `hi` second).\n\n### Build fails in `no_std` environment\n\nDisable default features and enable the `alloc` feature on `aglais-xqvm-bytecode`:\n\n```toml\naglais-xqvm-bytecode = { ..., default-features = false, features = [\"alloc\"] }\n```\n\nThe VM crate (`aglais-xqvm-vm`) requires `std` and is not suitable for bare-metal.\n\n### Inspecting unexpected bytecode\n\nUse `xqdism` to verify the assembler output before running:\n\n```sh\nxqasm suspect.xqasm -o suspect.xqbc\nxqdism suspect.xqbc   # check instruction sequence and operand values\nxqvm   suspect.xqbc\n```\n\n## License\n\nAGPL-3.0-or-later. Embedding in proprietary network services requires source disclosure under the AGPL.\n",{"name":5,"triggers":24,"description":7},[25,26,27,28,29,30,31,32],"quantum virtual machine rust","QUBO ising model bytecode","xqasm assembler quantum","quantum annealer optimization rust","aglais xqvm bytecode","binary optimization quantum vm","xqbc bytecode format","travelling salesman QUBO rust","master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fskills_sh\u002Fs\u002Fskills-sh_aradotso_trending-skills_aglais-xqvm-quantum-vm",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill aglais-xqvm-quantum-vm",{"tool":48,"command":49},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill aglais-xqvm-quantum-vm",{"tool":51,"command":52},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill aglais-xqvm-quantum-vm","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fskills_sh\u002Fs\u002Fskills-sh_aradotso_trending-skills_aglais-xqvm-quantum-vm\u002FSKILL.md",true,[],[57,64,71,78,85,92],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]