OQS Project 2: Pauli Channel

Published by strangeworks (01/05/2021)

The following series of posts combine projects from Open Quantum Systems with Qiskit with Strangeworks to allow readers to quickly explore and apply concepts with real quantum code using the free community edition of the Strangeworks platform.

In this project we will implement the general Pauli channel in qiskit.

As an application, we will evaluate a quantity that is relevant in quantum thermodynamics, known as extractable work, trying to reproduce the result of the paper G. García-Pérez et al., arXiv:1906.07099.

We introduced the Pauli channel in Chapter 5 where we showed the circuit that implements i

AT a specific time instant t, the Pauli channel can be written as

E(ρ)=i=03piσiρσi\mathcal{E}(\rho) = \sum^3_{i=0}p_i\sigma_i\rho\sigma_i

with 0pi10 \leq p_i \leq 1​ and ipi=1\sum_ip_i=1​.

Task 1

The depolarizing channel is a special case of the Pauli channel where p1=p2=p3=p4p_1 = p_2 = p_3 = p_4​. It can thus be implemented using the circuit above. But why can't a general Pauli channel be implemented with the circuit used in the previous project, if we allow each of the three ancillary qubits to be rotated.by a different angle θ\theta​.

Task 2

The crucial part of the circuit implementation of the Pauli channel is the inversion of the system of equations
p1=01ψ2=(c1c2s3=s1s2c3)2p2=10ψ2=(c1s2s3=s1c2s3)2p3=11ψ2=(s1c2c3=c1s2s3)2p1 = |\langle 01|\psi\rangle|^2 = (c_1c_2s_3=s_1s_2c_3)^2 \\ p2 = |\langle 10|\psi\rangle|^2 = (c_1s_2s_3=s_1c_2s_3)^2 \\ p3 = |\langle 11|\psi\rangle|^2 = (s_1c_2c_3=c_1s_2s_3)^2
where cicos2θic_i \equiv \cos 2\theta_i and sisin2θis_i \equiv \sin 2\theta_i, that gives us the three angles θ1, θ2, θ3\theta_1 ,\ \theta_2, \ \theta_3.
The system allows for multiple solutions, but we just need to find one. We can restrict to angles between 0 and 2π2\pi​.
  1. Find such a solution, either analytically (e.g. by using Mathematica) or numberically (e.g. using scipy.optimize.root).
  2. Implement a function that returns the circuit implementing the Pauli channel for a list of values [p1,p2,p3][p_1, p_2,p_3]​.

Task 3

We are going to evaluate the amount of work that can be extracted by erasure in our system qubit prepared in an initially entangled state with a quantum memory Q. This quantity is relevant in quantum thermodynamics. It was introduced in L. del Rio et al., Nature 474, 61 (2011) and also studied in the context of non-Markovian dynamics, B. Bylicka et al., Sci. Rep. 6, 27989 (2016) (an experimental implementation on IBM Q devices is here: G. García-Pérez et al., arXiv:1906.07099.
We are going to implement a function that evaluates Eq. (4) of B. Bylicka et al., Sci. Rep. 6, 27989 (2016).For that, we first need a conditional_entropy function that takes a two-qubit state vector or density operator and returns the conditional entropy 𝑆(𝐴|𝐵)=𝑆(𝐴𝐵)−𝑆(𝐵) where 𝑆 denotes the von-Neumann entropy.
And now you can implement the extractable_work function, that also takes a two-qubit system and returns the amount of extractable work.

Task 4

We are now going to implement two different types of dynamics, i.e. functions that return the values of p as function of time. One is a non-CP-divisible map (see Chapter 8) and the other is eternally non-Markovian (cf. G. García-Pérez et al., arXiv:1906.07099).
  1. Write the functions p_ncp(t) and p_enm(t) that return the circuit simulating the Pauli channel at time 𝑡 for the two dynamics above.
  2. Write a circuit in which you prepare two qubits (the system and memory) in a Ψ|\Psi^-\rangle​ state.
  3. Let's use the following time steps and parameters for the dynamics. t_values = np.linspace(0,3,11)params ncp = {'eta': 0.1, 'omega': 2.0}params_enm = {'eta': 1.0, 'omega': 0.5}
  4. Execute the circuits on the simulator, collect the results and plot the extractable work as a function of time for both dynamics.


  1. Use the circuit of the general Pauli channel to implement the depolarizing channel on the real machine, and compare the experimental outcome with the ones from the previous project. Which one has higher fidelities?
  2. Run the code above on a real device and compare it with the simulation.


All done? Click here to return to the Index or go on to Project 3.