[G1-Sync] Manual knowledge update
This commit is contained in:
@@ -2,62 +2,176 @@
|
||||
id: wiki-2026-0508-quantum-computing-for-ai
|
||||
title: Quantum Computing for AI
|
||||
category: 10_Wiki/Topics
|
||||
status: needs_review
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [QUANTUM-001]
|
||||
aliases: [Quantum ML, QML, Quantum Machine Learning]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 1.0
|
||||
tags: ["Quantum-Computing|[Quantum-Computing", ai, Quantum-Machine-Learning, qubit, future-tech]
|
||||
confidence_score: 0.85
|
||||
verification_status: applied
|
||||
tags: [quantum, machine-learning, qml, niche]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-04-26
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
|
||||
tech_stack:
|
||||
language: python
|
||||
framework: qiskit/pennylane
|
||||
---
|
||||
|
||||
# Quantum Computing for AI (AI를 위한 양자 컴퓨팅)
|
||||
# Quantum Computing for AI
|
||||
|
||||
## 📌 한 줄 통찰 (The Karpathy Summary)
|
||||
> "중첩과 얽힘의 힘으로 연산의 차원을 파괴하라" — 양자역학적 현상을 활용하여 기존 컴퓨터로는 수만 년이 걸릴 복잡한 최적화 및 행렬 연산을 초고속으로 처리함으로써 AI의 한계를 돌파하려는 차세대 컴퓨팅 패러다임.
|
||||
## 매 한 줄
|
||||
> **"매 quantum advantage 의 ML — 아직 mostly aspirational"**. 2026 현재 매 NISQ era — 100~1000 qubit, noisy. Variational quantum circuit (VQC) 의 hybrid classical-quantum optimizer 의 limited niche utility. 매 LLM scaling 의 dominant paradigm — 매 quantum ML 의 매 specialized boutique research.
|
||||
|
||||
## 📖 구조화된 지식 (Synthesized Content)
|
||||
- **추출된 패턴:** 비트(0 또는 1) 대신 큐비트(Qubit, 0과 1의 중첩 상태)를 사용하여 모든 가능성을 동시에 계산하고, 양자 간섭을 통해 정답 확률을 극대화하는 병렬 처리 패턴.
|
||||
- **세부 내용:**
|
||||
- **Superposition:** 여러 상태가 동시에 존재할 수 있어 지수적인 연산 공간 제공.
|
||||
- **Ent[[ANGLE|ANGLE]]ment:** 한 큐비트의 상태가 다른 큐비트와 연결되어 원거리에서도 정보를 즉각 동기화.
|
||||
- **Quantum Machine Learning (QML):** 양자 알고리즘을 활용한 데이터 분류, 회귀, 군집화 연구.
|
||||
- **[[Optimization|Optimization]] Speedup:** 방대한 파라미터 탐색 공간에서 전역 최적해를 찾는 속도를 비약적으로 단축 가능.
|
||||
## 매 핵심
|
||||
|
||||
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
|
||||
- **과거 데이터와의 충돌:** 이론적 가능성에 머물던 시기를 지나, NISQ(노이즈가 있는 중간 규모 양자 기기) 환경에서의 실질적인 AI 알고리즘 적용 연구가 활발히 진행 중.
|
||||
- **정책 변화:** Antigravity 프로젝트는 향후 대규모 지식 그래프의 복잡 추론 성능 향상을 위해 양자 컴퓨팅 서비스(AWS Braket 등) 연동을 중장기 로드맵에 포함함.
|
||||
### 매 NISQ-era reality (2026)
|
||||
- IBM Heron r2 (156 qubit), Quantinuum H2 (56 qubit ion trap), Google Willow (105 qubit, 2024 error-corrected milestone).
|
||||
- Logical qubit count 의 still <10 (Willow 의 1 logical qubit demo). Fault-tolerant ML era 의 ~2030+.
|
||||
- Practical ML advantage 의 still unproven on real hardware.
|
||||
|
||||
## 🔗 지식 연결 (Graph)
|
||||
- [[Parallel-Computing|Parallel-Computing]], [[Optimization|Optimization]], [[Linear-Algebra-for-ML|Linear-Algebra-for-ML]], Artificial-Neural-Networks
|
||||
- **Raw Source:** 10_Wiki/Topics/AI/Quantum-Computing-for-AI.md
|
||||
### 매 algorithm classes
|
||||
- **VQC (Variational Quantum Circuit)**: parameterized gate circuit, classical optimizer (COBYLA, SPSA). 매 QNN 의 base.
|
||||
- **QAOA (Quantum Approximate Optimization)**: combinatorial opt (max-cut, portfolio).
|
||||
- **VQE (Variational Quantum Eigensolver)**: ground-state energy, chemistry — 매 closest to practical advantage.
|
||||
- **Quantum kernel**: 매 SVM with quantum feature map. Havlíček 2019.
|
||||
- **HHL**: linear system solve, exponential speedup in theory — 매 caveats (sparse, well-conditioned, quantum I/O).
|
||||
|
||||
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
|
||||
### 매 응용
|
||||
1. Quantum chemistry (drug discovery, materials).
|
||||
2. Combinatorial optimization (logistics, finance portfolio).
|
||||
3. Quantum kernel SVM on small datasets.
|
||||
4. Generative QML (quantum GAN, quantum Boltzmann) — 매 research stage.
|
||||
|
||||
**언제 이 지식을 쓰는가:**
|
||||
- *(TODO)*
|
||||
## 💻 패턴
|
||||
|
||||
**언제 쓰면 안 되는가:**
|
||||
- *(TODO)*
|
||||
### PennyLane VQC
|
||||
```python
|
||||
import pennylane as qml
|
||||
import torch
|
||||
|
||||
## 🧪 검증 상태 (Validation)
|
||||
n_qubits = 4
|
||||
dev = qml.device("default.qubit", wires=n_qubits)
|
||||
|
||||
- **정보 상태:** needs_review
|
||||
- **출처 신뢰도:** A
|
||||
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
|
||||
@qml.qnode(dev, interface="torch")
|
||||
def circuit(inputs, weights):
|
||||
qml.AngleEmbedding(inputs, wires=range(n_qubits))
|
||||
qml.BasicEntanglerLayers(weights, wires=range(n_qubits))
|
||||
return [qml.expval(qml.PauliZ(i)) for i in range(n_qubits)]
|
||||
|
||||
## 🧬 중복 검사 (Duplicate Check)
|
||||
weight_shape = {"weights": (2, n_qubits)}
|
||||
qlayer = qml.qnn.TorchLayer(circuit, weight_shape)
|
||||
|
||||
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
|
||||
- **처리 방식:** UPDATE (자동 정규화)
|
||||
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
|
||||
model = torch.nn.Sequential(
|
||||
torch.nn.Linear(8, n_qubits),
|
||||
qlayer,
|
||||
torch.nn.Linear(n_qubits, 2),
|
||||
)
|
||||
```
|
||||
|
||||
## 🕓 변경 이력 (Changelog)
|
||||
### Qiskit VQE for H2 ground state
|
||||
```python
|
||||
from qiskit_nature.second_q.drivers import PySCFDriver
|
||||
from qiskit_nature.second_q.mappers import JordanWignerMapper
|
||||
from qiskit_algorithms import VQE
|
||||
from qiskit_algorithms.optimizers import SLSQP
|
||||
from qiskit.circuit.library import EfficientSU2
|
||||
from qiskit.primitives import Estimator
|
||||
|
||||
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|
||||
|------|-----------|-----------|--------|
|
||||
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
|
||||
driver = PySCFDriver(atom="H 0 0 0; H 0 0 0.74")
|
||||
problem = driver.run()
|
||||
mapper = JordanWignerMapper()
|
||||
hamiltonian = mapper.map(problem.second_q_ops()[0])
|
||||
|
||||
ansatz = EfficientSU2(hamiltonian.num_qubits, reps=2)
|
||||
vqe = VQE(Estimator(), ansatz, SLSQP())
|
||||
result = vqe.compute_minimum_eigenvalue(hamiltonian)
|
||||
print(f"Ground state energy: {result.eigenvalue.real:.4f} Ha")
|
||||
```
|
||||
|
||||
### Quantum kernel SVM
|
||||
```python
|
||||
from sklearn.svm import SVC
|
||||
from qiskit_machine_learning.kernels import FidelityQuantumKernel
|
||||
from qiskit.circuit.library import ZZFeatureMap
|
||||
|
||||
feature_map = ZZFeatureMap(feature_dimension=4, reps=2)
|
||||
qkernel = FidelityQuantumKernel(feature_map=feature_map)
|
||||
|
||||
svc = SVC(kernel=qkernel.evaluate)
|
||||
svc.fit(X_train, y_train) # 매 small dataset only — kernel eval 의 expensive
|
||||
```
|
||||
|
||||
### QAOA for max-cut
|
||||
```python
|
||||
from qiskit_optimization.applications import Maxcut
|
||||
from qiskit_algorithms import QAOA
|
||||
from qiskit_algorithms.optimizers import COBYLA
|
||||
from qiskit.primitives import Sampler
|
||||
|
||||
graph = ... # networkx graph
|
||||
maxcut = Maxcut(graph)
|
||||
qubo = maxcut.to_quadratic_program()
|
||||
qaoa = QAOA(Sampler(), COBYLA(), reps=3)
|
||||
result = qaoa.compute_minimum_eigenvalue(qubo.to_ising()[0])
|
||||
```
|
||||
|
||||
### IBM Quantum runtime
|
||||
```python
|
||||
from qiskit_ibm_runtime import QiskitRuntimeService, EstimatorV2
|
||||
|
||||
service = QiskitRuntimeService(channel="ibm_quantum")
|
||||
backend = service.backend("ibm_torino") # Heron r1, 133 qubit
|
||||
estimator = EstimatorV2(mode=backend)
|
||||
job = estimator.run([(circuit, observable, params)])
|
||||
result = job.result()
|
||||
```
|
||||
|
||||
### Barren plateau 의 회피 (CDR / shallow circuit)
|
||||
```python
|
||||
# 매 deep VQC 의 gradient 의 vanish exponentially in qubit count
|
||||
# 매 mitigation: layer-wise training, identity-block init, problem-aware ansatz
|
||||
ansatz = qml.templates.SimplifiedTwoDesign(
|
||||
initial_layer_weights=torch.zeros(n_qubits), # identity init
|
||||
weights=torch.randn(n_layers, n_qubits - 1, 2) * 0.01,
|
||||
wires=range(n_qubits),
|
||||
)
|
||||
```
|
||||
|
||||
## 매 결정 기준
|
||||
| 상황 | Approach |
|
||||
|---|---|
|
||||
| Small molecule chemistry | VQE (closest to practical) |
|
||||
| Combinatorial opt, classical heuristic insufficient | QAOA (compare vs SA, branch-and-bound) |
|
||||
| Tiny labeled dataset (<100), classical kernel weak | Quantum kernel SVM (sim only) |
|
||||
| Standard ML (image, NLP) | classical (LLM, ViT) — 매 quantum 의 X |
|
||||
| Production deployment 2026 | classical, full stop |
|
||||
|
||||
**기본값**: 매 simulator (PennyLane / Qiskit Aer) 에 prototype. 매 real hardware 의 noise + access cost 의 prohibitive for ML. 매 LLM era 에서 매 quantum 의 niche research, 매 practical ML 의 X.
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[Quantum-Computing]] · [[Machine-Learning]]
|
||||
- 변형: [[VQE]] · [[QAOA]] · [[Quantum-Kernel]]
|
||||
- 응용: [[Quantum-Chemistry]] · [[Combinatorial-Optimization]]
|
||||
- Adjacent: [[Tensor-Networks]] · [[Variational-Methods]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: explain quantum algorithm (HHL, Grover, Shor) 의 high-level intuition; generate Qiskit / PennyLane boilerplate; literature survey.
|
||||
**언제 X**: actual quantum algorithm correctness (LLM 의 hallucinate gate sequences, mismeasure circuits). 매 verify with simulator.
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **Quantum hype**: claim "exponential speedup" without specifying problem class + caveats.
|
||||
- **NISQ on big data**: 매 quantum I/O bottleneck 의 kill any speedup.
|
||||
- **Deep ansatz blind**: barren plateau, gradient vanishes — 매 shallow + problem-informed.
|
||||
- **Ignore noise**: simulator results 의 not transfer to real hardware without error mitigation (ZNE, PEC).
|
||||
- **Quantum ML for MNIST**: classical CNN 의 99%, quantum 의 80% — 매 not a benchmark.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (Qiskit 1.x docs 2026, PennyLane docs, Preskill "NISQ era" 2018, Google Willow 2024 paper, IBM Quantum roadmap).
|
||||
- 신뢰도 A (subject-matter), B for "practical advantage" claims.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — VQE/QAOA/quantum kernel patterns + 2026 NISQ reality check |
|
||||
|
||||
Reference in New Issue
Block a user