sf.io.loads

loads(s, ir='blackbird')[source]

Load a quantum program from a string.

Parameters
  • s (str) – string containing the Blackbird or XIR circuit

  • ir (str) – Intermediate representation language to use. Can be either “blackbird” or “xir”.

Returns

Strawberry Fields program

Return type

prog (Program)

Raises

ValueError – if an invalid IR name is passed