Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix typing-style not supported for python3.8 #77

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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