Module: testing#
Functions for testing bloqs.
Classes#
class BloqCheckResult: The status result of the check_bloq_example_xxx functions.
class BloqCheckException: An exception raised by the assert_bloq_example_xxx functions in this module.
Functions#
assert_bloq_example_decompose(...): Assert that the BloqExample has a valid decomposition.
assert_bloq_example_make(...): Assert that the BloqExample returns the desired bloq.
assert_bloq_example_qtyping(...): Assert that the bloq example has valid quantum data types throughout its decomposition.
assert_bloq_example_serializes(...): Assert that the BloqExample has consistent serialization.
assert_connections_compatible(...): Check that all connections are between compatible registers.
assert_connections_consistent_qdtypes(...): Check that a composite bloq’s connections have consistent qdtypes.
assert_consistent_classical_action(...): Check that the bloq has a classical action consistent with its decomposition.
assert_equivalent_bloq_counts(...): Assert that the BloqExample has consistent bloq counts.
assert_equivalent_bloq_example_counts(...): Assert that the BloqExample has consistent bloq counts.
assert_registers_match_dangling(...): Check that connections to LeftDangle and RightDangle match the declared registers.
assert_registers_match_parent(...): Check that the registers following decomposition match those of the original bloq.
assert_soquets_belong_to_registers(...): Check that all soquet’s registers make sense.
assert_soquets_used_exactly_once(...): Check that all soquets are used once and only once.
assert_valid_bloq_decomposition(...): Check the validity of a bloq decomposition.
assert_valid_cbloq(...): Perform all composite-bloq validity assertions.
assert_wire_symbols_match_expected(...): Assert a bloq’s wire symbols match the expected ones.
check_bloq_example_decompose(...): Check that the BloqExample has a valid decomposition.
check_bloq_example_make(...): Check that the BloqExample returns the desired bloq.
check_bloq_example_qtyping(...): Check that the bloq example has valid quantum data types throughout its decomposition.
check_bloq_example_serializes(...): Check that the BloqExample has consistent serialization.
check_equivalent_bloq_example_counts(...): Check that the BloqExample has consistent bloq counts.
execute_notebook(...): Execute a jupyter notebook in the caller’s directory.
Type Aliases#
Other Members
- LeftDangle
Instance of
qualtran.DanglingT- RightDangle
Instance of
qualtran.DanglingT