Hi there! I just started learning Qutip and my python skills are still novice. I was wondering if there's any Qobj method to convert an operator into a simple numpy array or related. I'm using Spyder since the variable explorer lets me see matrices in a friendly way (studying density matrices in the console is a nightmare). If you guys know any other way to display matrices inline in a neat way I would be very pleased to hear.Thanks!
--
You received this message because you are subscribed to the Google Groups "qutip" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Function | Command | Description |
---|---|---|
Conjugate | Q.conj() | Conjugate of quantum object. |
Dagger (adjoint) | Q.dag() | Returns adjoint (dagger) of object. |
Diagonal | Q.diag() | Returns the diagonal elements. |
Eigenenergies | Q.eigenenergies() | Eigenenergies (values) of operator. |
Eigenstates | Q.eigenstates() | Returns eigenvalues and eigenvectors. |
Exponential | Q.expm() | Matrix exponential of operator. |
Full | Q.full() | Returns full (not sparse) array of Q’s data. |
Groundstate | Q.groundstate() | Eigenval & eigket of Qobj groundstate. |
Matrix Element | Q.matrix_element(bra,ket) | Matrix element <bra|Q|ket> |
Norm | Q.norm() | Returns L2 norm for states, trace norm for operators. |
Partial Trace | Q.ptrace(sel) | Partial trace returning components selected using ‘sel’ parameter. |
Sqrt | Q.sqrtm() | Matrix sqrt of operator. |
Tidyup | Q.tidyup() | Removes small elements from Qobj. |
Trace | Q.tr() | Returns trace of quantum object. |
Transform | Q.transform(inpt) | A basis transformation defined by matrix or list of kets ‘inpt’ . |
Transpose | Q.trans() | Transpose of quantum object. |
Unit | Q.unit() | Returns normalized (unit) vector Q/Q.norm(). |
--
You received this message because you are subscribed to the Google Groups "QuTiP: Quantum Toolbox in Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<qobj_numpy.py>
Q.permute(order)
What would I pass into 'order'?
Thanks
--
class QobjTrig(Qobj):
def cos(self):
out = Qobj()
out.data = sp.csr_matrix(np.cos(self.data))
out.dims = [self.dims[1], self.dims[0]]
return out