```
def variance_experiment(n_shots):
dev = qml.device("default.qubit", wires = 1, shots = n_shots)
@qml.qnode(dev)
def circuit():
qml.Hadamard(wires=0)
return qml.expval(qml.PauliZ(wires=0))
variance = []
for _ in range(n_trials):
variance.append(circuit())
return np.var(variance)
def variance_scaling(n_shots):
estimated_variance = 0
dev = qml.device("default.qubit", wires = 1, shots = n_shots)
@qml.qnode(dev)
def circuit():
qml.Hadamard(wires = 0)
return qml.sample(qml.PauliZ(wires = 0))
estimated_variance = np.var(circuit())
return estimated_variance
shot_vals = [10, 20, 40, 100, 200, 400, 1000, 2000, 4000, 10000]
results_experiment = [variance_experiment(shots) for shots in shot_vals]
results_scaling = [variance_scaling(shots) for shots in shot_vals]
plot = plotter(shot_vals, results_experiment, results_scaling)
```

I’m getting an error: “Incoorect: Your variance fuction doesn’t look quite right”

I’m unable to understand what does the question mean by varience in expectation value when we run the experiment n_shot number of times