Pitt-JonesLab / quantum_logical

logical state encodings for error-detection/correction of quantum states
MIT License
0 stars 1 forks source link

[Feature Request]: Generalization of `PhaseDamping` Channel to Support Qudits #4

Closed evmckinney9 closed 9 months ago

evmckinney9 commented 10 months ago

Feature Description

The PhaseDamping channel currently only supports qubits. To enhance our quantum simulations, we aim to generalize this channel for higher-dimensional systems (qudits), such as qutrits.

Rationale for Generalization

Technical Challenges

Current Implementation for Qubits

class PhaseDamping(Channel):
    """Phase damping channel for qubits."""

    def __init__(self, T2, num_qubits=1, hilbert_space_dim=2):
        """Initialize with a given T2 dephasing time and number of qubits."""
        self.T2 = T2
        self.num_qubits = num_qubits
        self.hilbert_space_dim = hilbert_space_dim
        super().__init__(dims=hilbert_space_dim**num_qubits)

    def _create_single_qubit_operators(self):
        """Create single-qubit Kraus operators for phase damping."""
        if self.hilbert_space_dim == 2:  # standard qubit case
            _gamma = 1 - np.exp(-self._trotter_dt / self.T2)
            E0_single = np.array([[1, 0], [0, np.sqrt(1 - _gamma)]])
            E1_single = np.array([[0, 0], [0, np.sqrt(_gamma)]])
            return [E0_single, E1_single]

        else:
            raise NotImplementedError("Unsupported Hilbert space dimension.")

Proposed Changes

Additional Resources

Testing