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

Test failure: test_parameter_equality() #376

Closed
cqc-alec opened this issue Aug 16, 2024 · 0 comments · Fixed by #377
Closed

Test failure: test_parameter_equality() #376

cqc-alec opened this issue Aug 16, 2024 · 0 comments · Fixed by #377
Assignees

Comments

@cqc-alec
Copy link
Collaborator

After updating qiskit (to 1.2.0) and qiskit-ibm-runtime (to 0.28.0), test_parameter_equality fails.

    def test_parameter_equality() -> None:
        param_a = Parameter("a")
        param_b = Parameter("b")
    
        circ = QuantumCircuit(2)
        circ.rx(param_a, 0)
        circ.ry(param_b, 1)
        circ.cx(0, 1)
        # fails with preserve_param_uuid=False
        # as Parameter uuid attribute is not preserved
        # and so fails equality check at assign_parameters
        pytket_circ = qiskit_to_tk(circ, preserve_param_uuid=True)
        final_circ = tk_to_qiskit(pytket_circ)
    
>       assert final_circ.parameters == circ.parameters
E       assert ParameterView...Parameter(b)]) == ParameterView...Parameter(b)])
E         
E         Full diff:
E           ParameterView([Parameter(a), Parameter(b)])

qiskit_convert_test.py:756: AssertionError
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