View source on GitHub |
Checks that an EigenGate subclass is internally consistent and has a good repr.
cirq.testing.assert_eigengate_implements_consistent_protocols(
eigen_gate_type: Type[cirq.EigenGate
],
*,
exponents: Sequence[cirq.TParamVal
] = (0, 1, -1, 0.25, sympy.Symbol('s')),
global_shifts: Sequence[float] = (0, -0.5, 0.1),
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