This is a short communication paper discussing the sequential quadratic Hamiltonian (SQH) scheme to solve optimal control problems with non-smooth state constraints or non-smooth state cost terms, such as $$ \align \min_{y,u} \, &J(y,u)\coloneq\|y-y_d\|^2_{L^2(\Omega)}+\alpha\|u\|^2_{L^2(\Omega)}+\beta\|u\|_{L^1(\Omega)}\\ \text{subject to}&\\ &\Delta y+|y|=u,\quad \text{in } \Omega, \\ &u\in U_{\rm ad}\coloneq \{u\in L^2(\Omega) | a\le u(x)\le b, \text{a.e.}\}. \endalign $$ \par The problems are transformed into bilinear control-state structured optimal control problems, which can be efficiently solved by the SQH scheme.