# sf.decompositions.bipartite_graph_embed¶

bipartite_graph_embed(A, mean_photon_per_mode=1.0, rtol=1e-05, atol=1e-08)[source]

Embed a bipartite graph into a Gaussian state.

Given a bipartite graph in terms of an adjacency matrix (in general with arbitrary complex entries), returns the two-mode squeezing parameters and interferometers necessary for creating the Gaussian state that encodes such adjacency matrix

Uses takagi().

Parameters
• A (array[complex]) – square, (weighted) adjacency matrix of the bipartite graph

• mean_photon_per_mode (float) – guarantees that the mean photon number in the pure Gaussian state representing the graph satisfies $$\frac{1}{N}\sum_{i=1}^N sinh(r_{i})^2 ==$$ :code:mean_photon

• rtol (float) – relative tolerance used when checking if the input matrix is symmetric

• atol (float) – absolute tolerance used when checking if the input matrix is symmetric

Returns

squeezing parameters of the input state to the interferometer, and the unitaries matrix representing the interferometer

Return type

tuple[array, array, array]