diff --git a/.pylintrc b/.pylintrc index e97299428..246484eb3 100644 --- a/.pylintrc +++ b/.pylintrc @@ -88,6 +88,7 @@ disable=arguments-renamed, # more readable and clear too-many-public-methods, # too verbose too-many-statements, # too verbose unnecessary-pass, # allow for methods with just "pass", for clarity + not-context-manager, # terra is not fully type-safe # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option diff --git a/test/unit/transpiler/passes/basis/test_convert_id_to_delay.py b/test/unit/transpiler/passes/basis/test_convert_id_to_delay.py index 6e8e9fbe0..946c91f37 100644 --- a/test/unit/transpiler/passes/basis/test_convert_id_to_delay.py +++ b/test/unit/transpiler/passes/basis/test_convert_id_to_delay.py @@ -68,15 +68,15 @@ def test_c_if_id_gate(self): """Test if c_if Id gate is converted a c_if delay.""" qc = QuantumCircuit(1, 1) - qc.id(0).c_if(0, 1) + with qc.if_test((0, 1)): + qc.id(0) pm = PassManager([ConvertIdToDelay(self.durations)]) transformed = pm.run(qc) expected = QuantumCircuit(1, 1) - expected.delay(160, 0) - # Delay does not officially support condition - expected.data[0].operation.condition = qc.data[0].operation.condition + with expected.if_test((0, 1)): + expected.delay(160, 0) self.assertEqual(expected, transformed)