qat.quops.QuantumChannelPTM
- class qat.quops.QuantumChannelPTM(ptm, name='')
A quantum channel in its Pauli transfer matrix (PTM) representation.
\[R_{ij}^{(\mathcal{E})}\equiv\frac{1}{d}\mathrm{Tr}\left[\boldsymbol{P}_{i}\mathcal{E}(\boldsymbol{P}_{j})\right]\]with \(d=2^{n_\mathrm{qubits}}\).
- Parameters
ptm (np.array) – the PTM matrix
name (string, optional) – the name of the channel. Defaults to empty string.
- name
the name of the channel
- Type
str
- arity
the arity of the gate
- Type
int
- apply_to(density_matrix, qbits)
Applies the channel to a density matrix
Assumes density_matrix has shape 4, 4, …, 4 (with nqbits 4s)
- Parameters
density_matrix (np.array) – density matrix as a tensor of shape (4, 4, … 4)
qbits (list<int>) – qbits on which gate is applied
- Returns
(np.array) density matrix as tensor
- property matrix
The PTM matrix \(R_{ij}^{(\mathcal{E})}\)
- property ptm
The PTM matrix (deprecated)
- property tensor
Return the PTM as a tensor
- to_choi()
Convert to Choi representation
- Returns
QuantumChannelChoi
- to_kraus(force=False)
Convert to Kraus representation
- Parameters
force (bool, optional) – if True, force convertion if chi matrix is not PSD. Default to False.
Note
Convertion goes through PTM -> Chi -> Kraus
- Returns
QuantumChannelKraus