Skip to main content
Course and syllabus guidance

University Physics V · topic UPV-20.06

Unitary gates, circuits, and universal gate sets

Connect the ideas, make your working visible, and test the result. Use the hints when you need a starting point; open the full solution after your attempt.

Further practice

Work through a fresh case before tackling the extension.

Further practice · 01

Unitary gates, circuits and universality: predict a finite change

A quantum gate is a unitary operator on the state space of a qubit register — U†U = I — so it is linear, reversible and norm-preserving; a circuit is the product of its gates, and a gate set is universal when finite products of its members approximate every unitary, up to a global phase, to any chosen accuracy. Use the supplied topic model Y_out = cos(2*n*acos(cosd(a/2)*cosd(b/2)))+cosd(a/2)^2*sind(b/2)^2*(1-cos(2*n*acos(cosd(a/2)*cosd(b/2))))/max(1-(cosd(a/2)*cosd(b/2))^2,0.0001), where Y_out is BLOCH z = ⟨Z⟩ (dimensionless). The output symbol Y_out is distinct from all input symbols. ^ denotes a power; π = 3.141592653589793; max(a,b) selects the larger value; sind/cosd/tand use degrees; unmarked trigonometric functions use radians. a is x-turn θ₁ from H R_z(θ₁) H, measured in deg. Keep b (z-turn θ₂ from R_z(θ₂)) = 45 deg; n (Blocks applied n) = 1 fixed. For this exercise use only 189.45 deg ≤ a ≤ 321.75 deg on this continuous branch. A grid of test settings is an input restriction for this exercise, not by itself a claim of physical quantisation. This calculation retains the topic model's stated assumptions; it does not extend them to a different physical setup. Calculate Y_out at a = 218.556 deg and 237.078 deg. Find the signed output change ΔY_out and the average sensitivity ΔY_out/Δa across this interval. State whether the response increases or decreases; distinguish this interval average from a derivative at one point.

Explore the question data

BLOCH z = ⟨Z⟩ against a

Predictions from the supplied Unitary gates, circuits and universality model, with all other inputs fixed as stated in the question. 5 calibration points support a trend comparison; they are not measured data or a straight-line law.

Vertical axis (y): BLOCH z = ⟨Z⟩

BLOCH z = ⟨Z⟩ against aPredictions from the supplied Unitary gates, circuits and universality model, with all other inputs fixed as stated in the question. 5 calibration points support a trend comparison; they are not measured data or a straight-line law. Horizontal axis: a: x-turn θ₁ from H R_z(θ₁) H / deg. Vertical axis: BLOCH z = ⟨Z⟩. Exact values are available in the data table below.-1.057-0.5789-0.10060.37780.8562184.2219.9255.6291.3327xy

Horizontal axis (x): a: x-turn θ₁ from H R_z(θ₁) H / deg

Axes show the supplied calibration interval; the origin may lie outside the plot.

Reading 1a: x-turn θ₁ from H R_z(θ₁) H / deg: 189.4BLOCH z = ⟨Z⟩: -0.9864
Read the exact data as a table
BLOCH z = ⟨Z⟩ against a — supplied values
a: x-turn θ₁ from H R_z(θ₁) H / degBLOCH z = ⟨Z⟩
189.45-0.9864292571764955
222.52499999999998-0.7369824847979511
255.6-0.24868988716485554
288.6750.32019966162731206
321.750.7853169308807444

These are the supplied values, not a worked answer. No fitted trend is drawn.

Show a hint

Substitute each value of a separately while keeping every other input fixed, then subtract in the same order.

Reveal the worked solution
  1. At a = 218.556 deg, substitute into Y_out = cos(2*n*acos(cosd(a/2)*cosd(b/2)))+cosd(a/2)^2*sind(b/2)^2*(1-cos(2*n*acos(cosd(a/2)*cosd(b/2))))/max(1-(cosd(a/2)*cosd(b/2))^2,0.0001): Y₀ = -0.781999.
  2. At a = 237.078 deg, the same fixed-parameter model gives Y₁ = -0.543497.
  3. Signed change: ΔY_out = Y₁ − Y₀ = 0.238503; the input change is Δa = 18.522 deg.
  4. Average sensitivity is ΔY_out/Δa = 0.0128767 1 per deg. Its positive sign means that this response increases over the specified interval.
  5. This is a secant slope between two settings. It equals a point derivative only for a locally linear relation or in a justified small-interval limit.

Answer Y₀ = -0.781999, Y₁ = -0.543497; ΔY_out = 0.238503; average sensitivity = 0.0128767 1 per deg.

Compare the assumptions, method and units with your attempt. Explain any correction before trying another question.

Extra challenging questions

Work through the linked stages and explain what each result means.

Extra challenging · 01

Unitary gates, circuits and universality: infer an input with uncertainty

