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