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

qpy serialization fails with faulty qubits #1384

Closed
AzizNgoueya opened this issue Feb 6, 2024 · 3 comments
Closed

qpy serialization fails with faulty qubits #1384

AzizNgoueya opened this issue Feb 6, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@AzizNgoueya
Copy link

Describe the bug
Today when submitting a job on ibm_osaka using backend.run() produces the following error:
File "/usr/local/lib/python3.10/dist-packages/qiskit_ibm_provider/qpy/binary_io/circuits.py", line 917, in _write_layout
virtual_bit = final_layout_physical[i]
KeyError: 16

Steps to reproduce

service = QiskitRuntimeService()    
backend = service.get_backend('ibm_osaka')
qcT = transpile(qc, backend=backend)
job =  backend.run(qcT,shots=1000)

Expected behavior
Should works

Suggested solutions
The backend reports two faulty qubits on osaka today, backend.properties().faulty_qubits() : [16, 106] and they are missing in the physical layout. I added an exception here https://github.com/Qiskit/qiskit-ibm-provider/blob/f537ad7ece1d325e496fcce29712d50605b5080e/qiskit_ibm_provider/qpy/binary_io/circuits.py#L963

for i in range(circuit.num_qubits):
            try:
                virtual_bit = final_layout_physical[i]
                final_layout_array.append(circuit.find_bit(virtual_bit).index)
            except KeyError:
                continue

Additional Information

  • qiskit-ibm-runtime version: 0.18.0
  • qiskit-ibm-provider version: 0.8.0
  • Python version: 3.8.18
  • Operating system: macos
@AzizNgoueya AzizNgoueya added the bug Something isn't working label Feb 6, 2024
@kt474
Copy link
Member

kt474 commented Feb 12, 2024

Hi @AzizNgoueya, the changes in #1377 removed the qpy module from our codebase. If you are still having this issue with the latest version (> 0.19.0), the qpy issue would be fixed in https://github.com/Qiskit/qiskit.

@AzizNgoueya
Copy link
Author

Hi @kt474, I am still having the issue with the latest version of qiskit-ibm-runtime but we will wait for the qiskit 1.0.0 release, Thanks.

@AzizNgoueya
Copy link
Author

Closing this issue since it works with qiskit 1.0.0

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

No branches or pull requests

2 participants