Simulating Using Polarised Vector States and Polarised Elements

Hi all,

This may be a very basic question but I have tried to develop a simulation using the documentation and have had some luck at setting up various parts but keep running into a couple barriers. The barriers being that I am unable to simulate a polarised element and run a vector state at the same time using the configuration I have chosen.

I have many versions of the same code that I wrote from the Percival library in an attempt to get the result I would like. Unfortunately each one only goes so far. Some get part of the result that others do not.

The code variations all originated from a basic code I wrote from your library so ideally I would like to find a way to get the following simulation to work:
β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

import perceval as pcvl
import numpy as np
import matplotlib.pyplot as plt

A=0.5 #Perceval automatically normalises so if I put in the probability, it will renormalise
B=A
input_state = A * pcvl.BasicState("|0,{P:H},{P:H},0>") + B * pcvl.BasicState("|0,{P:V},{P:V},0>")
print(input_state)

test_circuit = pcvl.Circuit(4)
test_circuit.add(0,pcvl.PBS())
test_circuit.add(2,pcvl.PBS())
pcvl.pdisplay(test_circuit)

p = pcvl.Processor(β€œSLOS”, test_circuit) # create a processor running on SLOS backend
ca = pcvl.algorithm.Analyzer(p,
[input_state],
β€œ*”)
pcvl.pdisplay(ca)

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

One of the current errors I am coming across involves not being able to use a state vector with the analyser. I am also not able to put the PBS into certain analysis techniques. The set up in the broken code above is as close to what I would be looking to get.

I understand there are multiple different backends and different ways to initialise this but this is in the format that I would like to keep. Ideally, I would also like to initialise the bell state in this way so at a later date I can adjust probabilities and add in extra states.

So in total I would need to be able to use a PBS with a state vector and gain the probability or probability density of each possible outcome. Is there a way to do this in Perceval as I am unable to find a way that works so far?

Also, is there a way so I could add 2 bell states to 1 circuit? I know I can work out the probabilities and make the state myself with ease, I was just wondering if I could possibly just input one bell state over modes 0 and 1 and another over 2 and 3?

Kind Regards,
Calum.

Hi Calum,

Please notice that our polarization handling is not complete, you will encounter several limitations, especially regarding the use of state vectors.

Our advice is to switch to dual rail encoding, which will replace the input states by

1/2 * |1,0,1,0> + 1/2 * |0,1,0,1>

Next, the algorithm.Analyzer doesn’t accept state_vector as inputs, but an algorithm.Sample should fit your needs:

import perceval as pcvl

input_state = 1/2 * (pcvl.BasicState("|1,0,1,0>") + pcvl.BasicState("|0,1,0,1>"))

test_circuit = pcvl.Circuit(4) // pcvl.components.BS() // (2, pcvl.components.BS())
pcvl.pdisplay(test_circuit)

p.min_detected_photons_filter(1)
p.with_input(input_state)

s = pcvl.algorithm.Sampler(p)
s.probs()
1 Like

Hi @Ben_F ,

Thank you very much for your help. Much appreciated.

I’ve ran it with the SLOS backend:
p = pcvl.Processor(β€œSLOS”, test_circuit)

I assume this will be more than enough to do the tasks I mentioned in the last post?

In the end I hope to use this notation to add in extra photon’s as noise resembling parametric down conversion. Likely only up to the 3 pairs term of the standard statistical equation for this process. I would also like to ensure that I have not missed any in-built parametric down conversion source commands? If i remember correctly, Perceval only has Quantum dot source in built?

Kind Regards, Calum.