scqubits.FullZeroPi.phi_operator#

FullZeroPi.phi_operator(zeropi_evecs=None, energy_esys=False)[source]#

Returns \(\phi\) operator in the product or eigenenergy basis.

Helper method _zeropi_operator_in_product_basis is employed which converts a zeropi operator into one in the product basis. If user already has zeropi eigenvectors, user can input as zeropi_evecs=ndarray.

Parameters:
  • zeropi_evecs (Optional[ndarray]) – If None (default), helper method _zeropi_operator_in_product_basis calculates zeropi eigenvectors and uses them to convert operator to the product basis, if product basis is chosen. If zeropi_evecs = zeropievecs, where zeropievecs is an ndarray, and product basis is chosen, helper method _zeropi_operator_in_product_basis uses zeropievecs to convert the operator to the product basis.

  • energy_esys (Union[bool, Tuple[ndarray, ndarray]]) – If False (default), returns operator in the product basis. If True, the energy eigenspectrum is computed, returns operator in the energy eigenbasis. If energy_esys = esys, where esys is a tuple containing two ndarrays (eigenvalues and energy eigenvectors), returns operator in the energy eigenbasis, and does not have to recalculate eigenspectrum.

Return type:

Union[ndarray, csc_matrix]

Returns:

Operator in chosen basis. If product basis chosen, operator returned as a csc_matrix. If the eigenenergy basis is chosen, unless energy_esys is specified, operator has dimensions of truncated_dim x truncated_dim, and is returned as an ndarray. Otherwise, if eigenenergy basis is chosen, operator has dimensions of m x m, for m given eigenvectors, and is returned as an ndarray.