def cirq_type_from_json(type_str: str, resolvers: Sequence[JsonResolver] | None = None) -> type:
    """Returns a type object for JSON deserialization of `type_str`.

    This method is not part of the base deserialization path. Together with
    `json_cirq_type`, it can be used to provide type-object deserialization
    for classes that need it.

    Args:
        type_str: string representation of the type to deserialize.
        resolvers: list of JsonResolvers to use in type resolution. If this is
            left blank, DEFAULT_RESOLVERS will be used.

    Returns:
        The type object T for which json_cirq_type(T) matches `type_str`.

    Raises:
        ValueError: if type_str does not have a match in `resolvers`, or if the
            match found is a factory method instead of a type.
    """
    cirq_type = factory_from_json(type_str, resolvers)
    if isinstance(cirq_type, type):
        return cirq_type
    # We assume that if factory_from_json returns a factory, there is not
    # another resolver which resolves `type_str` to a type object.
    raise ValueError(f"Type {type_str} maps to a factory method instead of a type.")
Returns a type object for JSON deserialization of `type_str`.

    This method is not part of the base deserialization path. Together with
    `json_cirq_type`, it can be used to provide type-object deserialization
    for classes that need it.

    Args:
        type_str: string representation of the type to deserialize.
        resolvers: list of JsonResolvers to use in type resolution. If this is
            left blank, DEFAULT_RESOLVERS will be used.

    Returns:
        The type object T for which json_cirq_type(T) matches `type_str`.

    Raises:
        ValueError: if type_str does not have a match in `resolvers`, or if the
            match found is a factory method instead of a type.
    
cirq-core/cirq/protocols/json_serialization.py