toqito icon indicating copy to clipboard operation
toqito copied to clipboard

Feature: Convert kraus representation to channel (superoperator)

Open vprusso opened this issue 3 years ago • 2 comments

Given a collection of Kraus operators, convert them into the corresponding quantum channel (i.e. the superoperator).

This would be placed under channel_ops/kraus_to_channel.py. Corresponding tests would also need to be created in the tests/test_channel_ops/test_kraus_to_channel.pyfile. Updating the docs would also need to be done as well.

vprusso avatar Oct 06 '20 01:10 vprusso

I suppose that by the superoperator you mean the natural representation of the quantum channel (according to Watrous' book). So I guess that something like eq. 2.74, p 80. of Watrous' book would work here:

 super_op = sum(toqito.matrix_ops.tensor(A, B.conj()) for A, B in kraus_list)

I tried this with some random Kraus operators

dim = 2**2
kraus_list = [np.random.randint(-1, 4, (2, dim, dim)) for _ in range(12)]

and some random density matrix (together with its vectorization):

vector = np.random.randint(-3, 3, (dim, 1))
dm = toqito.state_ops.pure_to_mixed(vector)
vec_dm = toqito.matrix_ops.vec(dm)

and compared the action of the superoperator on the (vectorized) density matrix toqito.matrix_ops.unvec(superop @ vec_dm) , versus the action of the Kraus operators on the density matrix sum(A @ dm @ B.conj().T for A, B in kraus_list). I get the same entries, but one matrix is the transpose of the other, so I was wondering if I'm getting all the operation definitions right. May I ask you to take a look at these definitions? There's probably a bug that I'm not seeing.

Thanks!

sebgrijalva avatar Feb 11 '21 06:02 sebgrijalva

Hi @sebgrijalva

Thanks very much for your question, and do let me know if what I'm providing here makes sense.

I suppose that by the superoperator you mean the natural representation of the quantum channel (according to Watrous' book). So I guess that something like eq. 2.74, p 80. of Watrous' book would work here:

 super_op = sum(toqito.matrix_ops.tensor(A, B.conj()) for A, B in kraus_list)

Hmm, I believe that if your kraus_list that you're iterating over already contains the Kraus operators obtained elsewhere, these should already have the conjugation applied to the second right Kraus operator--in which case I believe the code would look something like:

super_op = sum(toqito.matrix_ops.tensor(A, B) for A, B in kraus_list)

This may be responsible for why your matrices at the end have the same entries but are a transpose of the other.

vprusso avatar Feb 11 '21 13:02 vprusso