squadds.calcs package#
Submodules#
squadds.calcs.coupled_transmons module#
Two transmons coupled to each other, each read out through a half-wave resonator: exact design from Hamiltonian targets.
Targets (GHz, f = omega / 2 pi) are the parameters of the Hamiltonian
H = sum_q H_transmon(E_J^q, E_C^q) + sum_r f_r c_r^+ c_r + K n_A n_B + sum_qr G_qr n_q (c_r + c_r^+) + R x_A x_B
f_q and eta of each exact transmon (charge basis), the bare f_r, J = K n01_A n01_B with the exact charge
matrix elements, and chi = half the dispersive shift computed from the full Hamiltonian (6 transmon levels in their
exact eigenbasis with every charge matrix element, 5 photons per resonator, counter-rotating terms kept; no rotating-wave
approximation). The circuit side maps a Maxwell matrix (fF; ground, cross A, cross B, claw A, claw B) plus lambda/2 lines
at the claws to E_C, K, G and R through the full inverse of the node capacitance matrix.
Used by the MCP tool solve_coupled_transmon_hamiltonian.
Only numpy and scipy are needed.
- squadds.calcs.coupled_transmons.charge_matrix_elements(EJ_EC)[source]#
|<0|n|1>|of the two transmons.
- squadds.calcs.coupled_transmons.circuit(M, fr_bare, Z0=50.0)[source]#
Circuit parameters (GHz) of a Maxwell matrix M (fF; ground, cross A, cross B, claw A, claw B) whose claws end lambda/2 lines that resonate (loaded) at fr_bare (GHz).
- squadds.calcs.coupled_transmons.circuit_numbers(M, c)[source]#
E_C^A, E_C^B, K, G_A, G_B (GHz) of a Maxwell matrix with the resonators of circuit c.
- squadds.calcs.coupled_transmons.compare(targets, c)[source]#
Target vs achieved Hamiltonian parameters of a circuit (MHz, magnitudes) with the miss in MHz and %.
- squadds.calcs.coupled_transmons.design_circuit(targets, G, EJ_EC=None)[source]#
The circuit of the targets’ Hamiltonian: exact transmons, bare resonators, K = J / (n01_A n01_B), and G.
- squadds.calcs.coupled_transmons.design_table(c)[source]#
E_J, E_C, E_J/E_C, L_J, I_c, n01, G, g = G n01 and
|chi|of both transmons, K and J (a DataFrame).
- squadds.calcs.coupled_transmons.dressed(c, nq=6, nr=5)[source]#
Dressed f_q, eta, f_r, chi (half the dispersive shift) of both sides and J = K n01_A n01_B (GHz).
- squadds.calcs.coupled_transmons.final_circuit(targets, M)[source]#
The circuit of a Maxwell matrix, with E_J chosen so that each transmon’s f01 is on target.
- squadds.calcs.coupled_transmons.fit_transmon(f01, eta)[source]#
E_J, E_C (GHz) of the transmon whose exact f01 and anharmonicity eta = f12 - f01 are the targets.
- squadds.calcs.coupled_transmons.goal(c)[source]#
The five circuit numbers a layout controls: E_C^A, E_C^B, K, G_A, G_B (GHz).
- squadds.calcs.coupled_transmons.h_params(c)[source]#
The Hamiltonian parameters of a circuit (GHz); chi from the full Hamiltonian.
- squadds.calcs.coupled_transmons.hamiltonian(c, nq=6, nr=5)[source]#
Full Hamiltonian (GHz) of two transmons and two resonators; c: EC, EJ, fr (pairs), K, G (2x2) and R (optional).
- squadds.calcs.coupled_transmons.ideal_reference(c)[source]#
A starting Maxwell matrix (fF) for
target_capacitanceswhen no layout exists yet: only the five controlled partial capacitances (rough circuit estimates), no claw-to-ground and no parasitic couplings.
- squadds.calcs.coupled_transmons.line_capacitance(f_line, Z0=50.0)[source]#
Lumped capacitance (F) of a lambda/2 line with fundamental f_line (GHz) near resonance.
- squadds.calcs.coupled_transmons.maxwell_from(P)[source]#
The Maxwell matrix of partial capacitances P (the inverse of
partials).
- squadds.calcs.coupled_transmons.partials(M)[source]#
Partial capacitances of a Maxwell matrix: P[i, j] = -M[i, j] between any two bodies (the ground included) and P[i, i] = row sum (body i to infinity).
- squadds.calcs.coupled_transmons.rwa_g(targets, q, chi)[source]#
The textbook (rotating-wave, two-level-like) coupling g for a dispersive shift chi.
- squadds.calcs.coupled_transmons.solve_couplings(targets, chi_A, chi_B)[source]#
G_A, G_B (GHz) for which the full Hamiltonian gives
|chi_A|and|chi_B|(GHz).
- squadds.calcs.coupled_transmons.target_capacitances(M_ref, c)[source]#
The Maxwell matrix that hits
goal(c), with every other partial capacitance (claw to ground, parasitics) from M_ref.
squadds.calcs.floating_transmon module#
Transmon Hamiltonians computed from the full Maxwell capacitance matrix of a planar qubit.
Rows carry positive magnitudes <a>_to_<b> (fF): the self terms <a>_to_<a> are the Maxwell diagonal and the
mutuals are \(|C_{ab}|\). The Maxwell matrix of the present conductors is rebuilt from them (ground excluded, every
conductor that is not part of the qubit mode held at ground: coupler pads are loaded by their resonators, whose
capacitance is much larger than the qubit’s).
FloatingTransmonHamiltonian: two islands (TransmonPocket), the pad-to-pad (differential) mode.XmonHamiltonian: one grounded island (Xmon) with any number of claws, \(C_\Sigma\) = Maxwell diagonal.
Both reuse the TransmonCross transmon approximations: \(E_J\) from the target \((f_q, \alpha)\) via
Transmon.find_EJ_EC, \(f_q\) and \(\alpha\) of each row from scqubits with that \(E_J\) and the row’s \(E_C\), and \(g\) from
TransmonCrossHamiltonian.g_from_cap_matrix on the equivalent grounded two-node circuit.
- squadds.calcs.floating_transmon.EC_GHz_from_Cs(C_fF)[source]#
\(E_C = e^2 / (2 C)\) in GHz for \(C\) in fF (the
TransmonCrossconversion).- Return type:
float
- class squadds.calcs.floating_transmon.FloatingTransmonHamiltonian(analysis)[source]#
Bases:
_MaxwellTransmonHamiltonianFloating (two-pad) transmon, e.g.
TransmonPocket: \(E_C = e^2 / (2 C_\mathrm{eff})\) of the pad-to-pad mode with the coupler pads loaded to ground (floating_transmon_capacitances()); \(g\) to the readout pad through \(C_{g,\mathrm{eff}}\).Initialize the TransmonCrossHamiltonian object.
- - analysis
The analysis object associated with the Hamiltonian.
- capacitances(row)[source]#
(C_sigma, C_g)of the qubit mode (fF) for one row;C_gtoreadout_coupler.
- couplers = ('readout_pad', 'bus_pad')#
- pads = ('pad_top', 'pad_bot')#
- readout_coupler = 'readout_pad'#
- class squadds.calcs.floating_transmon.XmonHamiltonian(analysis)[source]#
Bases:
_MaxwellTransmonHamiltonianGrounded cross with every claw: \(C_\Sigma = C_{\mathrm{cross,cross}}\) (Maxwell diagonal \(= C_{\mathrm{cross},g} + C_{\mathrm{cross,claw}} + C_{\mathrm{cross,bus\_claw}}\)), \(E_C = e^2 / (2 C_\Sigma)\).
TransmonCrosskeeps its own convention \(C_{\mathrm{cross},g} + C_{\mathrm{cross,claw}}\).Initialize the TransmonCrossHamiltonian object.
- - analysis
The analysis object associated with the Hamiltonian.
- capacitances(row)[source]#
(C_sigma, C_g)of the qubit mode (fF) for one row;C_gtoreadout_coupler.
- couplers = ('claw', 'bus_claw')#
- island = 'cross'#
- readout_coupler = 'claw'#
- squadds.calcs.floating_transmon.floating_transmon_capacitances(C, names, pads=('pad_top', 'pad_bot'), coupler=None)[source]#
Effective capacitance of the pad-to-pad mode and its effective coupling capacitance to one coupler (fF).
With every other conductor at ground, the two-pad block of the Maxwell matrix is \(\begin{pmatrix} C_{11} & -C_{12} \\ -C_{12} & C_{22} \end{pmatrix}\), \(C_{i\Sigma} = C_{ii} - C_{12}\) (pad \(i\) to ground plus every grounded coupler pad). The mode \(\varphi = V_1 - V_2\) (with \(Q_1 + Q_2 = 0\)) has
\(C_\mathrm{eff} = \frac{1}{(C^{-1})_{11} + (C^{-1})_{22} - 2 (C^{-1})_{12}} = C_{12} + \frac{C_{1\Sigma} C_{2\Sigma}}{C_{1\Sigma} + C_{2\Sigma}},\)
and a coupler \(k\) at voltage \(V_k\) drives it through the capacitive division
\(C_{g,\mathrm{eff}} = \frac{C_{2\Sigma} C_{1k} - C_{1\Sigma} C_{2k}}{C_{1\Sigma} + C_{2\Sigma}}, \qquad \beta = C_{g,\mathrm{eff}} / C_\mathrm{eff}.\)
Returns
(C_eff, |C_g_eff|); the second value is 0 whencoupleris None or absent.- Return type:
tuple[float, float]
- squadds.calcs.floating_transmon.maxwell_from_row(row, names, ground='ground')[source]#
Signed Maxwell matrix (fF) of the conductors in
namesthat a row carries (a conductor is present when its self term or its ground term is a number). A missing self term is rebuilt by closure, \(C_{aa} = C_{ag} + \sum_{b \ne a} |C_{ab}|\), over every present conductor.- Return type:
tuple[ndarray, list[str]]
squadds.calcs.qubit module#
- class squadds.calcs.qubit.QubitHamiltonian(analysis)[source]#
Bases:
ABC- abstractmethod E01(EJ, EC)[source]#
Calculate the energy difference between the ground state (|0>) and the first excited state (|1>) of a qubit.
- Parameters:
EJ (-) – Josephson energy of the qubit.
EC (-) – Charging energy of the qubit.
- Returns:
Energy difference between the ground state and the first excited state.
- Return type:
float
- abstractmethod E01_and_anharmonicity(EJ, EC)[source]#
Calculate the energy of the first excited state (E01) and the anharmonicity of a qubit.
- Parameters:
EJ (-) – Josephson energy of the qubit.
EC (-) – Charging energy of the qubit.
- Returns:
Energy of the first excited state. - anharmonicity (float): Anharmonicity of the qubit.
- Return type:
E01 (float)
- abstractmethod EC(cross_to_claw, cross_to_ground)[source]#
Performs error correction on the qubit.
- Parameters:
cross_to_claw (float) – The cross-talk probability from the qubit to the claw.
cross_to_ground (float) – The cross-talk probability from the qubit to the ground.
- Returns:
None
- abstractmethod EJ(f_q, alpha)[source]#
Calculate the Josephson energy (EJ) of a qubit.
- Parameters:
f_q (float) – The qubit frequency in Hz.
alpha (float) – The anharmonicity parameter.
- Returns:
The Josephson energy (EJ) in Joules.
- Return type:
float
- abstractmethod EJ_and_LJ(f_q, alpha)[source]#
Calculate the Josephson energy (EJ) and the Josephson inductance (LJ) for a given qubit frequency (f_q) and anharmonicity (alpha).
- Parameters:
f_q (float) – The qubit frequency in Hz.
alpha (float) – The anharmonicity of the qubit in Hz.
- Returns:
A tuple containing the Josephson energy (EJ) and the Josephson inductance (LJ).
- Return type:
tuple
- abstractmethod add_cavity_coupled_H_params()[source]#
Add parameters for cavity-coupled Hamiltonian.
- abstractmethod calculate_target_quantities(f_res, alpha, g, w_q, N, Z_0=50)[source]#
Calculate the target quantities for a qubit.
- Parameters:
f_res (-) – The resonance frequency of the qubit.
alpha (-) – The anharmonicity of the qubit.
g (-) – The coupling strength between the qubit and the resonator.
w_q (-) – The frequency of the qubit.
N (-) – The number of photons in the resonator.
Z_0 (-) – The characteristic impedance of the resonator. Default is 50 Ohms.
- Returns:
None
- abstractmethod g_alpha_freq(C, C_c, EJ, f_r, res_type, Z0=50)[source]#
Calculate the alpha and frequency of a qubit.
- Parameters:
C (-) – Capacitance of the qubit.
C_c (-) – Coupling capacitance.
EJ (-) – Josephson energy.
f_r (-) – Resonator frequency.
res_type (-) – Resonator type.
Z0 (-) – Characteristic impedance. Default is 50.
- Returns:
Qubit anharmonicity. - freq (float): Qubit frequency.
- Return type:
alpha (float)
- abstractmethod g_and_alpha(C, C_c, f_q, EJ, f_r, res_type, Z0=50)[source]#
Calculate the coupling strength (g) and anharmonicity (alpha) of a qubit.
- Parameters:
C (-) – Capacitance of the qubit.
C_c (-) – Coupling capacitance.
f_q (-) – Frequency of the qubit.
EJ (-) – Josephson energy of the qubit.
f_r (-) – Resonator frequency.
res_type (-) – Type of resonator.
Z0 (-) – Characteristic impedance of the transmission line. Default is 50 Ohms.
- Returns:
Coupling strength of the qubit. - alpha (float): Anharmonicity of the qubit.
- Return type:
g (float)
- abstractmethod g_from_cap_matrix(C, C_c, EJ, f_r, res_type, Z0=50)[source]#
Calculate the coupling strength ‘g’ of a qubit from the capacitance matrix.
- Parameters:
C (-) – The capacitance matrix.
C_c (-) – The coupling capacitance.
EJ (-) – The Josephson energy.
f_r (-) – The resonant frequency.
res_type (-) – The type of resonator.
Z0 (-) – The characteristic impedance. Default is 50 Ohms.
Returns: - g (float): The coupling strength of the qubit.
- abstractmethod get_freq_alpha_fixed_LJ(fig4_df, LJ_target)[source]#
Calculate the frequency alpha for a fixed LJ value.
- Parameters:
fig4_df (DataFrame) – The DataFrame containing the data for Fig. 4.
LJ_target (float) – The target LJ value.
- Returns:
The calculated frequency alpha.
- Return type:
float
squadds.calcs.transmon_cross module#
#!TODO: Generalize the half-wave cavity method usage
- squadds.calcs.transmon_cross.EC_numba_vectorized(cross_to_claw_arr, cross_to_ground_arr)[source]#
Vectorized EC calculation for arrays - much faster than loop.
- squadds.calcs.transmon_cross.Ec_from_Cs(Cs)[source]#
Calculate the charging energy (Ec) in GHz from the capacitance (Cs) in fF.
- class squadds.calcs.transmon_cross.TransmonCrossHamiltonian(analysis)[source]#
Bases:
QubitHamiltonianClass representing the Hamiltonian for a transmon qubit in a cross-coupled configuration.
Initialize the TransmonCrossHamiltonian object.
- - analysis
The analysis object associated with the Hamiltonian.
- E01(EJ, EC, ng=0, ncut=30)[source]#
Calculate the energy of the first excited state (E01) of a transmon qubit.
Uses cached calculations when ng=0 for significant speedup.
- Parameters:
EJ (-) – Josephson energy of the transmon qubit.
EC (-) – Charging energy of the transmon qubit.
ng (-) – Offset charge on the transmon qubit. Default is 0.
ncut (-) – Truncation level for the transmon qubit’s Hilbert space. Default is 30.
- Returns:
Energy of the first excited state (E01) of the transmon qubit.
- Return type:
E01 (float)
- E01_and_anharmonicity(EJ, EC, ng=0, ncut=30)[source]#
Calculate the energy of the first excited state (E01) and the anharmonicity (alpha) of a transmon qubit.
Uses cached calculations when ng=0 for significant speedup on large datasets.
- Parameters:
EJ (-) – Josephson energy of the transmon qubit.
EC (-) – Charging energy of the transmon qubit.
ng (-) – Offset charge on the transmon qubit. Defaults to 0.
ncut (-) – Truncation level for the transmon qubit’s Hilbert space. Defaults to 30.
- Returns:
Energy of the first excited state (E01) in GHz. - alpha (float): Anharmonicity (alpha) in MHz.
- Return type:
E01 (float)
- EC(cross_to_claw, cross_to_ground)[source]#
Calculate the charging energy (EC) of the transmon qubit.
- Parameters:
cross_to_claw (-) – Capacitance between the cross and the claw.
cross_to_ground (-) – Capacitance between the cross and the ground.
- Returns:
The charging energy of the transmon qubit.
- Return type:
EC
- EJ(w_q, alpha)[source]#
Calculate the Josephson energy (EJ) based on the given qubit frequency (w_q) and anharmonicity (alpha).
- Parameters:
w_q (-) – The qubit frequency.
alpha (-) – The anharmonicity of the qubit.
- Returns:
The Josephson energy of the qubit.
- Return type:
EJ
- EJ_and_LJ(w_q, alpha, *args, **kwargs)[source]#
Calculate the Josephson energy (EJ) and Josephson inductance (Lj) based on the given qubit frequency (w_q) and anharmonicity (alpha).
- Parameters:
w_q (-) – The qubit frequency.
alpha (-) – The anharmonicity of the qubit.
- Returns:
The Josephson energy of the qubit. - Lj: The Josephson inductance of the qubit.
- Return type:
EJ
- add_cavity_coupled_H_params(num_chunks='auto', Z_0=50)[source]#
Add cavity-coupled Hamiltonian parameters to the dataframe.
This method calculates the coupling strength ‘g_MHz’ between the transmon qubit and the cavity, based on the capacitance matrix, transmon parameters, cavity frequency, resonator type, and characteristic impedance.
Optimization: Pre-computes all unique transmon parameters in the main process before parallel processing, avoiding redundant matrix diagonalizations across workers.
- Parameters:
num_chunks (-) – The number of chunks to split the DataFrame into for parallel processing. Default is “auto” which sets the number of chunks to the number of logical CPUs.
Z_0 (-) – The characteristic impedance of the transmission line. Default is 50 ohms.
- Returns:
None
- add_qubit_H_params()[source]#
Add qubit Hamiltonian parameters to the DataFrame.
This method calculates and adds the qubit Hamiltonian parameters, such as EC, EJ, and EJEC, to the DataFrame.
- Parameters:
None
- Returns:
None
- add_qubit_H_params_chunk(df)[source]#
Add qubit Hamiltonian parameters to the DataFrame chunk.
This method calculates and adds the qubit Hamiltonian parameters, such as EC, EJ, and EJEC.
Optimization: Since EJ is constant for all rows, we only compute E01/anharmonicity for unique EC values (rounded to reduce count), then map results back. This avoids redundant Transmon instantiations and matrix diagonalizations.
- Parameters:
df (-) – The DataFrame chunk to which the parameters will be added.
- Returns:
The DataFrame chunk with the added parameters
- Return type:
df
- calculate_target_quantities(f_res, alpha, g, w_q, res_type, Z_0=50)[source]#
Calculate the target quantities (C_q, C_c, EJ, EC, EJ_EC_ratio) based on the given parameters.
- Uses the capacitance matrix formula to solve for C_c numerically:
g = (C_g / sqrt(C_Sigma)) * sqrt(hbar * omega_r * e^2 / det(C)) * (E_J / (8 * E_C))^(1/4)
- Parameters:
f_res (-) – The resonator frequency (in GHz).
alpha (-) – The anharmonicity of the qubit (in GHz).
g (-) – The coupling strength between the qubit and the resonator (in MHz).
w_q (-) – The qubit frequency (in GHz).
res_type (-) – The type of resonator (‘half’ or ‘quarter’).
Z_0 (-) – The characteristic impedance of the resonator (in ohms). Default is 50.
- Returns:
The total capacitance of the qubit (in fF). - C_c: The coupling capacitance between the qubit and the resonator (in fF). - EJ: The Josephson energy of the qubit (in GHz). - EC: The charging energy of the qubit (in GHz). - EJ_EC_ratio: The ratio of EJ to EC.
- Return type:
C_q
- chi(EJ, EC, g, f_r)[source]#
Calculate the full cavity frequency shift between |0> and |1> states of a qubit using g, f_r, f_q, and alpha. It uses the result derived using 2nd-order perturbation theory (equation 9 in SQuaDDS paper). :param - EJ: Josephson energy of the transmon qubit. :type - EJ: float :param - EC: Charging energy of the transmon qubit. :type - EC: float :param - g: The coupling strength between the qubit and the cavity. :type - g: float :param - f_r: The resonant frequency of the cavity. :type - f_r: float :param - f_q: The frequency spacing between the first two qubit levels. :type - f_q: float
- Returns:
The full dispersive shift of the cavity
- Return type:
chi (float)
- g_alpha_freq(C, C_c, EJ, f_r, res_type, Z0=50)[source]#
Calculate the coupling strength, anharmonicity, and transition frequency of a transmon qubit.
- Parameters:
C (-) – Total capacitance of the transmon qubit.
C_c (-) – Coupling capacitance between the transmon qubit and the resonator.
EJ (-) – Josephson energy of the transmon qubit.
f_r (-) – Resonator frequency.
res_type (-) – Type of resonator. Must be either ‘half’ or ‘quarter’.
Z0 (-) – Characteristic impedance of the transmission line. Defaults to 50.
- Returns:
A tuple containing the coupling strength (g), anharmonicity (alpha), and transition frequency (freq).
- Return type:
(g, alpha, freq) (tuple)
- g_and_alpha(C, C_c, f_q, EJ, f_r, res_type, Z0=50)[source]#
Calculate the coupling strength (g) and anharmonicity (alpha) based on the given parameters.
- Parameters:
C (-) – The capacitance between the qubit and the ground.
C_c (-) – The coupling capacitance between the qubit and the resonator.
f_q (-) – The qubit frequency.
EJ (-) – The Josephson energy of the qubit.
f_r (-) – The resonator frequency.
res_type (-) – The type of resonator.
Z0 (-) – The characteristic impedance of the resonator.
- Returns:
The coupling strength between the qubit and the resonator. - alpha: The anharmonicity of the qubit.
- Return type:
g
- g_from_cap_matrix(C, C_c, EJ, f_r, res_type, Z0=50)[source]#
Calculate the coupling strength ‘g’ between a transmon qubit and a resonator based on the capacitance matrix formalism.
- Uses the formula:
g = (C_g / sqrt(C_Q + C_g)) * sqrt(hbar * omega_r * e^2 / det(C)) * (E_J / (8 * E_C,Q))^(1/4)
where det(C) = (C_Q + C_g)(C_r + C_g) - C_g^2 is the determinant of the capacitance matrix:
- C = [[C_Q + C_g, -C_g ],
[ -C_g, C_r + C_g]]
- Parameters:
C (-) – Qubit self-capacitance to ground, C_Q (in femtofarads, fF).
C_c (-) – Coupling capacitance between qubit and resonator, C_g (in femtofarads, fF).
EJ (-) – Josephson energy of the qubit (in GHz).
f_r (-) – Resonator frequency (in GHz).
res_type (-) – Type of resonator. Can be ‘half’ or ‘quarter’.
Z0 (-) – Characteristic impedance of the transmission line (in ohms). Default is 50 ohms.
- Returns:
Coupling strength ‘g’ between the qubit and the resonator (in MHz).
- Return type:
g (float)
- get_freq_alpha_fixed_LJ(fig4_df, LJ_target)[source]#
Calculate the frequencies and anharmonicities of transmons with a fixed LJ value.
- Parameters:
fig4_df (-) – DataFrame containing the values of EC for different transmons.
LJ_target (-) – Target value of LJ in nH.
- Returns:
List of frequencies of the transmons. - alpha: List of anharmonicities of the transmons.
- Return type:
freq
- squadds.calcs.transmon_cross.g_from_cap_matrix_numba(C, C_c, EJ, f_r, res_type, Z0=50)[source]#
Calculate coupling strength ‘g’ using the capacitance matrix formalism (numba-accelerated).
- Uses the formula:
g = (C_g / sqrt(C_Q + C_g)) * sqrt(hbar * omega_r * e^2 / det(C)) * (E_J / (8 * E_C,Q))^(1/4)
where det(C) = (C_Q + C_g)(C_r + C_g) - C_g^2
- Parameters:
C (-) – Qubit self-capacitance to ground, C_Q (in fF).
C_c (-) – Coupling capacitance, C_g (in fF).
EJ (-) – Josephson energy (in GHz).
f_r (-) – Resonator frequency (in GHz).
res_type (-) – ‘half’ or ‘quarter’ wave resonator.
Z0 (-) – Characteristic impedance (ohms). Default 50.
- Returns:
Coupling strength in MHz.
- Return type:
g (float)
- squadds.calcs.transmon_cross.g_from_cap_matrix_vectorized(cross_to_ground_arr, cross_to_claw_arr, EJ_arr, cavity_freq_arr, res_type_val, Z0=50)[source]#
Vectorized calculation of g for arrays of inputs (numba-accelerated). Much faster than looping in Python.
- Parameters:
cross_to_ground_arr – Array of C_ground (fF)
cross_to_claw_arr – Array of C_coupling (fF)
EJ_arr – Array of EJ (GHz)
cavity_freq_arr – Array of resonator freq (GHz)
res_type_val – Integer (2 for half, 4 for quarter)
Z0 – Characteristic impedance