You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The pulse compress may increase the recursion depth of input schedule and crash the pulse assembler.
Steps to reproduce the problem
Prepare very long schedule
fromqiskit.ignis.verificationimportrandomized_benchmarking_seqimportnumpyasnpfromqiskit.test.mockimportFakeAlmadenfromqiskit.pulseimporttransformsrb_circs, xdata=randomized_benchmarking_seq(length_vector=[350], nseeds=1, rb_pattern=[[0]])
transpiled_rb_circs=qiskit.transpile(rb_circs[0], backend=FakeAlmaden(), optimization_level=0)
rb_scheds=qiskit.schedule(transpiled_rb_circs, backend=FakeAlmaden())
rb_scheds.instructionstransformed_sched=transforms.compress_pulses([rb_scheds])
transformed_sched[0].instructions# this causes an error
---------------------------------------------------------------------------
RecursionError Traceback (most recent call last)
<ipython-input-99-d345b17804b7> in <module>
11
12 transformed_sched = transforms.compress_pulses([rb_scheds])
---> 13 transformed_sched[0].instructions
~/qiskit/qiskit-terra/qiskit/pulse/schedule.py in instructions(self)
126 sorted(chan.name for chan in inst.channels))
127
--> 128 return tuple(sorted(self._instructions(), key=key))
129
130 def ch_duration(self, *channels: List[Channel]) -> int:
~/qiskit/qiskit-terra/qiskit/pulse/schedule.py in _instructions(self, time)
174 """
175 for insert_time, child_sched in self._children:
--> 176 yield from child_sched._instructions(time + insert_time)
177
178 def union(self,
... last 1 frames repeated, from the frame below ...
~/qiskit/qiskit-terra/qiskit/pulse/schedule.py in _instructions(self, time)
174 """
175 for insert_time, child_sched in self._children:
--> 176 yield from child_sched._instructions(time + insert_time)
177
178 def union(self,
RecursionError: maximum recursion depth exceeded while calling a Python object
Note that rb_scheds.instructions does work.
If we use two qubits for RB, the assembler crashes at almost the half clifford length ~ 150.
This is a realistic setup and should be supported.
Perhaps QV is also affected.
What is the expected behavior?
Transform module should convert the schedule so that transformed schedule has the almost constant recursion depth.
Suggested solutions
I'm not familiar with the logic of transform. @taalexander
The text was updated successfully, but these errors were encountered:
Information
What is the current behavior?
The pulse compress may increase the recursion depth of input schedule and crash the pulse assembler.
Steps to reproduce the problem
Prepare very long schedule
Note that
rb_scheds.instructions
does work.If we use two qubits for RB, the assembler crashes at almost the half clifford length ~ 150.
This is a realistic setup and should be supported.
Perhaps QV is also affected.
What is the expected behavior?
Transform module should convert the schedule so that transformed schedule has the almost constant recursion depth.
Suggested solutions
I'm not familiar with the logic of transform. @taalexander
The text was updated successfully, but these errors were encountered: