vayesta.solver.eb_fci

Submodules

vayesta.solver.eb_fci.ebfci

class vayesta.solver.eb_fci.ebfci.REBFCI(hamil, freqs, couplings, **kwargs)[source]

Bases: object

Performs FCI on coupled electron-boson systems. Input:

-system specification, via hamiltonian object along with bosonic parameters.

Output:

-FCI RDMs. -FCI response specification.

solver = <module 'vayesta.solver.eb_fci.ebfci_slow' from '/home/runner/.local/lib/python3.8/site-packages/vayesta/solver/eb_fci/ebfci_slow.py'>
class Options(max_boson_occ: int = 2, conv_tol: float = 1e-12, max_cycle: int = 100)[source]

Bases: OptionsBase

max_boson_occ: int = 2
conv_tol: float = 1e-12
max_cycle: int = 100
asdict(deepcopy=False)
classmethod change_dict_defaults(field, **kwargs)
static dict_with_defaults(**kwargs)
get(attr, default=None)

Dictionary-like access to attributes. Allows the definition of a default value, of the attribute is not present.

classmethod get_default(field)
classmethod get_default_factory(field)
items()
keys()
replace(**kwargs)
update(**kwargs)
values()
property norb
property nelec
property nbos
kernel(eris=None)[source]
get_hamil(eris=None)[source]
make_rdm1()[source]
make_rdm2()[source]
make_rdm12()[source]
make_rdm_eb()[source]
make_dd_moms(max_mom, dm1=None, coeffs=None, civec=None, eris=None)[source]
class vayesta.solver.eb_fci.ebfci.UEBFCI(hamil, freqs, couplings, **kwargs)[source]

Bases: REBFCI

solver = <module 'vayesta.solver.eb_fci.uebfci_slow' from '/home/runner/.local/lib/python3.8/site-packages/vayesta/solver/eb_fci/uebfci_slow.py'>
make_rdm12()[source]
class Options(max_boson_occ: int = 2, conv_tol: float = 1e-12, max_cycle: int = 100)

Bases: OptionsBase

asdict(deepcopy=False)
classmethod change_dict_defaults(field, **kwargs)
conv_tol: float = 1e-12
static dict_with_defaults(**kwargs)
get(attr, default=None)

Dictionary-like access to attributes. Allows the definition of a default value, of the attribute is not present.

classmethod get_default(field)
classmethod get_default_factory(field)
items()
keys()
max_boson_occ: int = 2
max_cycle: int = 100
replace(**kwargs)
update(**kwargs)
values()
get_hamil(eris=None)
kernel(eris=None)
make_dd_moms(max_mom, dm1=None, coeffs=None, civec=None, eris=None)
make_rdm1()
make_rdm2()
make_rdm_eb()
property nbos
property nelec
property norb

vayesta.solver.eb_fci.ebfci_slow

Module for slow, exact diagonalisation-based coupled electron-boson FCI code. Based on the fci_slow.py code within pyscf.

vayesta.solver.eb_fci.ebfci_slow.contract_all(h1e, g2e, hep, hpp, ci0, norbs, nelec, nbosons, max_occ, ecore=0.0, adj_zero_pho=False)[source]
vayesta.solver.eb_fci.ebfci_slow.make_shape(norbs, nelec, nbosons, max_occ)[source]

Construct the shape of a single FCI vector in the coupled electron-boson space.

vayesta.solver.eb_fci.ebfci_slow.contract_1e(h1e, fcivec, norb, nelec, nbosons, max_occ)[source]
vayesta.solver.eb_fci.ebfci_slow.contract_2e(eri, fcivec, norb, nelec, nbosons, max_occ)[source]
vayesta.solver.eb_fci.ebfci_slow.contract_ep(heb, fcivec, norb, nelec, nbosons, max_occ, adj_zero_pho=False)[source]
vayesta.solver.eb_fci.ebfci_slow.contract_pp(hpp, fcivec, norb, nelec, nbosons, max_occ)[source]

Arbitrary phonon-phonon coupling.

vayesta.solver.eb_fci.ebfci_slow.apply_bos_annihilation(ci0, nbosons, max_occ)[source]
vayesta.solver.eb_fci.ebfci_slow.apply_bos_creation(ci0, nbosons, max_occ)[source]
vayesta.solver.eb_fci.ebfci_slow.contract_pp_for_future(hpp, fcivec, norb, nelec, nbosons, max_occ)[source]

Our bosons are decoupled; only have diagonal couplings, ie. to the boson number.

vayesta.solver.eb_fci.ebfci_slow.slices_for(b_id, nbos, occ)[source]
vayesta.solver.eb_fci.ebfci_slow.slices_for_cre(b_id, nbos, occ)[source]
vayesta.solver.eb_fci.ebfci_slow.slices_for_des(b_id, nbos, occ)[source]
vayesta.solver.eb_fci.ebfci_slow.slices_for_occ_reduction(nbos, new_max_occ)[source]
vayesta.solver.eb_fci.ebfci_slow.make_hdiag(h1e, g2e, hep, hpp, norb, nelec, nbosons, max_occ)[source]
vayesta.solver.eb_fci.ebfci_slow.kernel(h1e, g2e, hep, hpp, norb, nelec, nbosons, max_occ, tol=1e-12, max_cycle=100, verbose=0, ecore=0, returnhop=False, adj_zero_pho=False, **kwargs)[source]
vayesta.solver.eb_fci.ebfci_slow.kernel_multiroot(h1e, g2e, hep, hpp, norb, nelec, nbosons, max_occ, tol=1e-12, max_cycle=100, verbose=0, ecore=0, nroots=2, returnhop=False, adj_zero_pho=False, **kwargs)[source]
vayesta.solver.eb_fci.ebfci_slow.make_rdm1(fcivec, norb, nelec)[source]

1-electron density matrix dm_pq = <|p^+ q|>

vayesta.solver.eb_fci.ebfci_slow.make_rdm12(fcivec, norb, nelec)[source]

1-electron and 2-electron density matrices dm_qp = <|q^+ p|> dm_{pqrs} = <|p^+ r^+ s q|>

vayesta.solver.eb_fci.ebfci_slow.make_rdm12s(fcivec, norb, nelec)[source]

1-electron and 2-electron spin-resolved density matrices dm_qp = <|q^+ p|> dm_{pqrs} = <|p^+ r^+ s q|>

vayesta.solver.eb_fci.ebfci_slow.make_eb_rdm(fcivec, norb, nelec, nbosons, max_occ)[source]

We calculate the value <0|b^+ p^+ q|0> and return this in value P[p,q,b] :param fcivec: :param norb: :param nelec: :param max_occ: :return:

vayesta.solver.eb_fci.ebfci_slow.calc_dd_resp_mom(ci0, e0, max_mom, norb, nel, nbos, h1e, eri, hbb, heb, max_boson_occ, rdm1, trace=False, coeffs=None, **kwargs)[source]

Calculate up to the mth moment of the dd response, dealing with all spin components separately. To replace preceding function. :param m: maximum moment order of response to return. :param hfbas: whether to return the moment in the HF basis. Otherwise returns in the basis in the underlying

orthogonal basis hfbas is specified in (defaults to False).

Returns:

vayesta.solver.eb_fci.ebfci_slow.run(nelec, h1e, eri, hpp, hep, max_occ, returnhop=False, nroots=1, **kwargs)[source]

run a calculation using a pyscf mf object.

vayesta.solver.eb_fci.ebfci_slow.run_hub_test(returnhop=False, **kwargs)[source]
vayesta.solver.eb_fci.ebfci_slow.run_ep_hubbard(t, u, g, pp, nsite, nelec, nphonon, returnhop=False, **kwargs)[source]

Run a calculation using a hubbard model coupled to some phonon modes.

vayesta.solver.eb_fci.uebfci_slow

Module for slow, exact diagonalisation-based coupled electron-boson FCI code. Based on the fci_slow.py code within pyscf.

vayesta.solver.eb_fci.uebfci_slow.contract_all(h1e, g2e, hep, hpp, ci0, norbs, nelec, nbosons, max_occ, ecore=0.0, adj_zero_pho=False)[source]
vayesta.solver.eb_fci.uebfci_slow.make_shape(norbs, nelec, nbosons, max_occ)[source]

Construct the shape of a single FCI vector in the coupled electron-boson space.

