qdesignoptimizer.design_analysis module
Core class for managing, optimizing and analyzing quantum circuit designs using electromagnetic simulations.
- class qdesignoptimizer.design_analysis.DesignAnalysis(state: DesignAnalysisState, mini_study: MiniStudy, opt_targets: List[OptTarget] | None = None, save_path: str = 'analysis_result', update_design_variables: bool = True, plot_settings: dict | None = None, meshing_map: List[MeshingMap] | None = None, minimization_tol=1e-12)[source]
Bases:
object
Manager for quantum circuit design optimization and electromagnetic simulation.
Handles the workflow of:
Simulation setup for eigenmode and capacitance calculations
Parameter extraction from simulations
Design variable optimization based on physical targets
Result tracking and visualization
This class integrates HFSS/ANSYS simulations with Qiskit Metal designs to automate the optimization of superconducting circuit parameters.
- Parameters:
state (DesignAnalysisState) – State object containing design, render function, and target parameters.
mini_study (MiniStudy) – Simulation parameters including component names, modes, and passes.
opt_targets (List[OptTarget]) – List of target physical parameters to optimize and their design variable relationships.
save_path (str) – Location to save optimization results.
update_design_variables (bool) – Whether to automatically update design files with optimized values.
plot_settings (dict) – Configuration for progress visualization plots.
meshing_map (List[MeshingMap]) – Custom mesh refinement configurations for specific components.
minimization_tol (float) – tolerance used to terminate the solution of an optimization step.
- update_nbr_passes_capacitance_ministudies(nbr_passes: int)[source]
Updates the number of passes for capacitance matrix studies.
- update_var(updated_design_vars: dict, system_optimized_params: dict)[source]
Update junction and design variables in mini_study, design, pinfo and.
- get_fine_mesh_names()[source]
The fine mesh for the eigenmode study of HFSS can be set in two different ways. First, via an attribute in the component class with function name “get_meshing_names”. This function should return the list of part names, e.g. {name}_flux_line_left. The second option is to specify the part names via the meshing_map as keyword in the DesginAnalysis class.
- get_simulated_modes_sorted()[source]
Get simulated modes sorted on value.
- Returns:
list of modes sorted on freq_value
- Return type:
List[tuple]
- static get_parameter_value(target: OptTarget, system_params: dict) float [source]
Return value of parameter from target specification.
- get_system_params_targets_met() dict[str, float] [source]
Return organized dictionary of parameters given target specifications and current status.
- optimize_target(updated_design_vars_input: dict, system_optimized_params: dict)[source]
Run full optimization iteration to adjust design variables toward target parameters.
Performs these steps in sequence:
Updates design variables and system parameters
Runs eigenmode simulation to extract frequencies and decay rates
Performs energy participation ratio (EPR) analysis for nonlinearities
Executes capacitance matrix studies if configured
Saves results and generates visualization plots
- Parameters:
Note
Assumes modes are simulated in the same order as target frequencies for correct assignment. Mismatched orders will cause incorrect parameter mapping.
- get_cross_kerr_matrix(iteration: int = -1) DataFrame | None [source]
Get cross kerr matrix from EPR analysis.
- Parameters:
iteration (int) – simulation iteration number defaults to the most recent iteration
- Returns:
cross kerr matrix
- Return type:
pd.DataFrame
- get_eigenmode_results(iteration: int = -1) DataFrame | None [source]
Get eigenmode results.
- Parameters:
iteration (int) – simulation iteration number defaults to the most recent iteration
- Returns:
eigenmode results
- Return type:
pd.DataFrame