Skip to content

Commit 4eac77c

Browse files
fix qudit example again
1 parent 241ec01 commit 4eac77c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/vqe_qudit_example.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def vqe_forward(param, *, nqudits: int, d: int, nlayers: int, J: float, h: float
7777
return tc.backend.real(energy)
7878

7979

80-
def build_param_shape(nqudits: int, d: int, nlayers: int):
80+
def build_param_shape(nqudits: int, nlayers: int):
8181
# Per layer per qudit: RX^{(01)}, RY^{(12)} (or dummy), RZ^{(0)} = 3 params
8282
# Per layer entanglers: len(pairs) parameters
8383
pairs = nqudits - 1
@@ -106,7 +106,7 @@ def main():
106106

107107
assert args.d >= 3, "d must be >= 3"
108108

109-
shape = build_param_shape(args.nqudits, args.d, args.nlayers)
109+
shape = build_param_shape(args.nqudits, args.nlayers)
110110
param = tc.backend.random_uniform(shape, boundaries=(-0.1, 0.1), seed=42)
111111

112112
try:

0 commit comments

Comments
 (0)