We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Installation of qutip shows various warnings on ubuntu 20.04.1
**Describe the bug**
Installing the qutip on ubuntu 20.04.1 shows the following warnings:
```
$ sudo apt install python3-qutip 
…
Entpacken von python3-qutip (4.4.1-6build1) ...
python3-qutip (4.4.1-6build1) wird eingerichtet ...
/usr/lib/python3/dist-packages/qutip/_mkl/spmv.py:53: SyntaxWarning: "is" 
with a literal. Did you mean "=="?
  if x.ndim is 1:
/usr/lib/python3/dist-packages/qutip/qobjevo.py:776: SyntaxWarning: "is no
t" with a literal. Did you mean "!="?
  if self.compiled and self.compiled.split()[2] is not "cte":
/usr/lib/python3/dist-packages/qutip/qobjevo.py:1045: SyntaxWarning: "is" 
with a literal. Did you mean "=="?
  elif op1.type is "array":
/usr/lib/python3/dist-packages/qutip/qobjevo.py:1070: SyntaxWarning: "is" 
with a literal. Did you mean "=="?
  elif self.ops[_set[0]].type is "string":
/usr/lib/python3/dist-packages/qutip/qobjevo.py:1079: SyntaxWarning: "is" 
with a literal. Did you mean "=="?
  elif self.ops[_set[0]].type is "array":
/usr/lib/python3/dist-packages/qutip/qobjevo.py:1534: SyntaxWarning: "is n
ot" with a literal. Did you mean "!="?
  for key in self.__dict__ if key is not "compiled_qobjevo"}
```


**To Reproduce**
Install qutip on ubuntu 20.04.1 via `sudo apt install python3-qutip`.

**Expected behavior**
No warnings during the installation of qutip.

**Your Environment**
```
>>> qutip.about()

QuTiP: Quantum Toolbox in Python
================================
Copyright (c) QuTiP team 2011 and later.
Original developers: R. J. Johansson & P. D. Nation.
Current admin team: Alexander Pitchford, Paul D. Nation, Nathan Shammah, Shahnawaz Ahmed, Neill Lambert, and Eric Giguère.
Project Manager: Franco Nori.
Currently developed through wide collaboration. See https://github.com/qutip for details.

QuTiP Version:      4.4.1
Numpy Version:      1.17.4
Scipy Version:      1.4.1
Cython Version:     0.29.14
Matplotlib Version: 3.1.2
Python Version:     3.8.5
Number of CPUs:     2
BLAS Info:          OPENBLAS
OPENMP Installed:   True
INTEL MKL Ext:      False
Platform Info:      Linux (x86_64)
Installation path:  /usr/lib/python3/dist-packages/qutip
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `qutip/_mkl/spmv.py`
Content:
```
1 # This file is part of QuTiP: Quantum Toolbox in Python.
2 #
3 #    Copyright (c) 2011 and later, Paul D. Nation.
4 #    All rights reserved.
5 #
6 #    Redistribution and use in source and binary forms, with or without
7 #    modification, are permitted provided that the following conditions are
8 #    met:
9 #
10 #    1. Redistributions of source code must retain the above copyright notice,
11 #       this list of conditions and the following disclaimer.
12 #
13 #    2. Redistributions in binary form must reproduce the above copyright
14 #       notice, this list of conditions and the following disclaimer in the
15 #       documentation and/or other materials provided with the distribution.
16 #
17 #    3. Neither the name of the QuTiP: Quantum Toolbox in Python nor the names
18 #       of its contributors may be used to endorse or promote products derived
19 #       from this software without specific prior written permission.
20 #
21 #    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 #    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 #    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
24 #    PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 #    HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 #    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 #    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 #    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 #    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 #    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 #    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 ###############################################################################
33 import numpy as np
34 import scipy.sparse as sp
35 import ctypes
36 from ctypes import POINTER,c_int,c_char,c_double, byref
37 from numpy import ctypeslib
38 import qutip.settings as qset
39 zcsrgemv = qset.mkl_lib.mkl_cspblas_zcsrgemv
40 
41 def mkl_spmv(A, x):
42      """
43      sparse csr_spmv using MKL
44      """
45      (m,n) = A.shape
46 
47      # Pointers to data of the matrix
48      data    = A.data.ctypes.data_as(ctypeslib.ndpointer(np.complex128, ndim=1, flags='C'))
49      indptr  = A.indptr.ctypes.data_as(POINTER(c_int))
50      indices = A.indices.ctypes.data_as(POINTER(c_int))
51 
52      # Allocate output, using same conventions as input
53      if x.ndim is 1:
54         y = np.empty(m,dtype=np.complex,order='C')
55      elif x.ndim==2 and x.shape[1]==1:
56         y = np.empty((m,1),dtype=np.complex,order='C')
57      else:
58         raise Exception('Input vector must be 1D row or 2D column vector')
59      
60      np_x = x.ctypes.data_as(ctypeslib.ndpointer(np.complex128, ndim=1, flags='C'))
61      np_y = y.ctypes.data_as(ctypeslib.ndpointer(np.complex128, ndim=1, flags='C'))
62      # now call MKL. This returns the answer in np_y, which points to y
63      zcsrgemv(byref(c_char(bytes(b'N'))), byref(c_int(m)), data ,indptr, indices, np_x, np_y ) 
64      return y
65
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/qutip/_mkl/spmv.py b/qutip/_mkl/spmv.py
--- a/qutip/_mkl/spmv.py
+++ b/qutip/_mkl/spmv.py
@@ -50,7 +50,7 @@
      indices = A.indices.ctypes.data_as(POINTER(c_int))
 
      # Allocate output, using same conventions as input
