Skip to content

Commit

Permalink
Correctly select a few modes in analyze_variation (#149)
Browse files Browse the repository at this point in the history
* Fix mode selection in analyze_variation

Addressing issue #148: analyze_variation incorrectly chooses Pj, Sj, Om, PHI_zpf when passed a subset of modes

* Remove redundant frequency selection

The frequencies are already correctly selected outside of this if-statement, so this is not necessary
  • Loading branch information
clarayfontaine committed Apr 25, 2023
1 parent e3bbf53 commit 148edc0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pyEPR/core_quantum_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,11 +664,10 @@ def analyze_variation(self,
PJ_cap = PJ_cap[:, junctions]

if modes is not None:
freqs_hfss = freqs_hfss[range(len(self.modes[variation])), ]
PJ = PJ[range(len(modes)), :]
SJ = SJ[range(len(modes)), :]
Om = Om[range(len(modes)), :][:, range(len(modes))]
PHI_zpf = PHI_zpf[range(len(modes)), :]
PJ = PJ[modes, :]
SJ = SJ[modes, :]
Om = Om[modes, :][:, modes]
PHI_zpf = PHI_zpf[modes, :]
PJ_cap = PJ_cap[:, junctions]

# Analytic 4-th order
Expand Down

0 comments on commit 148edc0

Please sign in to comment.