check_bloq_example_qtyping#
View source on GitHub
|
Check that the bloq example has valid quantum data types throughout its decomposition.
qualtran.testing.check_bloq_example_qtyping(
bloq_ex: qualtran.BloqExample
) -> Tuple[qualtran.testing.BloqCheckResult, str]
If the bloq has no decomposition, this check is not applicable. Otherwise: we check the
connections in the decomposed bloq with increasing levels of type checking severity.
First, we check loose type checking (allowing conversions between numeric types). A
failure here is returned as a FAIL.
Then QDTypeCheckingSeverity.ANY checking (allowing just conversions to and from QAny) and
finally strict checking are performed. Currently, these are coded as an UNVERIFIED bloq
check result.
View source on GitHub