Quantum Computing, Qiskit, Linear Algebra, Mathematics, Python.
product for i in range(rows_A): for j in range(cols_A): for m in range(rows_B): for n in range(cols_B): result[i * rows_B + m][j * cols_B + n] = A[i][j] * B[m][n] return result A = [[1+2j, 3+4j], [5+6j, 7+8j]] B = [[9+10j, 11+12j], [13+14j, 15+16j]] result = tensor_prod(A, B) print(result) #