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

Transpile using the native gate set of Forte 1 #210

Open
sebastianvromero opened this issue Dec 9, 2024 · 0 comments
Open

Transpile using the native gate set of Forte 1 #210

sebastianvromero opened this issue Dec 9, 2024 · 0 comments

Comments

@sebastianvromero
Copy link

Information

  • Qiskit IonQ Provider version: 0.5.8

  • Qiskit version: 1.1.0

  • Python version: 3.9.6

  • Operating system: macOS Sequoia v15.1.1

What is the current behavior?

Using transpile() from qiskit, I am trying to transpile a given circuit into the native set of gates of IonQ Forte 1, which considers ZZ gates instead of MS gates, as IonQ Aria platforms have.

Steps to reproduce the problem

from qiskit_ionq import IonQProvider
from qiskit import QuantumCircuit, transpile

provider = IonQProvider(token='your token')
native_simulator = provider.get_backend('ionq_simulator', gateset='native')
native_simulator.set_options(noise_model='forte-1')

qc = QuantumCircuit(2)
qc.rzz(1, 0, 1)

transpiled_qc = transpile(qc, backend=native_simulator, optimization_level=3)
print(transpiled_qc.count_ops()) # OrderedDict([('gpi2', 10), ('ms', 2), ('gpi', 1)])

What is the expected behavior?

Instead of MS gates, the transpiler should be aware of the backend chosen and transpile accordingly. If Forte backend is chosen, use ZZ as entangling gates instead.

Suggested solutions

The provider.get_backend() function could include a new input which is the device selected.

  • If device='aria-1': use GPi, GPi2 and MS gates.
  • If device='forte-1': use GPi, GPi2 and ZZ gates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant