You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance function call handling to support nested functions (#245)
* Enhance function call handling to support nested functions, improving modularity and reusability in QASM programs. Update tests to validate new functionality.
* update changelog
* restructure changelog
Copy file name to clipboardExpand all lines: CHANGELOG.md
+24-20Lines changed: 24 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,27 @@ Types of changes:
18
18
- A new discussion template for issues in pyqasm ([#213](https://github.com/qBraid/pyqasm/pull/213))
19
19
- A github workflow for validating `CHANGELOG` updates in a PR ([#214](https://github.com/qBraid/pyqasm/pull/214))
20
20
- Added `unroll` command support in PYQASM CLI with options skipping files, overwriting originals files, and specifying output paths.([#224](https://github.com/qBraid/pyqasm/pull/224))
21
+
- Added `Duration`,`Stretch` type, `Delay` and `Box` support for `OPENQASM3` code in pyqasm. ([#231](https://github.com/qBraid/pyqasm/pull/231))
22
+
###### Example:
23
+
```qasm
24
+
OPENQASM 3.0;
25
+
include "stdgates.inc";
26
+
qubit[3] q;
27
+
duration t1 = 200dt;
28
+
duration t2 = 300ns;
29
+
stretch s1;
30
+
delay[t1] q[0];
31
+
delay[t2] q[1];
32
+
delay[s1] q[0], q[2];
33
+
box [t2] {
34
+
h q[0];
35
+
cx q[0], q[1];
36
+
delay[100ns] q[2];
37
+
}
38
+
```
39
+
- Added a new `QasmModule.compare` method to compare two QASM modules, providing a detailed report of differences in gates, qubits, and measurements. This method is useful for comparing two identifying differences in QASM programs, their structure and operations. ([#233](https://github.com/qBraid/pyqasm/pull/233))
21
40
- Added `.github/copilot-instructions.md` to the repository to document coding standards and design principles for pyqasm. This file provides detailed guidance on documentation, static typing, formatting, error handling, and adherence to the QASM specification for all code contributions. ([#234](https://github.com/qBraid/pyqasm/pull/234))
41
+
- Added support for custom include statements in `OPENQASM3` code in pyqasm. This allows users to include custom files or libraries in their QASM programs, enhancing modularity and reusability of code. ([#236](https://github.com/qBraid/pyqasm/pull/236))
22
42
- Added support for `Angle`,`extern` and `Complex` type in `OPENQASM3` code in pyqasm. ([#239](https://github.com/qBraid/pyqasm/pull/239))
23
43
###### Example:
24
44
```qasm
@@ -43,31 +63,13 @@ Types of changes:
43
63
extern func6(bit[4]) -> bit[4];
44
64
bit[4] be1 = func6(bd);
45
65
```
46
-
- Added a new `QasmModule.compare` method to compare two QASM modules, providing a detailed report of differences in gates, qubits, and measurements. This method is useful for comparing two identifying differences in QASM programs, their structure and operations. ([#233](https://github.com/qBraid/pyqasm/pull/233))
47
66
48
67
### Improved / Modified
49
68
- Added `slots=True` parameter to the data classes in `elements.py` to improve memory efficiency ([#218](https://github.com/qBraid/pyqasm/pull/218))
50
69
- Updated the documentation to include core features in the `README` ([#219](https://github.com/qBraid/pyqasm/pull/219))
51
70
- Added support to `device qubit` resgister consolidation.([#222](https://github.com/qBraid/pyqasm/pull/222))
52
71
- Updated the scoping of variables in `QasmVisitor` using a `ScopeManager`. This change is introduced to ensure that the `QasmVisitor` and the `PulseVisitor` can share the same `ScopeManager` instance, allowing for consistent variable scoping across different visitors. No change in the user API is expected. ([#232](https://github.com/qBraid/pyqasm/pull/232))
53
-
- Added `Duration`,`Stretch` type, `Delay` and `Box` support for `OPENQASM3` code in pyqasm. ([#231](https://github.com/qBraid/pyqasm/pull/231))
54
-
###### Example:
55
-
```qasm
56
-
OPENQASM 3.0;
57
-
include "stdgates.inc";
58
-
qubit[3] q;
59
-
duration t1 = 200dt;
60
-
duration t2 = 300ns;
61
-
stretch s1;
62
-
delay[t1] q[0];
63
-
delay[t2] q[1];
64
-
delay[s1] q[0], q[2];
65
-
box [t2] {
66
-
h q[0];
67
-
cx q[0], q[1];
68
-
delay[100ns] q[2];
69
-
}
70
-
```
72
+
- Enhance function call handling by adding support for nested functions. This change allows for more complex function definitions and calls, enabling better modularity and reusability of code within QASM programs. ([#245](https://github.com/qBraid/pyqasm/pull/245))
71
73
72
74
### Deprecated
73
75
@@ -78,10 +80,12 @@ Types of changes:
78
80
- Fixed depth calculation for decomposable gates by computing depth of each constituent quantum gate.([#211](https://github.com/qBraid/pyqasm/pull/211))
79
81
- Optimized statement copying in `_visit_function_call` with shallow-copy fallback to deepcopy and added `max_loop_iters` loop‐limit check in for loops.([#223](https://github.com/qBraid/pyqasm/pull/223))
80
82
83
+
81
84
### Dependencies
82
85
- Add `pillow<11.3.0` dependency for test and visualization to avoid CI errors in Linux builds ([#226](https://github.com/qBraid/pyqasm/pull/226))
83
86
- Added `tabulate` to the testing dependencies to support new comparison table tests. ([#216](https://github.com/qBraid/pyqasm/pull/216))
84
-
87
+
- Update `docutils` requirement from <0.22 to <0.23 ([#241](https://github.com/qBraid/pyqasm/pull/241))
88
+
- Bumps `actions/download-artifact` version from 4 to 5 ([#243](https://github.com/qBraid/pyqasm/pull/243))
0 commit comments