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

AutoQASM: Add support for FreeParameter as gate arguments #757

Closed
laurencap opened this issue Oct 24, 2023 · 1 comment
Closed

AutoQASM: Add support for FreeParameter as gate arguments #757

laurencap opened this issue Oct 24, 2023 · 1 comment
Assignees

Comments

@laurencap
Copy link
Contributor

laurencap commented Oct 24, 2023

This allows statements such as rx(0, FreeParameter("theta")) in AutoQASM programs.

When converted to OpenQASM, the resulting program has an input statement, such as input float[32] theta;.

https://openqasm.com/language/directives.html#input-output

The input modifier can be used to indicate that one or more variable declarations represent values which will be provided at run-time, upon invocation. This allows the programmer to use the same compiled circuits which only differ in the values of certain parameters. For backward compatibility, OpenQASM3 does not require an input declaration to be provided. When an input declaration is provided, the compiler produces an executable that leaves these free parameters unspecified: a circuit run would take as input both the executable and some choice of the parameters.

input type for FreeParameter (input float32 a)

@laurencap laurencap converted this from a draft issue Oct 24, 2023
@laurencap laurencap self-assigned this Oct 24, 2023
@laurencap laurencap changed the title Support FreeParameter AutoQASM: Add support for FreeParameter as gate arguments Oct 24, 2023
@laurencap
Copy link
Contributor Author

Closed by #762
Additional work is required, but new issues have been made to track that work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant