s="n">v_xc</span> <span class="o">=</span> <span class="n">exchange_correlation_potential</span><span class="p">(</span><span class="n">s</span><span class="p">,</span> <span class="n">n</span><span class="p">)</span>
    <span class="n">Vxc</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">diag</span><span class="p">(</span><span class="n">v_xc</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">Vxc</span></div>


<div class="viewc