Skip to content

Commit

Permalink
fix: fix type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
king-p3nguin committed Jun 12, 2024
1 parent 64919c2 commit cd2f3d4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions torchquantum/plugin/qiskit/qiskit_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""
from __future__ import annotations

from typing import Iterable
from typing import Iterable, Optional

import numpy as np
import qiskit
Expand Down Expand Up @@ -837,7 +838,7 @@ def qiskit2tq_translate_qiskit_params(


def qiskit2tq(
circ: QuantumCircuit, initial_parameters: list[torch.nn.Parameter] | None = None
circ: QuantumCircuit, initial_parameters: Optional[list[torch.nn.Parameter]] = None
):
ops = qiskit2tq_Operator(circ, initial_parameters)
return tq.QuantumModuleFromOps(ops)
Expand Down

0 comments on commit cd2f3d4

Please sign in to comment.