Open 1ucian0 opened 1 month ago
Maybe is a GenericBackendV2
problem, since a BackendV2
created via BackendV2Converter
works:
from qiskit.providers.backend_compat import BackendV2Converter
def u0p_play(cr_schedule):
def _filter_func(time_inst):
return isinstance(time_inst[1], Play) and time_inst[1].pulse.name.startswith("CR90p_u")
return cr_schedule.filter(_filter_func).instructions[0][1]
backendV1 = Fake27QPulseV1()
backendV2 = BackendV2Converter(backendV1)
inst_map = backendV2.target.instruction_schedule_map()
cr_schedule = inst_map.get("cx", (0, 1))
with builder.build() as test_sched:
RZXCalibrationBuilder.rescale_cr_inst(u0p_play(cr_schedule), 0.1)
Environment
What is happening?
While deprecating BackendV1, I noticed that
test.python.transpiler.test_calibrationbuilder
is hard to transition to BackendV2. The pulse name structure seems to be different (for example, in V2 the previously pulse calledCR90p_u0
are now generically calledpulse_2
). Beyond those adaptations, the differences look even deeper.How can we reproduce the issue?
This is a BackendV2 version of
test.python.transpiler.test_calibrationbuilder.TestRZXCalibrationBuilder.test_rzx_calibration_cr_pulse_stretch
:Notice that calling
RZXCalibrationBuilder.rescale_cr_inst
with pulses coming from BackendV1 works:What should happen?
It should be possible to fully move
test.python.transpiler.test_calibrationbuilder
to BackendV2.Any suggestions?
No response