scqubits.FluxQubit.hamiltonian#

FluxQubit.hamiltonian(energy_esys=False)[source]#

Return Hamiltonian in the basis obtained by employing charge basis for both degrees of freedom or in the eigenenergy basis.

Parameters:

energy_esys (Union[bool, Tuple[ndarray, ndarray]]) – If False (default), returns Hamiltonian in the basis obtained by employing charge basis for both degrees of freedom. If True, the energy eigenspectrum is computed, returns Hamiltonian in the energy eigenbasis. If energy_esys = esys, where esys is a tuple containing two ndarrays (eigenvalues and energy eigenvectors), returns Hamiltonian in the energy eigenbasis, and does not have to recalculate eigenspectrum.

Return type:

ndarray

Returns:

Hamiltonian in chosen basis as ndarray. If the eigenenergy basis is chosen, unless energy_esys is specified, the Hamiltonian has dimensions of truncated_dim x truncated_dim. Otherwise, if eigenenergy basis is chosen, Hamiltonian has dimensions of m x m, for m given eigenvectors.