Amplitudes, tensor products, and phase-only gates

Advanced Quantum Machine Learning
Created by Pavel · 17.03.2026 at 07:05 UTC · 1 completed

Tensor products multiply single-qubit amplitudes when the state stays separable; that is how you read off coefficients such as $|11\rangle$ in a product of $R_y$ rotations. Separating population changes from phase-only $R_z$ factors avoids false intuition about measurement.

Global phase on $|0\rangle$ is unobservable, but once superposition exists, relative phases steer interference.

University approvals: 0
Tasks
Question 1

For the vector $(0.3, 0.7, 0.5, 0.1)$, what is the squared norm before normalization?

Hint

Add the squares of all entries.

Question 2

For the product state $R_y(x_1)|0\rangle \otimes R_y(x_2)|0\rangle$, what is the coefficient of $|11\rangle$?

Hint

Each qubit must contribute its $|1\rangle$ component.

Question 3

What is the immediate effect of applying only $R_z(\theta)$ to the initial state $|0\rangle$?

Hint

Compare state change with probability change.

Question 4

Suppose every qubit starts in $|0\rangle$ and the encoding applies only single-qubit $R_z(x_i)$ gates, with no Hadamards and no entangling gates. What can be said about measurement probabilities in the computational basis?

Hint

Generalize the one-qubit $R_z$ observation.

Question 5

Implement ry11_amplitude(x1: float, x2: float) -> float returning the $|11\rangle$ amplitude coefficient $\sin(x_1/2)\sin(x_2/2)$ for a product of single-qubit $R_y$ rotations applied to $|0\rangle$ each.

Hint

import math; use sin.

Starter code is prefilled; replace TODO blocks with your solution.
2 test cases will be used for grading
Run checks runtime behavior only. Final correctness is evaluated when you submit.
Card Info
  • Topic: Quantum Machine Learning
  • Difficulty: Advanced
  • Completed: 1 users
Creator
Pavel
Pavel