What does this command physically mean?
block_diag([[1]], BSunitaries[2], [[1]])
Can any one tell me in matrix form?
Quantum Computing Stack Exchange is a question and answer site for engineers, scientists, programmers, and computing professionals interested in quantum computing. It only takes a minute to sign up.
Sign up to join this communityWhat does this command physically mean?
block_diag([[1]], BSunitaries[2], [[1]])
Can any one tell me in matrix form?
A beamsplitter gates takes two parameters, and acts on two modes. The matrix that represents the gate is a 2x2 unitary. In this line you're calculating the unitary for the second 'column' in the circuit, which has a single beamsplitter. I've marked it in this image in blue:
In order to be able to multiply the unitaries for all of the columns together, they all need to be 4x4 so we first need to find the 2x2 unitary for the beamsplitter and then turn it into a 4x4 unitary.
BSunitaries
contains the unitaries for each of the beamsplitters so you first extract the information for this specific unitary by using BSunitaries[2]
.
block_diag creates a block diagonal matrix because you need UBS2
to be a 4x4 unitary so block_diag([[1]], BSunitaries[2], [[1]])
is basically adding a '1' in the top left and a '1' in the bottom right. If you print(block_diag([[1]], [[2,3],[4,5]], [[1]]))
you'll get an idea of how this looks.
Catalina from Xanadu
p = |00><00| + |01><01| + |01><10| + |10><01| + |10><10| + |11><11|
in general we have a11, a22, a23, a32, a33, a44
as non-zero entries. Now one thing I want to know is how to get these entries by matrix formulism?
$\endgroup$
Oct 17, 2022 at 8:20