Ferbo
The Fermionic-Bosonic (FerBo) qubit: a hybrid semiconductor-superconductor circuit coupling Andreev bound states in a weak link to the bosonic mode of an LC oscillator.
See Theory background for the physics background and the companion paper for a detailed treatment.
- class HybridSuperQubits.ferbo.Ferbo(Ec, El, Ej, Gamma, delta_Gamma, er, phase, dimension, flux_grouping='ABS', Delta=40)[source]
Bases:
QubitBase- Parameters:
flux_grouping (Literal['EL', 'ABS'])
- PARAM_LABELS: dict[str, str] = {'Ec': '$E_C$', 'Ej': '$E_J$', 'El': '$E_L$', 'Gamma': '$\\Gamma$', 'delta_Gamma': '$\\delta \\Gamma$', 'er': '$\\epsilon_r$', 'phase': '$\\Phi_{\\mathrm{ext}} / \\Phi_0$'}
- OPERATOR_LABELS: dict[str, str] = {'d_hamiltonian_d_EL': '\\partial \\hat{H} / \\partial E_L', 'd_hamiltonian_d_deltaGamma': '\\partial \\hat{H} / \\partial \\delta \\Gamma', 'd_hamiltonian_d_er': '\\partial \\hat{H} / \\partial \\epsilon_r', 'd_hamiltonian_d_ng': '\\partial \\hat{H} / \\partial n_g', 'd_hamiltonian_d_phase': '\\partial \\hat{H} / \\partial \\phi_{{ext}}', 'n_operator': '\\hat{n}', 'phase_operator': '\\hat{\\phi}'}
- __init__(Ec, El, Ej, Gamma, delta_Gamma, er, phase, dimension, flux_grouping='ABS', Delta=40)[source]
Initializes the Ferbo class with the given parameters.
- Parameters:
Ec (float) – Charging energy.
El (float) – Inductive energy.
Ej (float) – Josephson energy.
Gamma (float) – Coupling strength.
delta_Gamma (float) – Coupling strength difference.
er (float) – Energy relaxation rate.
phase (float) – External magnetic phase.
dimension (int) – Dimension of the Hilbert space.
flux_grouping (Literal["EL", "ABS"], optional) – Flux grouping (‘EL’ or ‘ABS’) (default is ‘ABS’).
Delta (float) – Superconducting gap.
- property phase_zpf: float
Returns the zero-point fluctuation of the phase.
- Returns:
Zero-point fluctuation of the phase.
- Return type:
- property n_zpf: float
Returns the zero-point fluctuation of the charge number.
- Returns:
Zero-point fluctuation of the charge number.
- Return type:
- property transparency: float
Return the transparency of the weak link.
- Returns:
Transparency of the weak link.
- Return type:
- phi_osc()[source]
Returns the oscillator length for the LC oscillator composed of the inductance and capacitance.
- Returns:
Oscillator length.
- Return type:
- n_operator()[source]
Returns the charge number operator.
- Returns:
The charge number operator.
- Return type:
np.ndarray
- phase_operator()[source]
Returns the total phase operator.
- Returns:
The total phase operator.
- Return type:
np.ndarray
- jrl_potential()[source]
Returns the Josephson Resonance Level potential.
- Returns:
The Josephson Resonance Level potential.
- Return type:
np.ndarray
- hamiltonian()[source]
Returns the Hamiltonian of the system.
- Returns:
The Hamiltonian of the system.
- Return type:
np.ndarray
- d_hamiltonian_d_EC()[source]
Returns the derivative of the Hamiltonian with respect to the charging energy.
- Returns:
The derivative of the Hamiltonian with respect to the charging energy.
- Return type:
np.ndarray
- d_hamiltonian_d_EL()[source]
Returns the derivative of the Hamiltonian with respect to the inductive energy.
- Returns:
The derivative of the Hamiltonian with respect to the inductive energy.
- Return type:
np.ndarray
- d_hamiltonian_d_EJ()[source]
Returns the derivative of the Hamiltonian with respect to the Josephson energy.
- Returns:
The derivative of the Hamiltonian with respect to the Josephson energy.
- Return type:
np.ndarray
- d_hamiltonian_d_Gamma()[source]
Returns the derivative of the Hamiltonian with respect to Gamma.
- Returns:
The derivative of the Hamiltonian with respect to Gamma.
- Return type:
np.ndarray
- d_hamiltonian_d_er()[source]
Returns the derivative of the Hamiltonian with respect to the energy relaxation rate.
- Returns:
The derivative of the Hamiltonian with respect to the energy relaxation rate.
- Return type:
np.ndarray
- d_hamiltonian_d_deltaGamma()[source]
Returns the derivative of the Hamiltonian with respect to the coupling strength difference.
- Returns:
The derivative of the Hamiltonian with respect to the coupling strength difference.
- Return type:
np.ndarray
- d2_hamiltonian_d_Gamma2()[source]
Returns the second derivative of the Hamiltonian with respect to Gamma.
- Returns:
The second derivative of the Hamiltonian with respect to Gamma.
- Return type:
np.ndarray
- d2_hamiltonian_d_deltaGamma2()[source]
Returns the second derivative of the Hamiltonian with respect to the coupling strength difference.
- Returns:
The second derivative of the Hamiltonian with respect to the coupling strength difference.
- Return type:
np.ndarray
- d2_hamiltonian_d_er2()[source]
Returns the second derivative of the Hamiltonian with respect to the energy relaxation rate.
- Returns:
The second derivative of the Hamiltonian with respect to the energy relaxation rate.
- Return type:
np.ndarray
- d_hamiltonian_d_ng()[source]
Returns the derivative of the Hamiltonian with respect to the number of charge offset.
- Returns:
The derivative of the Hamiltonian with respect to the number of charge offset.
- Return type:
np.ndarray
- d2_hamiltonian_d_ng2()[source]
Returns the second derivative of the Hamiltonian with respect to the number of charge offset.
- Returns:
The second derivative of the Hamiltonian with respect to the number of charge offset.
- Return type:
np.ndarray
- d_hamiltonian_d_phase()[source]
Returns the derivative of the Hamiltonian with respect to the external magnetic phase.
- Returns:
The derivative of the Hamiltonian with respect to the external magnetic phase.
- Return type:
np.ndarray
- d2_hamiltonian_d_phase2()[source]
Returns the second derivative of the Hamiltonian with respect to the external magnetic phase.
- Returns:
The second derivative of the Hamiltonian with respect to the external magnetic phase.
- Return type:
np.ndarray
- wigner(which=0, phi_grid=None, n_grid=None, esys=None)[source]
Computes the Wigner function for a given wavefunction.
- Parameters:
which (int, optional) – Index of desired wavefunction (default is 0).
phi_grid (np.ndarray, optional) – Custom grid for phi; if None, a default grid is used.
n_grid (np.ndarray, optional) – Custom grid for n; if None, a default grid is used.
esys (Tuple[np.ndarray, np.ndarray], optional) – Precomputed eigenvalues and eigenvectors.
- Returns:
The Wigner function.
- Return type:
np.ndarray
- reduced_density_matrix(which=0, esys=None, subsys=0)[source]
Computes the reduced density matrix for a given wavefunction.
- Parameters:
which (int, optional) – Index of desired wavefunction (default is 0).
esys (Tuple[np.ndarray, np.ndarray], optional) – Precomputed eigenvalues and eigenvectors.
subsys (int, optional) – Subsystem to compute the reduced density matrix for (default is 0). 0 for the tracing out the Fock states, 1 for the Andreev states.
- Returns:
The reduced density matrix.
- Return type:
np.ndarray
- wavefunction(which=0, phi_grid=None, esys=None, basis='phase', representation='ballistic')[source]
Returns a wave function in the phi basis.
- Parameters:
which (int, optional) – Index of desired wave function (default is 0).
phi_grid (np.ndarray, optional) – Custom grid for phi; if None, a default grid is used.
basis (Literal["phase", "charge"], optional) – Basis in which to return the wavefunction (‘phase’ or ‘charge’) (default is ‘phase’).
representation (Literal["ballistic", "Andreev"], optional) – Representation used for the two-component wavefunction. Use ‘ballistic’ for the basis used to define the Hamiltonian matrix, or ‘Andreev’ for the local phi-dependent eigenbasis of the Andreev sector.
- Returns:
Wave function data containing basis labels, amplitudes, and energy.
- Return type:
Dict[str, Any]
- potential(phi, return_evecs=False, include_berry=True)[source]
Calculates the potential energy for given values of phi.
- Parameters:
phi (Union[float, np.ndarray]) – The phase values at which to calculate the potential.
return_evecs (bool, optional) – If True, returns both eigenvalues and eigenvectors (default is False).
include_berry (bool, optional) – If True, includes the scalar Berry correction in the potential eigenvalues (default is True).
- Returns:
If return_evecs is False: The potential energy values (eigenvalues). If return_evecs is True: A tuple of (eigenvalues, eigenvectors). Eigenvalues shape: (len(phi), 2) Eigenvectors shape: (len(phi), 2, 2) where each [i, :, :] is the rotation matrix at phi[i]
- Return type:
Union[np.ndarray, Tuple[np.ndarray, np.ndarray]]
- plot_wavefunction(which=0, phi_grid=None, esys=None, scaling=1, plot_potential=False, basis='phase', andreev_basis='ballistic', mode='abs', **kwargs)[source]
Plot the wave function in the phi basis.
- Parameters:
which (Union[int, Iterable[int]], optional) – Index or indices of desired wave function(s) (default is 0).
phi_grid (np.ndarray, optional) – Custom grid for phi; if None, a default grid is used.
esys (Tuple[np.ndarray, np.ndarray], optional) – Precomputed eigenvalues and eigenvectors.
scaling (float, optional) – Scaling factor for the wavefunction (default is 1).
plot_potential (bool, optional) – Whether to plot the potential (default is False).
basis (Literal["phase", "charge"], optional) – Basis in which to return the wavefunction (‘phase’ or ‘charge’) (default is ‘phase’).
andreev_basis (Literal["ballistic", "Andreev"], optional) – Andreev basis used for plotting. Use ‘ballistic’ for the basis used to define the Hamiltonian matrix, or ‘Andreev’ for the local phi-dependent Andreev eigenbasis.
mode (Literal["abs", "abs2", "real", "imag"], optional) – Mode of the wavefunction (‘abs’, ‘abs2’, ‘real’, or ‘imag’) (default is ‘abs’).
**kwargs –
Additional arguments for plotting. Can include: - fig_ax: Tuple[plt.Figure, plt.Axes], optional
Figure and axes to use for plotting. If not provided, a new figure and axes are created.
- Returns:
The figure and axes of the plot.
- Return type:
Tuple[plt.Figure, plt.Axes]
- plot_state(which=0, phi_grid=None, n_grid=None, wigner_func=False, esys=None, plot_bloch=False, **kwargs)[source]
Plot the Wigner function of the state and the Bloch sphere.
- Parameters:
which (int, optional) – Index of desired wavefunction (default is 0).
phi_grid (np.ndarray, optional) – Custom grid for phi; if None, a default grid is used.
n_grid (np.ndarray, optional) – Custom grid for n; if None, a default grid is used.
wigner_func (bool, optional) – Precomputed wigner_func function (default is False).
esys (Tuple[np.ndarray, np.ndarray], optional) – Precomputed eigenvalues and eigenvectors.
plot_bloch (bool, optional) – Whether to plot the Bloch sphere (default is False).
**kwargs (dict, optional) –
Additional arguments for plotting. Can include: - fig_ax: Tuple[plt.Figure, plt.Axes], optional
Figure and axes to use for plotting. If not provided, a new figure and axes are created.
- cmap: str, optional
Colormap to use for the Wigner function (default is ‘seismic’).
- bloch_view: Tuple[float, float], optional
Tuple with (elevation, azimuth) for Bloch sphere view (default is (-30, 60)).
- bloch_position: Tuple[float, float, float, float], optional
Position of the Bloch sphere inset in figure coordinates (left, bottom, width, height). If not provided, a default position is calculated.
- Returns:
The figure and axes of the plot.
- Return type:
Tuple[plt.Figure, plt.Axes]