{"id":4064,"date":"2024-09-21T12:31:23","date_gmt":"2024-09-21T12:31:23","guid":{"rendered":"https:\/\/workhouse.sweetdishy.com\/?p=4064"},"modified":"2024-09-21T12:31:24","modified_gmt":"2024-09-21T12:31:24","slug":"single-qubit-gates","status":"publish","type":"post","link":"https:\/\/workhouse.sweetdishy.com\/index.php\/2024\/09\/21\/single-qubit-gates\/","title":{"rendered":"Single Qubit Gates"},"content":{"rendered":"\n<p>Classically, there exists only one reversible single bit gate: the NOT gate<\/p>\n\n\n\n<p>which e\ufb00ects 0 \u2192 1, 1 \u2192 0. However, any unitary operation on the qubits<\/p>\n\n\n\n<p>|0i and |1i is a valid single qubit gate. As we will see, such a gate can<\/p>\n\n\n\n<p>always be regarded as a linear combination of the Pauli gates X, iY , Z and<\/p>\n\n\n\n<p>the identity.<\/p>\n\n\n\n<p>In circuit notation, a gate G that acts on state |ii to produce state |oi is<\/p>\n\n\n\n<p>represented as<\/p>\n\n\n\n<p>|ii<\/p>\n\n\n\n<p>G<\/p>\n\n\n\n<p>|oi<\/p>\n\n\n\n<p>The matrix representation of G is found by computing its action on the<\/p>\n\n\n\n<p>computational basis states:<\/p>\n\n\n\n<p>G<\/p>\n\n\n\n<p>ij<\/p>\n\n\n\n<p>= hi|G|ji (7.2)<\/p>\n\n\n\n<p>The full power of the quantum gate emerges when it acts on superposition<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9781482238129\/files\/bg94.png\" width=\"366\" height=\"300\"><\/p>\n\n\n\n<p>Quantum Gates and Circuits 123<\/p>\n\n\n\n<p>states. Consider for example the action of NOT, de\ufb01ned in the computational<\/p>\n\n\n\n<p>basis by<\/p>\n\n\n\n<p>X|0i = |1i<\/p>\n\n\n\n<p>X|1i = |0i<\/p>\n\n\n\n<p>; X =<\/p>\n\n\n\n<p>&#8220;<\/p>\n\n\n\n<p>0 1<\/p>\n\n\n\n<p>1 0<\/p>\n\n\n\n<p>#<\/p>\n\n\n\n<p>= \u03c3<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>(7.3)<\/p>\n\n\n\n<p>When X acts on a generic quantum state |\u03c8i = \u03b1|0i + \u03b2|1i we get X|\u03c8i =<\/p>\n\n\n\n<p>\u03b1|1i + \u03b2|0i. This represents interchanged probabilities of the state being in<\/p>\n\n\n\n<p>|0i or |1i.<\/p>\n\n\n\n<p>Other useful quantum single-qubit gates, that have no classical analogue,<\/p>\n\n\n\n<p>are described below.<\/p>\n\n\n\n<p>1. Phase Flip (Z) gate:<\/p>\n\n\n\n<p>Z|0i = |0i<\/p>\n\n\n\n<p>Z|1i = \u2212|1i<\/p>\n\n\n\n<p>; Z =<\/p>\n\n\n\n<p>&#8220;<\/p>\n\n\n\n<p>1 0<\/p>\n\n\n\n<p>0 \u22121<\/p>\n\n\n\n<p>#<\/p>\n\n\n\n<p>= \u03c3<\/p>\n\n\n\n<p>z<\/p>\n\n\n\n<p>(7.4)<\/p>\n\n\n\n<p>This gate gives the state |1i a negative sign, an operation that is mean-<\/p>\n\n\n\n<p>ingless in classical logic, but is relevant when it acts on superposition<\/p>\n\n\n\n<p>states of a qubit. For instance, the state<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>(|0i + |1i) changes to the<\/p>\n\n\n\n<p>orthogonal state<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>(|0i \u2212 |1i).<\/p>\n\n\n\n<p>2. Hadamard (H) gate:<\/p>\n\n\n\n<p>H|0i =<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>(|0i + |1i) ;<\/p>\n\n\n\n<p>H|1i =<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>(|0i \u2212 |1i) ;<\/p>\n\n\n\n<p>H =<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>&#8220;<\/p>\n\n\n\n<p>1 1<\/p>\n\n\n\n<p>1 \u22121<\/p>\n\n\n\n<p>#<\/p>\n\n\n\n<p>=<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>(\u03c3<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>+ \u03c3<\/p>\n\n\n\n<p>z<\/p>\n\n\n\n<p>) (7.5)<\/p>\n\n\n\n<p>This is an invaluable gate in quantum information processing: it pro-<\/p>\n\n\n\n<p>duces equal superpositions of the basis states. Its action can be expressed<\/p>\n\n\n\n<p>algebraically as<\/p>\n\n\n\n<p>H|xi =<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>(|xi + (\u22121)<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>|\u00afxi) =<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>X<\/p>\n\n\n\n<p>y=0,1<\/p>\n\n\n\n<p>(\u22121)<\/p>\n\n\n\n<p>xy<\/p>\n\n\n\n<p>|yi. (7.6)<\/p>\n\n\n\n<p>3. Phase (\u03a6) gate:<\/p>\n\n\n\n<p>\u03a6|0i = |0i;<\/p>\n\n\n\n<p>\u03a6|1i = e<\/p>\n\n\n\n<p>i\u03d5<\/p>\n\n\n\n<p>|1i<\/p>\n\n\n\n<p>; \u03a6 =<\/p>\n\n\n\n<p>&#8220;<\/p>\n\n\n\n<p>1 0<\/p>\n\n\n\n<p>0 e<\/p>\n\n\n\n<p>i\u03d5<\/p>\n\n\n\n<p>#<\/p>\n\n\n\n<p>(7.7)<\/p>\n\n\n\n<p>Exercise 7.1. Show that the Z, H, and \u03a6 matrices are all unitary.<\/p>\n\n\n\n<p>Exercise 7.2. Calculate the output of each of these gates when the input is a<\/p>\n\n\n\n<p>general qubit state \u03b1|0i + \u03b2|1i.<\/p>\n\n\n\n<p>Exercise 7.3. What is the action of the Pauli Y gate?<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9781482238129\/files\/bg95.png\" width=\"685\" height=\"720\"><\/p>\n\n\n\n<p>124 Introduction to Quantum Physics and Information Processing<\/p>\n\n\n\n<p>It is useful to visualize the action of single qubit gates by looking at their<\/p>\n\n\n\n<p>action on the Bloch sphere. A gate must take any point on the Bloch sphere<\/p>\n\n\n\n<p>to another, and can be a rotation about an arbitrary axis through the center<\/p>\n\n\n\n<p>of the Bloch sphere. Inversions about the center are also allowed.<\/p>\n\n\n\n<p>Example 7.1.1. To see the e\ufb00ect of the Pauli X matrix on a qubit state on<\/p>\n\n\n\n<p>the Bloch sphere,<\/p>\n\n\n\n<p>X<\/p>\n\n\n\n<p>\ue012<\/p>\n\n\n\n<p>cos<\/p>\n\n\n\n<p>\u03b8<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>|0i + e<\/p>\n\n\n\n<p>i\u03c6<\/p>\n\n\n\n<p>sin<\/p>\n\n\n\n<p>\u03b8<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>|1i<\/p>\n\n\n\n<p>\ue013<\/p>\n\n\n\n<p>= cos<\/p>\n\n\n\n<p>\u03b8<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>|1i + e<\/p>\n\n\n\n<p>i\u03c6<\/p>\n\n\n\n<p>sin<\/p>\n\n\n\n<p>\u03b8<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>|0i<\/p>\n\n\n\n<p>= e<\/p>\n\n\n\n<p>i\u03c6<\/p>\n\n\n\n<p>\ue014<\/p>\n\n\n\n<p>cos<\/p>\n\n\n\n<p>\ue012<\/p>\n\n\n\n<p>\u03c0<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>\u2212<\/p>\n\n\n\n<p>\u03b8<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>\ue013<\/p>\n\n\n\n<p>|0i + e<\/p>\n\n\n\n<p>\u2212i\u03c6<\/p>\n\n\n\n<p>sin<\/p>\n\n\n\n<p>\ue012<\/p>\n\n\n\n<p>\u03c0<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>\u2212<\/p>\n\n\n\n<p>\u03b8<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>\ue013<\/p>\n\n\n\n<p>|1i<\/p>\n\n\n\n<p>\ue015<\/p>\n\n\n\n<p>(7.8)<\/p>\n\n\n\n<p>This is a state for which \u03b8 \u2192 \u03c0 \u2212 \u03b8 and \u03c6 \u2192 \u2212\u03c6. The transformation is<\/p>\n\n\n\n<p>illustrated in Figure 7.2.<\/p>\n\n\n\n<p>FIGURE 7.2: Action of<\/p>\n\n\n\n<p>\u02c6<\/p>\n\n\n\n<p>X on the Bloch sphere.(a) The \u03b8 and \u03c0 \u2212 \u03b8 cones<\/p>\n\n\n\n<p>are indicated to show you how the transformation works. (b) The result is<\/p>\n\n\n\n<p>equivalent to a rotation about \u02c6x by \u03c0.<\/p>\n\n\n\n<p>Exercise 7.4. Show that the Pauli gates Y and Z gates rotate a state on the<\/p>\n\n\n\n<p>Bloch sphere by \u03c0 about the \u02c6y and \u02c6z axes, respectively.<\/p>\n\n\n\n<p>Exercise 7.5. The e\ufb00ect of the H gate on the Bloch sphere can also be regarded<\/p>\n\n\n\n<p>as a rotation by \u03c0 about some axis. Find that axis.<\/p>\n\n\n\n<p>Exercise 7.6. What is the e\ufb00ect of the phase gate \u03a6 on a state located at (\u03b8, \u03c6)<\/p>\n\n\n\n<p>on the Bloch sphere?<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9781482238129\/files\/bg96.png\" width=\"366\" height=\"768\"><\/p>\n\n\n\n<p>Quantum Gates and Circuits 125<\/p>\n\n\n\n<p>A general rotation can always be constructed as combinations of rotations<\/p>\n\n\n\n<p>about the \u02c6x, \u02c6y, and \u02c6z axes. Hence a very useful set of gates is the rotation<\/p>\n\n\n\n<p>gates, expressed as functions of the Pauli matrices as follows:<\/p>\n\n\n\n<p>R<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>(\u03b8) \u2261 e<\/p>\n\n\n\n<p>\u2212i\u03b8\u03c3<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>\/2<\/p>\n\n\n\n<p>=<\/p>\n\n\n\n<p>&#8220;<\/p>\n\n\n\n<p>cos<\/p>\n\n\n\n<p>\u03b8<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>\u2212i sin<\/p>\n\n\n\n<p>\u03b8<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>\u2212i sin<\/p>\n\n\n\n<p>\u03b8<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>cos<\/p>\n\n\n\n<p>\u03b8<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>#<\/p>\n\n\n\n<p>(7.9a)<\/p>\n\n\n\n<p>R<\/p>\n\n\n\n<p>y<\/p>\n\n\n\n<p>(\u03b8) \u2261 e<\/p>\n\n\n\n<p>\u2212i\u03b8\u03c3<\/p>\n\n\n\n<p>y<\/p>\n\n\n\n<p>\/2<\/p>\n\n\n\n<p>=<\/p>\n\n\n\n<p>&#8220;<\/p>\n\n\n\n<p>cos<\/p>\n\n\n\n<p>\u03b8<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>\u2212sin<\/p>\n\n\n\n<p>\u03b8<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>sin<\/p>\n\n\n\n<p>\u03b8<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>cos<\/p>\n\n\n\n<p>\u03b8<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>#<\/p>\n\n\n\n<p>(7.9b)<\/p>\n\n\n\n<p>R<\/p>\n\n\n\n<p>z<\/p>\n\n\n\n<p>(\u03b8) \u2261 e<\/p>\n\n\n\n<p>\u2212i\u03b8\u03c3<\/p>\n\n\n\n<p>z<\/p>\n\n\n\n<p>\/2<\/p>\n\n\n\n<p>=<\/p>\n\n\n\n<p>&#8220;<\/p>\n\n\n\n<p>e<\/p>\n\n\n\n<p>\u2212i\u03b8\/2<\/p>\n\n\n\n<p>0<\/p>\n\n\n\n<p>0 e<\/p>\n\n\n\n<p>i\u03b8\/2<\/p>\n\n\n\n<p>#<\/p>\n\n\n\n<p>(7.9c)<\/p>\n\n\n\n<p>Exercise 7.7. Show by using the series expansion of e<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>that if A is a matrix such<\/p>\n\n\n\n<p>that A<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>= then e<\/p>\n\n\n\n<p>iA\u03b8<\/p>\n\n\n\n<p>= cos(\u03b8) + i sin(\u03b8)A.<\/p>\n\n\n\n<p>FIGURE 7.3: Rotation of a qubit by R<\/p>\n\n\n\n<p>n<\/p>\n\n\n\n<p>(\u03b8) on the Bloch sphere.<\/p>\n\n\n\n<p>You can now see that a rotation about an axis \u02c6n = n<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>\u02c6<\/p>\n\n\n\n<p>i + n<\/p>\n\n\n\n<p>y<\/p>\n\n\n\n<p>\u02c6<\/p>\n\n\n\n<p>j + n<\/p>\n\n\n\n<p>y<\/p>\n\n\n\n<p>\u02c6<\/p>\n\n\n\n<p>k by an<\/p>\n\n\n\n<p>angle \u03b8 is given by<\/p>\n\n\n\n<p>R<\/p>\n\n\n\n<p>\u02c6n<\/p>\n\n\n\n<p>(\u03b8) = e<\/p>\n\n\n\n<p>\u2212i\u03b8\u02c6n\u00b7~\u03c3\/2<\/p>\n\n\n\n<p>= cos<\/p>\n\n\n\n<p>\ue012<\/p>\n\n\n\n<p>\u03b8<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>\ue013<\/p>\n\n\n\n<p>\u2212 i sin<\/p>\n\n\n\n<p>\ue012<\/p>\n\n\n\n<p>\u03b8<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>\ue013<\/p>\n\n\n\n<p>(n<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>\u03c3<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>+ n<\/p>\n\n\n\n<p>y<\/p>\n\n\n\n<p>\u03c3<\/p>\n\n\n\n<p>y<\/p>\n\n\n\n<p>+ n<\/p>\n\n\n\n<p>z<\/p>\n\n\n\n<p>\u03c3<\/p>\n\n\n\n<p>z<\/p>\n\n\n\n<p>) . (7.10)<\/p>\n\n\n\n<p>The action of this gate is illustrated in Figure 7.3.<\/p>\n\n\n\n<p>Exercise 7.8. Verify that gate R<\/p>\n\n\n\n<p>\u02c6n<\/p>\n\n\n\n<p>(\u03b8) takes a state with Bloch vector \u02c6a to one<\/p>\n\n\n\n<p>rotated by \u03b8 about the \u02c6n axis<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Classically, there exists only one reversible single bit gate: the NOT gate which e\ufb00ects 0 \u2192 1, 1 \u2192 0. However, any unitary operation on the qubits |0i and |1i is a valid single qubit gate. As we will see, such a gate can always be regarded as a linear combination of the Pauli gates [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4041,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[496],"tags":[],"class_list":["post-4064","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-quantum-gates-and-circuits"],"jetpack_featured_media_url":"https:\/\/workhouse.sweetdishy.com\/wp-content\/uploads\/2024\/09\/quantum-2.png","_links":{"self":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/4064","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/comments?post=4064"}],"version-history":[{"count":1,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/4064\/revisions"}],"predecessor-version":[{"id":4065,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/4064\/revisions\/4065"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/media\/4041"}],"wp:attachment":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/media?parent=4064"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/categories?post=4064"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/tags?post=4064"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}