-
Notifications
You must be signed in to change notification settings - Fork 1k
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 Quantum Teleportation to examples. #1449
Conversation
Very simplistic Quantum Teleportation example that might serve as an instructive file.
Add Quantum Teleportation to examples_perf_test.py
As a heads-up, although the following line in quantum_teleportation.py passes the Travis CI tests:
That line needs to be revised to the following for it to run correctly:
|
What do you mean it needs to be revised? Why isn't it revised already? |
|
||
|
||
def make_quantum_teleportation_circuit(): | ||
circuit = cirq.Circuit() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cirq.Circuit.from_ops
would avoid a lot of append
boilerplate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much for this feedback. Please let me know if I misunderstood your comment, but I have amended the code to be as follows: message = sim.simulate(cirq.Circuit.from_ops([cirq.X(0)**ranX, cirq.Y(0)**ranY]))
which avoids the append
boilerplate to get the bloch sphere of the message.
Again, please do let me know if I misunderstood what you were looking for here and thanks so much for this suggestion!
Updated the circuit slightly, changed some nomenclature for key variables, changed the manner in which the message is generated and initially read, and revised the descriptive commentary accordingly.
Removed a stray variable that was no longer used.
My apologies that my earlier comment was unclear. This code has been removed in the latest version, so this is no longer an issue. In case it is helpful, the point I was trying to make is that Travis CI liked Thanks again for all of your help - I really do appreciate it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Will revisit when classical postprocessing is added.
Tagging: #887 |
Very simplistic Quantum Teleporation example that might serve as an instructive file.