A quantum gate is a unitary operator on the state space of a qubit register — U†U = I — so it is linear, reversible and norm-preserving; a circuit is the product of its gates, and a gate set is universal when finite products of its members approximate every unitary, up to a global phase, to any chosen accuracy. Use the supplied topic model Y_out = cos(2*n*acos(cosd(a/2)*cosd(b/2)))+cosd(a/2)^2*sind(b/2)^2*(1-cos(2*n*acos(cosd(a/2)*cosd(b/2))))/max(1-(cosd(a/2)*cosd(b/2))^2,0.0001), where Y_out is BLOCH z = ⟨Z⟩ (dimensionless). The output symbol Y_out is distinct from all input symbols. ^ denotes a power; π = 3.141592653589793; max(a,b) selects the larger value; sind/cosd/tand use degrees; unmarked trigonometric functions use radians. a is x-turn θ₁ from H R_z(θ₁) H, measured in deg. Keep b (z-turn θ₂ from R_z(θ₂)) = 45 deg; n (Blocks applied n) = 1 fixed. For this exercise use only 189.45 deg ≤ a ≤ 321.75 deg on this continuous branch. A grid of test settings is an input restriction for this exercise, not by itself a claim of physical quantisation. This calculation retains the topic model's stated assumptions; it does not extend them to a different physical setup. A reading gives Y_out = 0.0026703506, with a bounded reading uncertainty ±0.1174. Treat the model and all fixed inputs as exact for this exercise; the bound is not a standard deviation. First estimate the unknown a by straight-line interpolation between the two endpoint predictions. Then solve the actual model on the stated branch to an absolute input tolerance of 0.01323 deg, using a numerical bracket if required. Find the full input interval consistent with the bounded reading uncertainty and compare it with a symmetric input-error assumption. Do not assume that the supplied calibration points prove monotonicity outside this branch.

Explore the question data

BLOCH z = ⟨Z⟩ against a

Predictions from the supplied Unitary gates, circuits and universality model, with all other inputs fixed as stated in the question. 5 calibration points support a trend comparison; they are not measured data or a straight-line law.

Vertical axis (y): BLOCH z = ⟨Z⟩

BLOCH z = ⟨Z⟩ against aPredictions from the supplied Unitary gates, circuits and universality model, with all other inputs fixed as stated in the question. 5 calibration points support a trend comparison; they are not measured data or a straight-line law. Horizontal axis: a: x-turn θ₁ from H R_z(θ₁) H / deg. Vertical axis: BLOCH z = ⟨Z⟩. Exact values are available in the data table below.-1.057-0.5789-0.10060.37780.8562184.2219.9255.6291.3327xy

Horizontal axis (x): a: x-turn θ₁ from H R_z(θ₁) H / deg

Axes show the supplied calibration interval; the origin may lie outside the plot.

Reading 1a: x-turn θ₁ from H R_z(θ₁) H / deg: 189.4BLOCH z = ⟨Z⟩: -0.9864
Read the exact data as a table
BLOCH z = ⟨Z⟩ against a — supplied values
a: x-turn θ₁ from H R_z(θ₁) H / degBLOCH z = ⟨Z⟩
189.45-0.9864292571764955
222.52499999999998-0.7369824847979511
255.6-0.24868988716485554
288.6750.32019966162731206
321.750.7853169308807444

These are the supplied values, not a worked answer. No fitted trend is drawn.

Show a hint

The model's endpoint predictions bracket the reading. Solve Y_out(a) = Y_measured and then solve again at Y_measured − u and Y_measured + u; a nonlinear inverse can give unequal input deviations.

Reveal the worked solution
  1. Endpoint predictions are Y_out(189.45) = -0.986429 and Y_out(321.75) = 0.785317. The target lies between them. On the selected branch the response is strictly increasing.
  2. Endpoint interpolation gives a_line = 189.45 + (0.00267035 − -0.986429)(321.75 − 189.45)/(0.785317 − -0.986429) = 263.308 deg. This estimates the inverse of the endpoint chord, rather than assuming that chord is the physical model.
  3. Use the actual equation, not the chord, and bracket its root. Evaluating the midpoint and retaining the sign-changing half-interval gives a = 270.153 deg; substituting back gives Y_out = 0.0026703506.
  4. The interpolation error in the input is |a_line − a| = 6.84486 deg. This is larger than the requested numerical tolerance.
  5. Invert both limits Y_out = -0.11472965 and 0.12007035. Sort the roots even if the response decreases: 263.412 deg ≤ a ≤ 276.896 deg.
  6. The lower and upper input deviations are 6.74103 deg and 6.74316 deg. They differ because the inverse response is nonlinear; a symmetric error bar would only be a local approximation. This interval includes reading uncertainty only, not model error or uncertainty in fixed inputs.

Answer a ≈ 270.153 deg; compatible interval [263.412, 276.896] deg. Endpoint interpolation gives 263.308 deg.

Compare the assumptions, method and units with your attempt. Explain any correction before trying another question.