Parameterized Gates
A parameterised gate is a gate with a number dial. RY(θ) takes a qubit that is surely 0. It turns it into a state that reads 1 with chance sin²(θ/2). The shape of the circuit stays fixed while the numbers change. That split is the basis of parameter sweeps and variational methods.
What is a parameterised gate?
Why care? Many quantum programs work by trying a circuit, checking the result, and turning a few knobs. Those knobs are parameterised gates.
Gates like X and H are switches. Each does one fixed thing. A parameterised gate is a dial. The gate's shape is fixed, but a number you give it sets how far it turns. Think of a volume knob next to a mute button. The mute button has two settings. The knob has as many as you like.
The number is an angle in radians. In this angle unit, π ≈ 3.1416 means half a turn, and 2π means a full turn. In circuit JSON the angle is stored as a plain number, such as 1.0472 for π/3. It is not stored as a formula.
The three basic dials are RX(θ), RY(θ) and RZ(θ). Each turns the qubit's state around a different axis, like spinning a globe around three different rods. This lesson uses RY because its effect on readout chances is the easiest to work out by hand. It also uses RZ, because its effect is the easiest to get wrong.
- Worked example: how do I work out RY(π/3) by hand?
- Run RY(1.0472)INTERACTIVE
- Worked example: what happens as I sweep the angle?
- Compare: the dial turned fully to πINTERACTIVE
- Why does RZ(θ) show nothing here?
- Try this: what if I keep the angle but change the axis?INTERACTIVE
- Where does this lead? Variational circuits
You’ve read the opening of chapter 5. Pro unlocks the other 7 sections — plus every chapter of every course, with circuits you can run right on the page. That’s $11.99 a month, about the price of a coffee, or $99.99 a year (save 30%). The first chapter of every course, and the whole math course, stay free.