Graph evaluation

17 views
Skip to first unread message

Damien Hostache

unread,
Mar 18, 2014, 9:55:08 AM3/18/14
to quant...@googlegroups.com
Hi Quantomatic team,

I would like to know if it is possible to evaluate a graph from running Quantomatic
(external librairies ...).
I can create, rewrite graphs and put data on the nodes/edges and I want to get
the evaluation of the graph by setting specific inputs. Does Quantomatic can perform 
that? Or do you know a way to do it?

Thanks in advance,

Damien.

Aleks Kissinger

unread,
Mar 18, 2014, 12:39:36 PM3/18/14
to quant...@googlegroups.com
Hi Damien,

I assume by "evaluate" you mean normalise with respect to some rules.
There's no single command to issue the quantomatic core that will do
this, but it would be fairly easy to implement a little command line
utility to do it.

One quick and dirty way to do this in Poly/ML is to load the "heap"
that is produced by the quantomatic build process. For instance, if
you want to do this for red/green, start your code with something like
this:

PolyML.SaveState.loadState "quantomatic/core/heaps/quanto.heap";
PolyML.Compiler.printDepth:=100;

structure RG_IO = JsonObjectAnnotatedGraphicalTheoryIO(
structure Theory = RG_Theory
structure GraphComponentDataIO = RG_ComponentDataIO)

(custom code)


Then, have a look at the functions in RG_IO and RG_Theory for
loading/saving graphs and rules and applying rewrites, respectively.
> --
> You received this message because you are subscribed to the Google Groups
> "Quantomatic" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to quantomatic...@googlegroups.com.
> To post to this group, send email to quant...@googlegroups.com.
> Visit this group at http://groups.google.com/group/quantomatic.
> For more options, visit https://groups.google.com/d/optout.

Damien Hostache

unread,
Mar 18, 2014, 1:56:26 PM3/18/14
to quant...@googlegroups.com
Hi aleks,

Thank you for replying so quickly,

It is not what I mean by "evaluate", it doesn't concern the rules and the normalization.
I would like to send some qubits on the inputs of the graph and get the result of the transformation
by a Hadamard gate (for example). Maybe you know about the Deutsch-Josza Promise problem,
I try to run/create some Quantum algorithms and solve traditional problems using Quantum computations
(Z/X calculus especially).
I don't know if it is (will be) possible with Quantomatic (I work on different frameworks/softwares), I read much of the documentation about Quantomatic
and I don't find anything so I prefer to ask directly on this forum to save time.

Regards,
    Damien 

Aleks Kissinger

unread,
Mar 18, 2014, 2:15:27 PM3/18/14
to quant...@googlegroups.com
Ah, so you mean concrete evaluation as matrices? There used to be some
code which would turn graphs into some mathematica code for computing
the matrices, but I don't think thats around anymore.
Reply all
Reply to author
Forward
0 new messages