Hello here is my circuit:
import strawberryfields as sf
import tensorflow as tf
from strawberryfields.ops import Ket, BSgate, Rgate
import numpy as np
cutoff_dim = 5
paths = 2
modes = 2 * paths
initial_state = np.zeros([cutoff_dim] * modes, dtype=np.complex)
initial_state[0, 1, 0, 1] = 1
prog = sf.Program(modes)
with prog.context as q:
Ket(initial_state) | q # Initial state preparation
BSgate() | (q[0], q[1])
BSgate() | (q[2], q[3])
BSgate() | (q[1], q[2])
Rgate((np.pi)/(8)) | q[0]
Rgate((np.pi)/(8)) | q[2]
BSgate() | (q[0], q[1])
BSgate() | (q[2], q[3])
Rgate(0) | q[0]
Rgate((np.pi)/2) | q[2]
BSgate() | (q[0], q[1])
BSgate() | (q[2], q[3])
Now I want to measure my qubits. Actually when I designed my circuit in cirq, I have just 2 qubits and I was measuring my two qubits in computational basis and program was returning to me [0,1] or [1,0] or [1,1] or [0,0 ] However now, I have 2 qubits and each qubits have 2 modes. So how can I measure my qubits or states or modes? I mean what should I do for getting my measurements ??