qiskit-community/qiskit-braket-provider

Facing issues when using mthree package for measurement error mitigation

biswajitpaul18 opened this issue · 2 comments

I am trying to use the mthree package for measurement error mitigation. When I am using the backend "Qasm simulator" the code is running smoothly, but when using "BraketLocalBackend" getting an error in the line "mit.cals_from_system(mappings)" and the error is "ValueError: Circuit must have instructions to run on a device". How can I fix this issue?
<

trans_circ = transpile(circuit, backend=device)
mappings = mthree.utils.final_measurement_mapping(trans_circ)
result = device.run(trans_circ, shots=5000).result()
results=result.get_counts()

r1 = list(results.keys())
r2 = list(results.values())
print(r1)
print(r2)


mit = mthree.M3Mitigation(device)
mit.cals_from_system(mappings)

Hi @biswajitpaul18 , this error you saw is due to circuit being empty. You can fix this issue by adding identity gates to the circuit.

Closing this issue. Please reopen if there are other questions.