# Learning Quantum Objects

1st International Workshop on

Quantum Software and Quantum Machine Learning (QSML)

Min-Hsiu Hsieh

UTS: Centre for Quantum Software and Information

# This talk concerns

## QIP 2018 Tutorial

Ronald de Wolf | CWI, University of Amsterdam
Title: Quantum Learning Theory

• Complexity of Learning
• Full Quantum Settings

Hao-Chung Cheng, MH, Ping-Cheng Yeh. The learnability of unknown quantum measurements. QIC 16(7&8):615–656 (2016).

f: X\to Y

Unknown Function

\{(x_i,y_i)\}_{i=1}^N

Training Data

\mathcal{H}

Hypothesis Set

Learning

Algorithm

\hat{f}

Comp. Complexity

Sample Complexity

f_\rho : \mathcal{E}(\mathcal{H}) \to \mathbb{R}
f_\rho(E) = \text{Tr} E\rho

Hypothesis Set

\{f_{\rho}:\rho\in \mathcal{D}(\mathcal{H})\}
\{(E_i,f_\rho(E_i)\}_{i=1}^N

Training Data

Unknown Function

f_\rho : \mathcal{E}(\mathcal{H}) \to \mathbb{R}

Photo Credit: Akram Youssry

\{(x_i,y_i)\}_{i=1}^N

Training Data

R_n(h) = \frac{1}{N}\sum_{i=1}^N \ell (h(x_i), y_i)
h\in\mathcal{H}

Hypothesis Set

f: X\to Y

Unknown Function

## Given a loss function

\ell:Y\times Y \to \mathbb{R}

## find

{f}_n = \arg \min_{h\in \mathcal{H}} R_n (h)

## Out-of-Sample Error

R(h) = \mathbb{E}_{X\sim\mu} [\ell (h(X), Y) ]

## In-Sample Error

R_n(h) = \frac{1}{N}\sum_{i=1}^N \ell (h(x_i), y_i)
\{(x_i,y_i)\}_{i=1}^N

Training Data

h\in\mathcal{H}

Hypothesis Set

f: X\to Y

Unknown Function

|R(f_n) - R_n(f_n)| \leq Bound (n, \mathcal{H} )
\leq \sup_{h\in\mathcal{H}}|R(h) - R_n(h)|

# For Boolean functions $$\mathcal{H}$$

 Vapnik, Springer-Verlag, New York/Berlin, 1982.

 Blumer, Ehrenfeucht, Haussler, and Warmuth, Assoc. Comput. Machine, vol. 36, no. 4, pp. 151--160, 1989.

# For Real functions $$\mathcal{H}$$

$$m_{\mathcal{H}}= \frac{C}{\epsilon^2}\left(\text{fat}_{\mathcal{H}}(\frac{\epsilon}{8})\cdot\log(\frac2\epsilon)+\log(8/\delta)\right)$$

 Bartlett, Long, and Williamson, J. Comput. System Sci., vol. 52, no. 3, pp. 434--452, 1996.

 Alon, Ben-David, Cesa-Bianchi, and Haussler, J. ACM, vol. 44, no. 4, pp. 616--631, 1997.

 Mendelson, Inventiones Mathematicae, vol. 152, pp. 37--55, 2003.

# Sample Complexity for Learning Quantum Objects

## Measurement

f_\rho : \mathcal{E}(\mathcal{H}) \to \mathbb{R}
f_\rho(E) = \text{Tr} E\rho

Hypothesis Set

\{f_{\rho}:\rho\in \mathcal{D}(\mathcal{H})\}
\{(E_i,f_\rho(E_i)\}_{i=1}^N

Training Data

Unknown Function

f_\rho : \mathcal{E}(\mathcal{H}) \to \mathbb{R}
f_E: \mathcal{D}(\mathcal{H}) \to \mathbb{R}
f_E(\rho) = \text{Tr} E\rho

Hypothesis Set

\{f_{E}:E\in \mathcal{E}(\mathcal{H})\}
\{(\rho_i,f_E(\rho_i)\}_{i=1}^N

Training Data

Unknown Function

f_E : \mathcal{D}(\mathcal{H}) \to \mathbb{R}

# Learning Unknown Measurement

Hypothesis Set

\{f_{\rho}:\rho\in \mathcal{D}(\mathcal{H})\}
\{(E_i,f_\rho(E_i)\}_{i=1}^N

Training Data

Unknown Function

f_\rho : \mathcal{E}(\mathcal{H}) \to \mathbb{R}

# Learning Measurements

Hypothesis Set

\{f_{E}:E\in \mathcal{E}(\mathcal{H})\}
\{(\rho_i,f_E(\rho_i)\}_{i=1}^N

Training Data

Unknown Function

f_E : \mathcal{D}(\mathcal{H}) \to \mathbb{R}

Hypothesis Set

\{f_{\rho}:\rho\in \mathcal{D}(\mathcal{H})\}
\{(E_i,f_\rho(E_i)\}_{i=1}^N

Training Data

Unknown Function

f_\rho : \mathcal{E}(\mathcal{H}) \to \mathbb{R}

# Technical Merits

• ### You don't need to know quantum mechanics.

$$S_1^d$$ and $$S_\infty^d$$ are polar to each other.

S_1^d=\text{conv}(-\mathcal{D}(\mathbb{C}^d)\cup \mathcal{D}(\mathbb{C}^d))
S_\infty^d=\text{conv}(-\mathcal{E}(\mathbb{C}^d)\cup \mathcal{E}(\mathbb{C}^d))

# State - Measurement Duality

$$\mathcal{S}=\{x_1,\ldots,x_n\}\subset B_X$$ is $$\epsilon$$-shattered by $$B_{X^*}$$  if, for $$a_1,\ldots,a_n\in\mathbb{R}$$,
$$\epsilon\sum_{i=1}^n|a_i|\leq \left\|\sum_{i=1}^n a_i x_i\right\|_\mathcal{X},$$

## LHS = $$\epsilon n$$

  Mendelson and  Schechtman, The Shattering Dimension of Sets of Linear Functionals, The Annals of   Probability, 32 (3A): 1746–1770, 2004

## $$\epsilon n \leq C(n,d)$$

$$\mathcal{S}=\{x_1,\ldots,x_n\}\subset B_X$$ is $$\epsilon$$-shattered by $$B_{X^*}$$  if, for $$a_1,\ldots,a_n\in\mathbb{R}$$,
$$\epsilon\sum_{i=1}^n|a_i|\leq \left\|\sum_{i=1}^n a_i x_i\right\|_\mathcal{X},$$

# Learning Q. States

## $$\leq \sqrt{2\sigma^2 \log d}$$

Joel A. Tropp, Foundations of Computational Mathematics, 12 (4): 389–434, 2011.

# Learning Measurement

## $$\leq \sqrt{n d}$$

[Noncommutative Khintchine inequalities]

# Final Remark

## $$B_X:=S_p^d$$ and $$B_{X^*}:= S_q^d$$

\frac{1}{p}+\frac{1}{q}=1