Skip to content

Commit 6ff80a8

Browse files
Merge pull request #289 from ankhoa1212/main
Fix for issue #213
2 parents f6a074b + 3f76570 commit 6ff80a8

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

examples/clifford_qnn/mnist_clifford_qnn.py

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def forward(self, x, use_qiskit=False):
6060
self.q_device, self.encoder, self.q_layer, self.measure, x
6161
)
6262
else:
63+
self.q_device = tq.QuantumDevice(n_wires=self.n_wires, bsz=bsz)
6364
self.encoder(self.q_device, x)
6465
self.q_layer(self.q_device)
6566
x = self.measure(self.q_device)

torchquantum/operator/op_types.py

+1
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ def forward(
245245
params = self.params
246246

247247
if self.clifford_quantization:
248+
from torchquantum.util.quantization.clifford_quantization import CliffordQuantizer
248249
params = CliffordQuantizer.quantize_sse(params)
249250
if self.n_wires is None:
250251
self.func(q_device, self.wires, params=params, inverse=self.inverse)

0 commit comments

Comments
 (0)