Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProcessTomography sometimes computes the target channel incorrectly #758

Closed
chriseclectic opened this issue Apr 1, 2022 · 0 comments · Fixed by #759
Closed

ProcessTomography sometimes computes the target channel incorrectly #758

chriseclectic opened this issue Apr 1, 2022 · 0 comments · Fixed by #759
Assignees
Labels
bug Something isn't working
Milestone

Comments

@chriseclectic
Copy link
Collaborator

Informations

  • Qiskit Experiments version: 0.2
  • Python version: All
  • Operating system: All

What is the current behavior?

The process tomography measurement computes the target state for analysis incorrectly when not all qubits are prepared and measured, and the prepared and measured qubits differ. This results in the wrong value being returned for the "process_fidelity" analysis result since it is comparing the fit to the incorrect channel resulting in a low fidelity even for a a correct fit.

Steps to reproduce the problem

Run an experiment like

qc = QuantumCircuit(3)
qc.h(0)
qc.x(1)
qc.s(2)

qptexp = tomo.ProcessTomography(
    qc, preparation_qubits=[0], measurement_qubits=[1])
qptdata = qptexp.run(AerSimulator(), shots=10000).block_for_results()

The fitted channel is close to the true target

      [[0.,  0., 0.,  0.],
       [0.,  1., 0.,  0.],
       [0., 0.,  0., 0.],
       [0.,  0., 0.,  1.]])

However the automatically calculated target is the completely depolarizing channel

     [[ 0.5,  0. , -0. ,  0. ],
       [ 0. ,  0.5,  0. , -0. ],
       [-0. ,  0. ,  0.5,  0. ],
       [ 0. , -0. ,  0. ,  0.5]]

Resulting in an incorrectly reported process fidelity of 0.5

What is the expected behavior?

The target channel should be computed correctly for circuits with no measurements in them

Suggested solutions

This error is due to how the reduced target channel is calculated via partial trace of the full Choi matrix. This partial tracing is only correct for measurement indices, preparation indices should be projected onto the |0><0| state (the initial state of the circuit for those qubits not being prepared via tomography) rather than being traced over which is equivalent to evolving the maximumally mixed initial state I/2.

@chriseclectic chriseclectic added the bug Something isn't working label Apr 1, 2022
@chriseclectic chriseclectic added this to the Release 0.3 milestone Apr 1, 2022
@chriseclectic chriseclectic self-assigned this Apr 1, 2022
@chriseclectic chriseclectic changed the title ProcessTomography computes sometimes computes the target channel incorrectly ProcessTomography sometimes computes the target channel incorrectly Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant