When defining physical Hamiltonians, you can avoid manually adding Hermitian conjugate terms by using the plus_hc argument in coupling methods. This ensures that if you add a term like $c^{\dagger}_i c_j$, its conjugate $c^{\dagger}_j c_i$ is also included.
Managing MPO Bond Dimension
If you are using an MPOCouplingModel, you can optimize memory and computational efficiency using the explicit_plus_hc parameter in your model_params:
explicit_plus_hc = False (Default): You must either add conjugate terms manually or use plus_hc=True. If you use plus_hc=True, the MPO will store both terms, increasing the bond dimension.explicit_plus_hc = True: The model and MPO will only store half the terms (the non-conjugate ones). At runtime during DMRG, TeNPy will compute and apply the Hermitian conjugate automatically. This reduces the MPO bond dimension and memory requirements.
Important: To benefit from bond dimension reduction, you must set model_par['explicit_plus_hc'] = True and use plus_hc=True in your add_coupling or add_multi_coupling calls.
# Case 1: Manual addition (High bond dimension)
model_params['explicit_plus_hc'] = False
self.add_coupling(-J, u1, 'Cd', u2, 'C', dx)
self.add_coupling(np.conj(-J), u2, 'Cd', u1, 'C', -dx)
# Case 2: Automatic addition, but still stores both terms (High bond dimension)
model_params['explicit_plus_hc'] = False
self.add_coupling(-J, u1, 'Cd', u2, 'C', dx, plus_hc=True)
# Case 3: Optimized (Reduced bond dimension)
model_params['explicit_plus_hc'] = True
self.add_coupling(-J, u1, 'Cd', u2, 'C', dx, plus_hc=True)