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

v3 MVP #165

Merged
merged 84 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
66f0676
Adding FetchContent blocks for fmt and range-v3 in case they are not …
rturrado Oct 1, 2023
7f39194
Updated cqasm-utils functions to use ranges (now one-liners), and add…
rturrado Sep 29, 2023
4f7bbc2
Added cqasm-utils tests to test/CMakeLists.txt.
rturrado Sep 29, 2023
93a1a8e
Added range-v3 as a Conan dependency.
rturrado Oct 3, 2023
a03bb75
Added v3x-mvp tests.
rturrado Oct 3, 2023
95793c6
Updated grammar and visitor.
rturrado Oct 3, 2023
6c16c7a
Temporarily making V1 analyzer and resolver case-sensitive.
rturrado Oct 3, 2023
3398e77
Temporarily changing test/v1x/parsing.
rturrado Oct 3, 2023
59d606a
Added list of requirements to v3 lexer.
rturrado Oct 3, 2023
0521573
Added list of requirements to v3 lexer.
rturrado Oct 4, 2023
3410250
WIP.
rturrado Oct 9, 2023
5390253
v1x/cqasm-analyzer:
rturrado Oct 11, 2023
9076bd8
Updated parser grammar.
rturrado Oct 11, 2023
d0c699c
Fixed include files for src/v1x/cqasm-{types,values}.tree.
rturrado Oct 11, 2023
96a9042
Using nested namespaces for v1x/cqasm-instruction.
rturrado Oct 11, 2023
44413d2
Adding generate_tree_py calls for v3 parser.
rturrado Oct 11, 2023
7ac0966
Adding v3x/semantic-{instruction,primitives,semantic-helper}.
rturrado Oct 11, 2023
aa59adc
Added v3x/cqasm-semantic.tree, and updated v3x/cqasm-{ast,types,value…
rturrado Oct 11, 2023
fdc88a1
Revert "Using nested namespaces for v1x/cqasm-instruction."
rturrado Oct 12, 2023
628da61
Minor changes to v1x header files:
rturrado Oct 12, 2023
83379fe
Far away from everything but:
rturrado Oct 12, 2023
3696ac3
Removing the array supertype.
rturrado Oct 12, 2023
61cadb1
Reorganized test folder to accommodate future v3x tests.
rturrado Oct 13, 2023
c1351fc
src/CMakeLists.txt: fixed appending of v3 tree-gen files to CQASM_V3X…
rturrado Oct 13, 2023
4382891
Amend of commit below.
rturrado Oct 13, 2023
2499db3
Minor changes to v1x header files:
rturrado Oct 13, 2023
5a2ebf9
- Implemented BuildTreeGenAstVisitor.cpp.
rturrado Oct 13, 2023
ab28db7
Removed Toy v1 parsing resource files.
rturrado Oct 15, 2023
69d6719
Added V3 MVP parsing resource files.
rturrado Oct 15, 2023
1031d40
Changes to the type system: added int and real types to cqasm-types.t…
rturrado Oct 15, 2023
c1ada2c
Removed semantic.3.0.golden.txt files for the time being.
rturrado Oct 17, 2023
ecf94ac
Added and updated some res/v3x/parsing files.
rturrado Oct 17, 2023
a9ce86e
Changed v3 lexer to admit version numbers with multi-digit major and …
rturrado Oct 17, 2023
7bd242c
Version lexer admits C++ style single line comments (starting with '/…
rturrado Oct 17, 2023
8d09f33
Finished adding and updating the res/v3x/parsing files.
rturrado Oct 17, 2023
28d901a
parsing.cpp: removed version comparison, as I'm interested in purely …
rturrado Oct 17, 2023
4ddd9c9
Removed unused import statement 'get'.
rturrado Oct 17, 2023
4943430
Minor changes to the lexer:
rturrado Oct 19, 2023
f5f9fdc
Added helper functions to Version class.
rturrado Oct 20, 2023
04fdad5
Added skeletons for AnalyzeTreeGenAstVisitor.
rturrado Oct 21, 2023
0a54d10
Added v3 resolver.
rturrado Oct 22, 2023
5204b25
Updated res/v3x/ast.golden.txt files. Because:
rturrado Oct 24, 2023
d22d23c
Added res/v3x/parsing/version/*/semantic.3.0.golden.txt files.
rturrado Oct 24, 2023
89a3ec7
We are doing semantic analysis for v3 files containing only a version.
rturrado Oct 24, 2023
bf2ccc3
Updated res/v3x/ast.golden.txt files. Because:
rturrado Oct 25, 2023
dfd695e
Added bit_array_of_0_b and qubit_array_of_0_q tests.
rturrado Oct 25, 2023
cffca93
Merge remote-tracking branch 'origin/v3-mvp' into v3-mvp
rturrado Oct 25, 2023
4539cd9
Added semantic checks for variable definitions.
rturrado Oct 25, 2023
90161c4
Added some res/v3/parsing files that are already passing the semantic…
rturrado Oct 25, 2023
18f9347
Updated some res/v3x/ast.golden.txt files. Because:
rturrado Oct 26, 2023
94ce29b
Added semantic checks for instructions and expressions.
rturrado Oct 26, 2023
a159d5b
Updated some res/v3x/semantic.3.0.golden.txt files. Because:
rturrado Oct 31, 2023
f9e9ca8
Minor changes to v1 code:
rturrado Oct 31, 2023
f7470d7
Registered two overloads for 'cnot' and 'h' using qubit arrays.
rturrado Oct 31, 2023
b97203a
Added semantic checks for indexes.
rturrado Oct 31, 2023
47d57bb
Updated some res/v3x/semantic.3.0.golden.txt files:
rturrado Nov 2, 2023
6005107
Added semantic checks for the measure instruction.
rturrado Nov 2, 2023
613da36
Added "pi, eu, im, tau" tests.
rturrado Nov 3, 2023
3a48a8d
Renamed measure_statement folder to measure_instruction.
rturrado Nov 3, 2023
7951995
Renamed res/v1x/parsing folders by changing dashes to underscores, be…
rturrado Nov 4, 2023
ff0b8b8
Removed test/v1x/dirent-compat.h
rturrado Nov 4, 2023
e8a9b16
Updated test/{v1x,v3x}/parsing.cpp files.
rturrado Nov 4, 2023
1e470e8
Updated res/v3x/parsing/measure_instruction/{bit_and_qubit,no_qubit} …
rturrado Nov 4, 2023
3ff51a0
Minor changes to src/{v1x,v3x}/cqasm-values.cpp.
rturrado Nov 4, 2023
dceb804
Added check_input_indices_equals_output_indices to src/v3x/AnalyzeTre…
rturrado Nov 4, 2023
391fa4c
Changed res/v3x/parsing/measure_instruction/input.cq files so they do…
rturrado Nov 4, 2023
25601e4
Measure instruction can only work with one input operand (qubit, qubi…
rturrado Nov 4, 2023
87356c4
Updated res/v3x/parsing/measure_instruction files.
rturrado Nov 4, 2023
dc3401d
Fixed some errors and suggestions pointed out by clang-tidy.
rturrado Nov 4, 2023
efe1a75
Restored v1 code to be case-insensitive again. The Overload templates…
rturrado Nov 5, 2023
e1a82b4
Changed line endings from DOS to Unix.
rturrado Nov 5, 2023
cae4a33
Fixed v10.qc test.
rturrado Nov 5, 2023
8fb61e8
Changed ssize_t to tree::signed_size_t to fix Windows compilation.
rturrado Nov 5, 2023
3c56567
Updated res/v3x/parsing/*/*/semantic.3.0.golden.txt files. Because:
rturrado Nov 5, 2023
8c432be
Added request_same_size_input_output_indices flag to a semantic::Inst…
rturrado Nov 5, 2023
07f24b0
Trying to fix Python (macos-latest) build.
rturrado Nov 6, 2023
fcd84c5
Trying to fix C++ tests (clang/MacOS/ARM64) build.
rturrado Nov 6, 2023
d07de07
Added more 'measure_instruction' tests.
rturrado Nov 6, 2023
92ef8c7
Updated res/v3x/parsing/tests. Because:
rturrado Nov 9, 2023
e6945bb
Removed output_operands from instruction in src/v3x/cqasm-ast.tree.
rturrado Nov 9, 2023
97711e4
Removed the Maybe<Mapping> parameter from the resolver.
rturrado Nov 9, 2023
2088e76
Renamed request_same_size_input_output_indices to request_qubit_and_b…
rturrado Nov 10, 2023
49bc8ec
Added python/module/cqasm/v3x folder.
rturrado Nov 10, 2023
fa2828b
Fixed some clang-tidy warnings.
rturrado Nov 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Program(
]
)
>
output_operands: -
annotations: []
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Program(
]
)
>
output_operands: -
annotations: []
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Program(
]
)
>
output_operands: -
annotations: []
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Program(
]
)
>
output_operands: -
annotations: []
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Program(
]
)
>
output_operands: -
annotations: []
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Program(
]
)
>
output_operands: -
annotations: []
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Program(
]
)
>
output_operands: -
annotations: []
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ Program(
]
)
>
output_operands: -
annotations: []
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ Program(
]
)
>
output_operands: -
annotations: []
)
Instruction( # input.cq:6:1..2
Expand Down Expand Up @@ -95,7 +94,6 @@ Program(
]
)
>
output_operands: -
annotations: []
)
Instruction( # input.cq:7:1..5
Expand Down Expand Up @@ -151,7 +149,6 @@ Program(
]
)
>
output_operands: -
annotations: []
)
]
Expand Down
1 change: 0 additions & 1 deletion res/v3x/parsing/instruction/qubit_q__x_q/ast.golden.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Program(
]
)
>
output_operands: -
annotations: []
)
]
Expand Down
1 change: 0 additions & 1 deletion res/v3x/parsing/instruction/v_1/ast.golden.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Program(
]
)
>
output_operands: -
annotations: []
)
]
Expand Down
1 change: 0 additions & 1 deletion res/v3x/parsing/instruction/x_1/ast.golden.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Program(
]
)
>
output_operands: -
annotations: []
)
]
Expand Down
1 change: 0 additions & 1 deletion res/v3x/parsing/instruction/x_3_14/ast.golden.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Program(
]
)
>
output_operands: -
annotations: []
)
]
Expand Down
1 change: 0 additions & 1 deletion res/v3x/parsing/instruction/x_q0/ast.golden.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Program(
]
)
>
output_operands: -
annotations: []
)
]
Expand Down
1 change: 0 additions & 1 deletion res/v3x/parsing/instruction/x_v/ast.golden.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Program(
]
)
>
output_operands: -
annotations: []
)
]
Expand Down
8 changes: 3 additions & 5 deletions res/v3x/parsing/measure_instruction/3_14_to_b/ast.golden.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,12 @@ Program(
FloatLiteral( # input.cq:5:13..17
value: 3.14
)
Identifier( # input.cq:5:1..2
name: b
)
]
)
>
output_operands: <
Identifier( # input.cq:5:1..2
name: b
)
>
annotations: []
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,12 @@ Program(
Identifier( # input.cq:6:14..15
name: q
)
Identifier( # input.cq:6:1..3
name: b0
)
]
)
>
output_operands: <
Identifier( # input.cq:6:1..3
name: b0
)
>
annotations: []
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,12 @@ Program(
Identifier( # input.cq:6:13..14
name: q
)
Identifier( # input.cq:6:1..2
name: b
)
]
)
>
output_operands: <
Identifier( # input.cq:6:1..2
name: b
)
>
annotations: []
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,12 @@ Program(
Identifier( # input.cq:6:13..14
name: q
)
Identifier( # input.cq:6:1..2
name: b
)
]
)
>
output_operands: <
Identifier( # input.cq:6:1..2
name: b
)
>
annotations: []
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,34 +57,32 @@ Program(
Identifier( # input.cq:6:18..19
name: q
)
]
)
>
output_operands: <
Index( # input.cq:6:1..2
expr: <
Identifier(
name: b
)
>
indices: <
IndexList(
items: [
IndexRange(
first: <
IntegerLiteral( # input.cq:6:3..4
value: 0
)
>
last: <
IntegerLiteral( # input.cq:6:5..6
value: 4
Index( # input.cq:6:1..2
expr: <
Identifier(
name: b
)
>
indices: <
IndexList(
items: [
IndexRange(
first: <
IntegerLiteral( # input.cq:6:3..4
value: 0
)
>
last: <
IntegerLiteral( # input.cq:6:5..6
value: 4
)
>
)
>
]
)
]
>
)
>
]
)
>
annotations: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,34 +57,32 @@ Program(
Identifier( # input.cq:6:18..19
name: q
)
]
)
>
output_operands: <
Index( # input.cq:6:1..2
expr: <
Identifier(
name: b
)
>
indices: <
IndexList(
items: [
IndexRange(
first: <
IntegerLiteral( # input.cq:6:3..4
value: 2
)
>
last: <
IntegerLiteral( # input.cq:6:5..6
value: 6
Index( # input.cq:6:1..2
expr: <
Identifier(
name: b
)
>
indices: <
IndexList(
items: [
IndexRange(
first: <
IntegerLiteral( # input.cq:6:3..4
value: 2
)
>
last: <
IntegerLiteral( # input.cq:6:5..6
value: 6
)
>
)
>
]
)
]
>
)
>
]
)
>
annotations: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,12 @@ Program(
Identifier( # input.cq:6:13..14
name: q
)
Identifier( # input.cq:6:1..2
name: b
)
]
)
>
output_operands: <
Identifier( # input.cq:6:1..2
name: b
)
>
annotations: []
)
]
Expand Down
8 changes: 3 additions & 5 deletions res/v3x/parsing/measure_instruction/b_to_b/ast.golden.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,12 @@ Program(
Identifier( # input.cq:5:13..14
name: b
)
Identifier( # input.cq:5:1..2
name: b
)
]
)
>
output_operands: <
Identifier( # input.cq:5:1..2
name: b
)
>
annotations: []
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,12 @@ Program(
Identifier( # input.cq:6:13..14
name: q
)
Identifier( # input.cq:6:1..2
name: b
rturrado marked this conversation as resolved.
Show resolved Hide resolved
)
]
)
>
output_operands: <
Identifier( # input.cq:6:1..2
name: b
)
>
annotations: []
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,12 @@ Program(
Identifier( # input.cq:6:13..15
name: q0
)
Identifier( # input.cq:6:1..2
name: b
)
]
)
>
output_operands: <
Identifier( # input.cq:6:1..2
name: b
)
>
annotations: []
)
]
Expand Down
Loading