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

TensoredMeasFitter gives "TensoredMeasFitter doesn't support subset_fitter." error #598

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

Comments

@omarshehab
Copy link

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 TensoredMeasFitter 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)
    654                         tmp_fitter = meas_error_mitigation_fitter.subset_fitter(curr_qubit_index)
    655                     else:
--> 656                         raise QiskitError(
    657                             "{} doesn't support subset_fitter.".format(
    658                                 meas_error_mitigation_fitter.__class__.__name__

QiskitError: "TensoredMeasFitter doesn't support subset_fitter."

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=
TensoredMeasFitter)

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