Open amol2891 opened 4 months ago
QuantumOptics.jl implements a matrix representation of a given Fock basis, creation and annihilation operator. You will get the same matrix if you provide the create
or destroy
function with the Fock basis with the same $N$ . In other words, your a1
,a2
,a3
, and a4
are equal (you can check it with a1 == a2
), and the same for a1d
, ... and n1
, ... . what you should do instead is create the operators by tensoring everything as you did your states.
Something like this would work fine:
N = 2;
fb1 = FockBasis(N);
fb2 = FockBasis(N);
fb3 = FockBasis(N);
fb4 = FockBasis(N);
i1 = fockstate(fb1,1);
i2 = fockstate(fb2,1);
i3 = fockstate(fb3,0);
i4 = fockstate(fb4,0);
input = i1 ⊗ i2 ⊗ i3 ⊗ i4;
a1 = destroy(fb1) ⊗ identityoperator(fb2) ⊗ identityoperator(fb3) ⊗ identityoperator(fb4);
a2 = identityoperator(fb1) ⊗ destroy(fb2) ⊗ identityoperator(fb3) ⊗ identityoperator(fb4);
a3 = identityoperator(fb1) ⊗ identityoperator(fb2) ⊗ destroy(fb3) ⊗ identityoperator(fb4);
a4 = identityoperator(fb1) ⊗ identityoperator(fb2) ⊗identityoperator(fb3) ⊗ destroy(fb4);
a1d = create(fb1) ⊗ identityoperator(fb2) ⊗ identityoperator(fb3) ⊗ identityoperator(fb4);
a2d = identityoperator(fb1) ⊗ create(fb2) ⊗ identityoperator(fb3) ⊗ identityoperator(fb4);
a3d = identityoperator(fb1) ⊗ identityoperator(fb2) ⊗ create(fb3) ⊗ identityoperator(fb4);
a4d = identityoperator(fb1) ⊗ identityoperator(fb2) ⊗ identityoperator(fb3) ⊗ create(fb4);
If you want to keep $N=2$ for all the ports, then you can reduce your code to
N = 2;
fb = FockBasis(N);
i1 = fockstate(fb,1);
i2 = fockstate(fb,1);
i3 = fockstate(fb,0);
i4 = fockstate(fb,0);
input = i1 ⊗ i2 ⊗ i3 ⊗ i4;
a1 = destroy(fb) ⊗ identityoperator(fb) ⊗ identityoperator(fb) ⊗ identityoperator(fb);
a2 = identityoperator(fb) ⊗ destroy(fb) ⊗ identityoperator(fb) ⊗ identityoperator(fb);
a3 = identityoperator(fb) ⊗ identityoperator(fb) ⊗ destroy(fb) ⊗ identityoperator(fb);
a4 = identityoperator(fb) ⊗ identityoperator(fb) ⊗ identityoperator(fb) ⊗ destroy(fb);
a1d = create(fb) ⊗ identityoperator(fb) ⊗ identityoperator(fb) ⊗ identityoperator(fb);
a2d = identityoperator(fb) ⊗ create(fb) ⊗ identityoperator(fb) ⊗ identityoperator(fb);
a3d = identityoperator(fb) ⊗ identityoperator(fb) ⊗ create(fb) ⊗ identityoperator(fb);
a4d = identityoperator(fb) ⊗ identityoperator(fb) ⊗ identityoperator(fb) ⊗ create(fb);
About an example of a 50:50 beam splitter and the Hong-Ou-Mandel effect, I refer you to https://www.mdpi.com/2227-7390/10/24/4794#:~:text=The%20beam%20splitter%20(BS)%20is,transmitted%20and%20a%20reflected%20beam.
I was trying to model the 50:50 beam splitter with input state |1,1,0,0> as the one, one photon at the input port and the 0,0 at the output port. For that I tried to create 4 different FockBasis for respective ports. But apparently even the creation and destruction operators of other FockBasis is giving non-zero results upon acted on other fockstates of different basis.
In the code attached even if a1d * i3, raises the photon number of i3 which is fockstate of fb3.
It would be really nice if someone please give an example of 50:50 beam splitter and the Hong-Ou-Mandel effect.
`#!/usr/bin/julia using LinearAlgebra,QuantumOptics,Gnuplot
N = 2; fb1 = FockBasis(N); fb2 = FockBasis(N); fb3 = FockBasis(N); fb4 = FockBasis(N);
a1 = destroy(fb1); a2 = destroy(fb2); a3 = destroy(fb3); a4 = destroy(fb4);
a1d = create(fb1); a2d = create(fb2); a3d = create(fb3); a4d = create(fb4);
n1 = number(fb1); n2 = number(fb2); n3 = number(fb3); n4 = number(fb4);
i1 = fockstate(fb1,1); i2 = fockstate(fb2,1); i3 = fockstate(fb3,0); i4 = fockstate(fb4,0);
input = tensor(i1,i2,i3,i4);`