supergrad.quantum_system.Transmon#
- class supergrad.quantum_system.Transmon(ec: float = None, ej: float = None, ng: float = None, constant: bool = False, d: float = None, phiext: float = None, num_basis: int = 400, truncated_dim: int = 10, basis: str = 'phase', n_max: int = 0, is_basis_sym: bool = False, name: str = 'transmon', var: Array = None, drive_for_state_phase: str = 'charge', **kwargs)[source]#
Class for the transmon qubit.
- Parameters:
ec (float, optional) – charging energy
ej (float, optional) – Josephson energy
ng (float, optional) – ng parameter for transmon set None if you want to pass parameters by dm-haiku.
constant (bool) – True for manually setting parameters, False for using haiku’s parameters management.
d (float, optional) – junction asymmetry parameter, set None if it’s not a Tunable Transmon.
phiext – phi external parameters for fluxonium, in unit of flux quanta
num_basis – Number of basis functions
truncated_dim – Number of eigenenergies to construct the Hilbert space.
basis – Basis set, can be {‘charge’, ‘phase’, ‘phase_only’}.
n_max – charge basis range [-n_max, n_max). Override phi_max if both specified
is_basis_sym – Is basis forced to be [-n, … +n] instead of [-n, … +n-1].
name – module name
var – the device parameters variance
drive_for_state_phase – This is to specify which drive is used, so eigenstates are rotated to let <i|drive|i+1> be real positive Possible values are “charge” and “phase”. Default is “charge”.
- __init__(ec: float | None = None, ej: float | None = None, ng: float | None = None, constant: bool = False, d: float | None = None, phiext: float | None = None, num_basis: int = 400, truncated_dim: int = 10, basis: str = 'phase', n_max: int = 0, is_basis_sym: bool = False, name: str = 'transmon', var: Array | None = None, drive_for_state_phase: str = 'charge', **kwargs) None[source]#
Methods
__init__([ec, ej, ng, constant, d, phiext, ...])add_lcj_params_variance([var])Function to add variance to (device parameters).
create_d2phi()Computes \(\frac{d^2}{d \phi^2}\)
create_dphi()Computes \(\frac{d}{d \phi}\)
create_n()Computes charge matrix.
create_phi()Computes the phi matrix.
create_t()Computes kinetic matrix in phase/charge basis.
create_v()Computes potential matrix.
eigenenergies([unify_state_phase])Returns array of eigenvalues.
idling_hamiltonian()Create the Hamiltonian matrix of the qubit.
n_operator(**kwargs)- returns:
Returns the \(n = - i d/d\phi\) operator in the phase basis.
params_dict()Returns parameters keyed by name for this module and submodules.
phi_operator(**kwargs)- returns:
Returns the phi operator in the phase basis.
set_charge_basis(n_max[, num_n])Initializes parameters for charge basis.
set_n_phi_transform()Computes the unitary transformation between n and phi.
set_phi_basis(phi_max[, num_phi, phi_step])Initializes parameters for phase basis.
state_dict()Returns state keyed by name for this module and submodules.
transform_n_to_phi(mat)Run change of basis of matrix from charge basis to phase basis
transform_phi_to_n(mat)Run change of basis of matrix from phi basis to n basis
unify_state_phase(operator)Adjusts the phase of eigenstates to meet the condition <i|m|i+1> matrix elements are real positive.
Attributes
dimReturns truncated Hilbert space dimension
qdevice_type