Skip to content

Fix unresolved review comments from PR #326 Qiskit 2 support#3

Merged
MoritzWillmann merged 2 commits intoqiskit_2_supportfrom
copilot/apply-review-comments
Feb 24, 2026
Merged

Fix unresolved review comments from PR #326 Qiskit 2 support#3
MoritzWillmann merged 2 commits intoqiskit_2_supportfrom
copilot/apply-review-comments

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 24, 2026

Addresses the 5 unresolved comments from the Copilot review on the Qiskit 2 support PR.

Changes

  • optree_evaluate.py: Remove redundant local QISKIT_SMALLER_2_0 assignment — move the from ..executor import QISKIT_SMALLER_2_0 block before its first use so there's a single source of truth. Replace silent pass stub in _pauli_expval_with_variance with NotImplementedError to surface misuse at runtime.

  • pennylane_circuit.py: Restore c_if condition extraction in the non-if_else branch. Previously None was unconditionally appended, silently dropping any condition set via Gate.c_if(...):

    # Before: always None, losing c_if conditions
    pennylane_conditions.append(None)
    
    # After: extract condition if present
    condition = None
    if hasattr(op.operation, "condition") and op.operation.condition is not None:
        classical_bits = op.operation.condition[0]
        val = op.operation.condition[1]
        bit_index = circuit.find_bit(classical_bits).index if isinstance(classical_bits, Clbit) \
            else [circuit.find_bit(b).index for b in classical_bits]
        condition = (bit_index, val)
    pennylane_conditions.append(condition)
  • docs/install/install.rst: Sync dependency minimums with pyproject.toml (dill>=0.3.5, mapomatic>=0.12.0, numpy>=1.21, qiskit-aer>=0.14.0.1, qiskit-ibm-runtime>=0.19.0) and add missing sympy>=1.8.

  • tests/util/test_pennylane_circuit.py: Remove unused imports (numpy, pennylane, pennylane.numpy).


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: MoritzWillmann <44642314+MoritzWillmann@users.noreply.github.com>
Copilot AI changed the title [WIP] Apply changes based on review comments Fix unresolved review comments from PR #326 Qiskit 2 support Feb 24, 2026
Copilot AI requested a review from MoritzWillmann February 24, 2026 08:42
@MoritzWillmann MoritzWillmann marked this pull request as ready for review February 24, 2026 09:17
@MoritzWillmann MoritzWillmann merged commit 109bbdf into qiskit_2_support Feb 24, 2026
15 of 16 checks passed
@MoritzWillmann MoritzWillmann deleted the copilot/apply-review-comments branch February 24, 2026 09:18
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