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

Expand target model for more constraints on instruction parameters #13784

Open
mtreinish opened this issue Feb 4, 2025 · 0 comments
Open

Expand target model for more constraints on instruction parameters #13784

mtreinish opened this issue Feb 4, 2025 · 0 comments
Labels
mod: transpiler Issues and PRs related to Transpiler type: feature request New feature or request
Milestone

Comments

@mtreinish
Copy link
Member

What should we add?

In recent hardware there are backends that support gates where there are continuous. Two examples of this are the RZZ gate on IBM heron processors which support an angle of 0 to pi but anything outside of that isn't supported on the QPU. The ibm provider applies this bound as a custom scheduling stage that translates the gates if the angle is outside the bounds. Similarly aqt hardware implements an R gate where R(θ, φ) has the bounds θ ∈ [0, π] and φ ∈ [0, 2π]. Aqt works around this by adding rx as their target gate and then has a post processing step to convert the rx gate to r within the bounds.

Right now the target can represent a discrete angle by setting a float value to a parameter for a gate, and a continuous angle without any constraints by setting a Parameter value for a gate. We should expand this model to outline there are additional constraints on the parameter of a supported instruction. For example, having a way to express that this instruction only supports float angles between 0 and pi, no parameterized gates, and no angle values outside of that.

However, to fully support this path though we will need to have a transpiler mechanism/pass to conform to this constraint. Simply identifying
whether a gate is outside of the constraints isn't sufficient, as we'll need the transpiler to be able to translate a gate with a parameter outside the parameter bounds to something that is in the bounds. I'm not sure we can do this generally for all gates including custom definitions, but at least having a documented mechanism and one that works for standard gates should be sufficient.

@mtreinish mtreinish added the type: feature request New feature or request label Feb 4, 2025
@mtreinish mtreinish added this to the 2.1.0 milestone Feb 4, 2025
@mtreinish mtreinish added the mod: transpiler Issues and PRs related to Transpiler label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mod: transpiler Issues and PRs related to Transpiler type: feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant