Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix overlap integrals for complex beams #279

Merged
merged 13 commits into from
Aug 15, 2022

Conversation

chrisbrahms
Copy link
Collaborator

This delightful little feature cost me several hours today: when doting two vectors containing complex values, the first is automatically conjugated:

help?> dot
search: dot @__dot__ stdout DEPOT_PATH adjoint fieldcount codepoint fieldoffset isdisjoint denominator modifyproperty! StridedVecOrMat DenseVecOrMat redirect_stdout DimensionMismatch

  dot(x, y)
  x  y

  Compute the dot product between two vectors. For complex vectors, the first vector is conjugated.

This PR removes additional manual conjugates to fix overlap integrals for beams which evaluate to complex-valued vectors (e.g. diverging Gaussian beams using Fields.gauss_beam). It also splits the integrals into real and imaginary parts to allow for potentially complex overlap integral values (ie a phase between the mode and the beam).

@chrisbrahms chrisbrahms requested a review from jtravs August 1, 2022 14:18
Copy link
Contributor

@jtravs jtravs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but see minor comments.

@chrisbrahms chrisbrahms merged commit 028d2d1 into LupoLab:master Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants