Supporting assignment of measurement value to variable
Maintainer thường phản hồi trong vòng 1 ngày
@TheGupta2012 đang làm issue này rồi.
Từ ngày 31/7/2024.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Feature Description
Both of the following OpenQASM 3 strings generated using autoqasm fail program validation due to Unsupported expression type <class 'openqasm3.ast.BitstringLiteral'>. However, if generated directly from autoqasm, it seems they should be valid programs.
First:
import autoqasm as aq
@aq.main
def my_program():
ins.h(0)
ins.cnot(0, 1)
return ins.measure([0, 1])
qasm_str = my_program.build().to_ir()
print(qasm_str)
OPENQASM 3.0;
output bit[2] return_value;
qubit[2] __qubits__;
h __qubits__[0];
cnot __qubits__[0], __qubits__[1];
bit[2] __bit_0__ = "00";
__bit_0__[0] = measure __qubits__[0];
__bit_0__[1] = measure __qubits__[1];
return_value = __bit_0__;
Second:
import autoqasm as aq
@aq.main
def my_program():
ins.h(0)
ins.cnot(0, 1)
result = ins.measure([0, 1])
return result
qasm_str = my_program.build().to_ir()
print(qasm_str)
OPENQASM 3.0;
output bit[2] result;
qubit[2] __qubits__;
h __qubits__[0];
cnot __qubits__[0], __qubits__[1];
bit[2] __bit_0__ = "00";
__bit_0__[0] = measure __qubits__[0];
__bit_0__[1] = measure __qubits__[1];
result = __bit_0__;
And both raise the following exception from validate() method:
from pyqasm import loads
program = loads(qasm_str)
program.validate()
...
ValidationError: Unsupported expression type <class 'openqasm3.ast.BitstringLiteral'>
- Ngôn ngữ chính
- Python
- Star
- 29
- Fork
- 33
- Merge trung bình
- 2 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 15
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của qBraid/pyqasm
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement error-handling program-validation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Move the QASM 2 printer and its branch pre-processing out of qasm2.pyCó thể đã có người làm @danielgaskins đã nhận 9 ngày trước. Đang mởenhancement qasm2
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
qBraid/pyqasm#447 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] dumps() emits extern calls without a semicolon, producing unparsable QASMCó thể đã có người làm @Jah-yee đã nhận 18 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 25/100
qBraid/pyqasm#438 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Parse failures raise ValidationError with an empty message; the ANTLR diagnostic is lostCó thể đã có người làm @tonycoder-hub đã nhận 11 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 22/100
qBraid/pyqasm#436 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của qBraid/pyqasm
Issue tương tự
-
style: article/section 📝 system: cloud.rc ☁️ system: security 🔐
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
uabrc/uabrc.github.io#1262 ·
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
NCAR/miles-credit#526 ·
-
documentation
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 76/100
conda/conda-lock#957 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Type: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
aws-samples/sample-per-model-bedrock#464 ·
Maintainer thường phản hồi trong vòng 1 ngày