Verifying Quantum Steering with a Semidefinite Program

Werner States, Steerable Weight, and Critical Visibility

Quantum steering sits between entanglement and Bell nonlocality. Alice measures her half of a shared state, and she can steer Bob’s conditional states in a way that no local hidden state model can reproduce. In this post we decide steerability numerically with a semidefinite program (SDP), using a two-qubit Werner state as a concrete example.

1. The problem

Alice and Bob share a state $\rho_{AB}$. Alice chooses a measurement setting $x \in {1,\dots,m}$ and obtains an outcome $a \in {0,1}$, described by projectors $P_{a|x}$. Bob’s unnormalized conditional states form the assemblage

The assemblage is unsteerable if it admits a local hidden state (LHS) model:

$$
\sigma_{a|x} = \sum_{\lambda} D(a|x,\lambda),\sigma_\lambda,
\qquad \sigma_\lambda \succeq 0 ,
$$

where $\lambda = (\lambda_1,\dots,\lambda_m)$ runs over all $2^m$ deterministic strategies and $D(a|x,\lambda)=\delta_{a,\lambda_x}$. Since there are finitely many $\lambda$ and every constraint is linear in $\sigma_\lambda$, this is a semidefinite feasibility problem.

Steerable weight

Instead of a yes/no answer, we compute a quantitative measure, the steerable weight. We split the assemblage into an unsteerable part and a remainder, and maximize the weight of the unsteerable part:

$$
\begin{aligned}
\mu^\star = \max_ \quad & \sum_\lambda \mathrm{Tr},\sigma_\lambda \
\text{s.t.} \quad & \sum_{\lambda}D(a|x,\lambda),\sigma_\lambda \preceq \sigma_{a|x}\quad \forall a,x,\
& \sigma_\lambda \succeq 0 ,
\end{aligned}
\qquad
\mathrm{SW} = 1-\mu^\star .
$$

The assemblage is unsteerable exactly when $\mathrm{SW}=0$.

Critical visibility in a single SDP

Take the Werner state

$$
\rho(p) = p,|\psi^-\rangle\langle\psi^-| + (1-p),\frac{\mathbb{1}}{4},
\qquad |\psi^-\rangle=\frac{|01\rangle-|10\rangle}{\sqrt2}.
$$

For a projective measurement along the unit vector $\vec n$, the assemblage is

$$
\sigma_{a|x}(p) = \frac14\Big(\mathbb{1} - p,(-1)^a,\vec n_x\cdot\vec\sigma\Big)
= p,\sigma^{\rm singlet}_{a|x} + (1-p)\frac{\mathbb{1}}{4}.
$$

Bob’s conditional Bloch vectors therefore have length $p$. Since $p$ enters the constraints linearly, we can make it an SDP variable and find the critical visibility $p_c$ in one shot:

$$
p_c = \max_{p,{\sigma_\lambda}}\ p
\quad\text{s.t.}\quad
\sum_{\lambda:,\lambda_x=a}\sigma_\lambda = p,\sigma^{\rm singlet}_{a|x}+(1-p)\frac{\mathbb{1}}{4},\ \ \sigma_\lambda\succeq0 .
$$

For $p\le p_c$ the state is unsteerable with the chosen settings, and for $p>p_c$ it is steerable.

2. The worked example

We study three things:

  1. Critical visibility versus number of settings. We use $m=2$ (the $x,z$ axes), $m=3$ (the $x,y,z$ axes), $m=4$ (four cube diagonals), and $m=6$ (six icosahedron axes).
  2. Steerable weight curves $\mathrm{SW}(p)$ for $m=2,3,4$.
  3. Two settings at relative angle $\theta$, which gives a 3D surface $\mathrm{SW}(p,\theta)$. The critical curve is expected to be

$$
p_c(\theta)=\frac{1}{\sqrt{1+\sin\theta}} .
$$

Known reference values are $p_c=1/\sqrt2\approx0.7071$ for two orthogonal settings, $p_c=1/\sqrt3\approx0.5774$ for three orthogonal settings, and $p_c\to 1/2$ in the limit of infinitely many projective settings.

3. Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
import itertools
import time

import numpy as np
import cvxpy as cp
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D # noqa: F401

# ---------------------------------------------------------------
# 1. Basic objects: Pauli matrices, Werner state, measurements
# ---------------------------------------------------------------
I2 = np.eye(2, dtype=complex)
SX = np.array([[0, 1], [1, 0]], dtype=complex)
SY = np.array([[0, -1j], [1j, 0]], dtype=complex)
SZ = np.array([[1, 0], [0, -1]], dtype=complex)

PSI = np.array([0, 1, -1, 0], dtype=complex) / np.sqrt(2)
RHO_SINGLET = np.outer(PSI, PSI.conj())


def werner_state(p):
"""rho(p) = p |psi-><psi-| + (1-p) I/4"""
return p * RHO_SINGLET + (1 - p) * np.eye(4, dtype=complex) / 4


def projector(n, a):
"""Projector onto outcome a (0 or 1) of the spin measurement along n."""
n = np.asarray(n, dtype=float)
n = n / np.linalg.norm(n)
return 0.5 * (I2 + (-1) ** a * (n[0] * SX + n[1] * SY + n[2] * SZ))


def assemblage(rho, directions):
"""sigma_{a|x} = Tr_A[(P_{a|x} (x) I) rho] -> list[x][a] of 2x2 matrices"""
out = []
for n in directions:
row = []
for a in (0, 1):
M = np.kron(projector(n, a), I2)
full = (M @ rho).reshape(2, 2, 2, 2)
row.append(np.einsum("ijik->jk", full))
out.append(row)
return out


# ---------------------------------------------------------------
# 2. SDP solver helper
# ---------------------------------------------------------------
if "CLARABEL" in cp.installed_solvers():
SOLVE_KW = dict(solver=cp.CLARABEL)
else:
SOLVE_KW = dict(solver=cp.SCS, eps=1e-9, max_iters=200000)


# ---------------------------------------------------------------
# 3. SDP (A): steerable weight for a given assemblage
# ---------------------------------------------------------------
def steerable_weight(sigma):
m = len(sigma)
strategies = list(itertools.product((0, 1), repeat=m))
S = [cp.Variable((2, 2), hermitian=True) for _ in strategies]
cons = [s >> 0 for s in S]
for x in range(m):
for a in (0, 1):
part = sum(S[k] for k, lam in enumerate(strategies) if lam[x] == a)
cons.append(sigma[x][a] - part >> 0)
objective = cp.Maximize(cp.real(sum(cp.trace(s) for s in S)))
prob = cp.Problem(objective, cons)
prob.solve(**SOLVE_KW)
return max(0.0, 1.0 - float(prob.value))


# ---------------------------------------------------------------
# 4. SDP (B), slow: critical visibility by bisection
# ---------------------------------------------------------------
def critical_p_bisection(directions, lo=0.3, hi=1.0, iters=22, tol=1e-6):
for _ in range(iters):
mid = 0.5 * (lo + hi)
sw = steerable_weight(assemblage(werner_state(mid), directions))
if sw > tol:
hi = mid
else:
lo = mid
return 0.5 * (lo + hi)


# ---------------------------------------------------------------
# 5. SDP (C), fast: critical visibility with ONE SDP
# p becomes a variable: sum_{lam: lam_x=a} sigma_lam = p*sigma^singlet_{a|x} + (1-p) I/4
# ---------------------------------------------------------------
def critical_p_direct(directions):
m = len(directions)
sig_s = assemblage(RHO_SINGLET, directions)
strategies = list(itertools.product((0, 1), repeat=m))
S = [cp.Variable((2, 2), hermitian=True) for _ in strategies]
p = cp.Variable()
cons = [s >> 0 for s in S] + [p >= 0, p <= 1]
for x in range(m):
for a in (0, 1):
part = sum(S[k] for k, lam in enumerate(strategies) if lam[x] == a)
cons.append(part == p * sig_s[x][a] + (1 - p) * I2 / 4)
prob = cp.Problem(cp.Maximize(p), cons)
prob.solve(**SOLVE_KW)
return float(p.value)


# ---------------------------------------------------------------
# 6. Measurement settings
# ---------------------------------------------------------------
PHI = (1 + np.sqrt(5)) / 2
SETTINGS = {
2: [(1, 0, 0), (0, 0, 1)],
3: [(1, 0, 0), (0, 1, 0), (0, 0, 1)],
4: [(1, 1, 1), (1, -1, -1), (-1, 1, -1), (-1, -1, 1)],
6: [(0, 1, PHI), (0, 1, -PHI), (1, PHI, 0), (1, -PHI, 0), (PHI, 0, 1), (-PHI, 0, 1)],
}

# ---------------------------------------------------------------
# 7. Experiment 1: critical visibility vs. number of settings
# ---------------------------------------------------------------
print("=" * 64)
print("Experiment 1: critical visibility p_c of the Werner state")
print("=" * 64)
print(f"{'settings m':>10} {'strategies 2^m':>15} {'p_c (SDP)':>12} {'time [s]':>10}")
pc = {}
for m, dirs in SETTINGS.items():
t0 = time.time()
pc[m] = critical_p_direct(dirs)
print(f"{m:>10d} {2**m:>15d} {pc[m]:>12.6f} {time.time() - t0:>10.3f}")
print(f"\nReference: 1/sqrt(2) = {1/np.sqrt(2):.6f}, 1/sqrt(3) = {1/np.sqrt(3):.6f}, 1/2 = 0.500000")

# ---------------------------------------------------------------
# 8. Speed comparison: bisection vs. one-shot SDP (m = 4)
# ---------------------------------------------------------------
print("\n" + "=" * 64)
print("Speed comparison (m = 4 settings)")
print("=" * 64)
t0 = time.time()
pc_bis = critical_p_bisection(SETTINGS[4])
t_bis = time.time() - t0
t0 = time.time()
pc_dir = critical_p_direct(SETTINGS[4])
t_dir = time.time() - t0
print(f"bisection (22 SDPs): p_c = {pc_bis:.6f}, time = {t_bis:.3f} s")
print(f"one-shot SDP : p_c = {pc_dir:.6f}, time = {t_dir:.3f} s")
print(f"speed-up : x{t_bis / max(t_dir, 1e-9):.1f}")

# ---------------------------------------------------------------
# 9. Experiment 2: steerable weight curves
# ---------------------------------------------------------------
p_grid = np.linspace(0.4, 1.0, 31)
curve_ms = [2, 3, 4]
sw_curves = {}
for m in curve_ms:
sw_curves[m] = np.array(
[steerable_weight(assemblage(werner_state(p), SETTINGS[m])) for p in p_grid]
)

print("\n" + "=" * 64)
print("Experiment 2: steerable weight SW(p)")
print("=" * 64)
print(f"{'p':>6} " + " ".join(f"{'SW (m=' + str(m) + ')':>12}" for m in curve_ms))
for i in range(0, len(p_grid), 3):
print(f"{p_grid[i]:>6.2f} " + " ".join(f"{sw_curves[m][i]:>12.6f}" for m in curve_ms))

# ---------------------------------------------------------------
# 10. Experiment 3: two settings with relative angle theta
# ---------------------------------------------------------------
def two_settings(theta):
return [(0, 0, 1), (np.sin(theta), 0, np.cos(theta))]


thetas = np.linspace(0.05, np.pi / 2, 18)
ps = np.linspace(0.5, 1.0, 21)
SW_surf = np.zeros((len(thetas), len(ps)))
for i, th in enumerate(thetas):
for j, p in enumerate(ps):
SW_surf[i, j] = steerable_weight(assemblage(werner_state(p), two_settings(th)))

th_line = np.linspace(0.05, np.pi / 2, 40)
pc_num = np.array([critical_p_direct(two_settings(th)) for th in th_line])
pc_formula = 1 / np.sqrt(1 + np.sin(th_line))

print("\n" + "=" * 64)
print("Experiment 3: two settings at angle theta")
print("=" * 64)
print(f"{'theta [deg]':>12} {'p_c (SDP)':>12} {'1/sqrt(1+sin)':>15}")
for th in np.radians([15, 30, 45, 60, 75, 90]):
pn = critical_p_direct(two_settings(th))
print(f"{np.degrees(th):>12.1f} {pn:>12.6f} {1/np.sqrt(1+np.sin(th)):>15.6f}")
print(f"\nmax |SDP - formula| over the scan = {np.max(np.abs(pc_num - pc_formula)):.2e}")

# ---------------------------------------------------------------
# 11. Figure (all graphs in one figure)
# ---------------------------------------------------------------
fig = plt.figure(figsize=(16, 13))
colors = {2: "tab:red", 3: "tab:blue", 4: "tab:green"}
styles = {2: "-", 3: "-", 4: "--"}

# (a) SW vs p
ax1 = fig.add_subplot(2, 2, 1)
for m in curve_ms:
ax1.plot(p_grid, sw_curves[m], marker="o", ms=4, ls=styles[m], color=colors[m], label=f"m = {m}")
ax1.axvline(pc[m], color=colors[m], ls=":", lw=1)
ax1.set_xlabel("Werner parameter p")
ax1.set_ylabel("Steerable weight SW")
ax1.set_title("(a) Steerable weight vs. noise")
ax1.legend()
ax1.grid(alpha=0.3)

# (b) critical p vs m
ax2 = fig.add_subplot(2, 2, 2)
ms = list(pc.keys())
bars = ax2.bar([str(m) for m in ms], [pc[m] for m in ms], color="tab:purple", alpha=0.8)
for b, m in zip(bars, ms):
ax2.text(b.get_x() + b.get_width() / 2, pc[m] + 0.01, f"{pc[m]:.4f}", ha="center")
ax2.axhline(1 / np.sqrt(2), color="gray", ls="--", lw=1, label="1/sqrt(2)")
ax2.axhline(0.5, color="black", ls="--", lw=1, label="1/2 (continuum limit)")
ax2.set_ylim(0.4, 0.8)
ax2.set_xlabel("Number of measurement settings m")
ax2.set_ylabel("Critical visibility p_c")
ax2.set_title("(b) More settings reveal steering at lower p")
ax2.legend()
ax2.grid(alpha=0.3, axis="y")

# (c) 3D surface
ax3 = fig.add_subplot(2, 2, 3, projection="3d")
P, T = np.meshgrid(ps, np.degrees(thetas))
surf = ax3.plot_surface(P, T, SW_surf, cmap="viridis", edgecolor="none", alpha=0.92)
ax3.plot(pc_formula, np.degrees(th_line), np.zeros_like(th_line), color="red", lw=2.5, label="critical curve")
ax3.set_xlabel("p")
ax3.set_ylabel("angle theta [deg]")
ax3.set_zlabel("SW")
ax3.set_title("(c) SW(p, theta) for two settings")
ax3.view_init(elev=28, azim=-125)
ax3.legend(loc="upper left")
fig.colorbar(surf, ax=ax3, shrink=0.6, pad=0.1)

# (d) 3D Bloch sphere
ax4 = fig.add_subplot(2, 2, 4, projection="3d")
u, v = np.mgrid[0:2 * np.pi:40j, 0:np.pi:20j]
ax4.plot_wireframe(np.cos(u) * np.sin(v), np.sin(u) * np.sin(v), np.cos(v), color="lightgray", lw=0.4)
for p_val, col in [(1.0, "tab:red"), (0.8, "tab:orange"), (pc[3], "tab:blue")]:
sig = assemblage(werner_state(p_val), SETTINGS[3])
pts = []
for x in range(3):
for a in (0, 1):
s = sig[x][a]
pts.append([np.real(np.trace(s @ P_)) / np.real(np.trace(s)) for P_ in (SX, SY, SZ)])
pts = np.array(pts)
ax4.scatter(pts[:, 0], pts[:, 1], pts[:, 2], s=70, color=col, label=f"p = {p_val:.3f}")
ax4.set_xlabel("x")
ax4.set_ylabel("y")
ax4.set_zlabel("z")
ax4.set_title("(d) Bob's conditional states (m = 3)")
ax4.legend(loc="upper left")
ax4.set_box_aspect((1, 1, 1))

plt.tight_layout()
plt.show()

4. Walking through the code

Building blocks (sections 1 and 2)

werner_state(p) builds $\rho(p)=p|\psi^-\rangle\langle\psi^-|+(1-p)\mathbb 1/4$ as a $4\times4$ matrix. projector(n, a) returns $P_{a|n}=\tfrac12\big(\mathbb 1+(-1)^a,\vec n\cdot\vec\sigma\big)$, the spin projector along an arbitrary axis, normalized internally so that non-unit vectors like $(1,1,1)$ also work.

assemblage computes $\sigma_{a|x}=\mathrm{Tr}A[(P{a|x}\otimes\mathbb 1)\rho]$. The product $(P\otimes\mathbb 1)\rho$ is reshaped into a rank-4 tensor with indices $(i,j,i’,k)$, where the first pair labels Alice and Bob on the row side and the second pair labels them on the column side. The partial trace over Alice is then the contraction "ijik->jk", which sets the two Alice indices equal and sums over them.

The solver helper prefers Clarabel, an interior-point solver that is accurate to roughly $10^{-9}$ and well suited to small SDPs. If it is missing, it falls back to SCS with a tight tolerance.

SDP (A): steerable weight (section 3)

The function enumerates all deterministic strategies with itertools.product((0, 1), repeat=m), which gives $2^m$ tuples $\lambda=(\lambda_1,\dots,\lambda_m)$. Each strategy gets a Hermitian $2\times2$ variable $\sigma_\lambda$ with the constraint s >> 0.

For every setting $x$ and outcome $a$, the expression part is $\sum_{\lambda:\lambda_x=a}\sigma_\lambda$. The constraint sigma[x][a] - part >> 0 enforces $\sigma_{a|x}-\sum_\lambda D(a|x,\lambda)\sigma_\lambda\succeq0$. The objective maximizes $\mathrm{Re},\mathrm{Tr}\sum_\lambda\sigma_\lambda=\mu$, and the function returns $\mathrm{SW}=1-\mu^\star$, clipped at zero to remove tiny negative solver noise.

SDP (B) and SDP (C): finding $p_c$ (sections 4 and 5)

critical_p_bisection is the straightforward approach. It repeatedly solves the steerable-weight SDP at a trial value of $p$, moving the upper bound down if $\mathrm{SW}>10^{-6}$ and the lower bound up otherwise. With 22 iterations this costs 22 SDPs per critical visibility.

critical_p_direct is the accelerated version. The only change is that $p$ becomes a scalar cp.Variable(), and the inequality becomes the equality

$$
\sum_{\lambda:\lambda_x=a}\sigma_\lambda=p,\sigma^{\rm singlet}_{a|x}+(1-p)\frac{\mathbb 1}{4}.
$$

Maximizing $p$ then returns $p_c$ directly. The feasible set in $p$ is an interval $[0,p_c]$, because the problem is convex, so the maximum is exactly the threshold. One SDP replaces 22, and the program stays small: the matrices are always $2\times2$, with $2^m$ of them.

Settings (section 6)

The four sets of measurement directions are:

  • $m=2$: the $x$ and $z$ axes.
  • $m=3$: the $x$, $y$ and $z$ axes. The $y$ axis makes some matrices complex, which is why the variables are declared hermitian=True.
  • $m=4$: four cube diagonals.
  • $m=6$: six axes through the vertices of an icosahedron, using the golden ratio $\varphi=(1+\sqrt5)/2$.

Experiments (sections 7 to 10)

Experiment 1 loops over the settings with the fast solver and prints a table. Section 8 compares bisection against the one-shot SDP on $m=4$, and both must agree on $p_c$. Experiment 2 sweeps $p$ from $0.4$ to $1$ and evaluates $\mathrm{SW}$ for $m=2,3,4$.

Experiment 3 fixes the first setting along $z$ and rotates the second by an angle $\theta$ in the $x$–$z$ plane. It builds an $18\times21$ grid of $\mathrm{SW}(p,\theta)$ values for the 3D surface, then computes $p_c(\theta)$ by the fast SDP at 40 angles and compares it with $1/\sqrt{1+\sin\theta}$.

Plotting (section 11)

All four graphs are placed in a single figure with a $2\times2$ layout. The m=4 curve is dashed so that it remains visible even where it lies exactly on top of the m=3 curve. In panel (d), Bob’s conditional Bloch vector is recovered from each conditional state $s$ as $r_i=\mathrm{Tr}(s,\sigma_i)/\mathrm{Tr}(s)$.

5. Console output

================================================================
Experiment 1: critical visibility p_c of the Werner state
================================================================
settings m  strategies 2^m    p_c (SDP)   time [s]
         2               4     0.707107      0.138
         3               8     0.577350      0.258
         4              16     0.577350      0.436
         6              64     0.539345      2.713

Reference: 1/sqrt(2) = 0.707107,  1/sqrt(3) = 0.577350,  1/2 = 0.500000

================================================================
Speed comparison (m = 4 settings)
================================================================
bisection (22 SDPs): p_c = 0.577351, time = 8.040 s
one-shot SDP       : p_c = 0.577350, time = 0.151 s
speed-up           : x53.2

================================================================
Experiment 2: steerable weight SW(p)
================================================================
     p     SW (m=2)     SW (m=3)     SW (m=4)
  0.40     0.000000     0.000000     0.000000
  0.46     0.000000     0.000000     0.000000
  0.52     0.000000     0.000000     0.000000
  0.58     0.000000     0.006269     0.006269
  0.64     0.000000     0.148231     0.148231
  0.70     0.000000     0.290192     0.290192
  0.76     0.180589     0.432154     0.432154
  0.82     0.385442     0.574115     0.574115
  0.88     0.590294     0.716077     0.716077
  0.94     0.795147     0.858038     0.858038
  1.00     1.000000     1.000000     1.000000

================================================================
Experiment 3: two settings at angle theta
================================================================
 theta [deg]    p_c (SDP)   1/sqrt(1+sin)
        15.0     0.891289        0.891289
        30.0     0.816497        0.816497
        45.0     0.765367        0.765367
        60.0     0.732051        0.732051
        75.0     0.713208        0.713208
        90.0     0.707107        0.707107

max |SDP - formula| over the scan = 1.85e-08

Reading the console output

  • Experiment 1. The SDP reproduces $p_c=1/\sqrt2\approx0.7071$ for two settings and $p_c=1/\sqrt3\approx0.5774$ for three. Four cube diagonals give the same value as three orthogonal axes, $0.5774$, so the extra setting adds nothing here. Six icosahedron axes lower the threshold to about $0.5393$, approaching the continuum limit of $1/2$. The runtime column shows the cost growing with the number of strategies $2^m$, yet even $m=6$ remains cheap.
  • Speed comparison. Both methods return the same $p_c$ to within the bisection tolerance, but the one-shot SDP is faster by more than an order of magnitude because it replaces 22 SDP solves with a single one.
  • Experiment 2. The table shows $\mathrm{SW}=0$ below the threshold and a linear rise above it up to $\mathrm{SW}=1$ at $p=1$. For two settings, for example, $\mathrm{SW}\approx0.3172$ at $p=0.8$.
  • Experiment 3. The SDP values of $p_c(\theta)$ match $1/\sqrt{1+\sin\theta}$ essentially to solver precision, so the closed form is confirmed numerically.

