Your message dated Wed, 24 Feb 2021 20:34:17 +0000
with message-id <[email protected]>
and subject line Bug#983397: fixed in qutip 4.5.2-2
has caused the Debian Bug report #983397,
regarding qutip: TestDicke fails with scipy 1.6.1: TypeError: can't convert 
complex to float
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
983397: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983397
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: qutip
Version: 4.5.2-1
Severity: normal
Control: forwarded -1 https://github.com/qutip/qutip/issues/1451
Control: affects -1 src:scipy

Some TestDicke tests in test_piqs.py (test_lindbladian,
test_lindbladian_dims, test_liouvillian) fail with the
recent scipy 1.6.1 release, (scipy 1.6.1-1 is uploaded to
experimental). They were previously passing with scipy 1.6.0.

It's probably relevant that scipy 1.6.1 fixed some problems with
sparse matrices (with COO format constructor), see
https://docs.scipy.org/doc/scipy-1.6.1/reference/release.1.6.1.html
including PR#13403 https://github.com/scipy/scipy/pull/13403


To Reproduce

$  cp -r qutip/tests/  /tmp/qutip
$  cd /tmp/qutip
$  pytest-3 -v -k "TestDicke"


The test error message from TestDicke.test_lindbladian is

___________________________________________________________________________________________
 TestDicke.test_lindbladian 
____________________________________________________________________________________________

self = <tests.test_piqs.TestDicke object at 0x7f55475a0c10>

    def test_lindbladian(self):
        """
        PIQS: Test the generation of the Lindbladian matrix.
        """
        N = 1
        gCE = 0.5
        gCD = 0.5
        gCP = 0.5
        gE = 0.1
        gD = 0.1
        gP = 0.1
    
        system = Dicke(
            N=N,
            emission=gE,
            pumping=gP,
            dephasing=gD,
            collective_emission=gCE,
            collective_pumping=gCP,
            collective_dephasing=gCD,
        )
    
>       lindbladian = system.lindbladian()

tests/test_piqs.py:450: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/qutip/piqs.py:509: in lindbladian
    return cythonized_dicke.lindbladian()
qutip/cy/piqs.pyx:313: in qutip.cy.piqs.Dicke.lindbladian
    ???
qutip/cy/piqs.pyx:431: in qutip.cy.piqs.Dicke.lindbladian
    ???
