Mathematics, Python, Quantum Computing, Linear Algebra.
samples vector u and v u = np.array([[1], [0]]) v = np.array([[0], [1]]) # find the inner product value np.dot(u.T, v) array([[0]]) Apply Hadamard gate to them. # Apply the unitary matrix Uu = Hadamard @ u Uv = Hadamard @ v # find the inner product value np.dot(Uu.T, Uv) array([[0]]) ref1: