<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://spindynamics.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Fluxonium.m</id>
	<title>Fluxonium.m - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://spindynamics.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Fluxonium.m"/>
	<link rel="alternate" type="text/html" href="https://spindynamics.org/wiki/index.php?title=Fluxonium.m&amp;action=history"/>
	<updated>2026-10-02T12:38:49Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.15</generator>
	<entry>
		<id>https://spindynamics.org/wiki/index.php?title=Fluxonium.m&amp;diff=10351&amp;oldid=prev</id>
		<title>Kuprov: sync with Spinach main 3975f139: new function page from the source header</title>
		<link rel="alternate" type="text/html" href="https://spindynamics.org/wiki/index.php?title=Fluxonium.m&amp;diff=10351&amp;oldid=prev"/>
		<updated>2026-09-18T10:01:10Z</updated>

		<summary type="html">&lt;p&gt;sync with Spinach main 3975f139: new function page from the source header&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{DISPLAYTITLE:fluxonium.m}} __NOTOC__&lt;br /&gt;
Fluxonium Hamiltonian in the truncated basis of the harmonic oscillator formed by the charging and the inductive energies of the circuit (Y. Lu, Optimal Control and Coherence Engineering for Superconducting Qubits, PhD thesis, Northwestern University, 2026, Eq. 2.30):&lt;br /&gt;
&lt;br /&gt;
     H=4*ec*n^2-ej*cos(phi-phi_e)+(el/2)*phi^2,   [phi,n]=1i&lt;br /&gt;
&lt;br /&gt;
where ec is the charging energy, ej is the Josephson energy, el=(Phi_0/2*pi)^2/L is the inductive energy of the shunt inductance L (Eq. 2.31, the factor 1/2 is explicit in the potential and is not absorbed into el), and phi_e=2*pi*Phi_e/Phi_0 is the reduced external flux (Eq. 2.32). Eq. 2.30 has the inductive term as (el/2)*(phi+phi_e)^2 and the Josephson term as -ej*cos(phi); the form above is its image under the translation of the phase origin to the minimum of the inductive potential, which does not change the spectrum. The offset charge of Eq. 2.30 is dropped because the unbounded phase variable makes it removable by a gauge transformation. Phase and charge are built from the ladder operators of the linear oscillator 4*ec*n^2+(el/2)*phi^2 with the plasma frequency sqrt(8*ec*el) as&lt;br /&gt;
&lt;br /&gt;
          phi=phi_zpf*(b'+b),   n=1i*n_zpf*(b'-b)&lt;br /&gt;
&lt;br /&gt;
     phi_zpf=(2*ec/el)^(1/4),   n_zpf=(el/(32*ec))^(1/4)&lt;br /&gt;
&lt;br /&gt;
and the cosine is computed as a matrix function of the Hermitian phase operator using the matrix exponential. The ladder operators come from [[weyl.m]], the real part of (U+U')/2 with U=expm(1i*(phi-phi_e)) drops the round-off in the cosine, and the Hamiltonian is returned in rad/s.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
      [H,n_op,phi_op]=fluxonium(ec,ej,el,phi_e,nlevels)&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
   ec      - charging energy in Hz (energy over the&lt;br /&gt;
             Planck constant), a positive real number&lt;br /&gt;
&lt;br /&gt;
   ej      - Josephson energy in Hz (energy over the&lt;br /&gt;
             Planck constant), a positive real number&lt;br /&gt;
&lt;br /&gt;
   el      - inductive energy in Hz (energy over the&lt;br /&gt;
             Planck constant), a positive real number&lt;br /&gt;
&lt;br /&gt;
   phi_e   - reduced external flux 2*pi*Phi_e/Phi_0&lt;br /&gt;
             in radians, a real number&lt;br /&gt;
&lt;br /&gt;
   nlevels - number of oscillator basis states, a&lt;br /&gt;
             positive integer&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
   H       - fluxonium Hamiltonian in rad/s (2*pi times&lt;br /&gt;
             the energy in Hz), a real symmetric matrix&lt;br /&gt;
             of dimension nlevels&lt;br /&gt;
&lt;br /&gt;
   n_op    - charge operator (Cooper pair number) in the&lt;br /&gt;
             oscillator basis, a Hermitian matrix of di-&lt;br /&gt;
             mension nlevels&lt;br /&gt;
&lt;br /&gt;
   phi_op  - phase operator in radians in the oscillator&lt;br /&gt;
             basis, a real symmetric matrix of dimension&lt;br /&gt;
             nlevels&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
See fluxonium_spectrum.m in examples/quantum_tech/circuit_qed directory.&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
The oscillator basis must be large enough for the lowest eigenstates to be converged; nlevels of the order of 30 to 60 is sufficient for ej/el=5 and ec/el=1, larger ej/el ratios need more states. Check the convergence by repeating the calculation with a bigger nlevels.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[weyl.m]], [[oscillator.m]], [[Kernel utilities]]&lt;br /&gt;
&lt;br /&gt;
''Version 2.13, authors: [[Ilya Kuprov]]''&lt;/div&gt;</summary>
		<author><name>Kuprov</name></author>
		
	</entry>
</feed>