/span><span class="n">st_vec_arr</span><span class="p">,</span> <span class="n">perm</span><span class="p">)</span>
                <span class="n">effective_st_vec</span> <span class="o">=</span> <span class="n">StateVec</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">num_qbits</span><span class="p">,</span> <span class="n">st_vec_arr</span><span class="p">)</span>

            <span class="c1"># add contribution to mean</span>
            <span class="n">r