title: Python seems not runing, CVXPY optimize eigenvalue of matrix
body: <p>I am trying to optimize lambda that maximize <a href="https://i.stack.imgur.com/u58VL.png" rel="nofollow noreferrer">Equation to maximize</a>, where Z_A is {|0&gt;&lt;0|,|1&gt;&lt;1|}, Gamma is {Id_4, |01&gt;&lt;01|,|10&gt;&lt;10|}, and gamma is [1,0.5,0.5]. I change these quantum object to cp.bmat object using:</p>
  <pre><code>Gamma_cp = np.array([cp.bmat([[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]),cp.bmat([[0,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,0]]),cp.bmat([[0.5,0,0,-0.5],[0,0.5,-0.5,0],[0,-0.5,0.5,0],[-0.5,0,0,0.5]])])
  Z_A_cp = np.array([cp.bmat([[1,0,0,0],[0,1,0,0],[0,0,0,0],[0,0,0,0]]),cp.bmat([[0,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,1]])])
  Identity4 = cp.bmat([[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]])
  </code></pre>
  <p>The objective I want to optimize is coded as:</p>
  <pre><code>def Theta_total_cvx(Q):
      gamma = np.array([1,Q,Q])
      l = cp.Variable(shape=len(Gamma_cp))
      r = cp.exp(Identity4-sum([l[i]*Gamma_cp[i] for i in range(3)]))
      obj = cp.Maximize(-cp.lambda_max(sum(Z_A_cp[i]@r@Z_A_cp[i] for i in range(2))-np.dot(l,gamma)))
      constraints = []
      results = cp.Problem(obj, constraints)
      results.solve(verbose=True)
      return results.value/np.log(2) - h(Q)
  </code></pre>
  <p>The problem is python compile the obj using more than 10000 minutes, and still running.</p>
  <p>Is there anything wrong with this code?</p>