Skip to content

Commit

Permalink
Merge pull request #289 from ankhoa1212/main
Browse files Browse the repository at this point in the history
Fix for issue #213
  • Loading branch information
01110011011101010110010001101111 authored Nov 19, 2024
2 parents f6a074b + 3f76570 commit 6ff80a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/clifford_qnn/mnist_clifford_qnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def forward(self, x, use_qiskit=False):
self.q_device, self.encoder, self.q_layer, self.measure, x
)
else:
self.q_device = tq.QuantumDevice(n_wires=self.n_wires, bsz=bsz)
self.encoder(self.q_device, x)
self.q_layer(self.q_device)
x = self.measure(self.q_device)
Expand Down
1 change: 1 addition & 0 deletions torchquantum/operator/op_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ def forward(
params = self.params

if self.clifford_quantization:
from torchquantum.util.quantization.clifford_quantization import CliffordQuantizer
params = CliffordQuantizer.quantize_sse(params)
if self.n_wires is None:
self.func(q_device, self.wires, params=params, inverse=self.inverse)
Expand Down

0 comments on commit 6ff80a8

Please sign in to comment.