Skip to content

Conversation

marwahaha
Copy link
Contributor

fixes #5

One way I was testing was by using

fromBlochVector(1, 0, 0).toBlochSphere().vector

and seeing if the output matches the input.

@stewdio
Copy link
Owner

stewdio commented Sep 17, 2020

This is great. Can you add variable declarations in your code? Something like:

const
aReal = ( 0.5 + 0.5 * z ) ** 0.5,
a = new Q.ComplexNumber( aReal, 0 ),
b = new Q.ComplexNumber( x / 2 / aReal, y / 2 / aReal )

That way aReal, a, and b don’t fall into the global scope by accident. I think at that point it will be good for a merge.

@marwahaha
Copy link
Contributor Author

Ok, I've added them :-)

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.

Bloch Sphere conversion

2 participants