to initial length.</span>
                <span class="c1"># Temporary work-around to bug</span>
                <span class="c1"># in PyQuil ver 2.5.0.</span>
                <span class="c1"># Slicing was changing</span>
                <span class="c1"># pg from type Program to type list</span>
                <span class="n">pg</span> <span class="o">=</span> <span class="n">Program</span><span class="p">(</span><span class="n">pg</span><span class="p">[:</span><span class="n">len_pg_in</span><span clas