def get_angles(x):

```
beta0 = 2 * np.arcsin(np.sqrt(x[1] ** 2) / np.sqrt(x[0] ** 2 + x[1] ** 2 + 1e-12))
beta1 = 2 * np.arcsin(np.sqrt(x[3] ** 2) / np.sqrt(x[2] ** 2 + x[3] ** 2 + 1e-12))
beta2 = 2 * np.arcsin(
np.sqrt(x[2] ** 2 + x[3] ** 2)
/ np.sqrt(x[0] ** 2 + x[1] ** 2 + x[2] ** 2 + x[3] ** 2)
)
return np.array([beta2, -beta1 / 2, beta1 / 2, -beta0 / 2, beta0 / 2])
```

May I know why e choose np.sqrt(x[1] ** 2) / np.sqrt(x[0] ** 2 + x[1] ** 2 + 1e-12), not np.sqrt(x[0] ** 2) / np.sqrt(x[0] ** 2 + x[1] ** 2 + 1e-12)? Similarly for beta1, x[3] -> x[4] .

For beta2, can we set np.sqrt(x[0] ** 2 + x[4] ** 2)

/ np.sqrt(x[0] ** 2 + x[1] ** 2 + x[2] ** 2 + x[3] ** 2) and etc?

Any mathematical explanation here?

This is 4 data in a vector using two qubits. Says, I have a datesets with 8 elements in a vector. It means that I can use method above to represent the data. What about I use 3 qubits to have 2^3 states to represent my data? If hardware is not the issue, what is the merit between these two techniques? Thank you very much.