Skip to content

Commit 5165c72

Browse files
committed
1 parent 0fc7f19 commit 5165c72

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

test/codegen.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ using YaoTargetQASM
77
using YaoTargetQASM.QASM
88
using Test
99

10-
@operation function test_basic(theta, phi)
10+
@device function test_basic(theta, phi)
1111
# syntax sugar
1212
1 => X
1313
2 => Z
@@ -25,7 +25,7 @@ using Test
2525
return (a = a, b = c)
2626
end
2727

28-
@operation function test_pure_quantum()
28+
@device function test_pure_quantum()
2929
ret = @gate 1:4 => test_basic(1.0, π)
3030
@barrier 1:4
3131
@ctrl 2 1 => X
@@ -59,7 +59,7 @@ CX qreg_2[0], qreg_1[0];
5959
target_qasm = OpenQASM.parse(s)
6060
@test test_qasm target_qasm
6161

62-
@operation function test_gate(theta, phi)
62+
@device function test_gate(theta, phi)
6363
1 => X
6464
2 => Z
6565
4 => Rx(-sin(theta)+2)

test/inline.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ gate majority a,b,c
5656

5757
ast = code_qasm(typeof(majority()))
5858

59-
@operation function test_inline()
59+
@device function test_inline()
6060
1:3 => ccx()
6161
end
6262

test/reginfo.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ using YaoTargetQASM
88
using CompilerPluginTools
99
using Test
1010

11-
@operation function test_basic(theta, phi)
11+
@device function test_basic(theta, phi)
1212
# syntax sugar
1313
1 => X
1414
@gate 2 => Z
@@ -22,7 +22,7 @@ using Test
2222
return (a = a, b = c)
2323
end
2424

25-
@operation function test_pure_quantum()
25+
@device function test_pure_quantum()
2626
ret = @gate 1:4 => test_basic(1.0, 2.0)
2727
@ctrl 2 1 => Rx(2.2)
2828
return ret

0 commit comments

Comments
 (0)