示例#1
0
 def _json_dict_(self):
     return protocols.dataclass_json_dict(self)
示例#2
0
 def _json_dict_(self) -> Dict[str, Any]:
     d = dataclass_json_dict(self)
     # TODO (gh-4699): serialize `device` as well once SerializableDevice is serializable.
     del d['device']
     return d
示例#3
0
文件: io.py 项目: dstrain115/Cirq-1
 def _json_dict_(self) -> Dict[str, Any]:
     return dataclass_json_dict(self)
示例#4
0
 def _json_dict_(self) -> Dict[str, Any]:
     d = dataclass_json_dict(self)
     if d['qubit_placement']:
         d['qubit_placement'] = list(d['qubit_placement'].items())
     d['timings_s'] = list(d['timings_s'].items())
     return d