bfqcircuits.utils package
Utils of Black Forest Quantum Circuits
Submodules
bfqcircuits.utils.resonator_atom module
- class bfqcircuits.utils.resonator_atom.ResonatorAtom
Bases:
object- add_groundstate_energy()
Adds ground state energy to self.E.
- Returns:
None.
- add_groundstate_energy_sweep()
Subtracts ground state energy from self.E_sweep.
- Returns:
None.
- associate_levels(dE, na_max=-1, nr_max=-1)
Associating resonator and atom excitations to the system eigenstates. The states are identified by their mutual resonator charge dipole moment when climbing up the excitation ladder. This association is only meaningful for a weak resonator atom coupling.
- Parameters:
dE – allowed frequency variation of the resonator photons when climbing up the excitation ladder. A large value for dE slows down the sorting as more resonator charge dipole moments to all the states within dE have to be calculated. If no next state is found within dE, self.E_trust is set to the current state energy.
na_max – restricts the number of qubit states that are identified. By default, na_max is set to self.Na.
nr_max – restricts the number of resonator states that are identified. This parameter will certainly reduce self.E_trust and with that might limit the number of qubit states that will be identified. By default, nr_max is set to self.Nr.
- Returns:
None.
- associate_levels_sweep(dE=0.1, na_max=-1, nr_max=-1)
Association of resonator and atom excitations to the system eigenstates for each sweep parameter. The states are identified by their mutual resonator charge dipole moment when climbing up the excitation ladder. This association is only meaningful for a weak resonator atom coupling.
- Parameters:
dE – allowed frequency variation of the resonator photons when climbing up the excitation ladder. A large value for dE slows down the sorting as more resonator charge dipole moments to all the states within dE have to be calculated. If no next state is found within dE, self.E_trust is set to the current state energy.
na_max – restricts the number of qubit states that are identified. By default, na_max is set to self.Na.
nr_max – restricts the number of resonator states that are identified. This parameter will certainly reduce self.E_trust and with that might limit the number of qubit states that will be identified. By default, nr_max is set to self.Nr.
- Returns:
None
- calc_atom_dipole_moments(state1, state2) -> (<class 'float'>, <class 'float'>)
- calc_atom_dipole_moments_sweep(state1, state2)
Calculation of the atom flux and charge dipole moments between two states.
- Parameters:
state1 – integer or tupel (na, nr), which requires that the states have been sorted.
state2 – integer or tupel (na, nr), which requires that the states have been sorted.
- Returns:
None.
- calc_resonator_dipole_moments(state1, state2) -> (<class 'float'>, <class 'float'>)
- calc_resonator_dipole_moments_sweep(state1, state2)
Calculation of the resonator flux and charge dipole moments between two states.
- Parameters:
state1 – integer or tupel (na, nr), which requires that the states have been sorted.
state2 – integer or tupel (na, nr), which requires that the states have been sorted.
- Returns:
None.
- derive_spectrum_properties()
Calculation of various spectrum properties (resonator transitions, atom spectrum, dispersive/stark shift).
- Returns:
None.
- derive_spectrum_properties_sweep()
Calculation of various spectrum properties (resonator transitions, atom spectrum, dispersive/stark shift) as a function of the sweep parameter.
- Returns:
None.
- diagonalize_hamiltonian()
Numerical diagonalization of the Hamiltonian.
- Returns:
None.
- inspect_sweep(step)
Reset system to a specific sweep step. The routine assumes that the sweep has already been performed.
- Param:
step: step of the sweep.
- Returns:
None.
- plot_chi_sweep(ax, na, nr)
Plot dispersive shift as a function of the sweep parameter.
- Parameters:
ax – matplotlib axes instance.
nr – int or list of resonator states.
na – int or list of atom states.
- Returns:
None.
- plot_energy_convergence(ax, n)
Plot of energy convergence. This routine assumes that a convergence sweep has been performed beforehand.
- Parameters:
ax – matplotlib axes instance.
n – number of lower states that will be plotted.
- Returns:
None.
- plot_energy_sweep(ax, n)
Plot of unsorted energies as a function of the sweep parameter.
- Parameters:
ax – matplotlib axes instance.
n – list/array of states that will be plotted.
- Returns:
None.
- plot_energy_sweep_wrapped(ax, n_col, n_tot, E_ref)
Plot of unsorted energies modulo the reference energy as a function of the sweep parameter.
- Parameters:
ax – matplotlib axes instance.
n_col – number of lower states that will be plotted with colors.
n_tot – number of lower states that will be plotted.
E_ref – int or 1D numpy array of size self.par_sweep with reference energies.
- Returns:
E_max: maximum plotted energy.
- plot_res_dipole_to_various_states_sweep(ax, ref_state, state_list, dipole='flux')
3D plot of dipole moments as a function of the sweep parameter.
- Parameters:
ax – matplotlib axes instance with projection=”3d”.
ref_state – state of interest.
state_list – list of other states.
dipole – either “flux” or “charge” for flux and charge dipole moments, respectively.
- Returns:
None.
- plot_resonator_transitions_sweep(ax, na, nr)
Plot resonator transition energies as a function of the sweep parameter.
- Parameters:
ax – matplotlib axes instance.
nr – int or list of resonator states.
na – int or list of atom states.
- Returns:
None.
- plot_sorted_energy_sweep(ax, na, nr)
Plot of sorted energies as a function of the sweep parameter.
- Parameters:
ax – matplotlib axes instance.
nr – int or list of resonator states.
na – int or list of atom states.
- Returns:
None.
- plot_sorted_energy_sweep_wrapped(ax, E_ref, na_max=-1, nr_max=-1, n=-1, gap=True)
Plot of sorted energies modulo the reference energy as a function of the sweep parameter.
- Parameters:
ax – matplotlib axes instance.
E_ref – int or 1D numpy array of size self.par_sweep with reference energies.
na_max – restricts maximum atom excitation. Default is all excitations.
nr_max – restricts maximum resonator excitation. Default is all excitations.
n – number of lower system states that will be plotted. Default is all states.
gap – lines separated (True) or connected (False) at avoided level crossings.
- Returns:
na_max_plotted: maximum plotted atom excitation. nr_max_plotted: maximum plotted resonator excitation. n_max_plotted: maximum plotted system excitation. E_max: maximum plotted energy.
- plot_spectrum_sweep(ax, na, nr)
Plot atom energy spectrum as a function of the sweep parameter.
- Parameters:
ax – matplotlib axes instance.
nr – int or list of resonator states.
na – int or list of atom states.
- Returns:
None.
- plot_stark_shift_sweep(ax, na, nr)
Plot atom stark shift as a function of the sweep parameter.
- Parameters:
ax – matplotlib axes instance.
nr – int or list of resonator states.
na – int or list of atom states.
- Returns:
None.
- substract_groundstate_energy()
Subtracts ground state energy from self.E.
- Returns:
None.
- substract_groundstate_energy_sweep()
Subtracts ground state energy from self.E_sweep.
- Returns:
None.
bfqcircuits.utils.special module
- class bfqcircuits.utils.special.SpecialIntegrals
Bases:
object- cos_integral(m, n, b)
- cos_shift_integral(m, n, dist, d, b)
- destroy_look_up_table()
- init_look_up_table_fluxonium(n_max)
- init_look_up_table_fluxoniumLCAO(n_max, max_dist)
- overlap_shift_integral(m, n, dist, d)
- sin_integral(m, n, b)
- sin_shift_integral(m, n, dist, d, b)
- x2_shift_integral(m, n, dist, d)
- x_shift_integral(m, n, dist, d)
- bfqcircuits.utils.special.norm_hermite(n, x)