def _get_state(state_class, ops, **options):
    # Try to get a state instance from the operator INSTANCES.
    # If this fails, get the class
    try:
        ret = state_class._operators_to_state(ops, **options)
    except __HOLE__:
        ret = _make_default(state_class)

    return ret
dataset/ETHPy150Open sympy/sympy/sympy/physics/quantum/operatorset.py/_get_state