We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f8f741c commit e3a5f85Copy full SHA for e3a5f85
CHANGELOG.md
@@ -16,6 +16,10 @@
16
17
- Improve the efficiency of `sample_expectation_ps` method by using cached state.
18
19
+### Fixed
20
+
21
+- Fixed `unitary_kraus` of Circuit class support for multi-qubit kraus channels, previous implementation fails to reshape the kraus tensor as matrix
22
23
## 0.5.0
24
25
### Added
tensorcircuit/circuit.py
@@ -393,6 +393,7 @@ def _unitary_kraus_template(
393
sites = len(index)
394
kraus = [k.tensor if isinstance(k, tn.Node) else k for k in kraus]
395
kraus = [gates.array_to_tensor(k) for k in kraus]
396
+ kraus = [backend.reshapem(k) for k in kraus]
397
if prob is None:
398
prob = [
399
backend.real(backend.trace(backend.adjoint(k) @ k) / k.shape[0])
0 commit comments