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 deprecation of iterable CircuitInstruction under Qiskit 1.2 (backport #636) #637

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Jul 10, 2024

This fixes the following warnings that currently are triggered in the development version tests:

test/cutting/test_wire_cutting_transforms.py: 88 warnings
test/cutting/test_cutting_workflows.py: 4 warnings
  /home/runner/work/circuit-knitting-toolbox/circuit-knitting-toolbox/circuit_knitting/cutting/wire_cutting_transforms.py:79: DeprecationWarning: Treating CircuitInstruction as an iterable is deprecated legacy behavior since Qiskit 1.2, and will be removed in Qiskit 2.0. Instead, use the `operation`, `qubits` and `clbits` named attributes.
    other=instructions[0],

test/utils/test_transforms.py: 76 warnings
  /home/runner/work/circuit-knitting-toolbox/circuit-knitting-toolbox/test/utils/test_transforms.py:40: DeprecationWarning: Treating CircuitInstruction as an iterable is deprecated legacy behavior since Qiskit 1.2, and will be removed in Qiskit 2.0. Instead, use the `operation`, `qubits` and `clbits` named attributes.
    if len(gate[1]) == 2:
```<hr>This is an automatic backport of pull request #636 done by [Mergify](https://mergify.com).

```
test/cutting/test_wire_cutting_transforms.py: 88 warnings
test/cutting/test_cutting_workflows.py: 4 warnings
  /home/runner/work/circuit-knitting-toolbox/circuit-knitting-toolbox/circuit_knitting/cutting/wire_cutting_transforms.py:79: DeprecationWarning: Treating CircuitInstruction as an iterable is deprecated legacy behavior since Qiskit 1.2, and will be removed in Qiskit 2.0. Instead, use the `operation`, `qubits` and `clbits` named attributes.
    other=instructions[0],

test/utils/test_transforms.py: 76 warnings
  /home/runner/work/circuit-knitting-toolbox/circuit-knitting-toolbox/test/utils/test_transforms.py:40: DeprecationWarning: Treating CircuitInstruction as an iterable is deprecated legacy behavior since Qiskit 1.2, and will be removed in Qiskit 2.0. Instead, use the `operation`, `qubits` and `clbits` named attributes.
    if len(gate[1]) == 2:
```

(cherry picked from commit 14acf91)
@coveralls
Copy link

Pull Request Test Coverage Report for Build 9875848172

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 95.467%

Totals Coverage Status
Change from base Build 9847454472: 0.0%
Covered Lines: 3496
Relevant Lines: 3662

💛 - Coveralls

@garrison garrison merged commit e0046ab into stable/0.7 Jul 10, 2024
11 checks passed
@garrison garrison deleted the mergify/bp/stable/0.7/pr-636 branch July 10, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants