Linting

Lint rules

The linters read a program without running it and point at lines that are likely wrong. The rules you pick here are the ones the Slicer reports on every analysis.

Rules

Tick the rules to run; the choice is kept in this browser and shared with the Slicer. Click ? on a rule for what it catches, its limits, and a worked example with its fix.

Loading the linters…

The linters

Quick checks (QS)
Errors Python or Qiskit would raise, read from the source: syntax, a missing circuit, indices outside the registers, removed, deprecated or unknown Qiskit APIs, operations Qiskit rejects while the static parser rebuilds the circuit, and a circuit changed after it was run.
Dependence checks (QD)
Quantum-side mistakes, read from the rebuilt circuit and its dependence graph: gates no measurement depends on, measurements overwritten or constant, no measurement at all, controls and conditions never set, idle qubits, cancelling pairs, gates with no effect, a state read from a circuit that measures, classical bits never written. They also run on OpenQASM.
LintQ (LQ)
LintQ's ten analyses (Paltenghi and Pradel, FSE 2024), reimplemented on the syntax tree. Off by default. Where CodeQL is installed, the original queries can run as well.
Where they run
On every Analyze in the Slicer, where a finding marks its nodes in the graph.