Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qiskit-aer uses deprecated QobjDictField from qiskit #2233

Open
eendebakpt opened this issue Sep 16, 2024 · 0 comments
Open

Qiskit-aer uses deprecated QobjDictField from qiskit #2233

eendebakpt opened this issue Sep 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@eendebakpt
Copy link

Informations

  • Qiskit Aer version: 0.15.0
  • Python version: 3,12
  • Operating system: Windows

What is the current behavior?

Using the Result from the Aer simulator results in deprecation warnings (for example when using copy.deepcopy or marginal_counts. The warning generated is

C:\develop\Python312\Lib\copy.py:434: DeprecationWarning: The class ``qiskit.qobj.common.QobjDictField`` is deprecated as of qiskit 1.2. It will be removed in the 2.0 release. The `Qobj` class and related functionality are part of the deprecated `BackendV1` workflow,  and no longer necessary for `BackendV2`. If a user workflow requires `Qobj` it likely relies on deprecated functionality and should be updated to use `BackendV2`.

Also see Qiskit/qiskit#13084

Steps to reproduce the problem

A minimal example:

import copy
import qiskit
from qiskit.circuit import QuantumCircuit
from qiskit_aer import AerSimulator
import qiskit_aer
print(qiskit.__version__)
print(qiskit_aer.__version__)

import warnings
warnings.simplefilter('default')

qc = QuantumCircuit(1, 1)
qc.measure_all()

backend = AerSimulator()
result = backend.run(qc, shots=100, memory=False).result()
copy.deepcopy(result);

What is the expected behavior?

No warnings should be generated

Suggested solutions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant