Skip to content

CompleteMeasFitter incorrectly imported in measurement_error_mitigation.py #6980

@omarshehab

Description

@omarshehab

Information

  • Qiskit Terra version: 0.18.0
  • Python version: 3.9.5 (default, May 18 2021, 12:31:01) [Clang 10.0.0 ]
  • Operating system: Darwin

What is the current behavior?

I am currently seeing

QiskitError: 'Unknown fitter <qiskit.ignis.mitigation.measurement.fitters.CompleteMeasFitter object at 0x7fcbcace6c40>'

error, when I pass an qiskit.ignis.mitigation.measurement.fitters.CompleteMeasFitter object as a value to the parameter measurement_error_mitigation_cls in the constructor of QuantumInstance and use the QuantumInstance object with QuantumKernel.evaluate() .

Steps to reproduce the problem

  1. Generate the calibration circuits using complete_meas_cal().
  2. Execute the calibration circuits on target hardware (for this week ibm_toronto).
  3. Calculate the calibration matrix using CompleteMeasFitter().
  4. Pass the calibration matrix calculated in step # 3 as a value for the parameter measurement_error_mitigation_clswhile creating an instance of QuantumInstance . For simplicity, I am not overriding the default values for cals_matrix_refresh_period and measurement_error_mitigation_shots.
  5. Use the QuantumInstance object in the standard QSVM pipeline.

What is the expected behavior?

It should not throw any runtime error.

Suggested solutions

CompleteMeasFitter incorrectly imported in measurement_error_mitigation.py. At line # 141 of measurement_error_mitigation.py, CompleteMeasFitter should be imported from qiskit.ignis.mitigation.measurement.fitters instead of qiskit.ignis.mitigation.measurement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions