Skip to content

Commit

Permalink
Merge pull request #77 from chensgit169/stable/0.3
Browse files Browse the repository at this point in the history
fix typing-style not supported for python3.8
  • Loading branch information
Zhaoyilunnn authored Sep 6, 2023
2 parents 12414af + 8ec0ce1 commit 0dfa86e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/quafu/visualisation/circuitPlot.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from matplotlib.text import Text

from quafu.elements.quantum_element import Instruction, ControlledGate
from typing import Dict

# this line for developers only
# from quafu.circuits.quantum_circuit import QuantumCircuit
Expand Down Expand Up @@ -226,7 +227,7 @@ def _circuit_wires(self):
x1 = self.xs[-1] - 1
self._h_wire_points.append([[x0, y], [x1, y]])

def _inits_label(self, labels: dict[int: str] = None):
def _inits_label(self, labels: Dict[int, str] = None):
""" qubit-labeling """
if labels is None:
labels = self.q_label
Expand All @@ -241,7 +242,7 @@ def _inits_label(self, labels: dict[int: str] = None):
)
self._text_list.append(txt)

def _measured_label(self, labels: dict[int: str] = None):
def _measured_label(self, labels: Dict[int, str] = None):
""" measured qubit-labeling """
if labels is None:
labels = self.c_label
Expand Down

0 comments on commit 0dfa86e

Please sign in to comment.