check_bloq_example_serializes#
View source on GitHub
|
Check that the BloqExample has consistent serialization.
qualtran.testing.check_bloq_example_serializes(
bloq_ex: qualtran.BloqExample
) -> Tuple[qualtran.testing.BloqCheckResult, str]
This function checks that the given bloq can be serialized to a proto format and the corresponding proto can be deserialized back to a bloq which is equal to the original bloq.
If the given Bloq cannot be serialized / deserialized OR if the deserialized Bloq is not
equal to the given Bloq, then the result is FAIL. If the roundtrip succeeds, the result
is PASS.
View source on GitHub