qpe_toolbox.circuit.circuits_opt ================================ .. py:module:: qpe_toolbox.circuit.circuits_opt Functions --------- .. autoapisummary:: qpe_toolbox.circuit.circuits_opt.tn_fit Module Contents --------------- .. py:function:: tn_fit(tn, tn_target, tags='SU4SWAP', steps=100, tol=1e-08, contract_optimize='auto-hq', *, progbar=False) Fit tensor network `tn` to target tensor network `tn_target`. :param tn: The tensor network to be optimized (in-place). :type tn: TensorNetwork :param tn_target: The target tensor network (usually a state we want to approximate). :type tn_target: TensorNetwork :param tags: Tags selecting which tensors of `tn` to optimize. If None, all tensors are optimized. :type tags: str or list of str, optional :param steps: Number of sweeps. :type steps: int :param tol: Convergence tolerance on the change of the overlap. :type tol: float :param contract_optimize: Contraction strategy for the environments. :type contract_optimize: str :param progbar: Whether to show a progress bar. :type progbar: bool