graph_embed_deprecated(A, max_mean_photon=1.0, make_traceless=False, rtol=1e-05, atol=1e-08)[source]

Embed a graph into a Gaussian state.

Note: The default behaviour of graph embedding has been changed; see graph_embed(). This version is deprecated, but has been kept for consistency.

Given a graph in terms of a symmetric adjacency matrix (in general with arbitrary complex off-diagonal and real diagonal entries), returns the squeezing parameters and interferometer necessary for creating the Gaussian state whose off-diagonal parts are proportional to that matrix.

Uses takagi().

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

  • max_mean_photon (float) – Threshold value. It guarantees that the mode with the largest squeezing has max_mean_photon as the mean photon number i.e., \(sinh(r_{max})^2 ==\) :code:max_mean_photon.

  • make_traceless (bool) – Removes the trace of the input matrix, by performing the transformation \(\tilde{A} = A-\mathrm{tr}(A) \I/n\). This may reduce the amount of squeezing needed to encode the graph but will lead to different photon number statistics for events with more than one photon in any mode.

  • 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


squeezing parameters of the input

state to the interferometer, and the unitary matrix representing the interferometer

Return type

tuple[array, array]