Skip to main content
Introducing The Quantum Infrastructure Cloud Learn more

DevelopersHiQ / Use it

Diagnostic codes

The checker names every problem with one of 77 stable codes, with the line and column of your source that caused it. A refusal from a lower layer is reported at your line too, so an Objects program can return an Assembly code such as gate.unknown.

77 of 77 codes

Assembly and the IR

Used by all three layers. A refusal from a lower layer comes back at the line of your source that caused it.

CodeMeaning
lang.characterA character that is not part of the language
lang.syntaxThe text does not parse
lang.reservedA reserved word used as a name
lang.program_missingThe source does not start with program <name>
lang.declaration_nestedA declaration inside a block
lang.unclosed_blockA block is never closed
lang.array_sizeAn array size outside 1 to 65,536
lang.array_needs_indexAn array used without naming an element
lang.index_expressionAn index that is not a number or a loop variable
lang.index_unknownAn index naming no loop variable in scope
lang.angle_not_constantAn angle that is not constant
lang.angle_divisionAn angle that divides by zero
lang.bound_not_constantA loop bound that is not a whole number
lang.typeNot a type
lang.invalidA construct the IR rejected
gate.unknownNo such gate
gate.arityWrong number of qubits
gate.paramsWrong number of angles
qubit.unknownAn undeclared qubit
qubit.aliasedThe same qubit twice in one operation
qubit.use_after_measureUsed after measurement without reset
qubit.use_after_releaseUsed after release
qubit.double_releaseReleased twice
qubit.release_dirtyReleased clean while not known to be zero
qubit.already_allocatedAllocated while live
qubit.escapes_branchLives past the branch that allocated it
qubit.loop_needs_resetA loop reuses a qubit with no reset
qubit.too_manyToo many live qubits
variable.unknownAn undeclared variable
name.duplicateA name declared twice
name.invalidNot an identifier
classical.widthAn integer width outside 1 to 64
classical.typeOperand types do not fit
classical.literal_rangeA literal does not fit its type
condition.typeA condition is not a bit or a comparison
loop.unboundedA real-time loop has no budget
loop.budgetA budget outside its range
loop.stepA step of zero
switch.subjectA match subject that cannot be switched on
subroutine.unknownNo such routine
subroutine.arityWrong arguments to a routine
subroutine.recursionA routine calls itself
subroutine.too_deepCalls nested past 64
within.not_invertibleThe compute block cannot be inverted
block.too_deepBlocks nested past 64
expression.too_deepAn expression nested past 64
document.too_largeThe source is over 256 KiB
program.too_largeThe source expands past 20,000 statements

Script

Added by HiQ Script on top of the codes above.

CodeMeaning
lang.initAn initial value on a qubit or an array
lang.divisionA constant expression divides by zero
task.duplicateTwo tasks with one name
task.shares_qubitTwo tasks touch one qubit
task.shares_variableOne task writes a variable another touches

Objects

Added by HiQ Objects on top of the codes above.

CodeMeaning
l3.syntaxThe text does not parse
l3.mainNo main, or more than one
l3.undefinedAn unknown name or member
l3.unknown_typeAn unknown type
l3.typeA type that does not fit
l3.duplicateA name declared twice
l3.reserved_nameA class or interface named like a gate
l3.privateA member the caller cannot reach
l3.argumentsWrong arguments
l3.signatureA method that differs from what it implements
l3.overrideAn override that overrides nothing
l3.abstractAn abstract class instantiated
l3.not_implementedAn abstract or interface method left unimplemented
l3.recursionA call that reaches itself
l3.recursive_classA class that contains itself
l3.inheritance_too_deepInheritance past 64
l3.object_too_deepObjects nested past 64
l3.too_many_objectsMore than 65,536 objects
l3.array_sizeAn array size outside 1 to 65,536
l3.indexAn index out of range
l3.not_constantA value that must be known at compile time
l3.not_finiteA compile-time number that is not finite
l3.division_by_zeroA compile-time division by zero

Pulse

The pulse layer checks timing and amplitude.

CodeMeaning
pulse.timingA length that is not a multiple of dt