Angles, Radians, and Rotations
An angle measures how far something has turned, and a radian measures it by the distance walked around a circle of radius 1 — a full turn is 2π, about 6.283. Quantum gates turn a qubit's state by angles like these, and one plain rule — RY uses half the angle you give it — lets you predict a real measured histogram exactly.
What is an angle?
Look at a clock. At 3:00 the hour hand has moved from the top of the face a quarter of the way around. That amount of turning is an angle.
An angle does not measure length or weight. It measures how far something has rotated. Nothing more.
Pizza works too. Cut a pizza into 8 equal slices and each slice takes up one eighth of a full turn.
You may half-remember degrees from school: a full turn is 360 degrees, a quarter turn is 90. The number 360 is not special — it was picked thousands of years ago because it divides evenly in many convenient ways. Mathematicians prefer a different unit, and quantum computing uses that unit everywhere. It is called the radian, and the nicest way to meet it is to go for a walk.
What is a radian, and where does 2π come from?
Imagine a perfectly round pond whose radius — the distance from its center to its edge — is exactly 1 kilometer. You are going to walk along the shore.
The distance all the way around a circle is called its circumference, and every circle obeys the same rule: circumference = 2 × π × radius. That symbol π is the Greek letter pi, pronounced "pie". It is a fixed number, roughly 3.14159 — the same for every circle ever drawn, from a coin to a planet. It is just one more constant to keep in your pocket, like the big and small numbers you met in chapter 1.
Our pond has radius 1, so the full walk around it is 2 × 3.14159 × 1 = 6.28318 kilometers. That distance has a name: 2π, said "two pie".
Here is the whole idea of a radian: measure an angle by how far you walked. Walk 1 kilometer along the shore of this radius-1 pond, and the angle you have swept out is exactly 1 radian. Walk the full 6.28318 kilometers and you have turned 2π radians — one complete turn.
The common slices, worked from the full walk: half of 6.28318 is 3.14159, and half of that is 1.57080. So:
- Half turn: π ≈ 3.1416 radians (half the pizza).
- Quarter turn: π/2 ≈ 1.5708 radians (a quarter of the pizza).
- One sixth of a turn: π/3 ≈ 1.0472 radians.
- One eighth of a turn: π/4 ≈ 0.7854 radians (a classic pizza slice).
- One twelfth of a turn: π/6 ≈ 0.5236 radians (one hour on a clock face).
Read those fractions carefully: π/2 means "the number π divided by 2". A bigger number under the division line means a smaller slice.
What do sine and cosine tell you?
Back to the pond. Stand at the center, walk 1 kilometer due east, and stop at the shore. That is your starting point. Now walk counterclockwise along the shore through some angle.
You are now standing somewhere on the circle, and two numbers pin down exactly where: how far east of the center you are, and how far north.
Those two numbers have famous names. The east distance is the cosine of the angle, written cos. The north distance is the sine, written sin. That is all they are: the coordinates of your spot on a circle of radius 1.
One more piece of notation: angles get the standard nickname θ, the Greek letter theta. When you see θ, just think "some angle".
A few values worth keeping handy:
- cos(π/6) = 0.8660, sin(π/6) = 0.5 — a short walk: still far east, a little north.
- cos(π/4) = 0.7071, sin(π/4) = 0.7071 — halfway to the top: east and north exactly equal.
- cos(π/3) = 0.5, sin(π/3) = 0.8660 — mostly north now.
- cos(π/2) = 0, sin(π/2) = 1 — due north of the center.
Worked example 1. Because you are always exactly 1 kilometer from the center, the coordinates always pass one test: square each and the squares add to 1. That is the Pythagoras rule you used to measure an arrow's length in chapter 3. Check it for π/6, digit by digit:
- 0.8660 × 0.8660 = 0.749956 — call it 0.7500. (The tiny shortfall is only because 0.8660 is rounded from its full value 0.86602540…)
- 0.5 × 0.5 = 0.25.
- 0.7500 + 0.2500 = 1.0000. Still on the circle, as promised.
Why are quantum gates rotations?
A qubit that has not been measured is described by two amplitudes — a two-entry list you will study properly in the next chapter. Here is the surprise: what a quantum gate does to that state is not adding or erasing. It is turning. Every single-qubit gate is a rotation by some angle.
The gate for this chapter is called RY — R for rotation, Y for the axis it turns around. (The axis picture becomes clear in the Bloch sphere chapter.) It takes exactly one input: an angle θ, in radians.
And here is the one rule you need, stated plainly. The half-angle rule: apply RY(θ) to a fresh qubit — one that would read 0 on every shot — and the new state has amplitude cos(θ/2) for the 0 outcome and sin(θ/2) for the 1 outcome. The gate uses half the angle you hand it. The reason why is a lovely geometric story that the Bloch sphere chapter tells; for now, take the rule and watch it predict a real histogram.
Worked example 2, digit by digit, for θ = π/3 — the one-sixth-of-a-turn slice, 1.0472 radians:
- Halve the angle: 1.0472 ÷ 2 = 0.5236 radians, which is π/6.
- Look up the coordinates: cos(π/6) = 0.8660 and sin(π/6) = 0.5. So the amplitudes are 0.8660 for reading 0 and 0.5 for reading 1.
- Squaring an amplitude gives a probability: 0.8660 × 0.8660 = 0.75, and 0.5 × 0.5 = 0.25. (Why squares? That story lives in amplitudes and phase.)
- Expected counts = probability × shots, the rule from chapter 2: 0.75 × 1000 = 750 zeros, and 0.25 × 1000 = 250 ones.
That is the entire prediction: about 750 and about 250, wobbling a little the way chapter 2 taught. Time to check it against a real run.
Run it: does RY(π/3) really give 750 and 250?
Where will you use this?
Radians, cos, sin, and the half-angle rule become pure muscle memory from here on. You will lean on them in:
- The Bloch sphere — the picture that finally explains why RY uses half the angle.
- X, Y, and Z gates and phase gates and rotations — every gate there is a rotation by an angle you can now read at a glance.
- The next chapter — where the two amplitudes you just predicted become entries in a list with one strict rule.
- The Lab — set any RY angle yourself and watch the histogram track cos and sin in real time.