If we look at the x y plane, we usually use the intersection of the x y plane as our origin or the point of reference for things that are sitting in the x y plane. So why would we want to use different coordinate systems, sometimes particular applications make description in one coordinate system easier than another, so, for example, uh what, if you’re working with a grid? Well, then, the xy coordinate system might work for you um, but other times. If you’re working with curved lines, curved surfaces or spheres, it might make it a little bit challenging to describe things. We can use trigonometry to help us move between coordinate systems. Trigonometry helps us relate lengths and angles, so we have our angles represented by capital, letters, so a b and c, and then the sides of the triangle. So here we have a right triangle: the sides are represented by lowercase values, so a b and c as well. For opposite adjacent, hypotenuse, respectively sine of a is equal to opposite over hypotenuse, a over c cosine of a which is equal to adjacent over hypotenuse or b over c and tangent of a which is equal to opposite over adjacent a over b. To remember all this, you can just think sohcahtoa. Another important relationship we have in trigonometry is pythagorean theorem, and this relates the sides, a and b to the hypotenuse c. So we have a squared, plus, b squared equal to c squared.

We can also think of pythagorean theorem as the way to calculate distance. Let’S, look at some coordinate systems in two dimensions, so first we have cartesian coordinates. We already looked at this with the xy plane, so in cartesian coordinates. We have two values: the value associated with the distance in the x direction and the value associated with the distance in the y direction. So we look at these axes and they’re orthogonal to each other, and that means they intersect at right angles and, of course, that intersection is our origin. We also have polar coordinates, so r uh, which is our direct distance from our point of interest and the origin, and then our angle theta, which is the angle from the x axis. So how do we relate cartesian and polar coordinates? Well, we can move from cartesian to polar uh with the following equations, so we have x, squared plus y squared equals r squared, so that models, our pythagorean theorem y and x relate with tangent to give us a value of theta. So with those i increa with those equations we’re able to determine r and theta now, if we want to go from polar coordinates to cartesian coordinates, we can have the following relationship so cosine of theta. So if we remember theta is our angle from x, cosine is opposite or if cosine is adjacent over hypotenuse um. So if we multiply by r, which is also our hypotenuse we’re left with adjacent so here adjacent is equal to x.

We can find the relation that gives us y similarly with sine of theta, so sine that is opposite over hypotenuse. We multiply that ratio by r, which is our hypotenuse and we’re left with opposite in that case, for us opposite is the value of y. So the opposite of this angle: theta, is our distance y, so let’s build on these coordinate systems and add another dimension. The cartesian coordinates can add the z axis, which typically, we have that going up in the positive direction where x, moves forward and then y moves from left to right. And we define our point of interest as distances from the x from the origin in the x y and z directions. We also have spherical coordinates so with spherical coordinates. We have a position uh defined by our direct distance from the origin, r um, as well as an angle from the z axis theta. So our angle angle, from our the angle from the z axis theta and then an angle from our x axis uh feet depending on, if you’re using spherical coordinates um for mathematics or for physics, sometimes theta and phi are swapped. So you have to pay attention to that we’ll be using the notation typically used in physics, textbooks where we have our theta angle, our distance from our z axis and then our ph angle. The angle from the x axis let’s convert between these two coordinate systems. We’Re going from x y and z to r theta and phi, so it might not look super intuitive how you develop these equations, but we’re really just applying our trigonometric identities again.

So here we have r that’s formed as an extension of the pythagorean theorem, and then we can see that to generate fee and to generate theta we’re, simply using the tangent relationships of opposite over adjacent. If we’re going from spherical to cartesian coordinates, we have the same type of application of those identities. So here we have our equations for x, y and z, and we can see that we’re trying to use the combination of a function. So our sine cosine functions that allow us to cancel out every other value, except for our one of interest, so either x, y or z. So let’s go ahead and look at this value right here. So we know that sine of theta so sine gives us opposite of our hypotenuse. Well, if we look at opposite over hypotenuse for theta that’s, going to be our square root of x, squared plus y squared, so that’s, our distance multiplied by x over square root of x, squared plus y squared. So if we look at these, we have our r’s cancel out these portions here that are calculating um, a distance canceling out, so that comes from our pythagorean, theorem, um and then we’re left with x. So similarly, we can use those types of relationships in order to form our equations that give us y and z to convert from spherical to cartesian coordinates. So these equations are summarized in the slide here. So how do these conversions and coordinate systems relate to quantum computing? Well, we have qubits and as we’ve discussed in lecture, they have a couple of important attributes that give them abilities to express information differently than classical information.

So we’ve talked about superposition and we’ve talked about entanglement, but now we’re going to start talking about another important feature associated with quantum computing uh, the ability to have phase associated with our quantum information. So because we have this extra degree of freedom phase, we use the bloke sphere to depict a single qubit and our single qubit is depicted as a a point on the surface of the bloke sphere. So all valid quantum states are on the surface of the sphere and of course our radius is equal to one. So we already have learned about summer operations that implement either rotations or reflections around the bloke sphere. So we can also refer to these quantum operations.