Skip to content
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

Parity #74

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Parity #74

wants to merge 4 commits into from

Conversation

gsuarezr
Copy link

@gsuarezr gsuarezr commented Dec 20, 2023

This adds a notebook tutorial for the parity feature of HEOM from my pull reques qutip/qutip#2261

Copy link
Member

@nwlambert nwlambert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some inline comments. Would be better to follow the general template in https://github.com/qutip/qutip-tutorials/blob/main/tutorials-v5/template.md a bit more too, and add some simple tests at the end.

Main feedback points are the latex at the beginning needs fixing, and the spectral function stuff can be tidied up and explained a bit more. I can have a go at this if it helps.

edit: forgot to mention, better to remove the dephasing example changes, I guess these were just added by mistake


$H_{T}=H_{S}+H_{f}+H_{ef}$

Where $H_{S}$ is the system Hamiltonian, which is divided into three contributions. The electron system hamiltonian ($H_{e}$), the single-mode cavity ($H_{c}$) and the light matter coupling ($H_{ef}$):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no cavity in this example, better to remove mention of it here and elsewhere.


$H_{e}= \sum_{n=g,e}\sum_{\sigma=\uparrow,\downarrow} \epsilon_{n} \hat{n}^{n \sigma} + U_{n} \hat{n}_{n \uparrow} \hat{n}_{n \downarrow} $

$H_{ec} = \sum_{\sigma=\uparrow,\downarrow} g_{ct} (d_{g\sigma}^{\dagger} d_{e\sigma} + d_{e\sigma}^{\dagger} d_{g\sigma} )(a^{\dagger}+a)$
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, no cavity coupling etc


and

$H_{ef}= \sum_{k} \sum_{\alpha=L,R} \sum_{\sigma=\uparrow,\downarrow} g_{\alpha,k} (c_{\alpha,k}^{\dagger} d_{g\sigma}+c_{\alpha,k} d_{g\sigma}^{\dagger})$
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To simplify things i would remove the left/right label here. While one can derive this model from a two-lead one, in practise below we only one ''lead'' split up into two spin labelled baths.

def _f(N, n): return _oprd([_sz(N, j) for j in range(n)])*_sm(N,n)
def liouvillian(H):
return - 1j * (spre(H) - spost(H))
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove this and use internal functions, fcreate, fdestroy? also probably we dont need liouvillian

Cw32 = (I_vec3 @ Cw31[:sup_dim])
dddag.append(Cw32)

return -2*(np.array(ddagd).flatten()+np.array(dddag).flatten())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally these would be internal functions, but for now lets leave them here and just make them a bit more generic and documented a little better. also, we can probably make them data-layer agnostic with _data functions, like kron and solve? is it bad to expose users to these in a notebook? Worst case, leave as is, since HEOM mostly uses CSR internally anyway.

plt.yticks([0.,1,2],[0,1,2])
plt.xlabel(r"$\omega/\Gamma$",fontsize=28,labelpad=-10)
plt.ylabel(r"$2\pi \Gamma A(\omega)$ ",fontsize=28)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i tested this output and checked against the old data and it looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants