#17094·qiskit

TP checks can miss non-Hermitian partial-trace residuals

Author: Silas-ZengCreated Sep 30, 2026Updated Sep 30, 2026

TP checks can miss non-Hermitian partial-trace residuals

Environment

  • Qiskit main checkout at 51dd141c57baee0eaaf2072b99dd0c014cf19fa1
  • Python 3.13.9, NumPy 2.5.3

What is happening?

Kraus documents a generalized representation for general operator maps. For one such map, QuantumChannel.is_tp() can return True even when the Choi partial trace is not the identity. The same residual is also missed by the non-TP diagnostic in process_fidelity(..., require_tp=True).

How can we reproduce the issue?

python
import numpy as np
from qiskit.quantum_info import Choi, Kraus, process_fidelity

identity = np.eye(2, dtype=complex)
right = identity.copy()
right[0, 1] = 1e-3
channel = Kraus(([identity], [right]))

partial = np.trace(Choi(channel).data.reshape(2, 2, 2, 2), axis1=1, axis2=3)
print(partial)
print(channel.is_tp(atol=1e-8, rtol=0))
process_fidelity(channel, require_cp=False, require_tp=True)

The partial trace is [[1, 0.001], [0, 1]]. The predicate returns True, and process_fidelity emits no non-TP diagnostic warning.

What should happen?

The non-zero residual should make is_tp() return False, and process_fidelity(..., require_tp=True) should report the non-TP condition.

Any suggestions?

Could maintainers confirm whether is_tp() is intended to work for all general operator maps representable by Qiskit, or only for Hermiticity-preserving maps? If the latter is intended, the restriction should be documented or validated rather than silently producing this result.