Skip to content

Add native Noise dialect to QASM2 output as a comment. #275

Open
@weinbe58

Description

@weinbe58

have a program like

@qasm2.extended
def kernel():
    q = qasm2.Greg(3)
    native.pauli_channel([q[0]], px=0.01, py=0.02, pz=0.03)
    qasm2.h(q[0])

would lower to the following text:

OPENQASM 2.0;
#include "qelibc1.inc"

qreg[3] q;
// pauli_channel(px=0.01, py=0.02, pz=0.03) { q[0] }
h(q[1]);

using a Comment AST node to represent the text

cc: @stefan-o @lamq317 @Roger-luo

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestqasm2qasm2 related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions