You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 16, 2025. It is now read-only.
Suppose we are given two states
state_1 = np.array([0.8, 0.6])
state_2 = np.array([1 / np.sqrt(2), 1j / np.sqrt(2)])
Your function should compute and return the value of the inner product:
0.56568542-0.42426407j
I coded my solution and got the same result as the example 0.565685424949238-0.42426406871192845j by using:
However, if tried inner_product = np.dot(np.conjugate(state_1).T, state_2) with the example it gives me the following result:
(0.565685424949238+0.42426406871192845j)
I think the example needs to be like below for it to be consistent with the code solution:
Suppose we are given two states
state_1 = np.array([1 / np.sqrt(2), 1j / np.sqrt(2)])
state_2 = np.array([0.8, 0.6])
Your function should compute and return the value of the inner product:
0.56568542-0.42426407j
OR
Suppose we are given two states
state_1 = np.array([0.8, 0.6])
state_2 = np.array([1 / np.sqrt(2), 1j / np.sqrt(2)])
Your function should compute and return the value of the inner product:
0.56568542+0.42426407j
Actual behavior
Small inconsistency between the example and the codercise solution can be clarified/fixed by changing the example or adding some extra clarification in the instructions.
Additional information
No response
Source code
No response
Tracebacks
No response
Check other issues
I have searched existing GitHub issues to make sure the issue does not already exist.
The text was updated successfully, but these errors were encountered:
Node number
Codercise I.1.2
Expected behavior
The example says:
I coded my solution and got the same result as the example
0.565685424949238-0.42426406871192845j
by using:but when I tried to submit this, I got the following message:
I changed the conjugate to be on state_1 and the exercise was submitted correctly:
However, if tried
inner_product = np.dot(np.conjugate(state_1).T, state_2)
with the example it gives me the following result:I think the example needs to be like below for it to be consistent with the code solution:
OR
Actual behavior
Small inconsistency between the example and the codercise solution can be clarified/fixed by changing the example or adding some extra clarification in the instructions.
Additional information
No response
Source code
No response
Tracebacks
No response
Check other issues
The text was updated successfully, but these errors were encountered: