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

Add some basic enanglement tests #26

Closed
wants to merge 1 commit into from

Conversation

oxarbitrage
Copy link
Contributor

I was working with some basic entanglement so i created a few tests. Feel free to discord them if they are too basic or stuff already tested somewhere else.

There are also a few TODOSs i added to the code that i can try to fix in the future.

binary_m.chars().nth(1).unwrap().to_digit(2).unwrap(),
input.first_bit as u32
);
// TODO: Positions are reversed, check if there is some sort of endianess happening.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe related #25 ?

Copy link
Owner

Choose a reason for hiding this comment

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

You're right that the endianness issue is related to #25 - and the whole thing comes from the original iterators being defined to match how numpy handles outer (/tensor) products. Rewriting the internals may be an undertaking so I'm considering whether it's worthwhile.

@Renmusxd
Copy link
Owner

Sorry - taking me a while to get to this. I'll consider whether an entanglement unit test could get a little fancier. Right now it seems to just be checking that the hadamard gate works as expected which is already covered by stuff like the CSWAP test. But something more interesting along these lines could be useful to have.

@oxarbitrage
Copy link
Contributor Author

No worries, i am just trying to understand how the software works and learning some quantum computing at the same time so probably some code i send will not be good enough to be included. I think we can close it, i can probably try to make something a bit different. Feel free to send suggestions on what you will like to see in a better entanglement test :)

@Renmusxd
Copy link
Owner

Renmusxd commented Jul 1, 2021

Yeah - I may come up with some good entanglement ideas after the summer. I will be taking a quantum computing course so will likely just implement some of the ideas we talk about as unit tests.

I'll close this for now but reference issues #2 and #7 so this isn't forgotten.

@Renmusxd Renmusxd closed this Jul 1, 2021
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