-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Full and approximate polaritonic ADC energies up to second order #153
base: master
Are you sure you want to change the base?
Conversation
…sis sets, but performance is garbage
…due to the doubles symmetry of the independent blocks
…avidson intermediate results can now be given to Lanczos after e.g. max_iter is reached, for arbitrary convergence, since Davidson crashes for high omega and/or coupling. Triplet multiplicity for n_states calculation still occurs.
… now)...probably some factors are still wrong
… ready for testing)
…lemented the full_diagonalization option, where a full QED guess, (3 * adc_matrix + 2) guesses, is build. Care that at the moment the H_1 two particle part of the phot/elec ph_ph coupling blocks has been commented out, since this results in the matrix, that can be tested with the dipole property only.
… account, while electronic terms (including vacuum coupling to the quantized field) are taken into account through second order.
…first order for qed_adc2.
…first order for qed_adc2.
…r the QED method have been added as well.
…, instead of always doubling it.
This pull request introduces 4 alerts when merging 671183b into e58bc07 - view on LGTM.com new alerts:
|
Thanks for the contribution! This will, however, take some time to digest, but there are probably ways to make the integration of QED less "invasive" in the existing code structure, right @mfherbst? 👍 |
…e adjusted dispatch routine in tdm
Cool! Thanks for the contribution @BauerMarco. Indeed, quite a bit of code. Some looks like duplications that can be avoided. I have to admit that I lack the time to review the code without some explanation what's going on. Would be good to have a chat at some point. |
…. Furthermore, qed parameters are now passed directly into the ReferenceState, easing up conditions.
I am available after the STC ends (22nd of september) and would very much appreciate to have a chat. |
…n-polaritonic hf reference. Also missing indentation, leading to unbounded errors in backends init has been inserted.
…ity, due to an imaginary contribution on the diagonal of the final qed-matrix, which is requested as imaginary part of the cavity photon energy
qed approx methods now accounts for photon losses in the cavity via imaginary frequency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initial review cycle
adcc/AdcMatrix.py
Outdated
@@ -130,21 +134,35 @@ def __init__(self, method, hf_or_mp, block_orders=None, intermediates=None, | |||
self.ndim = 2 | |||
self.extra_terms = [] | |||
|
|||
if self.reference_state.qed: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check with cvs, whether .qed or .is_qed or etc.
adcc/AdcMatrix.py
Outdated
"adc0": dict(ph_ph=0, ph_pphh=None, pphh_ph=None, pphh_pphh=None), # noqa: E501 | ||
"adc1": dict(ph_ph=1, ph_pphh=None, pphh_ph=None, pphh_pphh=None), # noqa: E501 | ||
"adc2": dict(ph_ph=2, ph_pphh=1, pphh_ph=1, pphh_pphh=0), # noqa: E501 | ||
"adc2x": dict(ph_ph=2, ph_pphh=1, pphh_ph=1, pphh_pphh=1), # noqa: E501 | ||
"adc3": dict(ph_ph=3, ph_pphh=2, pphh_ph=2, pphh_pphh=1), # noqa: E501 | ||
} | ||
|
||
qed_default_block_orders = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merge dicts
adcc/workflow.py
Outdated
@@ -47,7 +50,8 @@ def run_adc(data_or_matrix, n_states=None, kind="any", conv_tol=None, | |||
n_guesses_doubles=None, output=sys.stdout, core_orbitals=None, | |||
frozen_core=None, frozen_virtual=None, method=None, | |||
n_singlets=None, n_triplets=None, n_spin_flip=None, | |||
environment=None, **solverargs): | |||
environment=None, coupl=None, freq=None, qed_hf=True, | |||
qed_approx=False, qed_full_diag=False, **solverargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
helper function for qed_full_diag
adcc/backends/psi4.py
Outdated
# and print the result | ||
orben_a = np.asarray(self.wfn.epsilon_a()) | ||
orben_b = np.asarray(self.wfn.epsilon_b()) | ||
if all(orben_a == orben_b): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return all(orben_a == orben_b)
adcc/backends/psi4.py
Outdated
else: | ||
print("This is an unrestricted calculation") | ||
return False | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if isinstance(self.wfn, (psi4.core.RHF...
if isinstance(self.wfn, (psi4.core.UHF)):
else:
wavefunction object
adcc/AmplitudeVector.py
Outdated
@@ -217,3 +219,160 @@ def __radd__(self, other): | |||
else: | |||
ret = {k: other + tensor for k, tensor in self.items()} | |||
return AmplitudeVector(**ret) | |||
|
|||
|
|||
class QED_AmplitudeVector: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merge this class with AmplitudeVector
…long with other minor changes
Review cycle1
… are now supported
In the following polaritonic is always referred to by QED (Quantum Electrodynamics)
Features:
All features have been tested thoroughly, although only the methods based on a QED-HF reference should be used, since they are available up to second order.
One can also request QED-ADC(2) from a QED-HF reference with the polaritonic coupling only expanded up to first order, which is correct, but it is not sure, how useful this feature really is...This has to be tested in a future benchmark.
New Keywords:
Additional comments: