qiskit-qec icon indicating copy to clipboard operation
qiskit-qec copied to clipboard

qiskit_qec.linear.symplectic.def _symplectic_product_vv_boolean gives wrong results

Open kaiott opened this issue 2 months ago • 0 comments

Steps to reproduce the problem

import numpy as np
from qiskit_qec.linear.symplectic import _symplectic_product_vv_boolean

a = np.array([1,0,0,0,1,1,1,0,1,0], dtype=np.bool_)
b = np.array([1,1,1,1,0,0,1,0,1,1], dtype=np.bool_)
_symplectic_product_vv_boolean(a, b, 5)

What is the current behavior?

Returns 1

What is the expected behavior?

The function should return 0, which is the actual symplectic product of the two vectors. This example is actually the example in the docstring.

Note: Within qiskit_qec this function is never used, as in symplectic_product the input arrays are always converted to dtype numpy.int8.

kaiott avatar Apr 26 '24 12:04 kaiott