assert_bloq_example_serializes#
View source on GitHub
|
Assert that the BloqExample has consistent serialization.
qualtran.testing.assert_bloq_example_serializes(
bloq_ex: qualtran.BloqExample
) -> None
This function asserts 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