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

Nightly test against Qiskit main failing #181

Closed
woodsp-ibm opened this issue Jun 15, 2024 · 1 comment · Fixed by #188
Closed

Nightly test against Qiskit main failing #181

woodsp-ibm opened this issue Jun 15, 2024 · 1 comment · Fixed by #188

Comments

@woodsp-ibm
Copy link
Member

Some gradient tests are failing due to changes in QuantumCircuit

      File "/home/runner/work/qiskit-algorithms/qiskit-algorithms/qiskit_algorithms/gradients/reverse/derive_circuit.py", line 135, in derive_circuit
    if len(circuit._parameter_table[parameter]) > 1:

    AttributeError: 'QuantumCircuit' object has no attribute '_parameter_table'

The change came from Qiskit/qiskit#12459 which is moving circuit logic into Rust.

@woodsp-ibm woodsp-ibm changed the title Nightly test against Qsikit main failing Nightly test against Qiskit main failing Jun 15, 2024
@woodsp-ibm
Copy link
Member Author

In chatting with Matthew

The parameter table was moved to rust though, if you're testing against main and want the number of parameter entries for a give parameter you can use QuantumCircuit._data._get_entry_count(parameter) which will return the count

In looking at this briefly I see there is no test case for the check that is failing (no coverage to have that error raised by tests) hence doing some different logic would ideally want a test case that checks that the error is raised so it can validate the new way, as well as the old!!, works as expected.

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 a pull request may close this issue.

1 participant