I noticed I was unable to replicate the simple 2 qubit/4 detector example on the website while on the latest release (1.0.5). A quick look at the code suggested me that it was failing to create the input matrix due to a shape mismatch, happening in the TomoClass.py file.
It explicitly fails when calling buildTomoInput with the default values for time, singles and window arguments. Instead of taking into account the number of detectors per qubit (as per lines 958 and 960), it defaults to creating an empty array for two detectors total.
I managed to fix this by changing line 983 to replicate the correct behaviour.
However, calling stateTomography_Matrix still fails eventually if you do not explicitly provide the efficiencies array (it seems the default value of 0 is not accepted). I suspect there must be an error in the way the default values for these parameters are handled, but since passing them explicitly avoids these issues I would hope it's an easy fix.
Hi team.
I noticed I was unable to replicate the simple 2 qubit/4 detector example on the website while on the latest release (1.0.5). A quick look at the code suggested me that it was failing to create the input matrix due to a shape mismatch, happening in the TomoClass.py file.
It explicitly fails when calling buildTomoInput with the default values for time, singles and window arguments. Instead of taking into account the number of detectors per qubit (as per lines 958 and 960), it defaults to creating an empty array for two detectors total.
I managed to fix this by changing line 983 to replicate the correct behaviour.
However, calling stateTomography_Matrix still fails eventually if you do not explicitly provide the efficiencies array (it seems the default value of 0 is not accepted). I suspect there must be an error in the way the default values for these parameters are handled, but since passing them explicitly avoids these issues I would hope it's an easy fix.