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_coder_operators failing on main branch of terra #564

Closed
kt474 opened this issue Oct 7, 2022 · 1 comment
Closed

test_coder_operators failing on main branch of terra #564

kt474 opened this issue Oct 7, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@kt474
Copy link
Member

kt474 commented Oct 7, 2022

https://github.com/Qiskit/qiskit-ibm-runtime/actions/runs/3202463779/jobs/5231471303#step:5:1067

ERROR: test_coder_operators (test.unit.test_data_serialization.TestDataSerialization) (operator=PauliSumOp(SparsePauliOp(['III', 'IXI', 'IYY', 'YIZ', 'XYZ', 'III'],
              coeffs=[1, 2, 3, 4, 5, 6]), coeff=10))
Test runtime encoder and decoder for operators.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/qiskit-ibm-runtime/qiskit-ibm-runtime/test/unit/test_data_serialization.py", line 179, in test_coder_operators
    self.assertEqual(operator, decoded)
  File "/opt/hostedtoolcache/Python/3.9.14/x64/lib/python3.9/unittest/case.py", line 837, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/opt/hostedtoolcache/Python/3.9.14/x64/lib/python3.9/unittest/case.py", line 827, in _baseAssertEqual
    if not first == second:
  File "/opt/hostedtoolcache/Python/3.9.14/x64/lib/python3.9/site-packages/qiskit/opflow/operator_base.py", line 240, in __eq__
    return self.equals(cast(OperatorBase, other))
  File "/opt/hostedtoolcache/Python/3.9.14/x64/lib/python3.9/site-packages/qiskit/opflow/primitive_ops/pauli_sum_op.py", line 165, in equals
    return len(self_reduced) == len(other_reduced) and self_reduced.primitive.equiv(
  File "/opt/hostedtoolcache/Python/3.9.14/x64/lib/python3.9/site-packages/qiskit/quantum_info/operators/symplectic/sparse_pauli_op.py", line 186, in equiv
    return np.allclose((self - other).simplify().coeffs, 0.0, atol=atol)
  File "/opt/hostedtoolcache/Python/3.9.14/x64/lib/python3.9/site-packages/qiskit/quantum_info/operators/symplectic/sparse_pauli_op.py", line 459, in simplify
    coeffs = np.array([0j], dtype=self.coeffs.dtype)
TypeError: can't convert complex to int

I believe it's related to Qiskit/qiskit#8620

@kt474 kt474 added the bug Something isn't working label Oct 7, 2022
@kt474
Copy link
Member Author

kt474 commented Oct 15, 2022

closed by #578

@kt474 kt474 closed this as completed Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant