#settings

A program can set two things about itself: how its gates are scheduled into columns and how many qubits it has. Those are the only #settings lines Qubi accepts. Everything else (zoom, decimal places, sorting, visible rows, label units) is your own preference and lives in the Settings button.

Program settings

KeyDefaultTypeWhat it does
Scheduling"always"enumGate packing mode. See Scheduling.
MaxQubits12int (2-24)Highest wire index is MaxQubits − 1. The state vector needs 16 bytes per amplitude, so 24 qubits use 256 MB; above about 12 qubits the probability panels list the most likely outcomes and the density matrix view keeps the first 10 wires.
#settings Scheduling "compressed"
#settings MaxQubits 16

H 0
CX [0,1]

Values in quotes are quoted in the file too. Leave a line out and the program uses the default. These two lines travel with the program, so whoever opens it gets the same circuit you built.

The NMR Analysis tab also reads its own #settings Nmr… lines for the sample, field and readout. Those are listed on #settings Nmr keys and don't change the circuit.

Scheduling

See the dedicated Scheduling page. Quick version: "always" packs gates aggressively; "never" puts every gate in its own column.

Angles need no setting

A bare angle is always a multiple of π, so RX 0 0.5 is π/2 in every program. Write 90deg, 1.5708rad or pi/2 when another form reads better. See Angles & Units.

Your settings (Settings button)

These change how the simulator looks and behaves for you. They are saved in your browser and never go into the program text, so sharing a file never changes someone else's view. Scheduling and Max Qubits sit at the top of the same window, because they edit the open program's two #settings lines.

SettingDefaultWhat it does
Visible qubits2How many qubit rows the circuit builder shows.
Zoom100%Circuit builder zoom: 50%, 1, 1.5, 2.
Auto-adjust visible qubitstrueGrow visible rows when code uses higher indices.
Decimal Places2Digits for amplitudes and probabilities.
Auto-run circuit after changestrueRe-run the circuit when code changes.
Use optimized gatestrueUse optimized decompositions where available.
Use optimized sweeptrueFaster sweep runs when stepping combos or running the full sweep batch.
Step by step (circuit builder)falseCircuit builder step scrubber and play controls.
Show gate parameters on circuittrueAngle labels on rotation tiles.
Conditional branches on circuitnoneIf/else markers on the circuit. none hides them, some shows branches that contain gates, all shows every marker.
Show evaluated values on circuit labelstrueShow evaluated LOOP counts and wire lists on blocks.
Gate parameter angles (circuit)degreesUnit for labels drawn on gates.
Symbolic notation (fractions & √)falsePrefer √(½) style in state displays.
Hide negligible probabilitiestrueDrop near-zero amplitudes from the state vector.
Order ByprobabilityBasis-state sort key.
DirectiondescSort direction for basis states.

Older programs

Files written before this change may have other #settings lines, such as CodeAngleUnit, VisibleQubits or Zoom, or the old visible and visiblemax wire forms. They convert automatically when you open them. A program that read bare angles in radians or degrees gets a rad or deg suffix on each of those angles, so it gives the same results. Display lines are dropped, and your own settings stay as they were.