Wire Ranges

Registers are how you tell Qubi which qubits a gate touches. Most forms accept arithmetic - not just literal integers.

FormMeaningExample
NSingle wire index (integer, variable, or expression)0, num, sqrt(9), max-1
allEvery allocated wire (0 through max)H all
maxLast allocated wire index12 qubits → max is 11
A..BInclusive range; endpoints can be expressions0..3, 1..max
A..maxRange through last allocated wire0..max
A.S.EStepped list (start.step.end); start, step, and end may be integers, floats, variables, max, or expressions; step may be negative or parenthesized like 0.2.(0.1).0.50.2.6; 0.2.0.1.0.5; max.-1.0; 0.coffee.max; max.step.0
A.S.maxStep through last allocated wire0.2.max
(a,b,c)Explicit parallel list; items can be expressionsH (0, max, sqrt(4))
[a,b,…]Joint multi-qubit registerCX [0,1], CX ([0,1],[2,3])

Parallel lists with math

coffee = 3
H (0, 1, max)
RX (0..max) 0.5
H 0.2.max            // stepped: 0, 2, 4, … up to max
H max.-1.0           // stepped down from max to 0
H (max.-2.0)         // parenthesized parallel stepped list
X (0.coffee.max)     // step may be a variable

Parallel controlled gates

Two bracket groups on one line apply the same gate to multiple control/target pairs in parallel:

CX ([0,1],[2,3])   // CNOT on (0→2) and (1→3) in one column (when scheduling allows)