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

pyEPR issue with selction of modes #161

Open
davidjhonsonn opened this issue Sep 19, 2024 · 4 comments
Open

pyEPR issue with selction of modes #161

davidjhonsonn opened this issue Sep 19, 2024 · 4 comments

Comments

@davidjhonsonn
Copy link

​

First of all, thank you very much for your tutorials in pyEPR, they saved me!

I'm a master student of Roma3, working at INFN for a design of two transmon qubits.

The code I'm using is similar to this from Daniel Cohen Hillel : πŸ”— Coupling between the readout resonator and transmon - Daniel Cohen Hillel , in which he selects only 2 of the 5 modes (otherwise the simulation is to slow).

But with the same code I got an error: '[1] not in index' when I run this cell:
epra = epr.QuantumAnalysis(eprh.data_filename)
epra.analyze_all_variations(cos_trunc = 8, fock_trunc = 15);

Probably is something related to the index, because after selecting the modes 0 and 4 it doesn't find anymore the modes 1 in the array.

I tried also selecting the mode again in the analyze_all_variations but I got the error "index 4 is out of bounds for axis 0 with size 2"

Copy link

πŸ‘πŸ‘πŸ‘ You are awesome! Thank you for making your first issue to pyEPR ' first issue

@zlatko-minev
Copy link
Owner

Not sure from the simple message. Depends on the file.

Check out:

def __init__(

You can see wha the loading does. You can print some of the statements there or the full error stack, not sure where the error is.

For instance print
epra.n_modes
epra.variations
epra.freqs_hfss
epra.PM

@davidjhonsonn
Copy link
Author

thank you for the code.

For instance print
epra.n_modes = 5
epra.variations = 1
epra.freqs_hfss = gives me the a panda.series with the 5 frequencies
epra.PM = gives me the a panda.series with 5 numbers

If you need I can send the full output but I don't think the problem is there. Perhaps is something related to the old version of pandas (I'm using version 1.5.3).

The strange thing is that it works if I select the modes [0, 1, 2], otherwise not. for example, If I select the modes [0,2,3] it gives me an error that index 1 is missing. Now I'm trying to change the order of the modes, [0,2,4,3,1] and then select the first three. Anyway it's not easy, if you know how to do change the order of the modes please help me. For instance, after I changed the order of modes, freqs_hfss_GHz remains uncghanged. So I manually change it. But now f_ND results are unchanged, too.

@zlatko-minev
Copy link
Owner

Yes, it could be the indexing. What's the print stack trace of the error / what is the line where this happens

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

3 participants
@zlatko-minev @davidjhonsonn and others