Hey I want to implement single qubit gates on the X8 hardware, first I’m trying to do so in SF.
The Idea is to generate the entangled modes using the S2 gate and then by post selecting 0/1 on the idler modes stay with a legitimate state in the signal mode (when I encode my qubit data using two modes in the singal modes with 1 photon in them)
I use the line:
ops.MeasureFock(select=(0/1)) | q
To post select 0/1 photons and it works fine in SF (will it also work on the X8?) How do I get a table like “results.samples” that include only the desired post selected results?
In the X8 platform there is also a problem Im facing, even in very simple codes such as:
import strawberryfields as sf
from strawberryfields import ops
from strawberryfields import RemoteEngine
from collections import Counter
prog = sf.Program(8, name=“remote_job1”)
with prog.context as q:
ops.S2gate(1.0) | (q, q) ops.Rgate(-np.pi/2) | q ops.BSgate(np.pi/4,np.pi/2) | (q, q) ops.Rgate(-np.pi/2) | q ops.MeasureFock() | q
eng = RemoteEngine(“X8”)
results = eng.run(prog, shots=20)
I get the error “There can be no operations before the S2gates.”
But clearly in the code trhere is no operation happening before the S2gates, what is the source of that?
Thank you in advance