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

Problem when analyzing specific modes in QuantumAnalysis.analyze_variation #89

Open
hatlabcz opened this issue Dec 9, 2021 · 1 comment

Comments

@hatlabcz
Copy link
Contributor

hatlabcz commented Dec 9, 2021

Hello,

I'm trying to do the EPR analysis for a multi-mode system, and it seems that analyzing more than 4 modes at once will take a very long time on my computer. So I tried to analyze fewer modes each time, say only mode 0 and mode 4, by passing [0, 4] to the 'modes' argument of QuantumAnalysis.analyze_variation. However, it seems that this will only analyze mode 0 and 1, not 0 and 4 as I wanted.

I checked the source code and I think the problem is below:

freqs_hfss = freqs_hfss[range(len(self.modes[variation])), ]
This line should be removed since we've already picked the mode frequencies in line 657

PJ = PJ[range(len(modes)), :]
here (and below) the matrix index should just be [modes, :], since we want to analyze the modes specified in the argument, not the first len(modes) number of modes.

I can submit a pull request later that fixes this issue if these sounds correct to you.

Thanks.

@zlatko-minev
Copy link
Owner

Thanks a lot for the issue.

That's interesting about the lines.

In general, when things move slowly, and you have many modes, usually it's because the numerical diagonal is being used and there are many many entries in the matrices.

Usually I will reduce the number of fock levels in that case.

Ideally, one could specify the number of truncation levels per mode, this is easy to write, it's not a lot of work, but it just hasn't been done yet. Very happy if you want to also look at this and make a pull request.

Regarding the two lines you mentioned above, this is a good idea. I'm not quite sure, because I have to really test and look at the code, but if you would like to make the change, test it on your end, see that it works, and then you can make a pool request, I'd be very happy to give feedback

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

No branches or pull requests

2 participants