quantumlib / OpenFermion

The electronic structure package for quantum computers.
Apache License 2.0
1.51k stars 372 forks source link

1 test fails #879

Open yurivict opened 4 months ago

yurivict commented 4 months ago
========================================================================================= FAILURES =========================================================================================
__________________________________________________________________________________ test_multitensor_init ___________________________________________________________________________________

    def test_multitensor_init():
        """
        Testing the generation of a multitensor object with random tensors
        """
        a = np.random.random((5, 5))
        b = np.random.random((4, 4))
        c = np.random.random((3, 3))
        at = Tensor(tensor=a, name='a')
        bt = Tensor(tensor=b, name='b')
        ct = Tensor(tensor=c, name='c')
        mt = MultiTensor([at, bt, ct])

        with pytest.raises(TypeError):
            _ = MultiTensor((at, bt))

>       assert len(mt.dual_basis) == 0
E       assert 3 == 0
E        +  where 3 = len(<openfermion.contrib.representability._dualbasis.DualBasis object at 0x3b442614f970>)
E        +    where <openfermion.contrib.representability._dualbasis.DualBasis object at 0x3b442614f970> = <openfermion.contrib.representability._multitensor.MultiTensor object at 0x3b44c950a280>.dual_basis

src/openfermion/contrib/representability/_multitensor_test.py:41: AssertionError
===================================================================================== warnings summary =====================================================================================

Version: 1.6.1 Python-3.9 FreeBSD 14.0

fdmalone commented 3 months ago

This is a recent failure I noticed locally too. Must be an upstream change from some dependency.