pytc.df.thc.extract_vv_df_factor

pytc.df.thc.extract_vv_df_factor(with_df, mo_coeff, nocc)[source]

Extract PySCF’s metric-applied virtual DF factor in PyTC order.

Consumed by pytc.solver.isdf_xtc_ccsd.RCCSD when it builds its factorized state. The extraction mirrors PyTC’s DF construction exactly: with_df.loop() supplies PySCF’s metric-applied cderi blocks, _ao2mo.nr_e2 transforms them to the MO basis, the virtual block is packed into the same vvL[(ac),Q] layout, and lib.unpack_tril(..., axis=0) restores B[a,c,Q].

nocc is explicit because the orbital-space partition must not be guessed from an occupation threshold.

Parameters:
  • with_df (object)

  • mo_coeff (object)

  • nocc (int)

Return type:

numpy.typing.NDArray.numpy.float64