KwiatLab / Quantum-Tomography

A python library to help perform tomography on a quantum state
http://tomography.web.engr.illinois.edu/TomographyDemo.php
MIT License
31 stars 9 forks source link

Problem with set of projectors #30

Closed diegomaragnano closed 1 year ago

diegomaragnano commented 1 year ago

Dear team of the Quantum Tomography Interface, I found out a problem while using the tomography interface to reconstruct a 2-qubit state with the following set of operators: HH, HV, VH, VV, HA, HL, DH, AH, DA, AL, DD, AA, DV, AV, VA, VL. This is the error I got:


Failed to run linear Tomography Traceback (most recent call last): File "/home/tomography/anaconda/envs/py39/lib/python3.9/site-packages/QuantumTomography/TomoClass.py", line 261, in StateTomography_Matrix [starting_matrix,inten_linear] = self.tomography_LINEAR(coincidences, measurements_pures,overall_norms) File "/home/tomography/anaconda/envs/py39/lib/python3.9/site-packages/QuantumTomography/TomoClass.py", line 738, in tomography_LINEAR b_inv = np.linalg.inv(b) File "<__array_function__ internals>", line 5, in inv File "/home/tomography/anaconda/envs/py39/lib/python3.9/site-packages/numpy/linalg/linalg.py", line 545, in inv ainv = _umath_linalg.inv(a, signature=signature, extobj=extobj) File "/home/tomography/anaconda/envs/py39/lib/python3.9/site-packages/numpy/linalg/linalg.py", line 88, in _raise_linalgerror_singular raise LinAlgError("Singular matrix") numpy.linalg.LinAlgError: Singular matrix

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/tomography/tomo/public_html/cgi-bin/RunScript.py", line 6, in exec(open("State_Tomography_WebsiteLib_2021.py").read()) File "", line 31, in File "/home/tomography/anaconda/envs/py39/lib/python3.9/site-packages/QuantumTomography/TomoClass.py", line 168, in importEval return self.StateTomography_Matrix(locals().get('tomo_input'), locals().get('intensity')) File "/home/tomography/anaconda/envs/py39/lib/python3.9/site-packages/QuantumTomography/TomoClass.py", line 267, in StateTomography_Matrix raise RuntimeError('Failed to run linear Tomography') RuntimeError: Failed to run linear Tomography


It seems to me that the projectors form a tomographically complete set, so there should be no problem, but it does not work at the moment.

Thanks in advance for checking the problem.

Best regards, Diego Maragnano

smturro2 commented 1 year ago

The linear tomography code has been refactored. Changes are reflected in the latest version (1.0.7)