Feature: PBR (Pusey-Barret-Rudolph) states
Closed this issue · 0 comments
vprusso commented
The PBR basis, defined in arXiv:1111.3328, is an interesting and often useful basis of states.
These states are defined in Equation-A6 in the Appendix. One approach to define
def pusey_barret_rudolph(n: int, theta: float) -> list[np.ndarray]:
"""Equation (A6) from arXiv:1111.3328
Basis of 2^n states parameterized by angle ``theta``.
"""
dims = n * [2]
psi_0 = np.cos(theta/2) * e_0 + np.sin(theta/2) * e_1
psi_1 = np.cos(theta/2) * e_0 - np.sin(theta/2) * e_1
psi = [psi_0, psi_1]
binary_strings = list(itertools.product([0, 1], repeat=n))
states = []
for b_str in binary_strings:
state = []
for b in b_str:
state.append(psi[b])
states.append(tensor(state))
return states
Should add these to states/pbr.py
or states/pusey_barret_rudolph.py
.