search for: toffoli_gate

Displaying 5 results from an estimated 5 matches for "toffoli_gate".

2013 Feb 04
2
[LLVMdev] c-like language implementation using llvm
...bly won't need to add an intrinsic unless you are doing something > _very_ exotic. > That's a good point. However simple binary operations such as XOR are not the only ones I'll be using. I have the Toffoli Gate for example which takes in 3 operands: http://en.wikipedia.org/wiki/Toffoli_gate I guess I can use intrinsics for these things? If I do, can I leave its behavior undefined? I would like it to appear just with the name toffoli in the IR. Thanks, Ali -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attac...
2013 Feb 04
0
[LLVMdev] c-like language implementation using llvm
...then use i32. For example, both signed and unsigned int get lowered to i32. > That's a good point. However simple binary operations such as XOR are not > the only ones I'll be using. I have the Toffoli Gate for example which takes > in 3 operands: > http://en.wikipedia.org/wiki/Toffoli_gate > I guess I can use intrinsics for these things? If I do, can I leave its > behavior undefined? I would like it to appear just with the name toffoli in > the IR. Just create the equivalent IR for the operation that the gate does; that will give LLVM the ability to optimize the operations....
2013 Feb 04
0
[LLVMdev] c-like language implementation using llvm
> Can I just utilize the i1 type? Is the > i1 type already used for something, and thus might create a conflict? I think you are very confused. LLVM's types are meant to be used to represent *your* program :) They can't be "already used". > 2) Can I use LLVM's intrinsic functions for my gates, something like > @llvm.NOT(i1 %val)? Would the fact that the
2013 Feb 13
1
[LLVMdev] c-like language implementation using llvm
...both signed > and unsigned int get lowered to i32. > >> That's a good point. However simple binary operations such as XOR are not >> the only ones I'll be using. I have the Toffoli Gate for example which takes >> in 3 operands: >> http://en.wikipedia.org/wiki/Toffoli_gate >> I guess I can use intrinsics for these things? If I do, can I leave its >> behavior undefined? I would like it to appear just with the name toffoli in >> the IR. > > Just create the equivalent IR for the operation that the gate does; > that will give LLVM the ability...
2013 Feb 03
2
[LLVMdev] c-like language implementation using llvm
Hi, I have a project where I am creating a language which is very similar to C, but has some extensions. Among the most important are: 1) A new 1-bit data-type 2) Some gates: NOT, AND, etc.. that act on arrays of this 1-bit type. (Think like a hardware description language.) These are like external function calls, which don't have an implementation for now. I don't have a particular