{ "cells": [ { "cell_type": "markdown", "id": "d13f76dd", "metadata": {}, "source": [ "# SOQCS Example 8: Entanglement swapping protocol using a physical quantum dot as a non-ideal Bell emitter." ] }, { "cell_type": "markdown", "id": "340f9352", "metadata": {}, "source": [ "

In the entanglement swapping protocol two pairs of photons are emitted in entangled Bell states. One photon of each pair is sent to a beamsplitter and the result at the output of the beamsplitter is measured. If one photon is detected in each output channel of the beamsplitter then the remaining two photons are also entangled. However, if the two pairs are not ideal Bell states misdetections can happen and the resulting density matrix of the two photons not traveling by the beamsplitter will not be the one of a pure state of a perfectly entangled pair of photons. In this simulation we will perform the protocol in the same way as depicted in [1]. This is, the two photons not traveling trough the beamsplitter will arrive at the detector through the same channel but at different times that here are labeled as 0 and 1. The calculation is repeated with different instances of the state of the QD emitter to capture the effect on the output of the distribution of noise in the input. We consider random noise, cross-dephasing noise and FSS effects on the photons that may give different imperfections to the input state in each emission. The result is compared with the analytical result for the current parameters. Note that we are neglecting pure dephasing effects in this example (this is T2* = 0)

\n", "
\n", "[1] F. Basso Basset et Al. Entanglement swapping with photons generated on demand by a quantum dot. Phys. Rev. Lett., 123:160501 (2019)
" ] }, { "cell_type": "code", "execution_count": 1, "id": "8ad62d08", "metadata": {}, "outputs": [], "source": [ "import soqcs" ] }, { "cell_type": "markdown", "id": "d233ca5b", "metadata": {}, "source": [ "Simulation constant" ] }, { "cell_type": "code", "execution_count": 2, "id": "033b04d8", "metadata": {}, "outputs": [], "source": [ "N = 10000 # Number of outputs to calculate the density matrix\n", "prntn = 1000 # Print a message each 1000" ] }, { "cell_type": "markdown", "id": "014deceb", "metadata": {}, "source": [ "Perform the simulation." ] }, { "cell_type": "code", "execution_count": 3, "id": "771b7809", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Start run of: 10000\n", "Running: 0\n", "Running: 1000\n", "Running: 2000\n", "Running: 3000\n", "Running: 4000\n", "Running: 5000\n", "Running: 6000\n", "Running: 7000\n", "Running: 8000\n", "Running: 9000\n" ] } ], "source": [ "# Initialize variables\n", "V=0.0;\n", "sim = soqcs.simulator()\n", "apd = soqcs.dmatrix()\n", "\n", "# Main loop\n", "print(\"Start run of: \",N)\n", "for i in range(0,N,1):\n", " if(i%prntn==0):\n", " print(\"Running:\", i)\n", "\n", " example = soqcs.qodev(nph = 4, # Number of photons\n", " nch = 3, # Number of channels\n", " nm = 2, # number of polarization modes\n", " ns = 4, # Number of packets\n", " clock= 1, # Detectors have a clock\n", " ckind='E') # Exponential wavepackets\n", " # First QD cascade\n", " example.add_QD(0, 1, \n", " t1 = 0.0, # Time of bi-exciton XX photon\n", " f1 = 1.0, # Frequency of bi-exciton XX photons\n", " w1 = 1.0, # Characteristic decay time of bi-exciton XX photon\n", " t2 =46.71, # Time of exciton X photon\n", " f2 = 1.0, # Frequency of bi-exciton X photons\n", " w2 = 1.0, # Characteristic decay time of bi-exciton X photon\n", " S = 1.0, # Fine Structure Splitting\n", " k = 0.8, # Ratio of photons that are not due to noise\n", " tss= 1.0, # Characteristic coherence time.\n", " thv= 1.0) # Characteristic cross-dephasing time.\n", " example.add_QD(0, 2, \n", " t1 = 16.0, # Time of bi-exciton XX photon\n", " f1 = 1.0, # Frequency of bi-exciton XX photons\n", " w1 = 1.0, # Characteristic decay time of bi-exciton XX photon\n", " t2 = 46.5, # Time of exciton X photon\n", " f2 = 1.0, # Frequency of bi-exciton X photons\n", " w2 = 1.0, # Characteristic decay time of bi-exciton X photon\n", " S = 1.0, # Fine Structure Splitting\n", " k = 0.8, # Ratio of photons that are not due to noise\n", " tss= 1.0, # Characteristic coherence time.\n", " thv= 1.0) # Characteristic cross-dephasing time.\n", " # Circuit\n", " example.beamsplitter(1,2,45.0,0.0);\n", " # Detectors\n", " example.detector(0)\n", " example.detector(1,1)\n", " example.detector(2,1)\n", "\n", " # Run simulation\n", " inputst=example.input() # Obtain input stste\n", " circuit=example.circuit() # Obtain circuit\n", " outputst=sim.run_st(inputst,circuit) # Run the simulation\n", "\n", " # Add state to the density matrix\n", " apd.add_state(outputst,example)\n", "\n", " # Calculate average photon overlapping\n", " V=V+example.emitted_vis(1,3)" ] }, { "cell_type": "markdown", "id": "80d85d47", "metadata": {}, "source": [ "Print average overlapping." ] }, { "cell_type": "code", "execution_count": 4, "id": "0a3777b0", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "V: 0.8105842459701214 \n", "\n" ] } ], "source": [ "print(\"V: \",V/N,\"\\n\")" ] }, { "cell_type": "markdown", "id": "1b3a7da4", "metadata": {}, "source": [ "Print density matrix. First we must apply post-selection manually because we have used run_st." ] }, { "cell_type": "code", "execution_count": 5, "id": "a35f7cad", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[36m | H(2)0\u001b[36m, V(0)0\u001b[36m >\u001b[0m 0.2766\u001b[0m 0.0000\u001b[0m 0.0000\u001b[0m -0.0214\u001b[0m \n", "\u001b[36m | V(0)0\u001b[36m, V(2)0\u001b[36m >\u001b[0m 0.0000\u001b[0m 0.2272\u001b[0m 0.0000\u001b[0m 0.0000\u001b[0m \n", "\u001b[36m | H(0)0\u001b[36m, H(2)0\u001b[36m >\u001b[0m 0.0000\u001b[0m 0.0000\u001b[0m 0.2190\u001b[0m 0.0000\u001b[0m \n", "\u001b[36m | H(0)0\u001b[36m, V(2)0\u001b[36m >\u001b[0m -0.0214\u001b[0m 0.0000\u001b[0m 0.0000\u001b[0m 0.2773\u001b[0m \n", "\n" ] } ], "source": [ "apd.normalize(); # Normalize\n", "partial=apd.calc_measure(example); # Calculate post-selection\n", "partial.prnt_mtx(3,0.01,example); # Print the matrix" ] }, { "cell_type": "markdown", "id": "f575c8d5", "metadata": {}, "source": [ "**THIS CODE IS PART OF SOQCS**
\n", "\n", "**Copyright:**
\n", "Copyright © 2023 National University of Ireland Maynooth, Maynooth University. All rights reserved.\n", "The contents and use of this document and the related code are subject to the licence terms detailed in LICENCE.txt" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.8" } }, "nbformat": 4, "nbformat_minor": 5 }