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

Fix DeprecationWarning introduced by Qiskit 1.3 #2091

Open
jyu00 opened this issue Dec 23, 2024 · 3 comments
Open

Fix DeprecationWarning introduced by Qiskit 1.3 #2091

jyu00 opened this issue Dec 23, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@jyu00
Copy link
Collaborator

jyu00 commented Dec 23, 2024

What is the expected feature or enhancement?

Qiskit 1.3 deprecated the Pulse package, causing a bunch of deprecation warnings to be raised when the transpiler passes in this package are used. For example:

/Users/davidmckay/miniforge3/envs/qiskit_latest/lib/python3.10/site-packages/qiskit_ibm_runtime/transpiler/passes/scheduling/block_base_padder.py:265: DeprecationWarning: The property ``qiskit.circuit.instruction.Instruction.condition_bits`` is deprecated as of qiskit 1.3.0. It will be removed in 2.0.0.
  if node.op.condition_bits or isinstance(node.op, ControlFlowOp):
/Users/davidmckay/miniforge3/envs/qiskit_latest/lib/python3.10/site-packages/qiskit_ibm_runtime/transpiler/passes/scheduling/block_base_padder.py:272: DeprecationWarning: The method ``qiskit.dagcircuit.dagcircuit.DAGCircuit.has_calibration_for`` is deprecated as of qiskit 1.3.0. It will be removed in Qiskit 2.0.0. The entire Qiskit Pulse package is being deprecated and this is a dependency on the package.
  if self._block_dag.has_calibration_for(node):
/Users/davidmckay/miniforge3/envs/qiskit_latest/lib/python3.10/site-packages/qiskit_ibm_runtime/transpiler/passes/scheduling/block_base_padder.py:540: DeprecationWarning: The property ``qiskit.circuit.instruction.Instruction.condition_bits`` is deprecated as of qiskit 1.3.0. It will be removed in 2.0.0.
  self._conditional_block = bool(node.op.condition_bits)

Acceptance criteria

No Qiskit deprecation warnings are issued when using functions in this package.

@jyu00 jyu00 added the enhancement New feature or request label Dec 23, 2024
@kt474 kt474 self-assigned this Dec 23, 2024
@kt474 kt474 removed their assignment Jan 2, 2025
@kt474
Copy link
Member

kt474 commented Jan 2, 2025

Is this a duplicate with #2069?

@jyu00
Copy link
Collaborator Author

jyu00 commented Jan 2, 2025

Is pulse the only deprecation warning we get from Qiskit 1.3?

@1ucian0
Copy link
Member

1ucian0 commented Jan 8, 2025

mostly. Like test.unit.test_data_serialization.TestDataSerialization triggers PendingDeprecationWarnings:

2025-01-08T05:06:32.7612061Z test_coder_qc (test.unit.test_data_serialization.TestDataSerialization)
2025-01-08T05:06:32.7619612Z Test runtime encoder and decoder for circuits. ... /home/runner/work/qiskit-ibm-runtime/qiskit-ibm-runtime/test/unit/test_data_serialization.py:110: PendingDeprecationWarning: The class ``qiskit.circuit.library.n_local.efficient_su2.EfficientSU2`` is pending deprecation as of Qiskit 1.3. It will be marked deprecated in a future release, and then removed no earlier than 3 months after the release date. Use the function qiskit.circuit.library.efficient_su2 instead.
2025-01-08T05:06:32.7622547Z   unbound = EfficientSU2(num_qubits=4, reps=1, entanglement="linear")
2025-01-08T05:06:32.7625082Z /opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/site-packages/qiskit/circuit/library/n_local/efficient_su2.py:258: PendingDeprecationWarning: The class ``qiskit.circuit.library.n_local.two_local.TwoLocal`` is pending deprecation as of Qiskit 1.3. It will be marked deprecated in a future release, and then removed no earlier than 3 months after the release date. Use the function qiskit.circuit.library.n_local instead.
2025-01-08T05:06:32.7627503Z   super().__init__(
2025-01-08T05:06:32.7629718Z /opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/site-packages/qiskit/circuit/library/n_local/two_local.py:216: PendingDeprecationWarning: The class ``qiskit.circuit.library.n_local.n_local.NLocal`` is pending deprecation as of Qiskit 1.3. It will be marked deprecated in a future release, and then removed no earlier than 3 months after the release date. Use the function qiskit.circuit.library.n_local instead.
2025-01-08T05:06:32.7631832Z   super().__init__(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants