File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -193,13 +193,16 @@ def main():
193193 for cycle in range (cycles ):
194194 otoc &= ising
195195 # Add the out-of-time-order perturbation
196- string = []
197- for q in range (n_qubits ):
198- if np .random .random () < butterfly_fraction :
199- string += np .random .choice (ops )
200- else :
201- string += ['I' ]
202- pauli_strings .append ("" .join (string ))
196+ string = 'I' * n_qubits
197+ while string == ('I' * n_qubits ):
198+ string_list = []
199+ for q in range (n_qubits ):
200+ if np .random .random () < butterfly_fraction :
201+ string_list += np .random .choice (ops )
202+ else :
203+ string_list += ['I' ]
204+ string = "" .join (string_list )
205+ pauli_strings .append (string )
203206 act_string (otoc , string )
204207 # Add the time-reversal of the Trotterization
205208 otoc &= ising_dag
You can’t perform that action at this time.
0 commit comments