Skip to content

Commit

Permalink
fixed remaining mypy error
Browse files Browse the repository at this point in the history
  • Loading branch information
nbronn committed Aug 13, 2024
1 parent d46e87d commit 0aa9df2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qiskit_research/utils/dynamical_decoupling.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from enum import Enum
from math import pi
from typing import Iterable, List, Optional, Sequence, Union
from typing import cast, Iterable, List, Optional, Sequence, Union

import numpy as np
from qiskit import QuantumCircuit, pulse
Expand Down Expand Up @@ -85,7 +85,7 @@ def dynamical_decoupling_passes(
Yields:
Iterator[Iterable[BasePass]]: Transpiler passes used for adding DD sequences.
"""
for new_gate in cast(List[Gate], [Xp, Xm, Yp, Ym]):
for new_gate in [cast(Gate, gate) for gate in [Xp, Xm, Yp, Ym]]:
if new_gate.name not in target:
target.add_instruction(new_gate, target["x"])

Expand Down

0 comments on commit 0aa9df2

Please sign in to comment.