/usr/lib/python3/dist-packages/scipy/sparse/compressed.py:54: in __init__
    other = self.__class__(coo_matrix(arg1, shape=shape,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <[AttributeError('dtype not found') raised in repr()] coo_matrix object 
at 0x7f55475a0ca0>
arg1 = ([(-0.6000000238418579+0j), (0.6000000238418579+0j), 
(-0.9000000357627869+0j), (-0.9000000357627869+0j), (-0.6000000238418579+0j), 
(0.6000000014901161+0j)], ([3, 3, 2, 1, 0, 0], [3, 0, 2, 1, 0, 3]))
shape = (4, 4), dtype = None, copy = False

    def __init__(self, arg1, shape=None, dtype=None, copy=False):
        _data_matrix.__init__(self)
    
        if isinstance(arg1, tuple):
            if isshape(arg1):
                M, N = arg1
                self._shape = check_shape((M, N))
                idx_dtype = get_index_dtype(maxval=max(M, N))
                data_dtype = getdtype(dtype, default=float)
                self.row = np.array([], dtype=idx_dtype)
                self.col = np.array([], dtype=idx_dtype)
                self.data = np.array([], dtype=data_dtype)
                self.has_canonical_format = True
            else:
                try:
                    obj, (row, col) = arg1
                except (TypeError, ValueError) as e:
                    raise TypeError('invalid input format') from e
    
                if shape is None:
                    if len(row) == 0 or len(col) == 0:
                        raise ValueError('cannot infer dimensions from zero '
                                         'sized index arrays')
                    M = operator.index(np.max(row)) + 1
                    N = operator.index(np.max(col)) + 1
                    self._shape = check_shape((M, N))
                else:
                    # Use 2 steps to ensure shape has length 2.
                    M, N = shape
                    self._shape = check_shape((M, N))
    
                idx_dtype = get_index_dtype(maxval=max(self.shape))
                data_dtype = getdtype(dtype, obj, default=float)
                self.row = np.array(row, copy=copy, dtype=idx_dtype)
                self.col = np.array(col, copy=copy, dtype=idx_dtype)
>               self.data = np.array(obj, copy=copy, dtype=data_dtype)
E               TypeError: can't convert complex to float

/usr/lib/python3/dist-packages/scipy/sparse/coo.py:161: TypeError

Likewise for TestDicke.test_lindbladian_dims and TestDicke.test_liouvillian.


Test fails also with qutip 4.5.3 built on Debian unstable.

qutip.about()

QuTiP: Quantum Toolbox in Python
================================
Copyright (c) QuTiP team 2011 and later.
Current admin team: Alexander Pitchford, Nathan Shammah, Shahnawaz Ahmed, Neill 
Lambert, Eric Giguère, Boxi Li and Jake Lishman.
Board members: Daniel Burgarth, Robert Johansson, Anton F. Kockum, Franco Nori 
and Will Zeng.
Original developers: R. J. Johansson & P. D. Nation.
Previous lead developers: Chris Granade & A. Grimsmo.
Currently developed through wide collaboration. See https://github.com/qutip 
for details.

QuTiP Version:      4.5.3
Numpy Version:      1.19.5
Scipy Version:      1.6.1
Cython Version:     0.29.21
Matplotlib Version: 3.3.4
Python Version:     3.9.1
Number of CPUs:     4
BLAS Info:          OPENBLAS
OPENMP Installed:   True
INTEL MKL Ext:      False
Platform Info:      Linux (x86_64)
Installation path:  /usr/lib/python3/dist-packages/qutip
================================================================================
Please cite QuTiP in your publication.
================================================================================
For your convenience a bibtex reference can be easily generated using 
`qutip.cite()`



-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-3-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_AU:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

--- End Message ---
--- Begin Message ---
Source: qutip
Source-Version: 4.5.2-2
Done: Drew Parsons <[email protected]>

We believe that the bug you reported is fixed in the latest version of
qutip, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Drew Parsons <[email protected]> (supplier of updated qutip package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Wed, 24 Feb 2021 19:55:30 +0100
Source: qutip
Architecture: source
Version: 4.5.2-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Science Maintainers 
<[email protected]>
Changed-By: Drew Parsons <[email protected]>
Closes: 983397
Changes:
 qutip (4.5.2-2) unstable; urgency=medium
 .
   * debian patch sparse_matrix_explicit_dtype_1452.patch applies
     upstream PR#1452 to explicitly set dtype=np.complex128 when
     constructing scipy.sparse matrices with csr_matrix. Required for
     working with scipy 1.6.1. Closes: #983397.
   * Standards-Version: 4.5.1
Checksums-Sha1:
 050c9dac45fe2eaac744bb872e94f63ea11fde94 2207 qutip_4.5.2-2.dsc
 1871bbc63b61cb972d4fa87212773a5f36efa3f8 5272 qutip_4.5.2-2.debian.tar.xz
Checksums-Sha256:
 900eb80a336d74f198333859c3f8fe24f9fee78b90b9b16dd7666d3b72a9fa7a 2207 
qutip_4.5.2-2.dsc
 a8add7ecda5e483610c072d7554c40743bdcd00641abf442afedfaee8557825b 5272 
qutip_4.5.2-2.debian.tar.xz
Files:
 f679c64c400abb85131271ce134cf415 2207 python optional qutip_4.5.2-2.dsc
 ba8fe5f23a03ca3dcfbb9392ff752b26 5272 python optional 
qutip_4.5.2-2.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEI8mpPlhYGekSbQo2Vz7x5L1aAfoFAmA2s4YACgkQVz7x5L1a
Afq1Sw//T06ldgCwZWz+btbwJET0BqdvTm7YtPiNp4LfKf1L0x9NNOiu0sl3etgf
vRBGAm7nmSsvXHXFljK56d0cuepqfaG1YpO01zCXa+zQ0yKH1ZKMY+UbOE7fjQ8m
iAeH1Fs5LdD+MeFf1hNE/UULPxPWxb9FANO1bD5qBggmRjNU+FKzTQbUgEfpMbgA
LzVooOctgbs1egBc45w39+AcX/N69Bwmwij7DupFajngtvgdhqCzmaJ4IyqSyT9N
uIAS8q1+UuSrg9RWltRW2YZhEBTMJIb3rD2jC48lF8xi5WV0LGAO9U4qGYKl9Ocj
KJ1j718ec8d3PDm2duuu/3Wk0d9ysi3TUajwRap7c6j0aHirSMyi1w4D1znLGArW
AKIbjb9rnMLodMORhrD1Nv3Y7doX+R2lgBV50n8Y0fnW0GyoJnwEJLMh73J+Lpwd
L7IcP95RV/RS0Jc5kQQKgcbPfI27CgvnCyLvWbpmllalckGx20a+50wQ2/EPcaNl
Jr2qhss/L2fowAzD1FxxxOdWAo52mHlvGBs2sFQp8igj05Fquyc0QoNeMFQ0zDh7
x6gCkoHnKzIRfjAujvkzFEczPMdFRM3lbpoHfqCsLnCHvn+6tjvFOGTfZQ05ZlZT
RqS8pvTwf6nVni/qkOpQ6euYZCbAceeQdPrK0eADo+dpJJaWvTg=
=z+y2
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to