question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CompleteMeasFitter incorrectly imported in measurement_error_mitigation.py

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
jakelishmancommented, Dec 14, 2021

I’m closing this now, because I think that if there was a bug, it was fixed, and the other issues were due to problems with the usage. Please feel free to re-open this or another issue if that’s not the case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Measurement Error Mitigation - Qiskit
With the results we can construct the calibration matrix, which we have been calling M M . meas_fitter = CompleteMeasFitter(cal_results, ...
Read more >
Why Measurement Error Mitigation does not seem to improve ...
... I from qiskit import Aer, IBMQ from qiskit.ignis.mitigation.measurement import CompleteMeasFitter from qiskit.providers.aer.noise import ...
Read more >
Experiencing Quantum Computers - Uni Siegen
(10) Implement the python code in Section 2.3 [If you failed to install qiskit, ... 3 from qiskit.providers.aer import QasmSimulator.
Read more >
Quantum simulation of quantum field theories as ... - arXiv
Thus, other than considering a quantum many-body problem with local interac- ... (measurement error mitigation cls=CompleteMeasFitter,.
Read more >
Quantum Simulation of Quantum Field Theory in the Front Form
IBM Vigo machine, with and without measurement error mitigation. ... of the problem [Man80, Fey82], so its exact simulation on a classical ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found