primitive_gate_validator
PrimitiveGateValidator
Bases: Validator
Source code in opensquirrel/passes/validator/primitive_gate_validator.py
validate(ir)
Check if all unitary gates in the circuit are part of the primitive gate set.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ir
|
IR
|
The intermediate representation of the circuit to be checked. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If any unitary gate in the circuit is not part of the primitive gate set. |