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

Kernel dies when ECR in basis gate set for MPS #2118

Closed
zlatko-minev opened this issue May 1, 2024 · 2 comments · Fixed by #2137
Closed

Kernel dies when ECR in basis gate set for MPS #2118

zlatko-minev opened this issue May 1, 2024 · 2 comments · Fixed by #2137
Assignees
Labels
bug Something isn't working

Comments

@zlatko-minev
Copy link

Informations

  • Qiskit Aer version: 0.14.1
  • Python version: 3.11.8
  • Operating system: MacOS

What is the current behavior?

Kernel dies when using ECR basis gate in MPS simulator.

Steps to reproduce the problem

from qiskit import QuantumCircuit, transpile
from qiskit_aer import AerSimulator

qc = QuantumCircuit(2)
qc.h(0)
qc.cx(0, 1)
qc.rz(0.5, 0)
qc.measure_all()

# Works with CX
simulator = AerSimulator(method="matrix_product_state", basis_gates=["cx", "id", "rz", "sx"])
qct = transpile(qc, simulator)
display(qct.draw(output='mpl'))
job = simulator.run(qct)

# Kernel dies with ECR
simulator = AerSimulator(method="matrix_product_state", basis_gates=["ecr", "id", "rz", "sx"])
qct = transpile(qc, simulator)
display(qct.draw(output='mpl'))
job = simulator.run(qct)

Last line causes Kernel to die every time.

What is the expected behavior?

Kernel should not die, simulation should be able to use CX or ECR basis gate, esp. as new devices all use ECR.

Suggested solutions

Unsure

@zlatko-minev zlatko-minev added the bug Something isn't working label May 1, 2024
@doichanj doichanj self-assigned this May 2, 2024
@doichanj
Copy link
Collaborator

doichanj commented May 2, 2024

I'm fixing this issue by 2 steps:

  1. Raise error if unsupported gate is passed as basis_gates
  2. Add native support for ecr gate in MPS method

@zlatko-minev
Copy link
Author

Wonderful, thank you, that sounds good.

We will want to test the ECR to make sure it's implemented faithfully.

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.

2 participants