"nv">result</span> <span class="o">=</span> <span class="k">try</span> <span class="n">circuit</span><span class="o">.</span><span class="nf">densityMatrix</span><span class="p">()</span><span class="o">.</span><span class="nf">get</span><span class="p">()</span>
<span class="nf">print</span><span class="p">(</span><span class="s">"Density matrix: </span><span class="se">\(</span><span class="n">result</span><span class="se">)\n</span><span class="s">"</span><span class="p">)</span>
<span class="nf">print</