cirq.protocols.json_serialization.factory_from_json

Returns a factory for constructing objects of type type_str.

DEFAULT_RESOLVERS is updated dynamically as cirq submodules are imported.

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.

An ObjectFactory that can be called to construct an object whose type matches the name type_str.

ValueError if type_str does not have a match in resolvers.