Skip to content

Commit c626ce8

Browse files
fix kraus to super bug
1 parent e3a5f85 commit c626ce8

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
- Fixed `unitary_kraus` of Circuit class support for multi-qubit kraus channels, previous implementation fails to reshape the kraus tensor as matrix
2222

23+
- Fixed `kraus_to_super_gate` bug when multi-qubit kraus channels are presented on tensorflow backend
24+
2325
## 0.5.0
2426

2527
### Added

tensorcircuit/channels.py

+2
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,8 @@ def kraus_to_super_gate(kraus_list: Sequence[Gate]) -> Tensor:
513513
:rtype: Tensor
514514
"""
515515
kraus_tensor_list = [k.tensor for k in kraus_list]
516+
kraus_tensor_list = [backend.reshapem(k) for k in kraus_tensor_list]
517+
516518
k = kraus_tensor_list[0]
517519
u = backend.kron(k, backend.conj(k))
518520
for k in kraus_tensor_list[1:]:

0 commit comments

Comments
 (0)