diff --git a/QElephant/QuBit.py b/QElephant/QuBit.py index b2201c2..1d25e56 100644 --- a/QElephant/QuBit.py +++ b/QElephant/QuBit.py @@ -1,7 +1,8 @@ import math import random as rd -from QElephant.Matrix import * +# from QElephant.Matrix import * +from Matrix import * I = complex(0, 1) @@ -378,7 +379,7 @@ def Cu(q: MuBit, u: list[list[complex]], n1: int, n2: int) -> None: if n1==n2: ValueError("the Cu gate must be applied on two differents QuBits") if type(u) is not list: - raise ValueError(f"u was expected to be list[list[complex]], no {type(u)}") + raise ValueError(f"u was expected to be list[list[complex]], not {type(u)}") for u_ in u: if type(u_) is not list: raise ValueError(f"u was expected to be list[list[complex]]. A {type(u_)} has been found") @@ -399,5 +400,7 @@ def Cu(q: MuBit, u: list[list[complex]], n1: int, n2: int) -> None: if __name__=="__main__": q = MuBit(2) + H(q[0]) + Cu(q, [[0, 1], [1, 0]], 0, 1) - print(q[0]) \ No newline at end of file + print(q) \ No newline at end of file diff --git a/QElephant/__pycache__/Matrix.cpython-311.pyc b/QElephant/__pycache__/Matrix.cpython-311.pyc new file mode 100644 index 0000000..3dc4650 Binary files /dev/null and b/QElephant/__pycache__/Matrix.cpython-311.pyc differ