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

qasm3_to_qir support for subroutines #70

Open
ryanhill1 opened this issue Mar 29, 2024 · 0 comments
Open

qasm3_to_qir support for subroutines #70

ryanhill1 opened this issue Mar 29, 2024 · 0 comments
Labels
enhancement New feature or request qasm3 Related to OpenQASM 3 conversions unitary-hack Issues tagged with Unitary Hack '24

Comments

@ryanhill1
Copy link
Member

ryanhill1 commented Mar 29, 2024

Add support for converting OpenQASM 3 program which contain subroutines to QIR.

elif isinstance(statement, SubroutineDefinition):
raise NotImplementedError("OpenQASM 3 subroutines not yet supported")

Placeholder test cases: test_subroutines.py

e.g.

OPENQASM 3.0;
include "stdgates.inc";

def apply_h_and_measure(qubit q) -> bit {
    bit result;
    h q;
    measure q -> result;
    return result;
}

qreg q[1];
creg c[1];

c[0] = apply_h_and_measure(q[0]);

openqasm reference for implementing subroutines

@ryanhill1 ryanhill1 added enhancement New feature or request qasm3 Related to OpenQASM 3 conversions labels Mar 29, 2024
@TheGupta2012 TheGupta2012 added the unitary-hack Issues tagged with Unitary Hack '24 label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request qasm3 Related to OpenQASM 3 conversions unitary-hack Issues tagged with Unitary Hack '24
Projects
None yet
Development

No branches or pull requests

2 participants