Esempio n. 1
0
 def info(self, depth=0):
     lines = [
         "{}: {}".format(name, info(obj, depth=depth + 1))
         for name, obj in [
             ("Machine", self._machine),
             ("Optimizer", self._optimizer_desc),
             ("SR solver", self._sr),
         ]
     ]
     return "\n  ".join([str(self)] + lines)
Esempio n. 2
0
 def info(self, depth=0):
     lines = [
         "{}: {}".format(name, info(obj, depth=depth + 1))
         for name, obj in [
             ("Hamiltonian ", self._ham),
             ("Machine     ", self._machine),
             ("Optimizer   ", self._optimizer),
             ("SR solver   ", self._sr),
         ]
     ]
     return "\n{}".format(" " * 3 * (depth + 1)).join([str(self)] + lines)