In order to verify the input program, we need to check that gates and registers are correctly used. This is done during type checking.
The purpose of type checking is to:
- detect the use of register in a wrong context, for instance, applying a gate on a classical register
- detect operand size mismatch during a measure
- detect if a gate is not correctly used
- detect if all parameters have been passed to a gate
In order to verify the input program, we need to check that gates and registers are correctly used. This is done during type checking.
The purpose of type checking is to: