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

The RXXGate tranpiles to RXX-wrapped #144

Closed
jadersantos opened this issue Mar 7, 2024 · 1 comment · Fixed by #145
Closed

The RXXGate tranpiles to RXX-wrapped #144

jadersantos opened this issue Mar 7, 2024 · 1 comment · Fixed by #145
Assignees
Labels
bug Something isn't working

Comments

@jadersantos
Copy link

Informations

  • Qiskit AQT provider version: qiskit-aqt-provider = 1.30.0
  • Qiskit version: qiskit = 0.46.0
  • Python version: 3.12.1 (specified environment)
  • Operating system: macOS : Sonoma 14.2.1

What is the current behavior?

We have noticed an issue in transpiling a circuit with the gate rxx with optimization_level = 0.
By using an argument theta outside the range [0,pi), the rxx gate is transpiled to rxx-wrapped, which is not in the basis gate set.
The problem could be overcome by using optimization_level > 0, but it shouldnt happen on the optimization_level =0 case.

Steps to reproduce the problem

from qiskit import QuantumCircuit, transpile
from qiskit_aqt_provider import AQTProvider
from qiskit_aqt_provider.primitives import AQTSampler

provider = AQTProvider("ACCESS_TOKEN")
backend = provider.get_backend("offline_simulator_no_noise")

circuit = QuantumCircuit(2)
circuit.rxx(-0.1, 0 ,1) ##the first argument is theta (we set it as negative to show the issue)
circuit_t = transpile(circuit, backend, optimization_level=0)
circuit_t.draw()

This code results with the wrapped-RXX gate. When attempting to run the circuit with said gate, the run results with an error:

job = backend.run(circuit_t,shots = 100)

" ValueError: Operation 'Rxx-warpped(-0.1)' npt om tje nasos gate set: {rz, r, rxxx}"

What is the expected behavior?

With this basic script, the transpilation should've result in a circuit with gates which are in the basis gate set.

Suggested solutions

@airwoodix
Copy link
Collaborator

Thanks for the bug report. The issue should be resolved by #145.

@airwoodix airwoodix self-assigned this Mar 14, 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

Successfully merging a pull request may close this issue.

2 participants