Skip to content

PyTorch RTCC simulations can't use field kicks #33

@lothian

Description

@lothian

pycc/pycc/rt/rtcc.py

Lines 74 to 82 in 34f928d

if kick:
s_to_i = {"x":0, "y":1, "z":2}
self.mu_tot = self.mu[s_to_i[kick.lower()]]
else:
self.mu_tot = sum(self.mu)/np.sqrt(3.0) # isotropic field
if isinstance(self.ccwfn.t1, torch.Tensor):
self.mu = torch.tensor(self.mu, dtype=torch.complex128, device=self.ccwfn.device1)
self.mu_tot = sum(self.mu) / (torch.sqrt(torch.tensor(3.0)).item())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions