Skip to content
New issue

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

Fix statevector endianness #163

Merged
merged 1 commit into from
Mar 6, 2024
Merged

Fix statevector endianness #163

merged 1 commit into from
Mar 6, 2024

Conversation

speller26
Copy link
Collaborator

Summary

Details and comments

inv_sqrt_2 = 1 / np.sqrt(2)
self.assertTrue(
np.allclose(
result.get_statevector(), np.array([0, 0, inv_sqrt_2, inv_sqrt_2])
Copy link
Collaborator

@jcjaskula-aws jcjaskula-aws Mar 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I verified that in qiskit: |q1 q0> and that arrays are ordered as (|00>, |01>, |10>, |11>). So this is good

Copy link
Collaborator

@jcjaskula-aws jcjaskula-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

took the time to verify. LGTM.

@speller26 speller26 merged commit b1dda9f into main Mar 6, 2024
7 checks passed
@speller26 speller26 deleted the sv branch March 6, 2024 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants