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
With #952, BaseCalibrationExperiment was changed to override _transpiled_circuits and run its own pass manager rather than using the default method which calls transpile() on the circuits. Additionally, an _attach_calibrations method was added for calibration experiments to use to attach the calibrations for the schedules being calibrated. The problem with this approach is that it does not provide much flexibility for other schedules in the experiment's circuits. For example, with a fine x amplitude calibration, what should be done with the sx gate? Should it use the default calibration, always pull the sx calibration from Calibrations as well, or try Calibrations and fall back to the default?
Additionally, currently the calibration tests call transpile() on the circuits() output rather than testing _transpiled_circuits() because they were not updated along with the experiments in #952. This means that the tests are not currently testing the actual behavior of running the calibration experiments.
Steps to reproduce the problem
#1157 currently updates the calibration tests to test _transpiled_circuits() rather than transpile(). Doing this change causes a couple tests to fail, specifically:
The rough amplitude test fails because the EFRoughAmplitudeCal inherits from the Rabi which attaches a calibration schedule for the gate being calibrated. Nothing attaches a schedule for the preparation x gate int he EF case.
The fine drag test fails also because the calibration experiment again only attaches the calibration for the gate under test. For the x calibration, the sx gate is also used.
Both tests check for the presence of multiple calibrations. EF wants to find an x calibration and an x12 calibration. The drag test wants to find both x and sx.
What is the expected behavior?
The tests need to pass. The simplest approach is to attach all the needed calibrations from Calibrations. We may want to allow flexibility here -- a user could want to calibration x12 while just using the default x.
Suggested solutions
A quick fix would be to use the knowledge of the experiments to update their _attach_calibrations methods accordingly. I think we should also consider if we could go back to calling transpile with just some custom transpile options (like routhing_method="none") rather than using a custom pass manager.
The text was updated successfully, but these errors were encountered:
Informations
What is the current behavior?
With #952,
BaseCalibrationExperiment
was changed to override_transpiled_circuits
and run its own pass manager rather than using the default method which callstranspile()
on the circuits. Additionally, an_attach_calibrations
method was added for calibration experiments to use to attach the calibrations for the schedules being calibrated. The problem with this approach is that it does not provide much flexibility for other schedules in the experiment's circuits. For example, with a fine x amplitude calibration, what should be done with the sx gate? Should it use the default calibration, always pull the sx calibration fromCalibrations
as well, or tryCalibrations
and fall back to the default?Additionally, currently the calibration tests call
transpile()
on thecircuits()
output rather than testing_transpiled_circuits()
because they were not updated along with the experiments in #952. This means that the tests are not currently testing the actual behavior of running the calibration experiments.Steps to reproduce the problem
#1157 currently updates the calibration tests to test
_transpiled_circuits()
rather thantranspile()
. Doing this change causes a couple tests to fail, specifically:test.library.calibration.test_rough_amplitude.TestSpecializations.test_ef_circuits
test.library.calibration.test_fine_drag.TestFineDragCal.test_update_cals
The rough amplitude test fails because the EFRoughAmplitudeCal inherits from the Rabi which attaches a calibration schedule for the gate being calibrated. Nothing attaches a schedule for the preparation x gate int he EF case.
The fine drag test fails also because the calibration experiment again only attaches the calibration for the gate under test. For the x calibration, the sx gate is also used.
Both tests check for the presence of multiple calibrations. EF wants to find an x calibration and an x12 calibration. The drag test wants to find both x and sx.
What is the expected behavior?
The tests need to pass. The simplest approach is to attach all the needed calibrations from
Calibrations
. We may want to allow flexibility here -- a user could want to calibration x12 while just using the default x.Suggested solutions
A quick fix would be to use the knowledge of the experiments to update their
_attach_calibrations
methods accordingly. I think we should also consider if we could go back to callingtranspile
with just some custom transpile options (likerouthing_method="none"
) rather than using a custom pass manager.The text was updated successfully, but these errors were encountered: