title: How can I cast a tensor to the complex type in Pytorch?
body: <p>I want to do some quantum mechanics calculations with Pytorch, where the quantities are sometimes complex. I would like to know how can I cast an existing real tensor to the complex type.</p>