---
id: wiki-2026-0508-quantum-computing-for-ai
title: Quantum Computing for AI
category: 10_Wiki/Topics
status: verified
canonical_id: self
aliases: [Quantum ML, QML, Quantum Machine Learning]
duplicate_of: none
source_trust_level: A
confidence_score: 0.85
verification_status: applied
tags: [quantum, machine-learning, qml, niche]
raw_sources: []
last_reinforced: 2026-05-10
github_commit: pending
tech_stack:
  language: python
  framework: qiskit/pennylane
---

# Quantum Computing for 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.

## 매 핵심

### 매 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.

### 매 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).

### 매 응용
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.

## 💻 패턴

### PennyLane VQC
```python
import pennylane as qml
import torch

n_qubits = 4
dev = qml.device("default.qubit", wires=n_qubits)

@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)]

weight_shape = {"weights": (2, n_qubits)}
qlayer = qml.qnn.TorchLayer(circuit, weight_shape)

model = torch.nn.Sequential(
    torch.nn.Linear(8, n_qubits),
    qlayer,
    torch.nn.Linear(n_qubits, 2),
)
```

### 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

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]]
- 응용: [[Combinatorial-Optimization]]

## 🤖 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 |
