zlatko-minev / pyEPR

Powerful, automated analysis and design of quantum microwave chips & devices [Energy-Participation Ratio and more]
https://pyepr-docs.readthedocs.io
Other
160 stars 219 forks source link

Huge update - Compatibility with Ansys 2022 R2 (#142) #153

Open zlatko-minev opened 10 months ago

zlatko-minev commented 10 months ago

allows to print result and print variation to be used togther where the variation to be printed is give by an integer

Instead of having the sorting of the dataframe as string indices (e.g. '0', '1', '10', '2'...) it is now sorted as integers ('0', '1', '2', ... , '10'). Only relevant for >10 variations.

See https://github.com/conda-forge/pyepr-quantum-feedstock for conda recipe

Two functions that return vectors tangent and normal to a surface. I used it to calculate surface participation ratios, e.g.: p_metal = t* (E_surface_metal / UE) print(f'Metal-Air/Metal-Substrate participation ratio, p_MA = p_MS = {p_metal:.3}')

#SA participation ratio
vecE_normal = vecE.normal2surface('chip_holder1').__div__(epsilon_r) #Complex Vector
vecE_tangent = vecE.tangent2surface('chip_holder1').__mul__(epsilon_r) #Complex Vector
vec_E_total = vecE_normal.__add__(vecE_tangent)
E_squared = vec_E_total.dot(vecE).__abs__().real().__pow__(2)
E_surface = E_squared.integrate_surf(name='chip_holder1').evaluate()
E_surface -= E_surface_metal

p_SA = t* (E_surface / UE)
print(f'Air-Substrate participation ratio, p_SA = {p_SA:.3}')

Also one change where an error is raised when pint is not properly imported.

Get numeric frequencies results should retrieve f_ND, not f_1. Some typos.

In core_quantum_analysis: Rows 671-674: update to modes that are not the first. Row 917: trying to get pandas to plot with the right label. Unsuccessfully.

clean_up_solutions function for an Ansys design (to avoid analysis of all variations). Also removed index name for frequencies and typos

Fixed #83

fixed KeyError when '0' is not in variations for QuantumAnalysis. updated type hint for QuantumAnalysis.analyze_variation

fix mode number error in QuantumAnalysis

Fix typo

The epr_numerical_diagonalization function uses np.float which has been deprecated in Numpy.

Refer https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

The continued usage of np.float yields the following error in the epr_numerical_diaganolization function when later versions of Numpy is used.

"AttributeError: module 'numpy' has no attribute 'float'."

This commit replace np.float with float to solve this error.

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

The frequencies are already correctly selected outside of this if-statement, so this is not necessary

out-commenting a property not supported in latest version. Only visual impact


zlatko-minev commented 10 months ago

@AndersenQubitLab - this is the same PR but not to pull into main, can you double check it looks ok and not replacing any new functionality?