Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Ali Javadi-Abhari <[email protected]>
  • Loading branch information
mtreinish and ajavadia authored Apr 28, 2022
1 parent d8e7605 commit c89be5e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions qiskit/transpiler/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,15 +525,15 @@ def instruction_supported(
the target supports a particular operation by class rather
than by name. This lookup is more expensive as it needs to
iterate over all operations in the target instead of just a
single lookup. If this is specified it will superscede the
single lookup. If this is specified it will supersede the
``operation_name`` argument. The typical use case for this
operation is to check whether a specific variant of an operation
is supported on the backend. For example, if you wanted to look
is supported on the backend. For example, if you wanted to
check whether a :class:`~.RXGate` was supported on a specific
qubit with a fixed angle. That fixed angle variant will
typically have a name different than the object's
:attr:`~.Instruction.name` attribute (``"rx"``) in the target.
This can be used to check if any instnaces of the class are
This can be used to check if any instances of the class are
available in such a case.
parameters (list): A list of parameters to check if the target
supports them on the specified qubits. If the instruction
Expand All @@ -548,7 +548,7 @@ def instruction_supported(
will not be checked (for example if an operation in the target
is listed as parameterized with ``"theta"`` and ``"phi"`` is
passed into this function that will return ``True``). For
exmample, if called with::
example, if called with::
parameters = [Parameter("theta")]
target.instruction_supported("rx", (0,), parameters=parameters)
Expand All @@ -560,7 +560,7 @@ def instruction_supported(
target.instruction_supported("rx", (0,), RXGate, parameters=[pi / 4])
will return ``True`` if any RXGate
will return ``True`` if an RXGate(pi/4) exists on qubit 0.
Returns:
bool: Returns ``True`` if the instruction is supported and ``False`` if it isn't.
Expand Down
2 changes: 1 addition & 1 deletion test/python/transpiler/test_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
from qiskit.transpiler import InstructionProperties
from qiskit.test import QiskitTestCase
from qiskit.test.mock.fake_backend_v2 import FakeBackendV2
from qiskit.test.mock.fake_mumbai_v2 import FakeMumbaiV2
from qiskit.test.mock.fake_mumbai_v2 import FakeMumbaiFractionalCX


class TestTarget(QiskitTestCase):
Expand Down

0 comments on commit c89be5e

Please sign in to comment.