-     if x.ndim is 1:
+     if x.ndim == 1:
         y = np.empty(m,dtype=np.complex,order='C')
      elif x.ndim==2 and x.shape[1]==1:
         y = np.empty((m,1),dtype=np.complex,order='C')

{"golden_diff": "diff --git a/qutip/_mkl/spmv.py b/qutip/_mkl/spmv.py\n--- a/qutip/_mkl/spmv.py\n+++ b/qutip/_mkl/spmv.py\n@@ -50,7 +50,7 @@\n      indices = A.indices.ctypes.data_as(POINTER(c_int))\n \n      # Allocate output, using same conventions as input\n-     if x.ndim is 1:\n+     if x.ndim == 1:\n         y = np.empty(m,dtype=np.complex,order='C')\n      elif x.ndim==2 and x.shape[1]==1:\n         y = np.empty((m,1),dtype=np.complex,order='C')\n", "issue": "Installation of qutip shows various warnings on ubuntu 20.04.1\n**Describe the bug**\r\nInstalling the qutip on ubuntu 20.04.1 shows the following warnings:\r\n```\r\n$ sudo apt install python3-qutip \r\n\u2026\r\nEntpacken von python3-qutip (4.4.1-6build1) ...\r\npython3-qutip (4.4.1-6build1) wird eingerichtet ...\r\n/usr/lib/python3/dist-packages/qutip/_mkl/spmv.py:53: SyntaxWarning: \"is\" \r\nwith a literal. Did you mean \"==\"?\r\n  if x.ndim is 1:\r\n/usr/lib/python3/dist-packages/qutip/qobjevo.py:776: SyntaxWarning: \"is no\r\nt\" with a literal. Did you mean \"!=\"?\r\n  if self.compiled and self.compiled.split()[2] is not \"cte\":\r\n/usr/lib/python3/dist-packages/qutip/qobjevo.py:1045: SyntaxWarning: \"is\" \r\nwith a literal. Did you mean \"==\"?\r\n  elif op1.type is \"array\":\r\n/usr/lib/python3/dist-packages/qutip/qobjevo.py:1070: SyntaxWarning: \"is\" \r\nwith a literal. Did you mean \"==\"?\r\n  elif self.ops[_set[0]].type is \"string\":\r\n/usr/lib/python3/dist-packages/qutip/qobjevo.py:1079: SyntaxWarning: \"is\" \r\nwith a literal. Did you mean \"==\"?\r\n  elif self.ops[_set[0]].type is \"array\":\r\n/usr/lib/python3/dist-packages/qutip/qobjevo.py:1534: SyntaxWarning: \"is n\r\not\" with a literal. Did you mean \"!=\"?\r\n  for key in self.__dict__ if key is not \"compiled_qobjevo\"}\r\n```\r\n\r\n\r\n**To Reproduce**\r\nInstall qutip on ubuntu 20.04.1 via `sudo apt install python3-qutip`.\r\n\r\n**Expected behavior**\r\nNo warnings during the installation of qutip.\r\n\r\n**Your Environment**\r\n```\r\n>>> qutip.about()\r\n\r\nQuTiP: Quantum Toolbox in Python\r\n================================\r\nCopyright (c) QuTiP team 2011 and later.\r\nOriginal developers: R. J. Johansson & P. D. Nation.\r\nCurrent admin team: Alexander Pitchford, Paul D. Nation, Nathan Shammah, Shahnawaz Ahmed, Neill Lambert, and Eric Gigu\u00e8re.\r\nProject Manager: Franco Nori.\r\nCurrently developed through wide collaboration. See https://github.com/qutip for details.\r\n\r\nQuTiP Version:      4.4.1\r\nNumpy Version:      1.17.4\r\nScipy Version:      1.4.1\r\nCython Version:     0.29.14\r\nMatplotlib Version: 3.1.2\r\nPython Version:     3.8.5\r\nNumber of CPUs:     2\r\nBLAS Info:          OPENBLAS\r\nOPENMP Installed:   True\r\nINTEL MKL Ext:      False\r\nPlatform Info:      Linux (x86_64)\r\nInstallation path:  /usr/lib/python3/dist-packages/qutip\r\n```\n", "before_files": [{"content": "# This file is part of QuTiP: Quantum Toolbox in Python.\n#\n#    Copyright (c) 2011 and later, Paul D. Nation.\n#    All rights reserved.\n#\n#    Redistribution and use in source and binary forms, with or without\n#    modification, are permitted provided that the following conditions are\n#    met:\n#\n#    1. Redistributions of source code must retain the above copyright notice,\n#       this list of conditions and the following disclaimer.\n#\n#    2. Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#\n#    3. Neither the name of the QuTiP: Quantum Toolbox in Python nor the names\n#       of its contributors may be used to endorse or promote products derived\n#       from this software without specific prior written permission.\n#\n#    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n#    \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n#    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A\n#    PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n#    HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n#    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n#    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n#    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n#    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n#    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n#    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n###############################################################################\nimport numpy as np\nimport scipy.sparse as sp\nimport ctypes\nfrom ctypes import POINTER,c_int,c_char,c_double, byref\nfrom numpy import ctypeslib\nimport qutip.settings as qset\nzcsrgemv = qset.mkl_lib.mkl_cspblas_zcsrgemv\n\ndef mkl_spmv(A, x):\n     \"\"\"\n     sparse csr_spmv using MKL\n     \"\"\"\n     (m,n) = A.shape\n\n     # Pointers to data of the matrix\n     data    = A.data.ctypes.data_as(ctypeslib.ndpointer(np.complex128, ndim=1, flags='C'))\n     indptr  = A.indptr.ctypes.data_as(POINTER(c_int))\n     indices = A.indices.ctypes.data_as(POINTER(c_int))\n\n     # Allocate output, using same conventions as input\n     if x.ndim is 1:\n        y = np.empty(m,dtype=np.complex,order='C')\n     elif x.ndim==2 and x.shape[1]==1:\n        y = np.empty((m,1),dtype=np.complex,order='C')\n     else:\n        raise Exception('Input vector must be 1D row or 2D column vector')\n     \n     np_x = x.ctypes.data_as(ctypeslib.ndpointer(np.complex128, ndim=1, flags='C'))\n     np_y = y.ctypes.data_as(ctypeslib.ndpointer(np.complex128, ndim=1, flags='C'))\n     # now call MKL. This returns the answer in np_y, which points to y\n     zcsrgemv(byref(c_char(bytes(b'N'))), byref(c_int(m)), data ,indptr, indices, np_x, np_y ) \n     return y\n", "path": "qutip/_mkl/spmv.py"}], "after_files": [{"content": "# This file is part of QuTiP: Quantum Toolbox in Python.\n#\n#    Copyright (c) 2011 and later, Paul D. Nation.\n#    All rights reserved.\n#\n#    Redistribution and use in source and binary forms, with or without\n#    modification, are permitted provided that the following conditions are\n#    met:\n#\n#    1. Redistributions of source code must retain the above copyright notice,\n#       this list of conditions and the following disclaimer.\n#\n#    2. Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#\n#    3. Neither the name of the QuTiP: Quantum Toolbox in Python nor the names\n#       of its contributors may be used to endorse or promote products derived\n#       from this software without specific prior written permission.\n#\n#    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n#    \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n#    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A\n#    PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n#    HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n#    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n#    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n#    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n#    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n#    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n#    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n###############################################################################\nimport numpy as np\nimport scipy.sparse as sp\nimport ctypes\nfrom ctypes import POINTER,c_int,c_char,c_double, byref\nfrom numpy import ctypeslib\nimport qutip.settings as qset\nzcsrgemv = qset.mkl_lib.mkl_cspblas_zcsrgemv\n\ndef mkl_spmv(A, x):\n     \"\"\"\n     sparse csr_spmv using MKL\n     \"\"\"\n     (m,n) = A.shape\n\n     # Pointers to data of the matrix\n     data    = A.data.ctypes.data_as(ctypeslib.ndpointer(np.complex128, ndim=1, flags='C'))\n     indptr  = A.indptr.ctypes.data_as(POINTER(c_int))\n     indices = A.indices.ctypes.data_as(POINTER(c_int))\n\n     # Allocate output, using same conventions as input\n     if x.ndim == 1:\n        y = np.empty(m,dtype=np.complex,order='C')\n     elif x.ndim==2 and x.shape[1]==1:\n        y = np.empty((m,1),dtype=np.complex,order='C')\n     else:\n        raise Exception('Input vector must be 1D row or 2D column vector')\n     \n     np_x = x.ctypes.data_as(ctypeslib.ndpointer(np.complex128, ndim=1, flags='C'))\n     np_y = y.ctypes.data_as(ctypeslib.ndpointer(np.complex128, ndim=1, flags='C'))\n     # now call MKL. This returns the answer in np_y, which points to y\n     zcsrgemv(byref(c_char(bytes(b'N'))), byref(c_int(m)), data ,indptr, indices, np_x, np_y ) \n     return y\n", "path": "qutip/_mkl/spmv.py"}]}