{"id":5224,"date":"2024-12-31T07:42:01","date_gmt":"2024-12-31T06:42:01","guid":{"rendered":"https:\/\/www.islandwalking.com\/wordpress\/?p=5224"},"modified":"2024-12-31T08:35:03","modified_gmt":"2024-12-31T07:35:03","slug":"quantum-teleportation-part-i","status":"publish","type":"post","link":"https:\/\/www.islandwalking.com\/wordpress\/quantum-teleportation-part-i\/","title":{"rendered":"Quantum Teleportation Part I"},"content":{"rendered":"<p>Making quantum circuits in Python is trivial I hear you say, there are already several packages for this, like Qiskit. Nah, you did not think a calculator had a package manager now, did you? The calculator only has a few standard packages as well as a couple of TI specific ones.<\/p>\n<p>We will need &#8220;random&#8221; because quantum measurements are probabilistic, and &#8220;math&#8221; because square root is used in several formulas:<\/p>\n<blockquote>\n<pre>from random import *\r\nfrom math import *\r\n<\/pre>\n<\/blockquote>\n<p>Other than that we will have to do with basic matrices which in Python are just arrays of arrays. That means a qubit will be something like this:<\/p>\n<blockquote>\n<pre>q=[[1\/sqrt(2)],[1\/sqrt(2)]]<\/pre>\n<\/blockquote>\n<p>The qubit above is in superposition and if measured will collapse into either &#8220;0&#8221; or &#8220;1&#8221;. Given as &#8220;[[1],[0]]&#8221; or &#8220;[[0],[1]]&#8221; respectively in our particular Python qubit speak. We are truly inside The Matrix here.<\/p>\n<p>Note that it is pretty cumbersome to key in programs on a calculator so like in the example above variable names will mostly be just one letter and hardly any extra spacing will be added for readability.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Making quantum circuits in Python is trivial I hear you say, there are already several packages for this, like Qiskit. Nah, you did not think a calculator had a package manager now, did you? The calculator only has a few standard packages as well as a couple of TI specific ones. We will need &#8220;random&#8221; &hellip; <a class=\"read-excerpt\" href=\"https:\/\/www.islandwalking.com\/wordpress\/quantum-teleportation-part-i\/\">Continue reading <span class=\"meta-nav\">&raquo;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5224","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.islandwalking.com\/wordpress\/wp-json\/wp\/v2\/posts\/5224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.islandwalking.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.islandwalking.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.islandwalking.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.islandwalking.com\/wordpress\/wp-json\/wp\/v2\/comments?post=5224"}],"version-history":[{"count":8,"href":"https:\/\/www.islandwalking.com\/wordpress\/wp-json\/wp\/v2\/posts\/5224\/revisions"}],"predecessor-version":[{"id":5232,"href":"https:\/\/www.islandwalking.com\/wordpress\/wp-json\/wp\/v2\/posts\/5224\/revisions\/5232"}],"wp:attachment":[{"href":"https:\/\/www.islandwalking.com\/wordpress\/wp-json\/wp\/v2\/media?parent=5224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.islandwalking.com\/wordpress\/wp-json\/wp\/v2\/categories?post=5224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.islandwalking.com\/wordpress\/wp-json\/wp\/v2\/tags?post=5224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}