qiskit-research
qiskit-research copied to clipboard
Upgrading mapomatic breaks DD tests
The mapomatic commit that broke the code was introduced between mapomatic versions 0.9 and 0.10: https://github.com/qiskit-community/mapomatic/commit/208989ecc783d3ae07bbd3b5c9e22287eebb20ac
This prevents us from upgrading mapomatic past 0.9, which in turn blocks us from upgrading to Qiskit 1.0, because mapomatic 0.9 depends on qiskit-terra
.
Example test failure (see CI logs of https://github.com/qiskit-community/qiskit-research/pull/107 for full test failures):
_______________________________________________________________________________________ TestScaledCostFuncs.test_cost_func_dd _______________________________________________________________________________________
self = <test.utils.test_cost_funcs.TestScaledCostFuncs testMethod=test_cost_func_dd>
def test_cost_func_dd(self):
"""Test cost function for RZX"""
backend = FakeWashington()
qc = QuantumCircuit(5)
qc.h(0)
qc.cx(0, 1)
qc.cx(1, 2)
qc2 = qc.copy()
qc2.cx(2, 3)
qc2.cx(3, 4)
layout = [0, 1, 2, 3, 4]
qc_t = transpile(qc, backend, initial_layout=layout)
qc_dd = add_dynamical_decoupling(qc_t, backend, "XY4pm")
> best_layout = evaluate_layouts(
qc_dd,
layout,
backend,
cost_function=cost_func_scaled_cr,
)[0]
E IndexError: list index out of range
test/utils/test_cost_funcs.py:151: IndexError