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