Fluxonium
Fluxonium qubit: an LC circuit shunted by a Josephson junction with a large inductance.
- class HybridSuperQubits.fluxonium.Fluxonium(Ec, El, Ej, phase, dimension, flux_grouping='EL')[source]
Bases:
QubitBase- Parameters:
flux_grouping (Literal['EL', 'EJ'])
- PARAM_LABELS: dict[str, str] = {'Ec': '$E_C$', 'Ej': '$E_J$', 'El': '$E_L$', 'phase': '$\\Phi_{\\mathrm{ext}} / \\Phi_0$'}
- OPERATOR_LABELS: dict[str, str] = {'d_hamiltonian_d_EL': '\\partial \\hat{H} / \\partial E_L', '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, phase, dimension, flux_grouping='EL')[source]
Initializes the Ferbo class with the given parameters.
- 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:
- 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
- hamiltonian()[source]
Returns the Hamiltonian of the system.
- Returns:
The Hamiltonian of the system.
- 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
- d_hamiltonian_d_EJ()[source]
Returns the derivative of the Hamiltonian with respect to the Josephson energy Ej.
- Returns:
The derivative of the Hamiltonian with respect to Ej.
- Return type:
np.ndarray
- wavefunction(which=0, phi_grid=None, esys=None, basis='phase')[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’).
rotate (bool, optional) – Whether to rotate the basis (default is False).
- Returns:
Wave function data containing basis labels, amplitudes, and energy.
- Return type:
Dict[str, Any]
- potential(phi)[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.
- Returns:
The potential energy values.
- Return type:
np.ndarray
- plot_wavefunction(which=0, phi_grid=None, esys=None, scaling=1, plot_potential=False, basis='phase', 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’).
mode (Literal["abs", "real", "imag"], optional) – Mode of the wavefunction (‘abs’, ‘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]