I met errors when going through the polarization part of the documentation:
first one:
p = pcvl.Polarization(sp.pi/2, sp.pi/4)
p.project_ev_eh()
and I got error:
TypeError Traceback (most recent call last)
/var/folders/4f/b5n_b3wj16n_66605bzq06ph0000gn/T/ipykernel_5837/2414637220.py in
----> 1 p = pcvl.Polarization(np.pi/2, np.pi/4)
2 p.project_ev_eh()
TypeError: init() takes 2 positional arguments but 3 were given
second one:
st3 = pcvl.AnnotatedBasicState("|{P:(sp.pi/2,sp.pi/3)>")
print(st3)
the error like this:
ValueError Traceback (most recent call last)
/var/folders/4f/b5n_b3wj16n_66605bzq06ph0000gn/T/ipykernel_5837/1753952641.py in
----> 1 st3 = pcvl.AnnotatedBasicState("|{P:(sp.pi/2,sp.pi/3)>")
2 print(st3)
/opt/anaconda3/lib/python3.9/site-packages/perceval/utils/statevector.py in init(self, bs, photon_annotations)
132 m = re.match(r"{(.?)}(.)", v)
133 if m is None:
→ 134 raise ValueError(“non-closed annotation: %s” % bs)
135 annotation = Annotations.parse_annotation(m.group(1))
136 v = m.group(2)
ValueError: non-closed annotation: |{P:(sp.pi/2,sp.pi/3)>
So how should I deal with these? Does anybody can help?