Hcpb¶
- class Hcpb(nlevels: int = 15, Ej: Optional[float] = None, Ec: Optional[float] = None, ng: float = 0.5)[source]¶
Hamiltonian-model Cooper pair box (Hcpb) class.
Used to model analytically the CPB Hamiltonian quickly and efficiently. Solves in charge basis tridiagonal eigenvalue problem for arbitrary Ej, Ec, ng values.
As long as nlevels remains fixed the number of charge states considered does not change and it does not recreate the arrays, just recomputes the properties
Returns all properties of interest for the CPB.
Generate a Cooper-pair box (CPB) model.
- Parameters
nlevels (int) – Number of charge states of the CPB [-nlevels, nlevels+1]
Ej (float) – Josephson energy of the JJ
Ec (float) – Charging energy of the CPB
ng (float) – Offset charge of the CPB (ng=0.5 is the sweet spot). ng only needs to run between -0.5 and 0.5. ng is defined in units of cooper pairs (2e)
Example use:
H = Hcpb(nlevels=15, Ej=13971.3, Ec=295.2, ng=0.001) print(f''' Transmon frequencies ω01/2π = {H.fij(0,1): 6.0f} MHz α/2π = {H.anharm(): 6.0f} MHz ''')
import matplotlib.pyplot as plt for k in range (3): ψ, θ = H.psi_k(k) plt.plot(θ, ψ.real+ψ.imag, label=f"|{k}>") # it's in either quadrature, but not both plt.xlabel("Junction phase θ (wrapped in the interval [-π, π])") plt.ylabel("Re(ψ(θ))") plt.legend(title="Level")
Attributes
Return Ec.
Returns Ej.
Return ng.
Return the number of levels.
Methods
Compute the anharmonicity of the CPB.
Return the eigenvalue of the Hamiltonian for level k.
Hcpb.evec_k
(k)Return the eigenvector of the CPB Hamiltonian for level k.
Hcpb.fij
(i, j)Compute the transition energy (or frequency) between states.
Hcpb.h0_to_qutip
(n_transmon)Wrapper around Qutip to output the diagonalized Hamiltonian truncated up to n levels of the transmon for modeling.
Hcpb.n_ij
(i, j)Compute the value of the number operator for coupling elements together in the energy eigen-basis.
Hcpb.n_to_qutip
(n_transmon[, thresh])Wrapper around Qutip to output the number operator (charge) for the Transmon Hamiltonian in the energy eigen-basis.
Hcpb.params_from_freq_fixEC
(f01, Ec, **kwargs)Find transmon Ej given a fixed EC and frequency.
Hcpb.params_from_spectrum
(f01, anharm, **kwargs)Method to work backwards from a desired transmon frequency and anharmonicty to extract the target Ej and Ec for design and fabrication.
Hcpb.psi_k
(k[, pts])Return the wavevector of the CPB Hamiltonian in the flux basis.