Hamiltonian of a quantum circuit including a diode? 
*

*The LC circuit has a Hamiltonian:
$$\hat{H}={E_L\over2} \hat{\varphi}^2 + 4E_C \hat{n}^2$$
where $\hat{\varphi}$ is the magnetic flux and $\hat{n}$ is the number of charge.



*

*What is the Hamiltonian for the following circuit?


 A: I have never seen a Hamiltonian for a circuit with a diode, and I doubt that it exists or used - for the reasons I describe below. However, from purely academic perspective it is an interesting question to ponder.

*

*Unlike inductance and capacitance, which can be characterized by linear response and therefore described by quadratic Hamiltonians, a diode is a non-linear element. Non-linearity is alien to the structure of quantum mechanics, although one could think about including it via a potential term.

*The Hamiltonian for LC circuit is actually not written for a real LC circuit with a macroscopic capacitance and inductance, but for a microscopic object. Any conducting object, however small, has some capacitance and inductance, which at microscales have to be treated quantum mechanically. On the other hand, a diode is an essentially macrosopic, human-engineered, device - it never happens at micro-/nano-scale.

One can reason from the point of view of the physical content of variables $\hat{n}$ and $\hat{\varphi}$ - the former is the operator of charge on the capacitor, whereas the latter is its conjugate (typically bias on the inductance), related by a commutation relation
$$
[\hat{\varphi},\hat{n}]=i
$$
(the coefficients $\pm1$ or $\hbar$ in this commutation relation are a matter of personal choice).
Thus, the equation for motion for the charge, which we can identify with the current, is
$$
\hat{I}=\dot{n} = [\hat{n},\hat{H}] = -\frac{E_L}{\hbar}\hat{\varphi}.
$$
(Writing likewise the EOM for $\varphi$ we obtain the oscillator equation of the LC circuit.)
If we now replace the inductance term by a potential $V(\varphi)$, we have
$$
\hat{H} = 4E_C\hat{n}^2 + V(\hat{\varphi}),\\
\hat{I}=\dot{n} = [\hat{n},\hat{H}] =-\frac{1}{\hbar}\frac{\partial V(\hat{\varphi})}{\partial \hat{\varphi}}
$$
We can the further identify $\hat{I}$ with the current given by the Shokley diode equation and $\hat{\varphi}$ with the bias in this equation:
$$
\hat{I} = I_S\left(e^{\frac{\hat{\varphi}}{nV_T}} -1\right)
$$
and integrating this equation $\hat{\varphi}$ would give us the potential $V(\hat{\varphi})$.
A: According to one of my professors:

I am not 100% sure, but I guess for the ideal diode it should be something like
$$ 4 E_C \hat{n}^2 H(\hat{n}) $$
where $H(\hat{n})$ is the Heaviside step function.
If the charge is negative, the capacitor is immediately discharged and the energy of the system is $0$. If the charge is positive, the energy is just the energy of the capacitor.

I think he is absolutely right.
Now I am wondering what the eigenvalues and eigenstates are for this Hamiltonian.
Oh silly me, I just realized that what I have here is like a free particle ($V(\hat{\varphi})=0$), except for the Heaviside part. And I quote Griffith (under eqn 2.82): there is no such thing as a free particle with a definite energy