vayesta.solver.eb_fci.uebfci_slow.contract_1e(h1e, fcivec, norb, nelec, nbosons, max_occ)[source]
vayesta.solver.eb_fci.uebfci_slow.contract_2e(eri, fcivec, norb, nelec, nbosons, max_occ)[source]
vayesta.solver.eb_fci.uebfci_slow.contract_ep(heb, fcivec, norb, nelec, nbosons, max_occ, adj_zero_pho=False)[source]
vayesta.solver.eb_fci.uebfci_slow.contract_pp(hpp, fcivec, norb, nelec, nbosons, max_occ)[source]

Arbitrary phonon-phonon coupling.

vayesta.solver.eb_fci.uebfci_slow.apply_bos_annihilation(ci0, nbosons, max_occ)[source]
vayesta.solver.eb_fci.uebfci_slow.apply_bos_creation(ci0, nbosons, max_occ)[source]
vayesta.solver.eb_fci.uebfci_slow.contract_pp_for_future(hpp, fcivec, norb, nelec, nbosons, max_occ)[source]

Our bosons are decoupled; only have diagonal couplings, ie. to the boson number.

vayesta.solver.eb_fci.uebfci_slow.slices_for(b_id, nbos, occ)[source]
vayesta.solver.eb_fci.uebfci_slow.slices_for_cre(b_id, nbos, occ)[source]
vayesta.solver.eb_fci.uebfci_slow.slices_for_des(b_id, nbos, occ)[source]
vayesta.solver.eb_fci.uebfci_slow.slices_for_occ_reduction(nbos, new_max_occ)[source]
vayesta.solver.eb_fci.uebfci_slow.make_hdiag(h1e, g2e, hep, hpp, norb, nelec, nbosons, max_occ)[source]
vayesta.solver.eb_fci.uebfci_slow.kernel(h1e, g2e, hep, hpp, norb, nelec, nbosons, max_occ, tol=1e-12, max_cycle=100, verbose=0, ecore=0, returnhop=False, adj_zero_pho=False, **kwargs)[source]
vayesta.solver.eb_fci.uebfci_slow.kernel_multiroot(h1e, g2e, hep, hpp, norb, nelec, nbosons, max_occ, tol=1e-12, max_cycle=100, verbose=0, ecore=0, nroots=2, returnhop=False, adj_zero_pho=False, **kwargs)[source]
vayesta.solver.eb_fci.uebfci_slow.make_rdm1(fcivec, norb, nelec)[source]

1-electron density matrix dm_pq = <|p^+ q|>

vayesta.solver.eb_fci.uebfci_slow.make_rdm12(fcivec, norb, nelec)[source]

1-electron and 2-electron density matrices dm_qp = <|q^+ p|> dm_{pqrs} = <|p^+ r^+ s q|>

vayesta.solver.eb_fci.uebfci_slow.make_rdm12s(fcivec, norb, nelec, reorder=True)[source]

1-electron and 2-electron spin-resolved density matrices dm_qp = <|q^+ p|> dm_{pqrs} = <|p^+ r^+ s q|>

vayesta.solver.eb_fci.uebfci_slow.make_eb_rdm(fcivec, norb, nelec, nbosons, max_occ)[source]

We calculate the value <0|b^+ p^+ q|0> and return this in value P[p,q,b] :param fcivec: :param norb: :param nelec: :param max_occ: :return:

vayesta.solver.eb_fci.uebfci_slow.calc_dd_resp_mom(ci0, e0, max_mom, norb, nel, nbos, h1e, eri, hbb, heb, max_boson_occ, rdm1, trace=False, coeffs=None, **kwargs)[source]

Calculate up to the mth moment of the dd response, dealing with all spin components separately. To replace preceding function. :param m: maximum moment order of response to return. :param hfbas: whether to return the moment in the HF basis. Otherwise returns in the basis in the underlying

orthogonal basis hfbas is specified in (defaults to False).

Returns:

vayesta.solver.eb_fci.uebfci_slow.run(nelec, h1e, eri, hpp, hep, max_occ, returnhop=False, nroots=1, **kwargs)[source]

run a calculation using a pyscf mf object.

vayesta.solver.eb_fci.uebfci_slow.run_hub_test(returnhop=False, **kwargs)[source]
vayesta.solver.eb_fci.uebfci_slow.run_ep_hubbard(t, u, g, pp, nsite, nelec, nphonon, returnhop=False, **kwargs)[source]

Run a calculation using a hubbard model coupled to some phonon modes.

Module contents