You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a UCJOpSpinBalanced operator from t_amplitudes, passing the interaction pairs does not result in a smaller number of parameters. It seems like the interaction pairs are overridden.
MWE to reproduce this:
importffsimfrompyscfimportgto, scf, ccmol=gto.Mole()
mol.basis='sto6g'atoms= [['C',(0, 0, 0)], ['C',(0, 0, 1.2)]]
mol.atom=atomsmol.build()
mf=scf.RHF(mol)
scf=mf.run()
active_space= [iforiinrange(mol.nelectron//2-4//2, mol.nelectron//2+4//2)]
ccsd=cc.CCSD(scf, frozen=[iforiinrange(mol.nao_nr()) ifinotinactive_space]).run()
n_reps=2pairs_aa= [(0, 1), (1, 2), (2, 3)]
pairs_ab= [(0, 0)]
operator=ffsim.UCJOpSpinBalanced.from_t_amplitudes(ccsd.t2, n_reps=n_reps)
operator_local=ffsim.UCJOpSpinBalanced.from_t_amplitudes(ccsd.t2, n_reps=n_reps, interaction_pairs=(pairs_aa,pairs_ab))
print(f'Number of parameters in UCJ Spin Balanced: {operator.to_parameters().size}')
print(f'Number of parameters in LUCJ Spin Balanced: {operator_local.to_parameters().size}')
print(f'Expected number of parameters in UCJ Spin Balanced: {operator.n_params(4,2)}')
print(f'Expected number of parameters in LUCJ Spin Balanced: {operator.n_params(4,2, interaction_pairs=(pairs_aa,pairs_ab))}')
The relevant part of the output:
Number of parameters in UCJ Spin Balanced: 72
Number of parameters in LUCJ Spin Balanced: 72
Expected number of parameters in UCJ Spin Balanced: 72
Expected number of parameters in LUCJ Spin Balanced: 40
The text was updated successfully, but these errors were encountered:
When creating a
UCJOpSpinBalanced
operator from t_amplitudes, passing the interaction pairs does not result in a smaller number of parameters. It seems like the interaction pairs are overridden.MWE to reproduce this:
The relevant part of the output:
The text was updated successfully, but these errors were encountered: