View source on GitHub |
Checks that a value is internally consistent and has a good repr.
openfermion.testing.assert_implements_consistent_protocols(
val: Any,
*,
exponents: Sequence[Any] = (0, 1, -1, 0.5, 0.25, -0.5, 0.1, sympy.Symbol('s')),
qubit_count: Optional[int] = None,
ignoring_global_phase: bool = False,
setup_code: str = _setup_code,
global_vals: Optional[Dict[str, Any]] = None,
local_vals: Optional[Dict[str, Any]] = None
) -> None