예제 #1
0
def assert_eigen_shifts_is_consistent_with_eigen_components(val: ops.EigenGate) -> None:
    # pylint: disable=unused-variable
    __tracebackhide__ = True
    # pylint: enable=unused-variable
    if not protocols.is_parameterized(val):
        assert val._eigen_shifts() == [
            e[0] for e in val._eigen_components()
        ], "_eigen_shifts not consistent with _eigen_components"
예제 #2
0
def assert_eigen_shifts_is_consistent_with_eigen_components(
        val: ops.EigenGate) -> None:
    assert val._eigen_shifts() == [e[0] for e in val._eigen_components()]
예제 #3
0
def assert_eigen_shifts_is_consistent_with_eigen_components(
        val: ops.EigenGate) -> None:
    if not protocols.is_parameterized(val):
        assert val._eigen_shifts() == [e[0] for e in val._eigen_components()]