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 fails when the number of prepared and measured qubits differ #757

Closed
chriseclectic opened this issue Apr 1, 2022 · 0 comments · Fixed by #759
Closed
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?

If process tomography is performed on a subset of qubits in a circuit with a different number of preparation and measurement qubits analysis will raise an exception.

Steps to reproduce the problem

Run an experiment like

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

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

Raises ValueError: cannot reshape array of size 64 into shape (8,2,2)

What is the expected behavior?

Experiment returns a fitted channel with 1 input qubit and 2 output qubits

Suggested solutions

This failure is because the analysis condition for checking the trace-preserving constraint assumes the input and output dimension of the channel are equal.

@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
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