Skip to content

Commit ba699cb

Browse files
committed
update project.toml
1 parent cb60f3d commit ba699cb

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Yao = "5872b779-8223-5990-8dd0-5abbb0748c8c"
2121
[compat]
2222
Compose = "0.9"
2323
LuxurySparse = "0.6"
24-
NiLang = "0.7, 0.8"
24+
NiLang = "0.8"
2525
Requires = "1"
2626
SimpleTensorNetworks = "0.1"
2727
TropicalNumbers = "0.2.1"

src/reversible/chimera.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
end
66
@invcheckoff for i=1:Ly-1
77
for j = 1:4
8-
apply_Gvb!(reg, (4*(i-1)+j,4*i+j), Js[k+1], REG_STACK)
8+
apply_Gvb!(reg, (@const (4*(i-1)+j,4*i+j)), Js[k+1], REG_STACK)
99
k += 1
1010
end
1111
end
1212
@invcheckoff for i=1:Ly
13-
apply_G16!(reg, (4i-3,4i-2,4i-1,4i), Js[k+1:k+16], REG_STACK)
13+
apply_G16!(reg, (@const (4i-3,4i-2,4i-1,4i)), Js[k+1:k+16], REG_STACK)
1414
k += 16
1515
end
1616
k length(Js)

src/reversible/second_neighbor.jl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ end
1818
for j=1:Ly-1
1919
if (_c(lt, (i,j), (i,j+1)), ~)
2020
INC(k)
21-
apply_Gvb!(reg, (j, j+1), Js[k], REG_STACK)
21+
apply_Gvb!(reg, (@const (j, j+1)), Js[k], REG_STACK)
2222
end
2323
end
2424
for j=1:Ly
@@ -31,12 +31,12 @@ end
3131
for j=1:Ly
3232
# store the information in qubit `j` to ancilla `nbit-j%2`
3333
if (j!=Ly && _c(lt, (i,j), (i+1,j+1)), ~)
34-
apply_Gcp!(reg, (j,nbit-j%2), REG_STACK)
34+
apply_Gcp!(reg, (@const (j,nbit-j%2)), REG_STACK)
3535
end
3636
# interact with j-1 th qubit (a)
37-
if (j!=1 && _c(lt, (i+1,j-1), (i,j)), ~)
37+
if (j!=1 && _c(lt, (@const (i+1,j-1)), (i,j)), ~)
3838
INC(k)
39-
apply_Gvb!(reg, (j-1, j), Js[k], REG_STACK)
39+
apply_Gvb!(reg, (@const (j-1, j)), Js[k], REG_STACK)
4040
end
4141
# onsite term (b)
4242
if (_c(lt, (i,j), (i+1,j)), ~)
@@ -48,9 +48,9 @@ end
4848
if (j!=1 && _c(lt, (i,j-1), (i+1,j)), ~)
4949
INC(k)
5050
# interact with cached j-1 th qubit (c)
51-
apply_Gvb!(reg, (j,nbit-(j-1)%2), Js[k], REG_STACK)
51+
apply_Gvb!(reg, (@const (j,nbit-(j-1)%2)), Js[k], REG_STACK)
5252
# erease the information in previous ancilla `nbit-(j-1)%2`
53-
apply_Gcut!(reg, nbit-(j-1)%2, REG_STACK)
53+
apply_Gcut!(reg, (@const nbit-(j-1)%2), REG_STACK)
5454
end
5555
end
5656
end
@@ -96,7 +96,7 @@ end
9696
for j=1:Ly-1
9797
if (_c(lt, (i,j), (i,j+1)), ~)
9898
INC(k)
99-
apply_Gvb!(reg, (j, j+1), Js[k], A_STACK)
99+
apply_Gvb!(reg, (@const (j, j+1)), Js[k], A_STACK)
100100
end
101101
end
102102
for j=1:Ly
@@ -110,12 +110,12 @@ end
110110
for j=1:Ly
111111
# store the information in qubit `j` to ancilla `nbit-j%2`
112112
if (j!=Ly && _c(lt, (i,j), (i+1,j+1)), ~)
113-
apply_Gcp!(reg, (j,nbit-j%2), A_STACK)
113+
apply_Gcp!(reg, (@const (j,nbit-j%2)), A_STACK)
114114
end
115115
# interact with j-1 th qubit (a)
116116
if (j!=1 && _c(lt, (i+1,j-1), (i,j)), ~)
117117
INC(k)
118-
apply_Gvb!(reg, (j-1, j), Js[k], A_STACK)
118+
apply_Gvb!(reg, (@const (j-1, j)), Js[k], A_STACK)
119119
end
120120
# onsite term (b)
121121
if (_c(lt, (i,j), (i+1,j)), ~)
@@ -127,9 +127,9 @@ end
127127
if (j!=1 && _c(lt, (i,j-1), (i+1,j)), ~)
128128
INC(k)
129129
# interact with cached j-1 th qubit (c)
130-
apply_Gvb!(reg, (j,nbit-(j-1)%2), Js[k], A_STACK)
130+
apply_Gvb!(reg, (@const (j,nbit-(j-1)%2)), Js[k], A_STACK)
131131
# erease the information in previous ancilla `nbit-(j-1)%2`
132-
apply_Gcut!(reg, nbit-(j-1)%2, A_STACK)
132+
apply_Gcut!(reg, (@const nbit-(j-1)%2), A_STACK)
133133
end
134134
end
135135
end

src/reversible/square.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
end
1212
for j=1:Ly-1
1313
k += 1
14-
apply_Gvb!(reg, (j, j+1), Js[k], A_STACK)
14+
apply_Gvb!(reg, (@const (j, j+1)), Js[k], A_STACK)
1515
end
1616
for i=2:Lx
1717
@safe println("Layer $i/$Lx, stack size: $(A_STACK.top) & $(B_STACK.top)")
@@ -38,7 +38,7 @@
3838
end
3939
for j=1:Ly-1
4040
k += 1
41-
apply_Gvb!(reg, (j, j+1), Js[k], A_STACK)
41+
apply_Gvb!(reg, (@const (j, j+1)), Js[k], A_STACK)
4242
end
4343
end
4444
summed one(TT)
@@ -74,7 +74,7 @@ end
7474
end
7575
for j=1:Ly-1
7676
k += 1
77-
apply_Gvb!(reg, (j, j+1), Js[k], REG_STACK)
77+
apply_Gvb!(reg, (@const (j, j+1)), Js[k], REG_STACK)
7878
end
7979
for i=2:Lx
8080
@safe println("Layer $i/$Lx")
@@ -87,7 +87,7 @@ end
8787
end
8888
for j=1:Ly-1
8989
k += 1
90-
apply_Gvb!(reg, (j, j+1), Js[k], REG_STACK)
90+
apply_Gvb!(reg, (@const (j, j+1)), Js[k], REG_STACK)
9191
end
9292
end
9393
summed one(TT)

0 commit comments

Comments
 (0)