removed imports from typing

This commit is contained in:
algobytewise 2021-03-23 14:16:34 +05:30
parent 23d2a74f10
commit 97089981c6
2 changed files with 2 additions and 7 deletions

View File

@ -1,7 +1,4 @@
from typing import List, Tuple
def max_difference(a: List[int]) -> Tuple[int, int]:
def max_difference(a: list[int]) -> tuple[int, int]:
"""
We are given an array A[1..n] of integers, n >= 1. We want to
find a pair of indices (i, j) such that

View File

@ -2,13 +2,11 @@
# https://en.wikipedia.org/wiki/Adder_(electronics)#Full_adder
# https://en.wikipedia.org/wiki/Controlled_NOT_gate
from typing import Tuple
from qiskit import Aer, QuantumCircuit, execute
from qiskit.providers import BaseBackend
def store_two_classics(val1: int, val2: int) -> Tuple[QuantumCircuit, str, str]:
def store_two_classics(val1: int, val2: int) -> tuple[QuantumCircuit, str, str]:
"""
Generates a Quantum Circuit which stores two classical integers
Returns the circuit and binary representation of the integers