Open itoko opened 1 year ago
I agree we should expose these properties via the target/backendv2 interface somehow. For me the primary question is about whether we treat it as a custom field for IBMBackend
and FakeBackendV2
or we make it an optional field in the common interface for the target on all devices. Having talked offline with you about this I'm leaning towards making it optional since it could be useful across backends if the data is available for asymmetric readout errors that could be potential useful for a lot of different things besides just noisy simulation. @chriseclectic do you have any thoughts on this?
If we make this a common optional field there are two paths forward I think, either we add these fields and descriptions of their meanings to the InstructionProperties
class definition so that any instruction can have these, or we add a subclass of InstructionProperties
(like MeasurementInstructionProperties
) that adds these extra fields. Then we document for measurement instructions if they contain the fields for the asymmetric error rates they should use the subclass to express that. Right now I'm leaning more towards the subclass as I think it makes the interface a bit cleaner (as these fields don't mean anything outside of a measurement instruction).
The subclass seems to make the most sense. Really it is just the two numbers in an array that is needed [prep0_meas1, prep1_meas0], and the current reported error is just the avg of the two, i.e. if you do not know what the state of the qubit is, return the avg. This ordering is also consistent with the A-matrix expression.
What should we add?
FakeBackendV2 should provide a way to access asymmetric readout errors (
prob_meas0_prep1
andprob_meas1_prep0
stored inprop_dict
) as FakeBackendV1 does so. Otherwise, FakeBackendV2 might have to have symmetric readout errors and causes poor noisy simulation results (see e.g. #8979). It would make sense to store the asymmetric readout errors in measure instruction properties additionally (introducing a subclass for that,MeasureInstructionProperties
).