pyEPR.project_info module

Main interface module to use pyEPR.

Contains code to connect to Ansys and to analyze HFSS files using the EPR method.

This module handles the microwave part of the analysis and connection to

Further contains code to be able to do autogenerated reports,

Copyright Zlatko Minev, Zaki Leghtas, and the pyEPR team 2015, 2016, 2017, 2018, 2019, 2020

class pyEPR.project_info.ProjectInfo(project_path: str = None, project_name: str = None, design_name: str = None, setup_name: str = None, dielectrics_bulk: list = None, dielectric_surfaces: list = None, resistive_surfaces: list = None, seams: list = None, do_connect: bool = True)[source]

Bases: object

Primary class to store interface information between pyEPR and Ansys.

Note

Junction parameters. The junction parameters are stored in the self.junctions ordered dictionary

A Josephson tunnel junction has to have its parameters specified here for the analysis. Each junction is given a name and is specified by a dictionary. It has the following properties:

  • Lj_variable (str):
    Name of HFSS variable that specifies junction inductance Lj defined on the boundary condition in HFSS. WARNING: DO NOT USE Global names that start with $.
  • rect (str):
    String of Ansys name of the rectangle on which the lumped boundary condition is defined.
  • line (str):
    Name of HFSS polyline which spans the length of the rectangle. Used to define the voltage across the junction. Used to define the current orientation for each junction. Used to define sign of ZPF.
  • length (str):
    Length in HFSS of the junction rectangle and line (specified in meters). To create, you can use epr.parse_units('100um').
  • Cj_variable (str, optional) [experimental]:
    Name of HFSS variable that specifies junction inductance Cj defined on the boundary condition in HFSS. DO NOT USE Global names that start with $.

Warning

To define junctions, do NOT use global names! I.e., do not use names in ansys that start with $.

Note

Junction parameters example . To define junction parameters, see the following example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Create project infor class
pinfo = ProjectInfo()

# Now, let us add a junction called `j1`, with the following properties
pinfo.junctions['j1'] = {
            'Lj_variable' : 'Lj_1', # name of Lj variable in Ansys
            'rect'        : 'jj_rect_1',
            'line'        : 'jj_line_1',
            #'Cj'          : 'Cj_1' # name of Cj variable in Ansys - optional
            }

To extend to define 5 junctions in bulk, we could use the following script

1
2
3
4
5
n_junctions = 5
for i in range(1, n_junctions + 1):
    pinfo.junctions[f'j{i}'] = {'Lj_variable' : f'Lj_{i}',
                                'rect'        : f'jj_rect_{i}',
                                'line'        : f'jj_line_{i}'}
check_connected()[source]

Checks if fully connected including setup.

connect()[source]

Do establish connection to Ansys desktop. Connects to project and then get design and setup

connect_design(design_name: str = None)[source]

Sets self.design self.design_name

connect_project()[source]

Sets self.app self.desktop self.project self.project_name self.project_path

connect_setup()[source]

Connect to the first available setup or create a new in eigenmode and driven modal

Raises:Exception – [description]
disconnect()[source]

Disconnect from existing Ansys Desktop API.

get_all_object_names()[source]

Returns array of strings

get_all_variables_names()[source]

Returns array of all project and local design names.

get_dm()[source]

Utility shortcut function to get the design and modeler.

oDesign, oModeler = pinfo.get_dm()
get_setup(name: str)[source]

Connects to a specific setup for the design. Sets self.setup and self.setup_name.

Parameters:
  • name (str) – Name of the setup.
  • the setup does not exist, then throws a logger error. (If) –
  • to None, in which case returns None (Defaults) –
save()[source]

Return all the data in a dictionary form that can be used to be saved

validate_junction_info()[source]

Validate that the user has put in the junction info correctly. Do not also forget to check the length of the rectangles/line of the junction if you change it.