Skip to content

Commit

Permalink
[minor] fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanrui-Wang committed Aug 30, 2023
1 parent c29f7ff commit 179dbfd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/train_unitary_prep/train_unitary_prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def main():
optimizer = optim.Adam(model.parameters(), lr=1e-2, weight_decay=0)
scheduler = CosineAnnealingLR(optimizer, T_max=n_epochs)

target_state = torch.tensor(
target_unitary = torch.tensor(
[
[1, 0, 0, 0],
[0, 1, 0, 0],
Expand All @@ -110,7 +110,7 @@ def main():

for epoch in range(1, n_epochs + 1):
print(f"Epoch {epoch}, LR: {optimizer.param_groups[0]['lr']}")
train(target_state, model, optimizer)
train(target_unitary, model, optimizer)
scheduler.step()


Expand Down

0 comments on commit 179dbfd

Please sign in to comment.