Skip to content

Commit 0e9bfdc

Browse files
authored
Bump qss-qasm v0.2.16 (#186)
This updates the parser to the latest version. A bug has been discovered, so this will need to be bumped to v0.2.17 when the fix is ready. Testing CI for now openqasm/qe-qasm#21
1 parent 5e51cfc commit 0e9bfdc

File tree

4 files changed

+9
-17
lines changed

4 files changed

+9
-17
lines changed

conan/qasm/conandata.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
sources:
2-
hash: "8530001d004f1859d7d75a5a06410fb248b0c338"
2+
hash: "b494a38c409d370ec3611a2d058ec95e0ccf9b4c"
33
requirements:
44
- "gmp/6.2.1"
55
- "mpfr/4.1.0"

conan/qasm/conanfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
class QasmConan(ConanFile):
2222
name = "qasm"
23-
version = "0.2.14"
23+
version = "0.2.16"
2424
url = "https://github.com/Qiskit/qss-qasm.git"
2525
settings = "os", "compiler", "build_type", "arch"
2626
options = {"shared": [True, False], "examples": [True, False]}

conandata.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ requirements:
66
- pybind11/2.10.1
77
- clang-tools-extra/14.0.6@
88
- llvm/14.0.6-2@
9-
- qasm/0.2.14@qss/stable
9+
- qasm/0.2.16@qss/stable

test/Frontend/OpenQASM3/bitstring-init.qasm

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,12 @@ cbit[8] b = 8;
4040
// MLIR: oq3.variable_assign @c : !quir.cbit<4> = [[CAST5]]
4141
cbit[4] c = 83957;
4242

43-
// initializer string shorter than the register
44-
// Not yet supported: modeling the initializer value as a single 137-bit integer
43+
// initializer strings are required by the spec to be the same size as the cbit
44+
// Not yet supported: modeling the initializer value as a single 100-bit integer
4545
// is conceptually fine, yet MLIR's asm printer code hits an assertion when
4646
// turning the long integer into part of the value's name.
47-
// MLIR: [[LONGBITREG_CONST:%.*]] = arith.constant 621124011108895393450852865781 : i137
48-
// MLIR: [[LONGBITREG_CBIT:%.*]] = "oq3.cast"([[LONGBITREG_CONST]]) : (i137) -> !quir.cbit<137>
49-
// MLIR: oq3.variable_assign @longbitreg : !quir.cbit<137> = [[LONGBITREG_CBIT]]
50-
cbit[137] longbitreg = "0111110101101111010110111101011011110101101111010110111101011011110101101111010110111101011011110101";
47+
// MLIR: [[LONGBITREG_CONST:%.*]] = arith.constant 621124011108895393450852865781 : i100
48+
// MLIR: [[LONGBITREG_CBIT:%.*]] = "oq3.cast"([[LONGBITREG_CONST]]) : (i100) -> !quir.cbit<100>
49+
// MLIR: oq3.variable_assign @longbitreg : !quir.cbit<100> = [[LONGBITREG_CBIT]]
50+
cbit[100] longbitreg = "0111110101101111010110111101011011110101101111010110111101011011110101101111010110111101011011110101";
5151
// compare python int("0b0111110101101111010110111101011011110101101111010110111101011011110101101111010110111101011011110101", 0)
52-
53-
// initializer string is longer than the register
54-
// As above
55-
// MLIR: [[LONGBITREG2_CONST:%.*]] = arith.constant 73147070982778154320087907793426741712629 : i137
56-
// MLIR: [[LONGBITREG2_CBIT:%.*]] = "oq3.cast"([[LONGBITREG2_CONST]]) : (i137) -> !quir.cbit<137>
57-
// MLIR: oq3.variable_assign @longbitreg2 : !quir.cbit<137> = [[LONGBITREG2_CBIT]]
58-
cbit[137] longbitreg2 = "10101101011011110101101111010110111101011011110101101111010110111101011011110101101111010110111101011011110101101111010110111101011011110101";
59-
// compare python int("0b<bitstring>", 0) & ((1<<137) - 1)

0 commit comments

Comments
 (0)