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

DynamicsBackend.from_backend doesn't work with subsystem measurements for backends with a qubit count greater than 32 #357

Open
NotJustSid opened this issue Jun 10, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@NotJustSid
Copy link

Informations

  • Qiskit Dynamics version: main
  • Python version: 3.10
  • Operating system: Windows

What is the current behavior?

A backend created through DynamicsBacked.from_backend and initialized with a subsystem_list errors out with

ValueError: maximum supported dimension for an ndarray is ..., found ...

Steps to reproduce the problem

from qiskit_ibm_runtime import QiskitRuntimeService
from qiskit_dynamics import DynamicsBackend

service = QiskitRuntimeService()
kyoto_backend = service.backend('ibm_kyoto')
kyoto_qubits = [1, 0]

dynamics_backend = DynamicsBackend.from_backend(kyoto_backend, subsystem_list=kyoto_qubits)

circuit = QuantumCircuit(2, 2) # example circuit
circuit.cx(0, 1)
circuit.x(0)
circuit.measure(0, 0)

transpiled_circuit = transpile(circuit, kyoto_backend)
sched = schedule(transpiled_circuit, kyoto_backend)

result = dynamics_backend.run(sched).result() # ValueError: maximum supported dimension for an ndarray is 32, found 127

What is the expected behavior?

Successful simulation followed by a Result object being returned.

Suggested solutions/workaround

As detailed in this Slack thread one would need to redefine options.subsystem_dims.

Making changes similar to this on a local fork acts as a temporary workaround.

@NotJustSid NotJustSid added the bug Something isn't working label Jun 10, 2024
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

1 participant