Fix the compatibility issue with qibo-0.2.0 during circuit-to-TN conversion

This commit is contained in:
Liwei Yang
2023-09-27 16:41:52 +08:00
parent f59b1b0bc7
commit fc665fcfc5

View File

@@ -95,7 +95,8 @@ class QiboCircuitToEinsum:
required_shape = self.op_shape_from_qubits(len(gate_qubits))
self.gate_tensors.append(
(
cp.asarray(gate.matrix).reshape(required_shape),
cp.asarray(gate.matrix(), dtype=self.dtype).reshape(
required_shape),
gate_qubits,
)
)