Goto Chapter: Top 1 2 3 4 Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

3 Tools
 3.1 Importing and exporting ZX-diagrams

3 Tools

3.1 Importing and exporting ZX-diagrams

3.1-1 ExportAsQGraphString
‣ ExportAsQGraphString( morphism )( function )

Returns: a JSON string

Takes a morphism in a category of ZX-diagrams and exports the morphism as a JSON string. This function is only available if the package json is available. See https://github.com/Quantomatic/quantomatic/blob/stable/docs/json_formats.txt for an overview of the qgraph format.

3.1-2 ExportAsQGraphFile
‣ ExportAsQGraphFile( morphism, filename )( function )

Takes a morphism in a category of ZX-diagrams and a filename file and exports the morphism to file. This function is only available if the package json is available. See https://github.com/Quantomatic/quantomatic/blob/stable/docs/json_formats.txt for an overview of the qgraph format.

3.1-3 ImportFromQGraphString
‣ ImportFromQGraphString( category, string )( function )

Returns: a morphism

Takes a category of ZX-diagrams and a JSON string describing a ZX-diagram and imports the ZX-diagram as a morphism. This function is only available if the package json is available. See https://github.com/Quantomatic/quantomatic/blob/stable/docs/json_formats.txt for an overview of the qgraph format.

3.1-4 ImportFromQGraphFile
‣ ImportFromQGraphFile( category, filename )( function )

Returns: a morphism

Takes a category of ZX-diagrams and a filename file and imports the ZX-diagram in file as a morphism. This function is only available if the package json is available. See https://github.com/Quantomatic/quantomatic/blob/stable/docs/json_formats.txt for an overview of the qgraph format.

 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 4 Ind

generated by GAPDoc2HTML