Magic.MagicQudit¶
- Magic.MagicQudit.Chan_Mana(JN, DIM)¶
- \[\mathcal{M}(\mathcal{N}_{A \rightarrow B}) = \log \max_\mathbf{u} \| \mathcal{N}_{A \rightarrow B}(A_A^\mathbf{u})\|_{W,1} = \log \max_u \sum_v |W_{\mathcal{N}}(\mathbf{v}|\mathbf{u})|\]
- Parameters:¶
JN (
numeric) – The choi matrix of the quantum channel.DIM (
int) – The dimension vector [da db], where da and db are the input and output dimensions of the channel.
- Returns:¶
Channel’s mana.
- Return type:¶
numeric
- Raises:¶
error– If the input and output dimension does not match with the channel, an error is raised.- Examples:¶
mana = Chan_Mana(JN, [3 3]); % Compute the mana of a qutrit-qutrit channel.
Note
Wang, X., Wilde, M. M., & Su, Y. (2019). Quantifying the magic of quantum channels. New Journal of Physics, 21(10), 103002.
- Magic.MagicQudit.Generate_A(dim, num_copy)¶
- \[ \begin{align}\begin{aligned}T_{\mathbf{u}}=\tau^{-a_1 a_2} Z^{a_1} X^{a_2}, \tau=e^{(d+1) \pi i / d}\\A_\mathbf{0}=\frac{1}{d} \sum_{\mathbf{u}} T_{\mathbf{u}}, A_{\mathbf{u}}=T_{\mathbf{u}} A_\mathbf{0} T_{\mathbf{u}}^{\dagger}.\end{aligned}\end{align} \]
Generate Heisenberg-Weyl Operators and n-copy Phase-Space Point Operators
- Parameters:¶
dim (
numeric) – dimension of the operators.num_copy (
numeric) – number of copies for phase-space point operators.
- Returns:¶
cell array containing the generated operators.
- Return type:¶
An (numeric)
- Raises:¶
error– None.- Examples:¶
An = Generate_A(3, 2); % Generate 2-copy phase-space point operators for dimension 3.
Note
Emerson, J. (2014). The resource theory of stabilizer computation. Bulletin of the American Physical Society, 59.
- Magic.MagicQudit.Mana_state(rho)¶
- \[\mathcal{M}(\rho) = \log \sum_\mathbf{u} |W_{\rho}(\mathbf{u})|,\]
where \(W_{(\rho)}\) is the Wigner representation of \(\rho\).
- Parameters:¶
rho (
numeric) – The density matrix of the quantum state.- Returns:¶
Magic mana of the given quantum state.
- Return type:¶
numeric
- Raises:¶
error– If either input/output dimension does not match, an error is raised.
Note
Emerson, J. (2014). The resource theory of stabilizer computation. Bulletin of the American Physical Society, 59.
- Magic.MagicQudit.QutritHstate()¶
Generate H state
Note
Emerson, J. (2014). The resource theory of stabilizer computation. Bulletin of the American Physical Society, 59.
- Magic.MagicQudit.QutritNstate()¶
Generate qutrit N state
Note
Emerson, J. (2014). The resource theory of stabilizer computation. Bulletin of the American Physical Society, 59.
- Magic.MagicQudit.QutritSstate()¶
Generate S state
Note
Emerson, J. (2014). The resource theory of stabilizer computation. Bulletin of the American Physical Society, 59.
- Magic.MagicQudit.QutritTstate()¶
Generate qutrit T state
Note
Emerson, J. (2014). The resource theory of stabilizer computation. Bulletin of the American Physical Society, 59.
- Magic.MagicQudit.WTraceNorm(PhaseOp, rho)¶
Compute the Wigner trace norm of a linear operator with respect to a phase-space frame.
- Parameters:¶
PhaseOp (
numeric) – Cell array of phase-space point operators (frame).rho (
numeric) – Density matrix.
- Returns:¶
Wigner trace norm of the given operator.
- Return type:¶
output (numeric)
- Raises:¶
error– If either input/output dimensions does not match, an error is raised.- Examples:¶
output = WTraceNorm(PhaseOp, rho); % Compute the Wigner trace norm of rho given a phase-space frame.
Note
Wang, X., Wilde, M. M., & Su, Y. (2020). Efficiently computable bounds for magic state distillation. Physical review letters, 124(9), 090505.