2
$\begingroup$

I am trying to design this circuits with strawberry fields. However I could not connect my first and second qubit mode:

enter image description here

orange boxes are beam splitters, blue boxes are phase shifters. The green box is nothing. (There was a letter of brand so I wanted to close it) First two lines corresponds to 2 modes of my first qubit: Let's say: 0_a and 1_a and the other two lines corresponds my second qubit modes Let's say 0_b and 1_b

My code is here:

  prog = sf.Program(4)

with prog.context as q:
    ops.BSgate() | (q[0], q[1])
    ops.BSgate() | (q[2], q[3])
    ops.Rgate(0.5719) | q[0]
    ops.BSgate() | (q[0], q[1])
    ops.Rgate(-1.9782) | q[1]
    ops.BSgate() | (q[0], q[1])
    ops.Rgate(-1.9782) | q[2]
    ops.BSgate() | (q[2], q[3])
    ops.Rgate(-1.9782) | q[2]
    ops.BSgate() | (q[2], q[3])
eng = sf.Engine("fock", backend_options={"cutoff_dim": 5})

prog.print()
#prog.draw_circuit(tex_dir='./circuit_tex', write_to_file=True)

My result is here

enter image description here

and indeed I could not make this connection:

enter image description here

Any help for me? Am I writing to correct code?

$\endgroup$
1
$\begingroup$

Ok It is done and it is correct. I just forgat to give an initial state to the program like

Ket(initial_state) | q 

And after that I also added a BSGate for 1 and 2 mode

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.