lumped_capacitive¶
Handles the capacitive simulation of a transmon pocket model.
Convert capacitance matrices extracted from Q3D into Hamiltonian parameters using the Duffing model. Typical input is the capacitance matrix calculated from Q3D.
Each function prints out the parameters and outputs a dictionary.
Functions
|
Get total shunt capacitance from charging energy In SI units. |
|
Critical current In SI units. |
|
Critical current In SI units. |
|
Calculate the charge line T1. |
|
Calculate the dispersive shift $chi$, where $2*chi$ is the |0> --> |1> splitting). |
|
Cost function for calculating C and IC given a C and IC calculate f and f02/2 from 'levels_vs_ng_real_units' and least square with measured f01,f02on2. |
|
Display the dataframe in the cmat style. |
|
Data frame handle reording of matrix basis. |
|
Primary analysis function called by the user for lumped-element mode (LOM) analysis. |
|
Get the capacitance and critical current for a transmon of a certain frequency and anharmonicity. |
|
This numerically computes the exact transmon levels given C and IC as a function of the ng ration -- it subtracts the vacuum flucations so that the ground state is set to zero energy. |
|
Load Q3D capcitance file exported as Maxwell matrix. |
|
Obtain a single result dataframe from a Q3D capacitance file pointed to by path. |
|
Utility function to swap index. |
|
Read in the txt file created from q3d export as CSV and output the capacitance matrix file exported by Ansys Q3D. |
|
Read in Q3D cap matrix from a .m file exported by Ansys Q3d. |
|
Properties of a transmon qubit. |
- Cs_from_Ec(Ec: float) float ¶
Get total shunt capacitance from charging energy In SI units.
- Parameters
Ec (float) – In Joules
- Returns
In farads
- Return type
float
- Ic_from_Ej(Ej: float) float ¶
Critical current In SI units.
- Parameters
Ej (float) – In Joules
- Returns
In Amps
- Return type
float
- Ic_from_Lj(Lj: float) float ¶
Critical current In SI units.
- Parameters
Lj (float) – In Henries
- Returns
In Amps
- Return type
float
- chargeline_T1(Ccharge, Cq, f01)¶
Calculate the charge line T1.
- Parameters
Cchare (float) – Ccharge
Cq (float) – Cq
f01 (float) – f01
- Returns
Calculated chargeline T1
- Return type
float
- chi(g: float, wr: float, w01: float, w12: float)¶
Calculate the dispersive shift $chi$, where $2*chi$ is the |0> –> |1> splitting).
Accounts for push on the i-th transmon level due to the j-th transmon level, mediated by cavity.
All args need to be in the same units.
- Parameters
g (float) – Qubit-cavity linear coupling.
wr (float) – Frequency of resonator.
w01 (float) – Qubit 01 transition frequency
w12 (float) – Qubit 12 transition frequency
- Returns
Calculated chi value
- Return type
float
- cos_to_mega_and_delta(Cin, ICin, f01, f02on2)¶
Cost function for calculating C and IC given a C and IC calculate f and f02/2 from ‘levels_vs_ng_real_units’ and least square with measured f01,f02on2.
- Parameters
Cin (float) – Cin
ICin (float) – ICin
f01 (float) – f01
f02on2 (float) – f02on2
- Returns
Calculated value
- Return type
float
- df_cmat_style_print(df_cmat: pandas.core.frame.DataFrame)¶
Display the dataframe in the cmat style.
- Parameters
df_cmat (dataframe) – Dataframe to display
- df_reorder_matrix_basis(df, i_from, i_to)¶
Data frame handle reording of matrix basis.
- Parameters
df (DataFrame) – Data frame to swap
i_from (int) – Index to move from
i_to (int) – Index to move to
- Returns
The changed index DataFrame
- Return type
DataFrame
- extract_transmon_coupled_Noscillator(capMatrix, Ic: float, CJ: float, N: int, fb: List[float], fr: float, res_L4_corr: Optional[float] = None, g_scale: float = 1.0, print_info: bool = False)¶
Primary analysis function called by the user for lumped-element mode (LOM) analysis. Uses a Maxwell capacitance matrix generated by a capacitive extractor, such as Q3D. Additionally takes more values to determine many parameters of the Hamiltonian of the system.
The capMatrix can be imported using readin_q3d_matrix
Calculate the χ The full dispersive splitting using analytical approximations, i.e., return the |0> –> |1> splitting.
- Parameters
capMatrix (np.ndarray) – Order of the capacitance matrix must be bus1…busN-1, ground, Qubit_pad1, Qubit_pad2, readout. (in F) If not in the correct order, use df_reorder_matrix_basis() to put it in the proper order. It is advised that the user follow a naming scheme in QiskitMetal or Q3D which results in the necessary order by default (eg. alphabetical)
Ic (float) – Junction Ic (in A)
Cj (float) – Junction capacitance (in F)
N (int) – Coupling pads (1 readout, N-1 bus)
fb (float) – Coupling bus and readout frequencies (in GHz). fb can be a list with the order the order they appear in the capMatrix.
fr (float) – Coupling bus and readout frequencies (in GHz). fr can be a list with the order the order they appear in the capMatrix.
res_L4_corr (list) – Correction factor is the resonators are L/4 if none it ignores, otherwise this is a list of length N in the form [1,0,1,…]. Defaults to None.
g_scale (float) – Scale factor
print_info (bool) – Print transmon and coupling properties. Defaults to False.
- Returns
ham_dict is a dictionary of all the calculated values
- Return type
dict
- Raises
ValueError – If N is not positive
ValueError – If the capacitance matrix is the wrong size
- get_C_and_Ic(Cin_est, Icin_est, f01, f02on2)¶
Get the capacitance and critical current for a transmon of a certain frequency and anharmonicity.
- Parameters
Cin_est (float) – Initial guess for capacitance (in fF)
Icin_est (float) – Initial guess for critical current (in nA)
f01 (float) – Transmon frequency (in GHz)
f02on2 (float) – 02/2 frequency (in GHz)
- Returns
[C,Ic] from levels_vs_ng_real_units that gives the specified frequency and anharmonicity
- Return type
tuple
- levels_vs_ng_real_units(Cq, IC, N=301, do_disp=0, do_plots=0)¶
This numerically computes the exact transmon levels given C and IC as a function of the ng ration – it subtracts the vacuum flucations so that the ground state is set to zero energy.
- Parameters
C (float) – In fF
Ic (float) – In nA
N (int) – Number of charge values to use (needs to be odd)
do_disp (int) – Will print out the values
do_plots (int) – Will plot the data
- Returns
fqubitGHz, anharMHz, disp, tphi_ms
- Return type
tuple
- Raises
ValueError – If the matrix is not Hermitian
- load_q3d_capacitance_matrix(path, user_units='fF', _disp=True)¶
Load Q3D capcitance file exported as Maxwell matrix. Do not export conductance. Units are read in automatically and converted to user units.
- Parameters
path (str) – Path to file.
user_units (str) – Units. Defaults to ‘fF’.
_disp (bool) – whehter or not to display messages. Defaults to True.
- Returns
df_cmat, user_units, design_variation, df_cond
- Return type
tupe
- lumped_oscillator_from_path(path: str, Lj_nH: float, Cj_fF: float, N: int, fr: Union[list, float], fb: Union[list, float]) pandas.core.frame.DataFrame ¶
Obtain a single result dataframe from a Q3D capacitance file pointed to by path. Similar to member method lumped_oscillator_vs_passes() of QQ3DRenderer but for a user provided capacitance matrix file.
- Parameters
path (str) – Path to file.
Lj_nH (float) – Junction inductance (in nH)
Cj_fF (float) – Junction capacitance (in fF)
N (int) – Coupling pads (1 readout, N - 1 bus)
fr (Union[list, float]) – Readout frequencies (in GHz). fr can be a list with the order they appear in the capMatrix.
fb (Union[list, float]) – Coupling bus frequencies (in GHz). fb can be a list with the order they appear in the capMatrix.
g_scale (float, optional) – Scale factor. Defaults to 1..
- Returns
A single dataframe corresponding to a single capacitance matrix
- Return type
dict
- move_index_to(i_from: List[int], i_to: List[int], len_)¶
Utility function to swap index.
- Parameters
i_from (int) – Data frame to swap index
i_to (int) – Data frame to index
len (int) – Length of array
- Returns
list of indecies, such as array([1, 2, 3, 4, 0, 5])
- Return type
list
- readin_q3d_matrix(path: str, delim_whitespace=True)¶
Read in the txt file created from q3d export as CSV and output the capacitance matrix file exported by Ansys Q3D.
When exporting pick “save as type: data table”
- Parameters
path (str) – Path to file
- Returns
df_cmat, units, design_variation, df_cond
- Return type
tuple
Example file:
DesignVariation:$BBoxL='650um' $boxH='750um' $boxL='2mm' $QubitGap='30um' $QubitH='90um' $QubitL='450um' Lj_1='13nH' Setup1:LastAdaptive Problem Type:C C Units:farad, G Units:mSie Reduce Matrix:Original Frequency: 5.5E+09 Hz Capacitance Matrix ground_plane Q1_bus_Q0_connector_pad Q1_bus_Q2_connector_pad Q1_pad_bot Q1_pad_top1 Q1_readout_connector_pad ground_plane 2.8829E-13 -3.254E-14 -3.1978E-14 -4.0063E-14 -4.3842E-14 -3.0053E-14 Q1_bus_Q0_connector_pad -3.254E-14 4.7257E-14 -2.2765E-16 -1.269E-14 -1.3351E-15 -1.451E-16 Q1_bus_Q2_connector_pad -3.1978E-14 -2.2765E-16 4.5327E-14 -1.218E-15 -1.1552E-14 -5.0414E-17 Q1_pad_bot -4.0063E-14 -1.269E-14 -1.218E-15 9.5831E-14 -3.2415E-14 -8.3665E-15 Q1_pad_top1 -4.3842E-14 -1.3351E-15 -1.1552E-14 -3.2415E-14 9.132E-14 -1.0199E-15 Q1_readout_connector_pad -3.0053E-14 -1.451E-16 -5.0414E-17 -8.3665E-15 -1.0199E-15 3.9884E-14 Conductance Matrix ground_plane Q1_bus_Q0_connector_pad Q1_bus_Q2_connector_pad Q1_pad_bot Q1_pad_top1 Q1_readout_connector_pad ground_plane 0 0 0 0 0 0 Q1_bus_Q0_connector_pad 0 0 0 0 0 0 Q1_bus_Q2_connector_pad 0 0 0 0 0 0 Q1_pad_bot 0 0 0 0 0 0 Q1_pad_top1 0 0 0 0 0 0 Q1_readout_connector_pad 0 0 0 0 0 0
- readin_q3d_matrix_m(path: str) pandas.core.frame.DataFrame ¶
Read in Q3D cap matrix from a .m file exported by Ansys Q3d.
- Parameters
path (str) – Path to .m file
- Returns
pd.DataFrame of cap matrix, with no names of columns.
- transmon_props(Ic: float, Cq: float)¶
Properties of a transmon qubit.
Calculate LJ, EJ, EC, wq, eps from Ic,Cq.
- Parameters
Ic (float) – Junction Ic (in A)
Cq (float) – Junction capacitance (in F)
- Returns
[LJ, EJ, Zqp, EC, wq, wq0, eps1] – Inductance
- Return type
tuple