get_disentangler

tenpy.algorithms.disentangler.get_disentangler(method, parent)[source]

Parse the parameter method and construct a Disentangler instance.

Parameters:
  • method (str | None) – The method to be used, of the form ‘method1-method2-min(method3,method4-method5)’. The usage should be clear from the examples, the precise rule follows: We parse the full method string as a composite, and define composite := min_atom ['-' min_atom ...], min_atom := { 'min(' composite [',' composite ...] ')' } | atom, and atom := {any key of `disentanglers_atom_parse_dict`}.

  • parent (PurificationTEBD) – The parent class calling the disentangler.

Returns:

disentangler – Disentangler instance, which can be called to disentangle a 2-site theta with the specified method.

Return type:

Disentangler

Examples

>>> get_disentangler(None, p)
Disentangler(p)
>>> get_disentangler('last-renyi', p)
Disentangler([LastDisentangler(p), RenyiDisentangler(p)], p)
>>> get_disentangler('min(None,noise-renyi,min(backwards,last)-graddesc)')
MinDisentangler([Disentangler,
                CompositeDisentangler([NoiseDisentangler(p), RenyiDisentangler(p)], p),
                CompositeDisentangler([MinDisentangler([BackwardDisentangler(p),
                                                        LastDisentangler(p)]),
                                        GradientDescentDisentangler(p)], p), p)