6. Graphs

Panel (a): steerable weight versus noise

Every curve is flat at zero until its own critical visibility, marked by the dotted vertical line, and then rises linearly to $\mathrm{SW}=1$ at $p=1$. In all the cases computed here the rise follows

$$
\mathrm{SW}(p)=\max!\left(0,\ \frac{p-p_c}{1-p_c}\right),
$$

so the whole curve is determined by $p_c$. The red curve ($m=2$) starts rising at $p\approx0.707$, while the blue and green curves ($m=3$ and $m=4$) start at $p\approx0.577$. The blue and green curves coincide exactly, which is why the dashed green line sits on top of the blue one: four cube diagonals reveal no more steering than three orthogonal axes for the Werner state.

Panel (b): critical visibility versus number of settings

This is the central result. Each additional well-chosen setting lets Alice detect steering in noisier states, so the threshold falls from $0.7071$ at $m=2$ to $0.5774$ at $m=3$ and $0.5393$ at $m=6$. The dashed line at $1/2$ is the continuum limit, which no finite set of settings can cross. Panel (b) also shows that the number of settings is not the only thing that matters: their geometry does too, since $m=4$ with cube diagonals gains nothing over $m=3$.

Panel (c): the 3D surface $\mathrm{SW}(p,\theta)$

The two horizontal axes are the Werner parameter $p$ and the angle $\theta$ between Alice’s two measurement axes, and the height is the steerable weight. The surface is a flat plain at $\mathrm{SW}=0$ in the unsteerable region, and it rises into a ramp that reaches $\mathrm{SW}=1$ at $p=1$ for large $\theta$. The red curve on the floor is $p_c(\theta)=1/\sqrt{1+\sin\theta}$, and it follows the foot of the ramp exactly.

At small $\theta$ the two measurements are nearly the same, so they carry almost no incompatibility and the critical visibility approaches $1$. As $\theta$ grows to $90^\circ$ the settings become maximally incompatible and the threshold falls to $1/\sqrt2$. The steerable region therefore widens as the measurements become more incompatible.

Panel (d): Bob’s conditional states on the Bloch sphere

For $m=3$, each setting and outcome produces one point on or inside the Bloch sphere. At $p=1$ (red) all six points lie on the surface at $\pm\hat x,\pm\hat y,\pm\hat z$, which means Alice steers Bob into pure states. Lowering $p$ shrinks all six points toward the center, giving orange at $p=0.8$ and blue at $p=1/\sqrt3\approx0.577$. At the critical visibility the shrunken octahedron has just become small enough that a local hidden state ensemble can reproduce it, which is where the SDP reports $\mathrm{SW}=0$.

7. Why the fast version matters

Each steering test involves $2^m$ matrix variables, so the cost grows exponentially with the number of settings. Locating a threshold by bisection multiplies that cost by the number of iterations. Turning $p$ into an SDP variable removes this factor entirely, because the threshold becomes the optimum of a single convex program. The comparison section of the console output makes the difference concrete, and the saving is largest in the regime where each SDP is already expensive, with $m=6$ and beyond.

8. Conclusion

Steerability with a finite set of measurements is a semidefinite feasibility problem. Solving it for the Werner state reproduces the textbook thresholds $1/\sqrt2$, $1/\sqrt3$, and the closed form $1/\sqrt{1+\sin\theta}$ for two settings at angle $\theta$. The same code can be applied to any two-qubit state or any set of measurements by changing werner_state and SETTINGS.