Skip to content

Commit

Permalink
add a test where inserting reduce_noise is necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
j2kun committed Nov 10, 2023
1 parent 267101c commit ba02cb4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/noisy_reduce_noise.mlir
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// RUN: tutorial-opt %s | FileCheck %s
// Check for syntax

// CHECK-LABEL: test_op_syntax
func.func @test_op_syntax() {
%0 = arith.constant 3 : i5
%1 = arith.constant 4 : i5
%2 = noisy.encode %0 : i5 -> !noisy.i32
%3 = noisy.encode %1 : i5 -> !noisy.i32
%4 = noisy.mul %2, %3 : !noisy.i32
%5 = noisy.mul %4, %4 : !noisy.i32
%6 = noisy.mul %5, %5 : !noisy.i32
%7 = noisy.mul %6, %6 : !noisy.i32
%8 = noisy.decode %7 : !noisy.i32 -> i5
return
}

0 comments on commit ba02cb4

Please sign in to comment.