We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Consider the following example:
from qrisp import * import numpy as np s = QuantumArray(qtype = QuantumModulus(5), shape = (2,1)) # 1) Wrong result for: s[:] = np.array([[3],[0]]) # 2) Error occurs for: #s[:] = np.array([[3],[1]]) A = np.array([[3,4]]) res = A @ s print(res)
1) The wrong result 1 is obtained. Correct would be (3 * 3 + 4 * 0) % 5 = 9 % 5 = 4.
Note that Theo following works correctly:
s = QuantumModulus(5) s[:] = 3 t = QuantumModulus(5) t[:] = 0 print(3*s+4*t)
Yields: 4
2) An error occurs:
ValueError: cannot convert float NaN to integer
Correct would be (3 * 3 + 4 * 1) % 5 = 13 % 5 = 3.
Note that the following works correctly:
s = QuantumModulus(5) s[:] = 3 t = QuantumModulus(5) t[:] = 1 print(3*s+4*t)
Yields: 3
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Consider the following example:
1) The wrong result 1 is obtained. Correct would be (3 * 3 + 4 * 0) % 5 = 9 % 5 = 4.
Note that Theo following works correctly:
Yields: 4
2) An error occurs:
Correct would be (3 * 3 + 4 * 1) % 5 = 13 % 5 = 3.
Note that the following works correctly:
Yields: 3
The text was updated successfully, but these errors were encountered: