abstract: I review the ideas and main results in the derivation of security bounds in quantum key distribution for keys of finite length. In particular, all the detailed studies on specific protocols and implementations indicate that no secret key can be extracted if the number of processed signals per run is smaller than $10^5-10^6$. I show how these numbers can be recovered from very basic estimates.
address: Centre for Quantum Technologies and Department of Physics, National University of Singapore, Singapore.
author: [^1]
title: QKD: a million signal task

# Introduction

In the very first proof of unconditional security of quantum key distribution (QKD), Mayers already stressed the need to obtain *finite-key bounds* and paved the path for this task . The complex development of QKD, which has been reviewed elsewhere , explains why this task was finally achieved only recently.

This text is a concise presentation of finite-key security proofs, written for readers that are already familiar with the main notions of QKD. I use the approach developed by Renato Renner in his thesis and applied later to the specific study of finite-key effects . Independently, and actually some months earlier than Renner and myself, Hayashi has also developed finite-key analysis . A recent work by Fung, Ma and Chau tackles the problem from yet another approach . It must be stressed that all these approaches are recognized to be ultimately based on the same definition of security and lead to the same order of magnitude for the finite-key corrections, although there may be differences in details.

# Finite-key corrections

In a QKD protocol, Alice and Bob have to infer the information that could have leaked to the eavesdropper Eve on the basis of some measured parameters: error rates, detection rates, and others. These parameters and the way of measuring them define the protocol. Let us refer to them as $\mathbf{V}$ measured value of the parameters.

Let $N$ be total number of signals exchanged by Alice and Bob in a run of key exchange, $n$ the number of signals kept for the key (i.e. the length of the raw key) and $m$ the number of signals used for parameter estimation. The length of the secret key to be extracted is denoted by $\ell$. The usually quoted number is the *secret key fraction* $r=\frac{\ell}{N}$.

It is important to note from the start that a *run of key exchange* is defined as the number of signals that shall be processed together: obviously, the duration of the key exchange cannot increase its security. In all this text, I focus on one-way post-processing without pre-processing, so specifically a run is defined by the size of the blocks on which privacy amplification is performed.

In the asymptotic limit, the expression of $r$ is by now well-known: $$\begin{aligned}
r_{\infty}&=&\lim_{N\rightarrow\infty}\frac{\ell}{N}\,=\,\min_{E|\mathbf{V}}H(A|E)-H(A|B)\label{rinf}
\end{aligned}$$ It has an intuitive meaning: the fraction that can be extracted is the uncertainty of Eve minus the uncertainty of Bob (or equivalently, the information of Bob minus the information of Eve) on Alice's key.

The finite-key bound, to be proved below, reads $$\begin{aligned}
r_{N}&=&\frac{\ell}{N}\,=\,\frac{n}{N}\left[\min_{E|\mathbf{V\pm\Delta V}}H(A|E)-\Delta(n)-\textrm{leak}_{EC}/n\right]\,.\label{rfinite}
\label{finitebound}
\end{aligned}$$ Four differences between () and () are worth stressing:

1.  $\frac{n}{N}$: in the asymptotic case, the protocol can be adapted so that almost all the signals are used for the raw key and only a negligible fraction is used for parameter estimation . This is of course no longer the case in the finite-key regime: one needs to devote enough many signals to parameter estimation in order to have good statistics.

2.  $V\pm\Delta V$: the statistical estimates of the parameters come with fluctuations for finite sampling.

3.  $\textrm{leak}_{EC}$: this is the information that leaks out to Eve during error correction; in the asymptotic case, it is given by the Shannon bound $H(A|B)$, but for practical codes on finite samples the Shannon bound may not be reached.

4.  $\Delta(n)$: while the three previous items are pretty obvious and and had in fact been anticipated in many works, both theoretical and experimental, this term is the challenging one. It comes as an overhead to privacy amplification: the task itself cannot be carried out perfectly on finite samples.

In summary, the theoretical challenge of finite-key analysis mainly consists of obtaining an expression for $\Delta(n)$. As we shall show, once this expression is obtained, one can study which of the corrections has the largest effect; it will turn out that the most dramatic correction comes from the "obvious" need to take into account $\Delta V$, the statistical fluctuations in the estimate of the parameters.

# Derivation of the finite-key bound

## Scenario

The following equation summarizes the steps of a QKD exchange: $$\begin{aligned}
\Phi_{AB}^{\otimes N}\,\stackrel{\mathrm{Eve}}{\longrightarrow}\, \Psi_{A^NB^NE}&\stackrel{\mathrm{Meas.}}{\longrightarrow}&\sum_{\underline{a},\underline{b}\in\{0,1\}^n} p(\underline{a},\underline{b})\mbox{$ | \underline{a} \rangle $}\mbox{$ \langle \underline{a} | $}\otimes \mbox{$ | \underline{b} \rangle $}\mbox{$ \langle \underline{b} | $}\otimes \rho_E^{\underline{a},\underline{b}}\;\textrm{ and parameters }\mathbf{V}\\
& \stackrel{\mathrm{EC}}{\longrightarrow}& \sum_{\underline{a}\in\{0,1\}^n} p(\underline{a})\mbox{$ | \underline{a} \rangle $}\mbox{$ \langle \underline{a} | $}\otimes \mbox{$ | \underline{a} \rangle $}\mbox{$ \langle \underline{a} | $}\otimes \rho_{{\cal E}}^{\underline{a}}\\
& \stackrel{\mathrm{PA(\mathbf{V})}}{\longrightarrow}& \Big(\sum_{\underline{k}\in\{0,1\}^\ell} \frac{1}{2^\ell}\mbox{$ | \underline{k} \rangle $}\mbox{$ \langle \underline{k} | $}\otimes \mbox{$ | \underline{k} \rangle $}\mbox{$ \langle \underline{k} | $}\Big)\otimes \rho_{{\cal E}}
\,\,\equiv \rho_U\otimes\rho_{{\cal E}}\,.
\end{aligned}$$ In words: on the quantum channel, Eve interacts with the $N$ signals flying between Alice and Bob; by giving Eve a purification of the whole state, we give her the maximal possible information. When Alice and Bob measure, the total state becomes a classical-classical-quantum (ccq) state. After error correction (EC), Alice's and Bob's classical lists are equal, but Eve has gained some additional classical information: $\rho_{{\cal E}}^{\underline{a}}=\sum_{\underline{b}}p(\underline{b}|\underline{a})\rho_E^{\underline{a},\underline{b}}\otimes\mbox{$ | C(\underline{b}\rightarrow\underline{a}) \rangle $}\mbox{$ \langle C(\underline{b}\rightarrow\underline{a}) | $}$. After privacy amplification (PA), the lists of Alice and Bob are shorter, but still equal and now drawn from a completely random distribution, on which Eve has no information.

This is for the ideal case. In order to estimate $\ell$, the first step consists in defining a security parameter. The most convenient choice, actually the only one with the suitable properties known to date (see for a discussion), is the *probability that the processed state differs from the ideal one*: $$\begin{aligned}
\epsilon&=&\frac{1}{2}\,\textrm{Tr}\left|\rho_{KE}-\rho_U\otimes\rho_E\right|\,.
\end{aligned}$$ So, now we choose a value for $\epsilon$ (say $10^{-9}$, i.e. I want at most one run in one billion to go wrong), our data processing defines $N$: how to get the corresponding $\ell$? This is the subject of the next paragraph.

## Renner's version of Murphy's law

The recipe is: quantify everything that can go wrong, going backwards, i.e. starting from PA and going up to parameter estimation. Here is what it gives in detail:

1.  First step: **Privacy amplification**. The probability that PA fails even if everything has been perfectly carried out is $$\begin{aligned}
    \epsilon_{PA}&=& 2^{-\frac{1}{2}\left(H_{min}^{\bar{\epsilon}}(A^n|{\cal E})-\ell\right)}\,.\label{epa}
    \end{aligned}$$ As usual, for the proof and the exact definitions I refer to the original papers quoted above. Let us however get an intuition of this result. The symbol ${\cal E}$ represent all that Eve has learned, both from attacking the quantum channel and from listening to error correction. Alice's information is denoted by $A^n$ to remind that it is a sequence of $n$ bits. The main object introduced here is $H_{min}^{\bar{\epsilon}}(.|.)$ is the quantum conditional *smooth min-entropy*, with ${\bar{\epsilon}}$ the smoothing parameter. It is not astonishing that a min-entropy appears here: as we said above, the final key should be randomly distributed given Eve's knowledge. In classical information theory, the min-entropy precisely quantifies the fraction of completely random bits one can extract from a given list of partially random bits. The challenge consisted in defining the quantity that plays the same role, in the case where an adversary has quantum information. This was done in Renner's thesis . So, in a sense, () can be seen as a definition of smooth min-entropy, or better, as one of the desiderata: the smooth min-entropy must be such that () holds.

    Now, for the right-hand side of () to be bounded, one must have $$\begin{aligned}
    \ell\,\leq\, H_{min}(A^n|{\cal E})-2\log\frac{1}{\epsilon_{PA}}\,.
    \end{aligned}$$ It is crucial to understand that this is *already* the desired bound for $\ell$. Unfortunately, there is no easy way of computing $H_{min}(A^n|{\cal E})$: the next steps will be merely bound on this last quantity, reaching to an ultimately computable expression.

2.  Second step: **error correction**. First, we have to add an $\epsilon_{EC}$ to the failure probability $\epsilon$. This measures the probability that the EC procedure was apparently successful but some uncorrected errors remain[^2]. Moreover, as we said, during EC, additional data $C$ has been provided to Eve, giving an amount of information $\textrm{leak}_{EC}$; by using a chain rule, one can split this information from the one acquired in attacking the quantum channel, denoted by $E$. So we obtain the expression $$\begin{aligned}
    H_{min}(A^n|{\cal E})&=&H_{min}(A^n|E)-\textrm{leak}_{EC}\,.
    \end{aligned}$$ Theory predicts $\textrm{leak}_{EC}\approx fH_0(A^n|B^n)+\log\frac{2}{\epsilon_{EC}}$, but ultimately this is number of bits *really* exchanged during EC: it does not need theoretical modeling (unless one is working on designing a better EC code), just pick it from the real run of the EC code.

3.  Third step: **Eve's attack on the quantum channel**. Now we are back at the level of quantum interaction and we have to compute $H_{min}(A^n|E)$: how much information Eve might have acquired, given the observed disturbances $\textbf{V}$. Under the assumption of collective attacks, one finds $$\begin{aligned}
    H_{min}(A^n|E=E^n)&\leq& n\left[H(A|E)-7\sqrt{\frac{\log(2/\bar{\epsilon})}{n}}\right]\,.
    \end{aligned}$$ The assumption of collective attacks is not restrictive for the Bennett-Brassard 1984 (BB84) protocol and many others, under the validity of the squashing condition[^3]. In order to remove this assumption, one could resort to the suitable De Finetti theorem, but the bound scales very badly. A much more promising approach is based on Ref. , but to my knowledge it has not been applied yet in the context of finite-keys.

4.  Fourth step: **Optimize over Eve's attacks**. Since we don't know which attack Eve has actually performed, $H(A|E)$ must be computed for the best possible attack compatible with the measured parameters $\mathbf{V}$. But these parameters have been measured on a finite sample: they are subject to fluctuations $\mathbf{\Delta V}$. Specifically, if a value $V_m$ has been obtained after averaging on $m$ samples, one has[^4] $$\begin{aligned}
    \Delta V&=&\sqrt{\frac{\ln(1/\epsilon_{PE})+d\ln(m+1)}{2m}}\,.\label{deltav}
    \end{aligned}$$ with $\epsilon_{PE}$ the probability that the fluctuation is actually larger than $\Delta V$ and $d$ the minimal number of outcomes of the POVM that is used to estimate $V$ (typically, $d=2$ for errors on bits: one has to estimate the probabilities of the event "bits equal" and of the event "bits different").

Putting everything together, one obtains () with $$\begin{aligned}
\Delta(n)&=&\frac{2}{n}\log\frac{1}{\epsilon_{PA}}+7\sqrt{\frac{\log(2/\bar{\epsilon})}{n}}\,. \label{deltan}
\end{aligned}$$Since failure probabilities add, the total error is $$\begin{aligned}
\epsilon&=& \epsilon_{PA}+\bar{\epsilon}+n_{PE}\epsilon_{PE}+\epsilon_{EC}
\end{aligned}$$with $n_{PE}$ the number of parameters to be estimated.

This concludes our overview of the meaning and derivation of the finite-key bound (). As we mentioned, there are alternative approaches : as they stand, these approaches are specifically tailored for the BB84 protocol; but there is no reason to doubt that they can be adapted to other protocols as well.

# Rapid estimates of finite key effects

To date, the bound () has been applied to the BB84 protocol, both in the ideal single photon case and in more realistic scenarios , as well as to ideal implementations of the six-state protocol and of a modified Ekert protocol . In spite of the differences and for a wide range of reasonable values of parameters, a common feature is observed: $r_N$ becomes larger than 0 only for $N\approx 10^5-10^6$. Here, we show with a simple estimate that this is indeed the case.

We suppose that all epsilons are of the order $10^{-3}\approx 2^{-10}$. This is quite a poor requirement: it means that the key exchange may fail once every thousand runs only; but anyway, one would only get a small overhead by choosing $10^{-9}$ instead, because the dependence in the epsilons is logarithmic.

Another useful approximation is $m\approx n\approx N/2$. Close to the critical point where $r_N$ passes from being 0 to be positive, this is always observed in exact numerical estimates of (), and it is quite reasonable: in the critical regime, one tries to devote enough many signals to the parameter estimation, without compromising the key.

Under these two assumption, we have the following approximate values for () and () respectively: $$\begin{aligned}
\Delta(n)\approx \frac{40}{N}+7\sqrt{\frac{12}{N}} &\textrm{ , }& \Delta V\approx\sqrt{\frac{9+2\ln(N)}{N}}\,.
\end{aligned}$$Let's consider two case studies:

1.  **Case study: effect of $\Delta(n)$**. Suppose we are in a regime of parameters such that $r_\infty=0.1$. Neglecting the parameter fluctuations $\Delta V$, from () one has $r_N\approx r_\infty-\Delta(n)$. This quantity is positive for $N\approx 10^5$. Of course, the estimate becomes worse, the smaller $r_\infty$ is (for instance, as a function of the distance in a practical implementation). In summary, the finite-sample corrections to privacy amplification force a lower bound of $N\approx 10^5$ signals per run.

2.  **Case study: effect of $\Delta V$**. Consider $V$ as the most typical parameter in QKD, namely an error rate. Because of the quality of optical setups, errors normally range around $1-2\%$. At which point $r_N$ is zero depends on many variables and of course on the protocol, so we cannot be very specific here. But if one requests that error rates are known to a precision $\Delta V\approx 0.5\%$, one needs $N\approx 10^6$ signals per run.

From these case studies, we see how the estimate $N> 10^5-10^6$ arise from quite trivial estimates of the finite-key effects, independently of the details of the protocols.

# Conclusion

Claims of security of QKD could not be complete without integrating the effects of finite sampling, or finite-key in short. Thanks to the work of several authors, this task has now been accomplished. One of the most striking features is the fact that, to have any final key whatsoever, approximately one million signals must be processed in each run — and the more, the better. In this text, after reviewing the main ingredients of the finite-key bounds, I have stressed that the lower bounds on the number of signals can be obtained from very simple estimates and are therefore rather robust. While the performances of QKD may still be improved in many aspects, it seems unavoidable that QKD will always be a *million-signal task*; or, to put it more positively, I would consider it as a milestone if someone could find a way of improving significantly on these bounds.

# Acknowledgements

I thank all the participants to the workshop "Quantum cryptography with finite resources" (Singapore, 4-6 December 2008) for very valuable comments and queries. This work was supported by the National Research Foundation and the Ministry of Education, Singapore.

[^1]: Corresponding Author: Centre for Quantum Technologies, 3 Science Drive 2, Singapore 117543. E-mail: firstname.lastname@example.com.

[^2]: This may sound cumbersome at first reading, but it is actually clear. Any EC procedure has a possible red-flag outcome: "Sorry, the procedure was not successful". In this case, one just discards the raw key, without compromising the security. Problems arise only when there are still uncorrected errors left but the red flag is not raised.

[^3]: This condition means that one can prove the security of a protocol on the level of qubits, even if physically light fields are infinitely dimensional systems. In other words, one can "squash" the meaningful degrees of freedom down to qubits. This statement has been rigorously proved for the BB84 protocol .

[^4]: Note added: the following equation is imprecise for $d>2$: see a better discussion in L. Sheridan and V. Scarani, Phys. Rev. A **82**, 030301(R) (2010).


abstract: Predicting stock market movements is a well-known problem of interest. Now-a-days social media is perfectly representing the public sentiment and opinion about current events. Especially, twitter has attracted a lot of attention from researchers for studying the public sentiments. Stock market prediction on the basis of public sentiments expressed on twitter has been an intriguing field of research. Previous studies have concluded that the aggregate public mood collected from twitter may well be correlated with Dow Jones Industrial Average Index (DJIA). The thesis of this work is to observe how well the changes in stock prices of a company, the rises and falls, are correlated with the public opinions being expressed in tweets about that company. Understanding author's opinion from a piece of text is the objective of sentiment analysis. The present paper have employed two different textual representations, Word2vec and N-gram, for analyzing the public sentiments in tweets. In this paper, we have applied sentiment analysis and supervised machine learning principles to the tweets extracted from twitter and analyze the correlation between stock market movements of a company and sentiments in tweets. In an elaborate way, positive news and tweets in social media about a company would definitely encourage people to invest in the stocks of that company and as a result the stock price of that company would increase. At the end of the paper, it is shown that a strong correlation exists between the rise and falls in stock prices with the public sentiments in tweets.
author:
;
;
;
title: Sentiment Analysis of Twitter Data for
  Predicting Stock Market Movements

**Keywords: Sentiment Analysis, Natural Language Processing, Stock market prediction, Machine Learning, Word2vec, N-gram**

# Introduction

Earlier studies on stock market prediction are based on the historical stock prices. Later studies have debunked the approach of predicting stock market movements using historical prices. Stock market prices are largely fluctuating. The efficient market hypothesis (EMH) states that financial market movements depend on news, current events and product releases and all these factors will have a significant impact on a company's stock value . Because of the lying unpredictability in news and current events, stock market prices follow a random walk pattern and cannot be predicted with more than 50% accuracy .

With the advent of social media, the information about public feelings has become abundant. Social media is transforming like a perfect platform to share public emotions about any topic and has a significant impact on overall public opinion. Twitter, a social media platform, has received a lot of attention from researchers in the recent times. Twitter is a micro-blogging application that allows users to follow and comment other users thoughts or share their opinions in real time . More than million users post over 140 million tweets every day. This situation makes Twitter like a corpus with valuable data for researchers .Each tweet is of 140 characters long and speaks public opinion on a topic concisely. The information exploited from tweets are very useful for making predictions .

In this paper, we contribute to the field of sentiment analysis of twitter data. Sentiment classification is the task of judging opinion in a piece of text as positive, negative or neutral.

There are many studies involving twitter as a major source for public-opinion analysis. Asur and Huberman  have predicted box office collections for a movie prior to its release based on public sentiment related to movies, as expressed on Twitter. Google flu trends are being widely studied along with twitter for early prediction of disease outbreaks. Eiji et al.  have studied the twitter data for catching the flu outbreaks. Ruiz et al.  have used time-constrained graphs to study the problem of correlating the Twitter micro-blogging activity with changes in stock prices and trading volumes. Bordino et al.   have shown that trading volumes of stocks traded in NASDAQ-100 are correlated with their query volumes (i.e., the number of users requests submitted to search engines on the Internet). Gilbert and Karahalios  have found out that increases in expressions of anxiety, worry and fear in weblogs predict downward pressure on the S&P 500 index. Bollen  showed that public mood analyzed through twitter feeds is well correlated with Dow Jones Industrial Average (DJIA). All these studies showcased twitter as a valuable source and a powerful tool for conducting studies and making predictions.

Rest of the paper is organized as follows. Section 2 describes the related works and Section 3 discusses the data portion demonstrating the data collection and pre-processing part. In Section 4 we discuss the sentiment analysis part in our work followed by Section 5 which examines the correlation part of extracted sentiment with stocks. In Section 6 we present the results, accuracy and precision of our sentiment analyzer followed by the accuracy of correlation analyzer. In Section 7 we present our conclusions and Section 8 deals with our future work plan.

# Related Work

The most well-known publication in this area is by Bollen . They investigated whether the collective mood states of public (Happy, calm, Anxiety) derived from twitter feeds are correlated to the value of the Dow Jones Industrial Index. They used a Fuzzy neural network for their prediction. Their results show that public mood states in twitter are strongly correlated with Dow Jones Industrial Index. Chen and Lazer  derived investment strategies by observing and classifying the twitter feeds. Bing et al.  studied the tweets and concluded the predictability of stock prices based on the type of industry like Finance, IT etc. Zhang  found out a high negative correlation between mood states like hope, fear and worry in tweets with the Dow Jones Average Index. Recently, Brian et al.  investigated the correlation of sentiments of public with stock increase and decreases using Pearson correlation coefficient for stocks. In this paper, we took a novel approach of predicting rise and fall in stock prices based on the sentiments extracted from twitter to find the correlation. The core contribution of our work is the development of a sentiment analyzer which works better than the one in Brian's work and a novel approach to find the correlation. Sentiment analyzer is used to classify the sentiments in tweets extracted.The human annotated dataset in our work is also exhaustive. We have shown that a strong correlation exists between twitter sentiments and the next day stock prices in the results section. We did so by considering the tweets and stock opening and closing prices of Microsoft over a year.

# Data Collection and Preprocessing

## Data Collection

A total of 2,50,000 tweets over a period of August 31st, 2015 to August 25th,2016 on Microsoft are extracted from twitter API . Twitter4J is a java application which helps us to extract tweets from twitter. The tweets were collected using Twitter API and filtered using keywords like \$ MSFT, \# Microsoft, \#Windows etc. Not only the opinion of public about the company's stock but also the opinions about products and services offered by the company would have a significant impact and are worth studying. Based on this principle, the keywords used for filtering are devised with extensive care and tweets are extracted in such a way that they represent the exact emotions of public about Microsoft over a period of time. The news on twitter about Microsoft and tweets regarding the product releases were also included. Stock opening and closing prices of Microsoft from August 31st, 2015 to August 25th, 2016 are obtained from Yahoo! Finance .

## Data Pre-Processing

Stock prices data collected is not complete understandably because of weekends and public holidays when the stock market does not function. The missing data is approximated using a simple technique by Goel . Stock data usually follows a concave function. So, if the stock value on a day is x and the next value present is y with some missing in between. The first missing value is approximated to be (y+x)/2 and the same method is followed to fill all the gaps.

Tweets consists of many acronyms, emoticons and unnecessary data like pictures and URL's. So tweets are preprocessed to represent correct emotions of public. For preprocessing of tweets we employed three stages of filtering: Tokenization, Stopwords removal and regex matching for removing special characters.

### Tokenization

Tweets are split into individual words based on the space and irrelevant symbols like emoticons are removed. We form a list of individual words for each tweet.

### Stopword Removal

Words that do not express any emotion are called Stopwords. After splitting a tweet, words like a,is, the, with etc. are removed from the list of words.

### Regex Matching for special character Removal

Regex matching in Python is performed to match URL's and are replaced by the term URL. Often tweets consists of hashtags(#) and @ addressing other users. They are also replaced suitably. For example, \#Microsoft is replaced with Microsoft and @Billgates is replaced with USER. Prolonged word showing intense emotions like coooooooool! is replaced with cool! After these stages the tweets are ready for sentiment classification.

```latex
\begin{table*}[h]\centering
\caption{Sample tweets sentiment labeling by the model}
\label{my-label}
\begin{tabular}{|l|l|}
\hline
I'm really excited that today is my first day at @Microsoft as a Technical Evangelist                                                         & 1 \\ \hline
Ultrabooks in the mainstream ($AAPL iPad Pro in contention) | $ MSFT                                                                          & 1 \\ \hline
About the Surface team, it's one of the most secret team at @Microsoft , except VPs, no one knows what they do, so don't expect leaks ;)      & 1 \\ \hline
We broke all your devices, we force you to update whenever we want, and we spy on you all the time. Happy Anniversary!" - @microsoft          & 0 \\ \hline
My grandfather, a depression era company man, hated that \$ MSFT didn't pay dividends (90s). I never could explain "new" idea of growth/cash. & 2 \\ \hline
Thanks @Microsoft , delivered my Surface Pro 3 power plug to a newsagents 20 miles from my home with no notification.                         & 0 \\ \hline
10 swift lessons. My post on @SwiftKey @Microsoft @georgewhitehead @OctopusVentures @IndexVentures @Accel                                     & 0 \\ \hline
@Microsoft Acquires MinecraftEdu, Tailored for Schools http:// nyti.ms/1U9a1oV (via: @nytimesbusiness                                         & 0 \\ \hline
My surface's touchscreen stopped working... I have homework... @Microsoft expand your customer service hours please                           & 0 \\ \hline
MSFT trailing revenues are declining since 2015, net income is up thanks to higher margins                                                    & 2 \\ \hline
\end{tabular}
\end{table*}
```

# Sentiment Analysis

Sentiment analysis task is very much field specific. There is lot of research on sentiment analysis of movie reviews and news articles and many sentiment analyzers are available as an open source. The main problem with these analyzers is that they are trained with a different corpus. For instance, Movie corpus and stock corpus are not equivalent. So, we developed our own sentiment analyzer.
Tweets are classified as positive, negative and neutral based on the sentiment present . 3,216 tweets out of the total tweets are examined by humans and annotated as 1 for Positive, 0 for Neutral and 2 for Negative emotions. For classification of nonhuman annotated tweets a machine learning model is trained whose features are extracted from the human annotated tweets.

## Feature Extraction

Textual representations are done using two methods:n-grams and Word2vec

### N-gram Representation

N-gram representation is known for its specificity to match the corpus of text being studied. In these techniques a full corpus of related text is parsed which are tweets in the present work, and every appearing word sequence of length n is extracted from the tweets to form a dictionary of words and phrases. For example the text "Microsoft is launching a new product" has the following 3-gram word features:"Microsoft is launching", "is launching a", "launching a new" and "a new product". In our case, N-grams for all the tweets form the corpus. In this representation, tweet is split into N-grams and the features to the model are a string of 1's and 0's where 1 represents the presence of that N-gram of the tweet in the corpus and a 0 indicates the absence.

### Word2vec Representation

Word2vec representation is far better, advanced and a recent technique which functions by mapping words to a 300 dimensional vector representations. Once every word of the language has been mapped to a unique vector, vectors of words can be summed up yielding a resultant vector for any given collection of words . Relationship between the words is exactly retained in this form of representation. Word vectors difference between Rome and Italy is very close to the difference between vectors of France and Paris This sustained relationship between word concepts makes word2vec model very attractive for textual analysis. In this representation, resultant vector which is sum of 300 dimensional vectors of all words in a tweet acts as features to the model.

## Model Training

The features extracted using the above methods for the human annotated tweets are fed to the classifier and trained using random forest algorithm. Both the textual representations performed well and the results are comparable. Out of the two, model trained with word2vec representation is picked because of its sustainability of meaning and promising performance over large datasets. The results of sentiment classification are discussed in the following sections. The devised classifier is used to predict the emotions of non-human annotated tweets. Table-1 shows a sample of annotated tweets by the sentiment analyzer.

```latex
\begin{table*}[h]\centering
\caption{Sentiment Analysis Results}
\label{my-label}
\begin{tabular}{|l|l|l|l|l|l|l|l|l|}
\hline
\multirow{2}{*}{\begin{tabular}[c]{@{}l@{}}Machine Learning\\ Algorithm\end{tabular}} & \multicolumn{4}{c|}{Word2vec}             & \multicolumn{4}{c|}{N-gram}               \\ \cline{2-9}
                                                                                & Accuracy & Precision & Recall & F-Measure & Accuracy & Precision & Recall & F-Measure \\ \hline
Random Forest                                                                         & 70.18\%  & 0.711     & 0.702  & 0.690     & 70.49\%  & 0.719     & 0.705  & 0.694     \\ \hline
Logistic Regression                                                                   & 62.42\%  & 0.621     & 0.624  & 0.621     & 57.14\%  & 0.580     & 0.571  & 0.574     \\ \hline
SMO                                                                                & 62.42\%  & 0.617     & 0.624  & 0.618     & 65.84\%  & 0.658     & 0.658  & 0.657     \\ \hline
\end{tabular}
\end{table*}
```

# Correlation Analysis of Price and Sentiment

The stock price data of Microsoft are labeled suitably for training using a simple program. If the previous day stock price is more than the current day stock price, the current day is marked with a numeric value of 0, else marked with a numeric value of 1. Now, this correlation analysis turns out to be a classification problem. The total positive, negative and neutral emotions in tweets in a 3 day period are calculated successively which are used as features for the classifier model and the output is the labeled next day value of stock 0 or 1.The window size is experimented and best results are achieved when the sentiment values precede 3 days to the stock price. A total of 355 instances, each with 3 attributes are fed to the classifier with a split proportions of 80% train dataset and the remaining dataset for testing. The accuracy of the classifier is discussed in the results section.

# Results and Discussion

This section gives an overview of accuracy rates of the trained classifiers. All the calculations are done in Weka tool which runs on java virtual machine

## Sentiment Analyzer Results

The above sections discussed the method followed to train the classifier used for sentiment analysis of tweets. The classifier with features as Word2vec representations of human annotated tweets trained on Random Forest algorithm with a split percentage of 90 for training the model and remaining for testing the model showed an accuracy of 70.2%. With N-gram representations, the classifier model with same algorithm and with same dataset showed an accuracy of 70.5%. Though the results are very close, model trained with word2vec representations is picked to classify the nonhuman annotated tweets because of its promising accuracy for large datasets and the sustainability in word meaning. Numerous studies have been conducted on people and they concluded that the rate of human concordance, that is the degree of agreement among humans on the sentiment of a text, is between 70% and 79% . They have also synthesized that sentiment analyzers above 70% are very accurate in most of the cases. Provided this information, the results we obtained from the sentiment classification can be observed as very good figures while predicting the sentiments in short texts, tweets, less than 140 characters in length. Table-2 depicts the results of sentiment classification including accuracy, precision, F-measure and recall when trained with different machine learning algorithms. ROC curves are plotted for detailed analysis.

## Stock Price and Sentiment Correlation Results

A classifier is presented in the previous sections that is trained with aggregate sentiment values for 3-day period as features and the increase/decrease in stock price represented by 1/0 as the output. Total data is split into two parts, 80 percent to train the model and remaining for testing operations. The classifier results show an accuracy value of 69.01% when trained using Logistic regression algorithm and the accuracy rate varied with the training set. When the model with LibSVM is trained with 90 percent of data, it gave a result of 71.82%. These results give a significant edge to the investors and they show good correlation between stock market movements and the sentiments of public expressed in twitter. This trend shows that with increasing dataset the models are performing well. We would like to incorporate more data in our future work.

# Conclusion

In this paper, we have shown that a strong correlation exists between rise/fall in stock prices of a company to the public opinions or emotions about that company expressed on twitter through tweets. The main contribution of our work is the development of a sentiment analyzer that can judge the type of sentiment present in the tweet. The tweets are classified into three categories: positive, negative and neutral. At the beginning, we claimed that positive emotions or sentiment of public in twitter about a company would reflect in its stock price. Our speculation is well supported by the results achieved and seems to have a promising future in research.

# Future Work

In this work, we have considered only twitter data for analyzing people's sentiment which may be biased because not all the people who trade in stocks share their opinions on twitter. Stocktwits  is a financial communication platform designed solely for sharing ideas and insights of investors, entrepreneurs and traders. The current study can be extended by incorporating stocktwits data. In addition to this, data from news can also be included for an exhaustive public opinion collection.
While training the sentiment analyzer, 3,216 tweets are used which is comparatively a less number to train a sentiment analyzer. In future, we look forward to human annotate more than 10,000 tweets and train the classifiers. With increasing size of training datasets, the models tend to perform better.

# Acknowledgment

The authors would like to thank the students of IIT Bhubaneswar who contributed to the human annotation of tweets.


abstract: Cosmological models with cold dark matter composed of weakly interacting particles predict overly dense cores in the centers of galaxies and clusters and an overly large number of halos within the Local Group compared to actual observations. We propose that the conflict can be resolved if the cold dark matter particles are self-interacting with a large scattering cross-section but negligible annihilation or dissipation. In this scenario, astronomical observations may enable us to study dark matter properties that are inaccessible in the laboratory.
author: David N. Spergel and Paul J. Steinhardt
Princeton University, Princeton NJ 08544 USA
title: Observational evidence for self-interacting cold dark matter

Flat cosmological models with a mixture of ordinary baryonic matter, cold matter, and cosmological constant (or quintessence) and a nearly scale-invariant, adiabatic spectrum of density fluctuations are consistent with standard inflationary cosmology and provide an excellent fit to current observations on large scales ($\gg 1$ Mpc). However, an array of observations on galactic and subgalactic scales ($\le$ few Mpc) appears to conflict with the structure formation predicted by analytical calculations and numerical simulations. The predictions are based on the standard view of cold dark matter as consisting of particles with weak self-interactions, as well as weak interactions with ordinary matter.

A generic prediction for weakly self-interacting dark matter, independent of other details of the cosmological model, is that cold dark matter forms triaxial halos with dense cores and significant dense substructures within the halo. Yet, lensing observations of clusters reveal central regions (roughly galactic scale) with nearly spherical low density cores. Dwarf irregular galaxies appear to have low density cores with much shallower profiles than predicted in numerical simulations . The persistence of bars in high surface brightness galaxies imply that galaxies like our own Milky Way also have low density cores . Observations of the Local Group reveal less than one hundred galaxies , while numerical simulations and analytical theory predict that there should be roughly one thousand discrete dark matter halos within the Local Group.

In this paper, we propose that the inconsistencies with the standard picture may be alleviated if the cold dark matter is self-interacting with a large scattering cross-section but negligible annihilation or dissipation. The key feature is that the mean free path should be in the range 1 kpc to 1 Mpc at the solar radius, where the dark matter density is about 0.4 GeV/cm$^3$. The large scattering cross-section may be due to strong, short-range interactions, similar to neutron-neutron scattering at low-energies, or weak interactions mediated by the exchange of light particles (although not so light as to produce a long-range force). Depending on the interaction and the mean free path, the requisite mass for the dark matter is in the range 1 MeV to 10 GeV. For the purposes of our proposal, only two-body scattering effects are important so either repulsive or attractive interactions are possible. Exchanged particles should be massive enough that they are not radiated by the scattering of dark matter particles in the halo.

We are led to consider self-interactions because ordinary astrophysical processes are unlikely to resolve the problems with standard, weakly interacting dark matter. Consider the dwarf galaxy problem. One might suppose that supernova explosions could cause the galactic core density to be made smoother; but, while the explosions suppress star formation in dwarf galaxies, numerical simulations find that starbursts in dwarfs are very inefficient at removing gas or matter from the core. One might also consider whether the apparent overabundance of halos found in simulations can be explained if the low velocity halos form primarily low surface brightness galaxies, which are difficult to find. However, while low brightness galaxy surveys suggest a steeper luminosity function outside of groups, even these surveys do not find enough small galaxies to eliminate the discrepancy between theory and observations. If star formation in dwarfs is sufficiently suppressed, then they should have been detected as gas clouds in the local group or external systems. HI surveys do not find large numbers of small isolated gas clouds. Even if any of the processes were successful in reducing the number of visible dwarfs, the dense small halos would still persist. When these halos fall onto galactic disks, they will heat the stellar disks and destroy them. These dense halos will also settle to the centers of the central halo and produce a high density core in galaxies and clusters. Since the baryon fraction in the centers of low surface brightness galaxies is low, hydrodynamic processes are not likely to alter their dark matter profiles.

The success of the cold dark matter model on large scales suggests that a modification of the dark matter properties may be the best approach for resolving the problems on small scales. If the dark matter is not cold, but warm (moderately relativistic), this alleviates some of these discrepancies. However, the remarkably good agreement between standard cold dark matter (CDM) models and the observed power spectrum of Lyman $\alpha$ absorbers likely rules out warm dark matter candidates.

We propose that a better resolution is dark matter that is cold, non-dissipative, but self-interacting. There are stringent constraints on the interactions between dark matter and ordinary matter and on long range forces between dark matter particles. However, as long as the dark matter annihilation cross-section is much smaller than the scattering cross-section, there are relatively few constraints on short-range dark matter self-interactions. Carlson, Machacek & Hall suggested a self-interacting dark matter model in which the dark matter particle is warm rather than cold. Their model assumed that the dark matter plus ordinary matter sum to the critical density predicted by inflationary cosmology. Their purpose was to reduce the power on 10 Mpc scales in the dark matter mass spectrum as required if the normalization of the spectrum is to agree fluctuations measured by the COBE satellite. Subsequently, de Laix *et al.* pointed out that the alteration cannot simultaneously fit the IRAS power spectrum and the observed properties of galaxies. Our proposal does not suffer from this problem because we assume a cosmological model with a low matter density and a cosmological constant (or quintessence) which satisfies the COBE constraint without self-interactions. Our proposed self-interactions do not change structure on the 10 Mpc scale but only on the 1 kpc scale. Consequently, our model satisfies the constraints raised by de Laix *et al.*

To be more specific, we suggest that the dark matter particles should have a mean free path between $\sim$ 1 kpc to 1 Mpc at the solar radius in a typical galaxy (mean density 0.4 GeV/cm$^3$), for reasons to be explained below. For a particle of mass $m_x$, this implies an elastic scattering cross-section of $$\sigma_{XX} = 8.1 \times 10^{-25} \, {\rm cm}^{2}
\left(\frac{m_x}{\rm GeV}\right)
     \left(\frac{\lambda}{ 1 {\rm Mpc}}\right)^{-1},$$ intriguingly similar to that of an ordinary hadron. (In this paper, we consider the case of dark matter particles scattering only from themselves but, in a forthcoming paper, we consider the possibility that dark matter is a stable, neutral hadron.) If the dark matter particles scatter through strong interactions similar to low-energy neutron-neutron scattering, then the cross-section is $\sigma = 4 \pi a^2$, where $a$ is the scattering length. For neutrons, the scattering length is more than 100 times its Compton wavelength. Using the estimate $a \approx  100 f m_x^{-1}$, we obtain $$m_x =  4 \left(\frac{\lambda}{ 1 {\rm Mpc}}\right)^{1/3} f^{2/3} \, GeV.$$ Alternatively, the self-interaction may be weak but longer-range, as in the case of the exchange of a light intermediate vector boson of mass $m_y$, in which case the cross-section is $\sigma \approx \alpha_y m_x^2/m_y^4$. The mass of the vector boson must be large enough that there is no dissipation when dark matter particles scatter; this requires that $m_y >  450 \, {\rm eV} \,  (m_x/GeV)(v/200 km/s)^2$, where $v$ is the typical velocity of dark matter particles in the halo. This mass scale for $m_y$ corresponds to a force that is short-range compared to the dark matter interparticle spacing (about 1 cm in the halo). Hence, we need only consider two-body interactions in our analysis. If $m_y = g m_x$ and $\alpha_y =O(1)$, then the maximum dark matter mass is $$m_x < 80 \left(\frac{\lambda}{ 1 {\rm Mpc}}\right)^{1/3} g^{-4/3} \, MeV.$$ Beyond what is expressed in the relations above, there is no significant constraint on how light the dark matter particles can be.

The strong self-interaction might occur if the dark matter consists of particles with a conserved global charge (such as a hidden baryon number) interacting through a hidden gauge group (*e.g.*, hidden color). If the gauge group is unbroken, then the particles experience strong interactions which can be non-dissipative but the particle number is conserved. M-theory and superstrings, for example, suggest the possibility that dark matter fields reside on domain walls with gauge fields separated from ordinary matter by an extra (small) dimension. Similar scenarios can be constructed in purely four-dimensional supergravity models. Note that, if the sum of the hidden baryon number and the ordinary sector baryon number is zero, then $\Omega_{x} = (m_x/m_{proton})
\Omega_{b} \simeq 0.19  \, (m_x/4 {\rm GeV})$ (using $\Omega_b h^2
= 0.02$ and $h=0.65$). The particles we suggest include light versions of WIMPZILLAS and Q-balls.

How does the mean free path of the dark matter particles affect astrophysics? Since interactions only alter the evolution of cold dark matter when the density inhomogeneities are large, the cosmic microwave background (CMB) and large-scale power spectrum measurements are not sensitive to the self-interactions. So long as the dark matter is cold ($T_{x} /m_{x}<\Phi$, where $\Phi$ is the depth of the gravitational potential), the dark matter will collapse to form a bound halo regardless of its collisional properties. If the dark matter mean path were much longer than $\sim$ 1 Mpc, the typical dark matter particle would not experience any interactions as it moves through a halo. In this regime, the usual, triaxial cold dark matter halo with dense core forms through gravitational collapse. On the other hand, if the dark matter mean free path is much smaller than 1 kpc, then the dark matter behaves as a collisional gas and this alters the halo evolution significantly. The dark matter will shock: this will heat up the low entropy material that would usually collapse to form a core and produce a shallower density profile. Since collisions tend to make the dark matter velocity distribution isotropic, the halo can not be triaxial and will only be elliptical if flattened by significant rotation. Since dark halos form with little angular momentum, if the dark matter is not dissipative, then all halos will be nearly spherical. X-ray observations of clusters reveal that most halos are moderately ellipsoidal. This implies that the collision time scale for dark matter near the half-mass radius of clusters must be longer than the Hubble time: one of the strongest constraints on this model. Studies suggest that polar ring galaxies are only mildly triaxial and oblate with the equatorial plane of the dark halo nearly coinciding with that of the stellar body. If the dark matter has an isotropic distribution function and the baryons form a disk, then the dark matter will form a slightly flattened halo.

In our scenario, we consider a mean free path in the intermediate regime, larger than 1 kpc, but smaller than $\sim$ 1 Mpc. Particles in this range have $1 - 10^3$ interactions per Hubble time in the local neighborhood, which is overdense by $10^6$ relative to the mean density of the universe. At the virial radius of a typical galactic halo, which is overdense by $\sim 200$ relative to the mean density of the universe, the typical particle has less than 1 collision per Hubble time. Thus, near the virial radius, halos can have anisotropic velocity ellipsoids and will be triaxial. However, in the inner halo of galaxies, dark matter is collisional. Infalling dark matter is scattered before reaching the center of the galaxy so that the orbit distribution is isotropic rather than radial. These collisions increase the entropy of the dark matter phase space distribution and lead to a dark matter halo profile with a shallower density profile. The characteristic scale for the core would correspond to an "optical depth" of 1, the "photosphere" of the dark matter.

When a dwarf halo with a low velocity dispersion falls into a larger, high velocity dispersion halo, the high velocity particles will scatter off the low velocity particles. After the collision, neither particle is likely to be bound to the dwarf. As dark matter is slowly removed, the dwarf halo expands, this also makes the halo more vulnerable to tidal stripping and shock heating. This process will slowly evaporate all substructure in the larger halo, particularly, in the centers of galaxies, groups and clusters. However, near the half-mass radius, the collision time is longer than the Hubble time, so substructure will only be destroyed in the inner portions of halos. This dark matter evaporation will protect galaxy disks from dynamical heating by collisions with dwarfs in the halo. Dwarfs with high central densities evaporate more slowly as particles at optical depth greater than $\sim$ 1 are shielded by other particles from collisions. Intriguingly, all of our Galaxy's dwarf companions have very high phase space densities. As the central density and particle velocities increase, not all collisions will lead to particles being deflected out of the dwarf halo. A small fraction of the particles will be rescattered within the spheroidal core of the dwarf and a fraction of the momentum absorbed. (The phase space for capture is suppressed by $(\sigma/v)^3$, where $\sigma$ is the velocity dispersion in the dwarf core and $v$ is the typical particle velocity in the halo.) This could produce a ram pressure drag that can slow the dwarf halo and cause it to spiral into the cores of larger halos. Numerical studies of this process are required to determine whether the observed fraction of denser dwarfs are likely to survive after a Hubble time.

The halos of large (e.g. $L_*$) galaxies moving through groups and clusters are less prone to destruction. When a cluster dark matter particle strikes a galaxy dark matter particle, the probability that the recoiling particles will escape from the galaxy is significantly less than unity. For cross-sections near the smaller end of our suggested range, most collisions take place within the half mass radius, where the escape velocity from a galaxy halo is comparable to the characteristic recoil velocity. Thus, many collisions will not lead to recoil energies large enough to escape. At the smaller end of our cross-section range, the probability of a typical particle experiencing a collision during a Hubble time approaches unity only for galaxies that fall deep into the cluster core. Towards the larger end of our suggested range, the galaxies are opaque to dark matter and the collision products are also likely to experience multiple collisions within a massive galaxy halo. Because of these multiple collisions, the collision products are unlikely to escape from the galaxy. This effect is more important in massive halos as the optical depth through a galaxy scales as the one-third power of its mass, Thus, for large galaxies, the background cluster or group will primarily heat the entire dark halo rather than evaporate dark matter from it.

The presence of collisions will lead to energy transport within the dark matter halo, which eventually leads to core collapse. We can obtain an estimate of the core collapse time from Quinlan's Fokker-Planck simulations of the evolution of an isolated cluster of interacting particles with a central density profile of $r^{-1}$ and an outer profile of $r^{-3}$. These models have a temperature inversion in the core and undergo two stages of core collapse. During the first stage, the inner region expands as heat is transported inwards. After 0.1 half-mass relaxation times, the inner 1% of the mass has moved out in radius by factor 2. After roughly 3 half-mass relaxation times, the whole system collapses as heat is transported from the virial radius outwards. We suspect that this second stage is delayed in our cosmological context as the infall of new material is constantly adding heat near the dark halo photosphere. If we model our Galaxy as starting with a density profile corresponding to the Navarro-Frenk-White fit to CDM models with $V_{200} = 225$ km s$^{-1}$, $\Omega_0=0.3$, $H_0 = 65$ km s$^{-1}$ Mpc$^{-1}$ and dimensionless concentration parameter $c=8$, then its half mass radius is 220 kpc. Since the density at the half mass radius is 300 times smaller than the local dark matter density, the particle mean free path at that radius is between 0.3 - 300 Mpc and at that radius, the particle is in the weakly interacting regime. Thus, for our Galaxy, the core collapse time (roughly 3 half-mass relaxation times) is between 4.5 - 6000 Gyr, or perhaps significantly longer if the collapse stage is delayed by the infall of new material. Hence, for most of our range of parameters, the collapse time for our Galaxy exceeds the lifetime of the universe, yet there is sufficient number of interactions to lower the dark matter density in the inner 5 kpc of our Galaxy. As the particle mean free path approaches the lower bound (0.3 Mpc) or the upper bound (300 Mpc) at the half-mass radius, our estimates suggest that one or the other condition is not satisfied, but more accurate methods are needed to determine the precise range. \[Note added in proof: A. Burkert (astro-ph/0002409) has constructed an N-body code that simulates self-interactions and obtains results consistent with these estimates based on the Fokker-Planck approximation.\]

To summarize, our estimated range of $\sigma/m$ for the dark matter is between 0.45-450 cm$^2$/g or, equivalently, $8 \times 10^{-(25-22)}$ cm$^2$/GeV. Numerical calculations are essential for checking our approximations and refining our estimates. Even without numerical simulations, we can already make a number of predictions for the properties of galaxies in a self-interacting dark matter cosmology: (1) the centers of halos are spherical; (2) dark matter halos will have cores; and (3) there are few dwarf galaxies in groups but dwarfs persist in lower density environments; and, (4) the halos of dwarf galaxies and galaxy halos in clusters will have radii smaller than the gravitational tidal radius (due to collisional stripping). Intriguingly, current observations appear to be consistent with all of these predictions.

# Acknowledgements

We would like to thank R. Dave, J. Dalcanton, G. Dvali, J. Goodman, E. Kolb, J. March-Russell, J. Miralda-Escude, J. Ostriker, J. Peebles, J. Silk, S. Tremaine, M. Turner and N. Turok for discussions. We are grateful to the West Anglia Great Northern Railway whose train delay provided the opportunity for initial discussions. This work was initiated at the Newton Institute for Mathematical Sciences. DNS acknowledges the NASA Theory program and the NASA MAP Satellite program for support and PJS was supported by the US Department of Energy grant DE-FG02-91ER40671.


abstract: We demonstrate a coherent and dynamic beam splitter based on light storage in cold atoms. An input weak laser pulse is first stored in a cold atom ensemble via electromagnetically-induced transparency (EIT). A set of counter-propagating control fields, applied at a later time, retrieves the stored pulse into two output spatial modes. The high visibility interference between the two output pulses clearly demonstrates that the beam splitting process is coherent. Furthermore, by manipulating the control lasers, it is possible to dynamically control the storage time, the power splitting ratio, the relative phase, and the optical frequencies of the output pulses. The active beam splitter demonstrated in this work is expected to significantly reduce the resource requirement in photonic quantum information and in all-optical information processing as a single cold atom ensemble can functionally replace a variety of optical elements, including beam splitters, mirrors, phase shifters, and optical quantum memories.
author: Kwang-Kyoon Park; Tian-Ming Zhao; Jong-Chan Lee; Young-Tak Chough; Yoon-Ho Kim
date: November 16, 2015
title: Coherent and Dynamic Beam Splitting based on Light Storage in Cold Atoms

Photonic quantum computation has received much attention over the last decade due to the demonstration of scalability using single-photon sources, projective measurement, and linear optical elements such as beam splitters, phase shifters, and mirrors . In addition to these elements, quantum memories are essential in synchronizing multi-photon events to increase the success probability of linear optical quantum gates . Recent advances in miniaturized photonic circuits on a silicon chip may reduce the experimental overhead in managing many such linear optical elements . Here, we demonstrate a cold-atom based approach to consolidate different linear optical operations and a quantum memory in a single device. By employing EIT-based light storage, we demonstrate that a weak laser pulse can be coherently and dynamically manipulated in a cold atom ensemble to perform beam splitting, reflection, and phase shifting, in addition to quantum memory operation.

Beam splitters play a crucial role in quantum optics and photonic quantum information, as demonstrated in the Hanbury-Brown–Twiss experiment , the Hong-Ou-Mandel effect , implementation of photonic quantum gates , etc. While beam splitters based on passive linear optics are widely available at low cost, there are growing needs for dynamic beam splitting devices in which the splitting ratio can be easily varied. Moreover, such devices integrated with coherent optical memory functionalities can significantly reduce resource requirement in photonic quantum information and all-optical information processing. Coherent optical memories or quantum memories for photons have recently been demonstrated by utilizing coherent atom-photon interaction schemes, e.g., EIT , the DLCZ protocol , and Raman memory . Dynamic beam splitting devices based on such atom-photon interaction schemes, therefore, would allow an integrated photonic device in which quantum memory and linear optical functionalities are combined.

Recently, controllable beam splitting in frequency or time modes has been demonstrated by using the gradient echo memory scheme , with a double-tripod EIT scheme , and with a tripod EIT scheme . Dynamic beam splitting in the spatial modes which functions as a variable beam splitter , however, has not been implemented in a long-coherence atomic medium. Spatial beam splitting has, nevertheless, been demonstrated in warm atomic vapor relying on the EIT effect and natural atomic thermal motions in which atoms with light-induced ground state coherence can move freely to another spatial channel at which the ground state coherence is retrieved back to light . Since this scheme relies on atomic thermal random motion rather than a phase-matched process, only a small fraction of the input light can be retrieved at the second spatial channel. There have been several theoretical proposals for efficient spatial splitting of a signal beam by using a cold atom medium with two control beams , but due to different physics, these schemes are inapplicable for warm atomic vapor. For instance, in warm vapor, light retrieval can occur only in the spatial mode with the stronger control field , whereas, in the cold atoms, the input signal beam is split into two spatial modes according to the power ratio of the two control fields .

In this paper, we propose and demonstrate coherent and dynamic beam splitting of a weak laser pulse into two spatial modes, precisely resembling a variable beam splitting operation of a linear optical device . Our scheme is based on the EIT-based light storage scheme in a cold atom ensemble: The photonic excitation of a weak laser pulse is mapped into an atomic coherence, called the spin wave . After a controlled delay, two nearly counter-propagating control beams are applied to retrieve the signal beam into two spatial modes whose directions are determined by the phase matching condition. As the scheme is based on a phase-matched process, light retrieval can be highly efficient. Experimentally, we demonstrate dynamic beam splitting with the quantum memory operation. We show that, between the two output spatial modes, it is possible to control the power splitting ratio, the relative phase, and the relative frequency shift. High visibility interference between the two output modes confirms that the beam splitting process is coherent.

The essential features of the experiment are depicted in Fig. (a). A weak signal pulse of $\sim$`<!-- -->`{=html}50 nW is split into two directions at the atomic ensemble after a certain period of coherent light storage. The two output beams are then superposed at a linear optical beam splitter to form a Mach-Zehnder interferometer. The energy level diagram for the cold atoms and the detailed experimental schematic are shown in Fig. (b) and Fig. (c), respectively. 87 rubidium cold atoms ($< 1$ mK) are prepared by a magneto-optical trap (MOT). After loading the neutral atomic ensemble, the trapping magnetic field is turned off and all the atoms are optically pumped into the ground state, $\left| g \right\rangle  = \left| {5{S_{1/2}},F = 1,m_F = 1} \right\rangle$. The other relevant atomic levels are $\left| e \right\rangle  = \left| {5{P_{1/2}},F' = 2,m_{F'} = 2} \right\rangle$ and $\left| s \right\rangle  = \left| {5{S_{1/2}},F = 2,m_F = 1} \right\rangle$. The quantization axis is set to be the same as the propagation axis of the signal field. The properties of the medium is characterized by measuring the two-level transmission and the three-level EIT transmission spectrum. Optical depth (OD) is measured to be 21 and the ground state dephasing rate is measured to be $\gamma_{gs} = 2\pi \times 3.8{\text{ kHz}}$. The decay rate of the $\left| g \right\rangle$-$\left| e \right\rangle$ transition is $\Gamma/2 = 2\pi \times 2.9{\text{ MHz}}$. The forward (FW) control laser is first turned on, illuminating the whole atomic ensemble, after which the signal pulse is sent for the beam splitting experiment. The whole procedure is repeated every 50 ms.

The horizontally (H) polarized input signal pulse is transformed to right circular polarization and focused into the atomic ensemble of cold atoms. The FW control is turned on to open the transparency window for the signal pulse and then adiabatically turned off to map the signal pulse into the atomic spin wave. The angle between the FW control and the signal is $0.3^\circ$. After a programmable storage, the controls are turned back on to convert the spin wave back into photonic excitation, i.e., the output beams. The direction ${\vec k_\textsc{o}}$ and the frequency ${\omega _\textsc{o}}$ of the output are determined by the following phase matching condition , $$\begin{aligned}
{\vec k_\textsc{s}} - {\vec k_\textsc{fwc}} = {\vec k_\textsc{spin}} =  {\vec k_\textsc{o}} - {\vec k_\textsc{c}}, \label{phasek}\\
{\omega _\textsc{s}} - {\omega _\textsc{fwc}} ={\omega _\textsc{spin}} =  {\omega _\textsc{o}} - {\omega _\textsc{c}}, \label{phasew}
\end{aligned}$$ where ${\vec k_\textsc{spin}}$ (${\vec k_\textsc{s}}$, ${\vec k_\textsc{fwc}}$) and ${\omega _\textsc{spin}}$ (${\omega _\textsc{s}}$, ${\omega _\textsc{fwc}}$) are the wave vector and frequency of the spin wave (signal, FW control), respectively. The wave vectors and the frequency of the control beams (i.e., retrieval control) used for generating the output beams are ${\vec k_\textsc{c}}$ and ${\omega _\textsc{c}}$, respectively.

According to Eq. (), if we assume $\vec k_\textsc{c}= \vec k_\textsc{fwc}$, then $\vec k_\textsc{o}= \vec k_\textsc{s}$, i.e., the direction of the output signal is the same as that of the input if the retrieval control is the same as the FW control. On the other hand, if we consider the condition $\vec k_\textsc{c}\simeq -\vec k_\textsc{s}$, then $\vec k_\textsc{o}\simeq - \vec k_\textsc{fwc}$. That is, if the retrieval control is in the backward (BW) direction, the output is nearly opposite to the FW control as sketched in Fig. (c). The input signal beam can be split into two output directions if both FW and BW controls are applied to the cold atom medium at the same time, thus functioning as a dynamic beam splitter. Note that this process is not possible in a warm vapor. In a medium with a large Doppler shift, instead of beam splitting, light retrieval can occur only in the spatial mode with the stronger control field. This is due to the fact that higher spatial-frequency components of Raman coherence decay quickly in warm vapor .

The experimental results for dynamic beam splitting are shown in Fig. . Here, the detuning $\Delta$ of the BW control from the $\left| s \right\rangle$-$\left| e \right\rangle$ transition is set to zero. Part of the input pulse is stored in the cold atom medium by turning off the FW control. The Rabi frequency of the FW control is ${\Omega _\textsc{fwc}} = 2\pi  \times (5.8 \pm 0.2) {\text{ MHz}}$. The early-arriving part of the pulse leaks out from the medium without being stored before the turn-off of the FW control at 2.05 $\mu$s. After a controllable delay which is set to 1.93 $\mu$s, the controls are turned on for mapping the spin wave back into photonic excitation. In Fig. (a), only the FW control is turned on at 3.98 $\mu$s with ${\Omega _\textsc{fwc}} = 2\pi  \times 5.7{\text{ MHz}}$. Just as in normal EIT storage, all the stored light is retrieved into the FW output, making the cold atom ensemble to function as a coherent optical buffer or a quantum memory. For 50:50 beam splitting, the BW control with ${\Omega _\textsc{bwc}} = 2\pi  \times 6.6{\text{ MHz}}$ is simultaneously turned on with the FW control as shown in Fig. (b). In this case, the spin wave is split into almost opposite directions in the atomic ensemble and the two counter-propagating output beams are retrieved. The medium thus functions as a 50:50 beam splitter if the effective strengths of the FW and BW controls are the same. If effective Rabi frequencies of the controls are different, the medium functions as an asymmetric beam splitter in which more power is emitted in the direction of the stronger control. As shown in Fig. (c), it is possible that all the stored light is retrieved in the backward direction by turning on the BW control only, thus making the medium to function as a mirror integrated with a quantum memory. The pulse width of the BW output in Fig. (c) is narrower than that of Fig. (a) due to the fact that the BW control is larger, ${\Omega _\textsc{bwc}} = 2\pi  \times 7.7{\text{ MHz}}$ for Fig. (c).

Our experimental results are well explained by the numerical simulation shown in the solid lines of Fig. . The numerical simulation is based on the Maxwell-Bloch equations for light propagation . By comparing the experimental data in Fig.  and the results of numerical simulation using the measured values of OD and $\gamma_{gs}$, we extract the effective values of the Rabi frequencies. The two-dimensional numerical simulation in Fig.  showing the singal propagation in the medium was done by further assuming ${\Omega _\textsc{fwc}} = {\Omega _\textsc{bwc}} = 2\pi  \times 7.6{\text{ MHz}}$ and OD is set to be 100 to consider a situation with negligible signal leakage.

We now examine coherence between the two output beams by superposing them at a linear optical beam splitter, forming a Mach-Zehnder interferometer in which the first beam splitter is made of a cold atom ensemble, see Fig. (a). If the FW and BW output beams in Fig. (b) are mutually coherent, high visibility interference is expected. For this experiment, the detuning $\Delta$ is set to zero so that the frequencies of the FW and BW outputs are identical. The experimental result is shown in Fig. a and it clearly shows high visibility interference between the FW and BW output beams, confirming that the beam splitting process is coherent. It is interesting to note that the phase difference between the FW and BW output beams can be varied by changing the relative phase between the two control fields. In experiment, the relative phase is controlled by the phase difference between the RF signals, $\phi_2 - \phi_1$, applied to the acousto-optic modulators (AOM) for generating the FW and BW controls. This results suggests that, with the input signal in the single-photon state, our scheme can be used to prepare a single-photon dual-rail entangled state of the form, $\left| \psi  \right\rangle  = \sin \theta {\left| 1 \right\rangle _\textsc{fw}}{\left| 0 \right\rangle _\textsc{bw}} + \cos \theta {e^{i\delta \phi }}{\left| 0 \right\rangle _\textsc{fw}}{\left| 1 \right\rangle _\textsc{bw}},$ where $\tan \theta  = {\Omega _\textsc{fwc}}/{\Omega _\textsc{bwc}}$ and $\delta \phi  = {\phi _2} - {\phi _1}$.

As seen from Eq. (), it is possible to perform a dynamic beam splitting operation in which one of the two outputs has slightly different frequency than that of the input if $\omega_\textsc{c}\neq \omega_\textsc{fwc}$. In experiment, this can be achieved by simply setting $\Delta  \ne 0$ in Fig. (b). The experimental result for such a case is shown in Fig. (b) in which beating is observed with the period of $2\pi /\Delta$. This result reconfirms that the dynamic and coherent nature of the beam splitting operation based on the light storage in cold atoms.

In conclusion, we have demonstrated a coherent and dynamic beam splitter by means of an EIT-based light storage in cold atoms. Since coherent conversion between photonic and atomic spin wave excitations is at the heart of the atom-based optical beam splitter, our beam splitter scheme naturally incorporates quantum memory functions. If, instead of the conventional EIT medium, the Rydberg-EIT medium is used , our beam splitter scheme can further incorporate the process of single-photon filtering from a weak laser, potentially enabling direct generation of single-photon dual-rail entanglement from a weak laser. Although the beam splitter scheme was demonstrated with a weak laser pulse, it is nevertheless applicable to the single-photon input signals . Our scheme may also be used for other types of EIT media with negligible Doppler broadening . Note that, in this work, we have demonstrated a $1\times2$ beam splitting device based on a cold atom medium. It is however possible to extend the scheme to $N \times M$ beam splitting, supporting $N$ input and $M$ outputs, using the fact that the EIT medium can be excited with multiple spin wave components and the phase matching condition allows various possible directions for light storage and retrieval. Such an $N\times M$ beam splitter based on the EIT medium may offer new possibilities for multiplexed all optical information and photonic quantum information.

This work was supported by Samsung Science & Technology Foundation under Project Number SSTF-BA1402-07.