We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8020ccc commit 057721cCopy full SHA for 057721c
src/qibo/backends/npmatrices.py
@@ -498,9 +498,11 @@ def FanOut(self, *q):
498
# based on Backend.matrix_fused method
499
rank = len(q)
500
matrix = self.I(2**rank)
501
+ matrix = self._cast(matrix, dtype=self.dtype)
502
503
gmatrix = self.CNOT
504
eye = self.I(2 ** (rank - 2))
505
+ eye = self._cast(eye, dtype=self.dtype)
506
gmatrix = self.engine.kron(gmatrix, eye)
507
original_shape = gmatrix.shape
508
gmatrix = self.engine.reshape(gmatrix, 2 * rank * (2,))
0 commit comments