Rgate and BSgate from U

Hi, Can anyone point me to how to calculate the parameters for Rgates and BSgates based on a unitary matrix or an adjacency matrix for the borealis chip? Many thanks.

I found the GraphEmbed does this but I get the error - “CircuitError: This program contains 0 spatial modes, but the device ‘borealis’ only supports 1 modes.”

Hi @Dr_Paul_GRIFFIN,

Welcome to the forum! Sorry we took a few days to answer.

It’s great that you’re running circuits on Borealis! While Borealis is programmable, it has a very specific architecture so not any kind of circuit can be programmed on it. The best way we can help you is if you share your full code here. If you can’t copy-paste your code here please let me know and you can send it on a slack message or through another medium.

Hi Catalina, Many thanks for getting back to me. I’m trying to modify the Borealis demo code to use my own graphs. I have a graph and can create a unitary but neither GraphEmbed or Interferometer classes are supported for Borealis so I am at a loss on how to create the S, R and BS gates to run the circuit. I have uploaded my code so far and a graph to run on slack. Any pointers to how to calculate the gates and parameters need would be great, thanks.

Hi @Dr_Paul_GRIFFIN,

Thank you for sharing your code on Slack.
As Isaac responded on Slack, only specific gates are supported on Borealis.

Unfortunately I haven’t seen that we have any function that does what you need. If you already had the rotation parameters and beamsplitter parameters you could use them on Borealis but I haven’t seen that you can go directly from the matrix to these parameters.

We do have some demos that are graph-related here, but we don’t use beamsplitters and rotations.

If you do find a way to do this please share it here!

Many thanks for the reply @CatalinaAlbornoz. I have given a reply to Isaac in Slack and will continue my learning for this fascinating area. I’ll certainly share my code when I figure it out.

Great! Thank you @Dr_Paul_GRIFFIN!