EPRanalysis

class EPRanalysis(design: QDesign | None = None, renderer_name: str | None = None)[source]

From an input eigenmode dataset, apply the Energy Participation Ratio analysis method.

Default Setup:
  • junctions (Dict):
    • keys (str): Name of each Non-linear (Josephson) junction to consider in EPR

    • values (Dict):
      • Lj_variable (str): Name of renderer variable that specifies junction inductance.

      • Cj_variable (str): Name of renderer variable that specifies junction capacitance.

      • rect (str): Name of renderer rectangle on which the lumped boundary condition

        is defined.

      • line (str): Name of renderer line spanning the length of rect

        (voltage, orientation, ZPF).

  • dissipatives (Dict):
    • keys (str): Categories of dissipattives that can appear in the system. Possible keys

      are: ‘dielectrics_bulk’, ‘dielectric_surfaces’, ‘resistive_surfaces’, ‘seams’.

    • values (list of str): Names of the shapes composing that dissipative.

  • cos_trunc (int): truncation of the cosine function

  • fock_trunc (int): truncation of the fock

  • sweep_variable (str): Variable to sweep during EPR

Data Labels:
  • energy_elec (float): Name given to the current sweep.

  • energy_mag (float): Impedance matrix.

  • energy_elec_sub (float): Admittance matrix.

Performs Energy Participation Ratio (EPR) analysis on a simulated or user-provided eigenmode matrix.

Parameters:
  • design (QDesign) – Pointer to the main qiskit-metal design. Used to access the QRenderer. Defaults to None.

  • renderer_name (str, optional) – Which renderer to use. Valid entries: ‘hfss’. Defaults to None.

Attributes

data_labels = ['energy_elec', 'energy_mag', 'energy_elec_sub']

Default data labels.

default_setup = {'cos_trunc': 8, 'dissipatives': {'dielectrics_bulk': ['main']}, 'fock_trunc': 7, 'junctions': {'jj': {'Cj_variable': 'Cj', 'Lj_variable': 'Lj', 'line': '', 'rect': ''}}, 'sweep_variable': 'Lj'}

Default setup.

energy_elec

Getter

Returns:

Electric field energy stored in the system based on the eigenmode results.

Return type:

float

energy_elec_sub

Getter

Returns:

Electric field energy stored in the substrate based on the eigenmode results.

Return type:

float

energy_mag

Getter

Returns:

Magnetic field energy stored in the system based on the eigenmode results.

Return type:

float

logger

Returns the logger.

setup

Dictionary intended to be used to modify the analysis behavior.

Returns:

Current setup.

Return type:

Dict

Type:

Getter

supported_data

Set that contains the names of the variables supported from the analysis.

Returns:

list of supported variable names.

Return type:

set

Type:

Getter

Methods

add_junction(name_junction='jj', lj_var='Lj', cj_var='Cj', rect='', line='')[source]

Add a new junction for the EPR analysis

Parameters:
  • name_junction (str, optional) – name of the junction. Defaults to “jj”.

  • Lj_var (str, optional) – Name of the simulator variable referring to the inductance. Defaults to “Lj”.

  • Cj_var (str, optional) – Name of the simulator variable referring to the capacitance. Defaults to ‘Cj’.

  • rect (str, optional) – Name of the rectangle representing the junction in the simulation, as defined during rendering. Defaults to ‘’.

  • line (str, optional) – Name of the line representing the junction current flow in the simulation, as defined during rendering. Defaults to ‘’.

clear_data(data_name: str | list | None = None)

Clear data. Can optionally specify one or more labels to delete those labels and data.

Parameters:

data_name (Union[str, list], optional) – Can list specific labels to clean. Defaults to None.

del_junction(name_junction='jj')[source]

Remove a junction from the dictionary setup.junctions

Parameters:

name_junction (str, optional) – name of the junction to remove. Defaults to ‘jj’.

epr_start(no_junctions=False)[source]

Initialize epr package.

get_data(data_name: str | None = None)

Retrieves the analysis module data. Returns None if nothing is found.

Parameters:

data_name (str, optional) – Label to query for data. If not specified, the entire dictionary is returned. Defaults to None.

Returns:

The data associated with the label, or the entire list of labels and data.

Return type:

Any

get_data_labels() list

Retrieves the list of data labels currently set. Returns None if nothing is found.

Returns:

list of data names

Return type:

list

get_frequencies()[source]

Short-cut to the same-name method found in renderers.ansys_renderer.py. Eventually, the analysis code needs to be only here, and the renderer method deprecated.

get_stored_energy(no_junctions=False)[source]

Calculate the energy stored in the system based on the eigenmode results.

load_simulation_data(data_name: str, data)[source]

Load simulation data for the following analysis. This will override any data found

Parameters:
  • data_name (str) – name of the variable

  • data (Any) – simulation output

print_run_args()

Prints the args and kwargs that were used in the last run() of this Analysis instance.

report_hamiltonian(sweep_variable, numeric=True)[source]

Short-cut to the same-name method found in renderers.ansys_renderer.py. Eventually, the analysis code needs to be only here, and the renderer method deprecated.

run(*args, **kwargs)[source]

Executes sequentially the system capacitance simulation and lom extraction executing the methods EigenmodeSim.run_sim(*args, **kwargs) and EPRanalysis.run_epr(). For input parameter, see documentation for EigenmodeSim.run_sim().

Returns:

Pass numbers (keys) and respective energy participation ratio (values).

Return type:

(dict)

run_analysis()[source]

Short-cut to the same-name method found in renderers.ansys_renderer.py. Eventually, the analysis code needs to be only here, and the renderer method deprecated.

run_epr(no_junctions=False)[source]

Executes the epr analysis from the extracted eigenmode, and based on the setup values.

run_sweep(*args, **kwargs)

User requests sweeper based on arguments from Sweeper.run_sweep().

save_run_args(**kwargs)

Intended to be used to store the kwargs passed to the run() method, for repeatability and for later identification of the QAnalysis instance.

set_data(data_name: str, data: Any)

Stores data in a structure for later retrieval. Could be output, intermediate or even input data. Current implementation uses Dict()

Parameters:
  • data_name (str) – Label for the data. Used a storage key.

  • data (Any) – Free format

setup_update(section: str | None = None, **kwargs)

Intended to modify multiple setup settings at once, while retaining previous settings. If you intend to change a single setting, the better way is: setup.setting1 = value.

Parameters:

section (str) – Setup section that contains the setup keys to update.

spectrum_analysis(cos_trunc: int = 8, fock_trunc: int = 7)[source]

Short-cut to the same-name method found in renderers.ansys_renderer.py. Eventually, the analysis code needs to be only here, and the renderer method deprecated.