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

Addressing package similarities and aberration correction scale issues #29

Merged
merged 2 commits into from
Aug 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions paper.bib
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ @article{gerhberg1972practical
year={1972}
}

@article{motlakunta2023preserving,
title={Preserving a qubit during adjacent measurements at a few micrometers distance},
author={Motlakunta, Sainath and Kotibhaskar, Nikhil and Shih, Chung-You and Vogliano, Anthony and Mclaren, Darian and Hahn, Lewis and Zhu, Jingwen and Habl{\"u}tzel, Roland and Islam, Rajibul},
journal={arXiv preprint arXiv:2306.03075},
year={2023}
}

@software{sebastien_m_popoff_2022_6121191,
author = {Sébastien M. Popoff and
Expand Down Expand Up @@ -212,4 +206,27 @@ @article{pasienski2008high
pages={2176--2190},
year={2008},
publisher={Optica Publishing Group}
}

@article{motlakunta2024,
author={Motlakunta, Sainath
and Kotibhaskar, Nikhil
and Shih, Chung-You
and Vogliano, Anthony
and McLaren, Darian
and Hahn, Lewis
and Zhu, Jingwen
and Habl{\"u}tzel, Roland
and Islam, Rajibul},
title={Preserving a qubit during state-destroying operations on an adjacent qubit at a few micrometers distance},
journal={Nature Communications},
year={2024},
month={Aug},
day={03},
volume={15},
number={1},
pages={6575},
issn={2041-1723},
doi={10.1038/s41467-024-50864-2},
url={https://doi.org/10.1038/s41467-024-50864-2}
}
22 changes: 15 additions & 7 deletions paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ bibliography: paper.bib
---

# Summary
Holographic beam shaping using spatial light modulators (SLMs) as a reprogrammable hologram offers a powerful tool for precise and flexible optical controls. It has been adopted for a wide range of research, including atom trapping [@gaunt2012robust], optical addressing of individual quantum objects [@motlakunta2023preserving], preparation of exotic quantum states [@islam2015measuring], and multi-beam laser machining [@obata2010multi].
Holographic beam shaping using spatial light modulators (SLMs) as a reprogrammable hologram offers a powerful tool for precise and flexible optical controls. It has been adopted for a wide range of research, including atom trapping [@gaunt2012robust], optical addressing of individual quantum objects [@motlakunta2024], preparation of exotic quantum states [@islam2015measuring], and multi-beam laser machining [@obata2010multi].

`pySLM2` is a python package designed for holographic beam shaping application, encompassing hologram generation, simulation, and hardware controls.

Expand All @@ -41,16 +41,24 @@ In addition to hologram generation, the package provides functions to simulate b
For hardware control, pySLM2 offers a unified application interface (API) compatible with various SLMs, ensuring seamless adaptation of code across different devices. Currently, the package supports DMD controllers from two commercial vendors: Visitech, INC and ViALUX GmbH.

# Statement of need
High-quality optical controls are crucial for numerous scientific and engineering applications. For instance, in atom-based quantum information processors, quantum states of individual atoms are often manipulated by individually addressing laser beams. The quality of these addressing beams directly impacts the fidelity of quantum operations [@motlakunta2023preserving].
High-quality optical controls are crucial for numerous scientific and engineering applications. For instance, in atom-based quantum information processors, quantum states of individual atoms are often manipulated by individually addressing laser beams. The quality of these addressing beams directly impacts the fidelity of quantum operations [@motlakunta2024].

Holographic beam shaping using SLMs provides a way for precise and adaptive optical controls. Compared to using conventional optical elements, holographic beam shaping has several advantages. Firstly, it can generate arbitrary beam profiles that are challenging to create with standard optical elements. For example, the Laguerre-Gaussian beam with a non-zero azimuthal index (often referred to as a doughnut beam), which can be used to trap atoms in a tube-like potential [@kuga1997novel], apply angular momentum to Bose-Einstein Condensate [@andersen2006quantized], or achieve super-resolution imaging [@qian2021super;@drechsler2021optical].


Secondly, holographic beam shaping can actively correct optical aberrations in the system, thereby achieving diffraction-limited performance. This enables the faithful production of target beam profiles with high accuracy. It has been shown that residual aberrations can be corrected to less than $\lambda/20$ root-mean-square (RMS) [@shih2021reprogrammable;@zupancic2016ultra], which is smaller than most of the manufacturing tolerances of optical elements.
Secondly, holographic beam shaping can actively correct cumulative optical aberrations in the system arising from almost inevitable causes, such as surface irregularities, misalignment, and imperfect lens curvature, thereby achieving diffraction-limited performance at the target image plane. This enables the faithful production of target beam profiles with high accuracy, relieving the stringent requirement on optics quality and alignment precision. It has been shown that residual wavefront aberrations can be corrected to less than $\lambda/20$ root-mean-square (RMS) [@shih2021reprogrammable;@zupancic2016ultra], which meets the Maréchal criteria (wavefront RMS error < $\lambda/14$) for optical performance.
<!--
It is important to note that our method's strength lies in its ability to achieve this level of correction regardless of the initial beam quality. Even when cumulative aberrations from various optical components exceed λ/20, our approach ensures that the final corrected beam meets or exceeds this threshold, providing high-quality performance that is comparable to or better than what can be achieved with high-precision optical elements. -->

At the time of writing, the `pySLM2` package, as detailed in this manuscript, has been used in the trapped ion quantum information processing research [@shih2021reprogrammable;@motlakunta2023preserving;@kotibhaskar2023programmable]. The authors believe that the package will benefit a broader community of researchers and engineers by offering turnkey solutions for applying holographic beam shaping to their work. Moreover, the primitives included in the package can assist researchers in rapidly prototyping new hologram generation algorithms.

There are existing open-source packages available that specialize in different levels of holographic beam shaping with SLMs. [`SLMLayout`](https://github.com/wavefrontshaping/Layout) is a package focusing on wavefront shaping with macropixel method [@matthes2019optical] with DMDs. [`CGH-diff`](https://github.com/DigitalNatureGroup/CGH-autodiff) offers scripts for an automatic differentiation-based algorithm [@yamamoto2021gradient] for DMD hologram generation. The most comparable package is [`slmsuite`](https://slmsuite.readthedocs.io/), which offers a comprehensive suite of hologram algorithms tailored for phase-only Spatial Light Modulators (SLMs), supported by GPU acceleration via CuPy [@nishino2017cupy], and includes hardware control capabilities for Liquid Crystal on Silicon (LCoS) SLMs. In contrast, `pySLM2` encompasses hardware controls for multiple popular commercial DMD and SLM models, implementations of four different algorithms for Fourier hologram generation, and simulation tools for visualizing the generated hologram, supported by GPU acceleration via `TensorFlow`. The authors believe that the addition of `pySLM2` to the community can facilitate researchers in applying desired Fourier holographic beam shaping ideas on actual machines with fewer hardware hurdles.

At the time of writing, the `pySLM2` package, as detailed in this manuscript, has been used in the trapped ion quantum information processing research [@shih2021reprogrammable;@motlakunta2024;@kotibhaskar2023programmable]. The authors believe that the package will benefit a broader community of researchers and engineers by offering turnkey solutions for applying holographic beam shaping to their work. Moreover, the primitives included in the package can assist researchers in rapidly prototyping new hologram generation algorithms.

There are existing open-source packages available that specialize in different levels of holographic beam shaping with SLMs. For example, [`SLMLayout`](https://github.com/wavefrontshaping/Layout) is a package focusing on wavefront shaping with macropixel method [@matthes2019optical] with DMDs. [`CGH-diff`](https://github.com/DigitalNatureGroup/CGH-autodiff) offers scripts for an automatic differentiation-based algorithm [@yamamoto2021gradient] for DMD hologram generation. [`slmsuite`](https://slmsuite.readthedocs.io/) offers a comprehensive suite of hologram algorithms tailored for phase-only Spatial Light Modulators (SLMs), supported by GPU acceleration via CuPy [@nishino2017cupy], and includes hardware control capabilities for Liquid Crystal on Silicon (LCoS) SLMs.

`pySLM2` implements hologram generation algorithms and primitives leveraging TensorFlow for GPU acceleration. In terms of hardware controls, `pySLM2` offers a unified API for programming DMDs from different vendors. Some algorithms, including the algorithms used in authors' prior works[@shih2021reprogrammable;motlakunta2024] in the field of quantum information processing, are only available in `pySLM2` at the time of writing.

We hope that the addition of `pySLM2` to the community will facilitate researchers in applying Fourier holographic beam shaping ideas on various machines with fewer hardware hurdles.

# Fourier Holography Basics

Expand All @@ -69,7 +77,7 @@ The aberrations of the optical system can be modeled as a phase map $\Phi_{\math
# Hologram Generation Algorithm
Currently, `pySLM2` supports two type of the spatial light modulator (SLM), liquid crystal on silicon (LCoS) SLM and digital micromirror device (DMD). The LCoS SLM modulates the phase profile purely without modifying the amplitude. As the time of writing, Gerchberg-Saxton (GS) [@gerhberg1972practical] algorithm and the mixed-region amplitude freedom (MRAF) algorithm [@gaunt2012robust;@pasienski2008high] are included.

On the other hand, DMDs use micromirrors to locally turn on and off the light by toggling the micromirrors between two directions. This allows binary amplitude control. By periodically turning on and off the micromirrors across the DMD to form grating patterns, diffracted beams with controllable phase and amplitude can be engineered to have the desired beam profiles. As the time of writing, a randomized algorithm [@zupancic2016ultra] and an iterative Fourier transformation algorithm [@shih2021reprogrammable;@motlakunta2023preserving] are provided for hologram generation.
On the other hand, DMDs use micromirrors to locally turn on and off the light by toggling the micromirrors between two directions. This allows binary amplitude control. By periodically turning on and off the micromirrors across the DMD to form grating patterns, diffracted beams with controllable phase and amplitude can be engineered to have the desired beam profiles. As the time of writing, a randomized algorithm [@zupancic2016ultra] and an iterative Fourier transformation algorithm [@shih2021reprogrammable;@motlakunta2024] are provided for hologram generation.


# Usages
Expand Down Expand Up @@ -98,7 +106,7 @@ To obtain the phase map of the aberration, one can either use a wavefront sensor
## Hardware Controls [not-reviewed]
`pySLM2` provides hardware controls for DMD controllers from both Visitech, INC and ViALUX GmbH. The controllers from these two companies use different communication protocols and architectures. The Visitech controller uses UDP over Ethernet, while the ViALUX controller uses USB3.

One of the goals of `pySLM2` is to abstract the hardware details and offer a unified application interface for interacting with these devices. For instance, we have implemented the same `load_single` and `load_multiple` functions within the controller classes for both manufacturers' devices. These functions allow for the display of single holograms or the loading of multiple holograms that can be switched by triggers. Apart from the hardware agnostic functions, it also exposed the lower-level access for advanced users to implement device specific controls.
One of the goals of `pySLM2` is to abstract the hardware details and offer a unified application interface for interacting with these devices. For instance, we have implemented the same `load_single` and `load_multiple` functions within the controller classes for both manufacturers' devices. These functions allow for the display of single holograms or the loading of multiple holograms that can be switched by triggers. Apart from the hardware-agnostic functions, it also exposed the lower-level access for advanced users to implement device specific controls.

As of the current writing, the package's hardware support is limited to DMD controllers. For users interested in using LCoS-SLM, open-source tools such as [`slmsuite`](https://slmsuite.readthedocs.io/) and [`slmPy`](https://github.com/wavefrontshaping/slmPy) are available options.

Expand Down
Loading