Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

TensoredExpvalMeasMitigator gives "Unknown fitter" error #597

Open
omarshehab opened this issue Sep 20, 2021 · 0 comments
Open

TensoredExpvalMeasMitigator gives "Unknown fitter" error #597

omarshehab opened this issue Sep 20, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@omarshehab
Copy link

omarshehab commented Sep 20, 2021

Informations

  • Qiskit Ignis version: 0.6.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?

When I use TensoredExpvalMeasMitigator for a 15 qubit QSVM experiment, I get the following error.

---------------------------------------------------------------------------
QiskitError                               Traceback (most recent call last)
/var/folders/5p/_ydvdq5959v8p0kntv58swdc0000gn/T/ipykernel_2969/2322411278.py in <module>
----> 1 adhoc_matrix_train_q_em = adhoc_kernel.evaluate(x_vec=train_features)
      2 adhoc_matrix_test_q_em = adhoc_kernel.evaluate(x_vec=test_features,
      3                                           y_vec=train_features)

~/opt/anaconda3/envs/py39/lib/python3.9/site-packages/qiskit_machine_learning/kernels/quantum_kernel.py in evaluate(self, x_vec, y_vec)
    331                 ]
    332 
--> 333                 results = self._quantum_instance.execute(circuits)
    334 
    335                 matrix_elements = [

~/opt/anaconda3/envs/py39/lib/python3.9/site-packages/qiskit/utils/quantum_instance.py in execute(self, circuits, had_transpiled)
    486                         state_labels,
    487                         circuit_labels,
--> 488                     ) = build_measurement_error_mitigation_circuits(
    489                         qubit_index,
    490                         self._meas_error_mitigation_cls,

~/opt/anaconda3/envs/py39/lib/python3.9/site-packages/qiskit/utils/measurement_error_mitigation.py in build_measurement_error_mitigation_circuits(qubit_list, fitter_cls, backend, backend_config, compile_config, mit_pattern)
    166         )
    167     else:
--> 168         raise QiskitError(f"Unknown fitter {fitter_cls}")
    169 
    170     # the provided `qubit_list` would be used as the initial layout to

QiskitError: "Unknown fitter <class 'qiskit.ignis.mitigation.expval.tensored_mitigator.TensoredExpvalMeasMitigator'>"

Steps to reproduce the problem

Instantiate QuantumInstance in the following manner and use it in a QSVM project with 15 qubits.

adhoc_backend = QuantumInstance(backend, shots=1024,
                                seed_transpiler=seed, optimization_level = 3, measurement_error_mitigation_cls=
TensoredExpvalMeasMitigator)

What is the expected behavior?

It should work without any error.

Suggested solutions

@omarshehab omarshehab added the bug Something isn't working label Sep 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant