# Encoding graph into a GBS

**URL:** <https://discuss.pennylane.ai/t/encoding-graph-into-a-gbs/1913>\
**Category:** Strawberry Fields\
**Created:** [May 20, 2022, 2:05pm UTC](https://discuss.pennylane.ai/t/encoding-graph-into-a-gbs/1913 "2022-05-20T14:05:00Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![arund](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/arund/32/3909_2.png) [@arund](https://discuss.pennylane.ai/u/arund)\
**Post date:** [July 14, 2025, 11:41am UTC](https://discuss.pennylane.ai/t/encoding-graph-into-a-gbs/1913/7 "2025-07-14T11:41:42Z")

</div>

> [@Amanuel](#):
>
> the Takagi-Autonne decomposition of the adjacency matrix…Can either one of them be used?

@Amanuel @Maria_Schuld @CatalinaAlbornoz Thanks for this interesting thread. May I restart the discussion here rather than starting a new one.

- Can one use any adjacency matrix (without the doubling step) ?  
I understand that the eigenvalues need to obey certain constraints, as mentioned in  
[Xanadu | Welcome to Xanadu](https://strawberryfields.ai/photonics/concepts/gbs.html#id16).

In the discussion thread

> [@Encoding adjacency matrix into GBS devices](https://discuss.pennylane.ai/t/encoding-adjacency-matrix-into-gbs-devices/1227/2):
>
> Hi @anafilipa.carv, Welcome to the forum! You are correct that an adjacency matrix can be encoded directly into a GBS device consisting only of squeezers and interferometers. In the dense subgraph paper, this corresponds to Eq. (2). Very simply, the paper on dense subgraphs was written at a time where less was understood about GBS and therefore the exposition is not as clean as in the latest Nature paper. If you want to understand more about the central concepts of programming GBS devices to …

@jmarrazola mentioned that it may be possible. I am trying to confirm if I understood the answer correctly.  
Thanks.

---

_[View the full topic](https://discuss.pennylane.ai/t/encoding-graph-into-a-gbs/1913)._
