Skip to content

Commit

Permalink
Review comment
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
  • Loading branch information
nkanazawa1989 and mtreinish committed Feb 17, 2023
1 parent bbc0a0e commit f932bfb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
fixes:
- |
Fix a bug that :meth:`.InstructionScheduleMap.has_custom_gate` returns always
True when the inst map is created by :class:`.Target`.
Fixed an issue with the :meth:`.InstructionScheduleMap.has_custom_gate` method,
where it would always return ``True`` when the :class:`~.InstructionScheduleMap`
object was created by :class:`.Target`.
Fixed `#9595 <https://github.com/Qiskit/qiskit-terra/issues/9595>`__
5 changes: 5 additions & 0 deletions test/python/transpiler/test_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -1254,6 +1254,11 @@ def test_default_instmap_has_no_custom_gate(self):
inst_map = target.instruction_schedule_map()
self.assertTrue(inst_map.has_custom_gate())

empty = InstructionProperties()
target.update_instruction_properties(instruction="sx", qargs=(0,), properties=empty)
inst_map = target.instruction_schedule_map()
self.assertFalse(inst_map.has_custom_gate())


class TestGlobalVariableWidthOperations(QiskitTestCase):
def setUp(self):
Expand Down

0 comments on commit f932bfb

Please sign in to comment.