bloqade.lanes.utils.check_circuit
← Module overview
function
functioncheck_circuit¶source
bloqade.lanes.utils.check_circuit
Signature
def check_circuit(squin_method: ir.Method[[], None], other_squin_method: ir.Method[[], None], atol: float = 1e-05, rtol: float = 1e-08) -> boolCheck if two squin methods are equivalent.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
squin_method | ir.Method[[], None] | required | The first squin method. This method should not take any arguments and return None. |
other_squin_method | ir.Method[[], None] | required | The second squin method. This method should not take any arguments and return None. |
atol | float | 1e-05 | Absolute tolerance for state vector comparison. Defaults to 1.0e-5. |
rtol | float | 1e-08 | Relative tolerance for state vector comparison. Defaults to 1 |
Returns
boolbool: True if the methods are equivalent, False otherwise.
Note
The methods should not perform any measurements. Otherwise, the state vectors may not be comparable.
source