OAM-KIST 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- oam_kist-0.1.0/OAM_KIST/__init__.py +1 -0
- oam_kist-0.1.0/OAM_KIST/holography.py +91 -0
- oam_kist-0.1.0/OAM_KIST.egg-info/PKG-INFO +15 -0
- oam_kist-0.1.0/OAM_KIST.egg-info/SOURCES.txt +9 -0
- oam_kist-0.1.0/OAM_KIST.egg-info/dependency_links.txt +1 -0
- oam_kist-0.1.0/OAM_KIST.egg-info/requires.txt +3 -0
- oam_kist-0.1.0/OAM_KIST.egg-info/top_level.txt +1 -0
- oam_kist-0.1.0/PKG-INFO +15 -0
- oam_kist-0.1.0/README.md +17 -0
- oam_kist-0.1.0/setup.cfg +4 -0
- oam_kist-0.1.0/setup.py +16 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .holography import *
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
# import matplotlib.pyplot as plt
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def generate_oam_superposition(res, pixel_pitch, beam_w0, l_modes, weights):
|
|
6
|
+
"""
|
|
7
|
+
OAM 중첩 상태를 위한 SLM 홀로그램 생성 (Interferogram 방식)
|
|
8
|
+
"""
|
|
9
|
+
# 1. 좌표계 설정
|
|
10
|
+
x = np.linspace(-res[0] * pixel_pitch / 2, res[0] * pixel_pitch / 2, res[0])
|
|
11
|
+
y = np.linspace(-res[1] * pixel_pitch / 2, res[1] * pixel_pitch / 2, res[1])
|
|
12
|
+
X, Y = np.meshgrid(x, y)
|
|
13
|
+
|
|
14
|
+
# 극좌표 변환
|
|
15
|
+
R = np.sqrt(X ** 2 + Y ** 2)
|
|
16
|
+
Phi = np.arctan2(Y, X)
|
|
17
|
+
|
|
18
|
+
# 2. 빔 프로파일 정의 (Laguerre-Gaussian 근사)
|
|
19
|
+
# 0으로 나누는 것 방지
|
|
20
|
+
R[R == 0] = 1e-10
|
|
21
|
+
|
|
22
|
+
# 3. 중첩 (Superposition) - 여기서 복소수 합이 일어납니다.
|
|
23
|
+
E_total = np.zeros_like(Phi, dtype=complex)
|
|
24
|
+
for l, w in zip(l_modes, weights):
|
|
25
|
+
# 각 모드의 복소수 필드 생성 (LG mode, p=0 가정)
|
|
26
|
+
# E = (sqrt(2)r/w)^|l| * exp(-r^2/w^2) * exp(il*phi)
|
|
27
|
+
E_total += w * (np.sqrt(2) * R / beam_w0) ** abs(l) * np.exp(-R ** 2 / beam_w0 ** 2) * np.exp(1j * l * Phi)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# 목표 진폭(Amplitude)과 위상(Phase) 추출
|
|
31
|
+
Amp = np.abs(E_total)
|
|
32
|
+
Phase = np.angle(E_total)
|
|
33
|
+
|
|
34
|
+
# 진폭 정규화 (0 ~ 1)
|
|
35
|
+
Amp = Amp / np.max(Amp)
|
|
36
|
+
|
|
37
|
+
return Amp, Phase, X, Y
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def encode_hologram(Amp, Phase, X, Y, grating_period):
|
|
41
|
+
"""
|
|
42
|
+
진폭 정보를 포함하여 SLM에 띄울 최종 Phase Mask 생성
|
|
43
|
+
방식: Off-axis Holography (Carrier frequency 추가)
|
|
44
|
+
"""
|
|
45
|
+
# Blazed Grating (Carrier Frequency) 생성
|
|
46
|
+
# k_tilt * x
|
|
47
|
+
carrier_phase = (2 * np.pi * X) / grating_period
|
|
48
|
+
|
|
49
|
+
# 간섭 패턴 생성 (Interference pattern)
|
|
50
|
+
# Arrizon type 3의 간소화된 형태 또는 일반적인 Interferogram 방식
|
|
51
|
+
# 진폭 A를 위상 변조 효율로 인코딩하는 방식입니다.
|
|
52
|
+
# soft_aperture는 원치 않는 고차 회절을 줄이는 데 도움을 줍니다.
|
|
53
|
+
|
|
54
|
+
# 간단하고 강력한 방법: Phase = Target_Phase + Carrier
|
|
55
|
+
# 하지만 진폭을 표현하기 위해 'Sinc' 함수 꼴로 위상 변조 깊이를 조절하거나
|
|
56
|
+
# 단순히 코사인 패턴을 만듭니다.
|
|
57
|
+
|
|
58
|
+
# 가장 직관적인 'Interferogram' 방식 (Amplitude masking)
|
|
59
|
+
# SLM Phase = f(Amplitude) * sin(Phase + Carrier) 와 유사한 꼴
|
|
60
|
+
|
|
61
|
+
# 여기서는 Arrizon 논문의 Eq. 5와 유사한 방식을 사용하여
|
|
62
|
+
# 진폭 정보를 1차 회절 효율로 보냅니다.
|
|
63
|
+
|
|
64
|
+
# f(A) 계산 (Arrizon 방식의 역함수 매핑이 정확하지만, 근사적으로 A * pi 사용 가능)
|
|
65
|
+
# A=1일 때 변조가 최대(효율 최대), A=0일 때 변조 없음(효율 0)
|
|
66
|
+
|
|
67
|
+
final_hologram = Amp * np.mod(Phase + carrier_phase, 2 * np.pi)
|
|
68
|
+
|
|
69
|
+
# SLM은 0~2pi만 인식하므로 래핑
|
|
70
|
+
# 하지만 위 식은 단순 곱셈이므로, 진폭 변조를 위해
|
|
71
|
+
# 'Checkerboard' 방식이나 'Sawtooth' 변형을 주로 씁니다.
|
|
72
|
+
|
|
73
|
+
# [실제 연구용 추천 코드]: Type 3 Arrizon encoding (simplified)
|
|
74
|
+
# 이 방식이 노이즈가 적고 깔끔합니다.
|
|
75
|
+
complex_field = Amp * np.exp(1j * Phase)
|
|
76
|
+
|
|
77
|
+
# Arrizon method (Type 3)
|
|
78
|
+
# H(x,y) = f(A) * sin(Psi + carrier) 가 아니라
|
|
79
|
+
# 위상 값 자체를 변형합니다.
|
|
80
|
+
|
|
81
|
+
# 실용적인 근사치:
|
|
82
|
+
# A가 작으면 회절 효율을 떨어뜨리기 위해 Grating의 위상 깊이를 줄임
|
|
83
|
+
|
|
84
|
+
phase_depth = 2 * np.arcsin(Amp) # 진폭을 위상 깊이로 변환
|
|
85
|
+
hologram_pattern = phase_depth * np.cos(Phase + carrier_phase)
|
|
86
|
+
|
|
87
|
+
# SLM 0~2pi 매핑 (Gray scale)
|
|
88
|
+
hologram_final = np.mod(hologram_pattern, 2 * np.pi)
|
|
89
|
+
|
|
90
|
+
return hologram_final
|
|
91
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: OAM_KIST
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Quantum information and technology using OAM states and SLM for KIST research
|
|
5
|
+
Author: Youngjun Kim
|
|
6
|
+
Author-email: kyjun0915@kist.re.kr
|
|
7
|
+
Requires-Python: >=3.7
|
|
8
|
+
Requires-Dist: numpy
|
|
9
|
+
Requires-Dist: matplotlib
|
|
10
|
+
Requires-Dist: scipy
|
|
11
|
+
Dynamic: author
|
|
12
|
+
Dynamic: author-email
|
|
13
|
+
Dynamic: requires-dist
|
|
14
|
+
Dynamic: requires-python
|
|
15
|
+
Dynamic: summary
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
OAM_KIST
|
oam_kist-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: OAM_KIST
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Quantum information and technology using OAM states and SLM for KIST research
|
|
5
|
+
Author: Youngjun Kim
|
|
6
|
+
Author-email: kyjun0915@kist.re.kr
|
|
7
|
+
Requires-Python: >=3.7
|
|
8
|
+
Requires-Dist: numpy
|
|
9
|
+
Requires-Dist: matplotlib
|
|
10
|
+
Requires-Dist: scipy
|
|
11
|
+
Dynamic: author
|
|
12
|
+
Dynamic: author-email
|
|
13
|
+
Dynamic: requires-dist
|
|
14
|
+
Dynamic: requires-python
|
|
15
|
+
Dynamic: summary
|
oam_kist-0.1.0/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# OAM KIST
|
|
2
|
+
|
|
3
|
+
Imaging and sequence toolkit for Lageurre-Gaussian mode light, i.e. Orbital Angular Montum(OAM) state.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
OAM_KIST/ # GitHub 저장소 루트
|
|
7
|
+
├── OAM_KIST/ # 실제 패키지 소스 코드 (import OAM_KIST)
|
|
8
|
+
│ ├── __init__.py # 패키지 초기화 및 버전 정의
|
|
9
|
+
│ ├── holography.py # SLM 좌표계 및 홀로그램 생성 함수
|
|
10
|
+
│ ├── vqe_solver.py # COBYLA 알고리즘 및 VQE 로직
|
|
11
|
+
│ └── utils.py # 기타 유틸리티 (시각화 등)
|
|
12
|
+
├── tests/ # 유닛 테스트 코드
|
|
13
|
+
├── README.md # 프로젝트 설명
|
|
14
|
+
├── requirements.txt # 의존성 라이브러리 목록
|
|
15
|
+
├── setup.py # 패키지 빌드 및 배포 설정
|
|
16
|
+
└── .gitignore # 제외할 파일 목록
|
|
17
|
+
```
|
oam_kist-0.1.0/setup.cfg
ADDED
oam_kist-0.1.0/setup.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
setup(
|
|
4
|
+
name="OAM_KIST",
|
|
5
|
+
version="0.1.0",
|
|
6
|
+
packages=find_packages(),
|
|
7
|
+
install_requires=[
|
|
8
|
+
"numpy",
|
|
9
|
+
"matplotlib",
|
|
10
|
+
"scipy",
|
|
11
|
+
],
|
|
12
|
+
author="Youngjun Kim",
|
|
13
|
+
author_email="kyjun0915@kist.re.kr",
|
|
14
|
+
description="Quantum information and technology using OAM states and SLM for KIST research",
|
|
15
|
+
python_requires=">=3.7",
|
|
16
|
+
)
|