---
id: wiki-2026-0508-quantum-computing
title: Quantum Computing
category: 10_Wiki/Topics
status: verified
canonical_id: self
aliases: [QC, Quantum Information Processing]
duplicate_of: none
source_trust_level: A
confidence_score: 0.9
verification_status: applied
tags: [quantum, computing, algorithms, qubits]
raw_sources: []
last_reinforced: 2026-05-10
github_commit: pending
tech_stack:
  language: python
  framework: qiskit
---

# Quantum Computing

## 매 한 줄
> **"매 superposition + entanglement = exponential parallelism."**. 1981년 Feynman이 양자 시뮬레이션 limitation 제기. 2019 Google Sycamore quantum supremacy → 2024 IBM Heron 156-qubit, 2026 fault-tolerant prototype 등장. NISQ era에서 early fault-tolerant 로 전환 중.

## 매 핵심

### 매 Qubit Model
- Classical bit: {0, 1}. Qubit: α|0⟩ + β|1⟩, |α|² + |β|² = 1.
- N qubits → 2^N complex amplitudes (exponential state space).
- Measurement: collapse to basis state probabilistically.

### 매 Three Quantum Resources
- **Superposition**: Hadamard gate H|0⟩ = (|0⟩+|1⟩)/√2.
- **Entanglement**: Bell state (|00⟩+|11⟩)/√2 — non-local correlation.
- **Interference**: amplitudes add/cancel to amplify correct answer.

### 매 응용
1. Shor's algorithm — RSA factoring in polynomial time.
2. Grover's search — O(√N) database search.
3. VQE/QAOA — chemistry simulation, combinatorial optimization.
4. Quantum machine learning (kernel methods).

## 💻 패턴

### Bell State (Qiskit)
```python
from qiskit import QuantumCircuit, transpile
from qiskit_aer import AerSimulator

qc = QuantumCircuit(2, 2)
qc.h(0)
qc.cx(0, 1)
qc.measure([0, 1], [0, 1])

sim = AerSimulator()
result = sim.run(transpile(qc, sim), shots=1024).result()
print(result.get_counts())  # ~50% '00', ~50% '11'
```

### Grover's Algorithm (2-qubit)
```python
from qiskit import QuantumCircuit
import numpy as np

def grover_2q(marked_state):
    qc = QuantumCircuit(2)
    qc.h([0, 1])
    # Oracle: phase flip on marked
    if marked_state == '11':
        qc.cz(0, 1)
    # Diffuser
    qc.h([0, 1]); qc.x([0, 1])
    qc.cz(0, 1)
    qc.x([0, 1]); qc.h([0, 1])
    return qc
```

### VQE for H2 ground state
```python
from qiskit_nature.second_q.drivers import PySCFDriver
from qiskit_algorithms import VQE
from qiskit_algorithms.optimizers import SLSQP
from qiskit.primitives import Estimator
from qiskit_nature.second_q.circuit.library import UCCSD, HartreeFock

driver = PySCFDriver(atom='H 0 0 0; H 0 0 0.735')
problem = driver.run()
ansatz = UCCSD(problem.num_spatial_orbitals, problem.num_particles, ...)
vqe = VQE(Estimator(), ansatz, SLSQP())
result = vqe.compute_minimum_eigenvalue(problem.hamiltonian.second_q_op())
```

### QAOA for Max-Cut
```python
from qiskit_optimization.applications import Maxcut
from qiskit_algorithms import QAOA

graph = nx.gnp_random_graph(5, 0.5)
problem = Maxcut(graph).to_quadratic_program()
qaoa = QAOA(sampler=Sampler(), optimizer=COBYLA(), reps=3)
result = qaoa.compute_minimum_eigenvalue(problem.to_ising()[0])
```

### Quantum Phase Estimation skeleton
```python
def qpe(unitary, n_counting, eigenstate):
    qc = QuantumCircuit(n_counting + eigenstate.num_qubits)
    qc.h(range(n_counting))
    qc.append(eigenstate, range(n_counting, qc.num_qubits))
    for q in range(n_counting):
        qc.append(unitary.power(2**q).control(),
                  [q] + list(range(n_counting, qc.num_qubits)))
    qc.append(QFT(n_counting, inverse=True), range(n_counting))
    return qc
```

### Error mitigation (Zero Noise Extrapolation)
```python
from mitiq import zne
def executor(circuit): return run_on_hw(circuit)
mitigated = zne.execute_with_zne(circuit, executor,
                                  scale_factors=[1, 3, 5])
```

## 매 결정 기준
| 상황 | Approach |
|---|---|
| Cryptanalysis (factoring) | Shor (need fault-tolerant, 2030+) |
| Combinatorial optim, NISQ | QAOA + warm-start |
| Chemistry / materials | VQE with UCCSD ansatz |
| Search w/ structure | Quantum walks, Grover variants |
| ML kernels | Quantum feature maps (caveat: limited speedup proof) |

**기본값**: 2026 production은 매 hybrid quantum-classical (VQE/QAOA) on real hardware via IBM Quantum / IonQ / Quantinuum.

## 🔗 Graph
- 부모: [[Theoretical-Computer-Science]] · [[Linear-Algebra-Foundations]]
- 변형: [[Quantum-Computing|Quantum Computing (Intro)]]
- 응용: [[Practical-Cryptography|Cryptography]] · [[Combinatorial-Optimization]]

## 🤖 LLM 활용
**언제**: hardware-aware compilation 설명, ansatz 설계 brainstorm, error mitigation strategy 추천.
**언제 X**: 매 large-scale circuit simulation 직접 실행 (use Qiskit/Cirq locally), 매 hardware-specific calibration data.

## ❌ 안티패턴
- **Quantum hype**: 매 "quantum solves NP" — 매 BQP ⊄ NP-complete (likely).
- **Decoherence ignore**: shallow circuits 만 NISQ 에서 의미. Deep circuits → noise dominate.
- **Classical baseline 무시**: 매 tensor network / Monte Carlo 가 매 quantum 보다 fast 한 경우 多.
- **Measurement overhead**: 매 expectation value estimation 위해 1000s shots 필요.

## 🧪 검증 / 중복
- Verified (Nielsen & Chuang *Quantum Computation and Quantum Information*; IBM Qiskit textbook 2025).
- 신뢰도 A.

## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — qubit model, Bell/Grover/VQE/QAOA/QPE 패턴, NISQ→FT 전환 정리 |
