Skip to content

Commit

Permalink
fix print + update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGupta2012 committed Sep 19, 2024
1 parent 5e6909c commit 4f3af78
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,33 @@ Types of changes:
### ➕ New Features
* Add support for pauli measurement operators in `cirq` converter ( [#144](https://github.com/qBraid/qbraid-qir/pull/144) )
* Add support for `sizeof` operator in `openqasm` converter ( [#146](https://github.com/qBraid/qbraid-qir/pull/146) )
* Add complete support for `array` type in subroutines ( [#151](https://github.com/qBraid/qbraid-qir/pull/151) )

### 🌟 Improvements
* Re-factor the `BasicQasmVisitor` and improve modularity ( [#142](https://github.com/qBraid/qbraid-qir/pull/142) )
* Add static type checking with `mypy` ( [#150](https://github.com/qBraid/qbraid-qir/pull/150) )
* Improve measurement statement parsing logic and add support for range definition and discrete set ( [#150](https://github.com/qBraid/qbraid-qir/pull/150) )
* Expanded support for parameters used in gate body expressions. Initially, if a statement inside a gate body used its parameters in arbitrary expressions, the expression was not evaluated correctly as the identifiers were not replaced. ( [#157](https://github.com/qBraid/qbraid-qir/pull/157) ). Example -

```c++
// previous
gate my_gate(a, b) q {
rx(a) q;
ry(b) q;

// this was not supported
rz(5 * a) q;
}

// current
gate my_gate(a, b) q {
rz(a) q;

// expressions supported now
rx(a * 3.2) q;
ry(a / b + pi) q;
}
```
### 📜 Documentation
* Housekeeping updates for release ( [#135](https://github.com/qBraid/qbraid-qir/pull/135) )
Expand All @@ -32,6 +54,8 @@ Types of changes:
* Fix function block issues where qubit references were not getting populated correctly. Users can now use `for`, `switch` and other constructs inside functions. ( [#141](https://github.com/qBraid/qbraid-qir/pull/141) )
### ⬇️ Dependency Updates
* Update sphinx-autodoc-typehints requirement from <2.3,>=1.24 to >=1.24,<2.4 ( [#152](https://github.com/qBraid/qbraid-qir/pull/152) )
* Update sphinx-autodoc-typehints requirement from <2.4,>=1.24 to >=1.24,<2.5 ( [#153](https://github.com/qBraid/qbraid-qir/pull/153) )
### 👋 Deprecations
Expand Down
2 changes: 0 additions & 2 deletions qbraid_qir/qasm3/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,7 @@ def transform_gate_params(
for i, actual_arg in enumerate(gate_op.arguments):
# recursively replace ALL instances of the parameter in the expression
# with the actual value
print("Before transformation: ", actual_arg)
gate_op.arguments[i] = Qasm3Transformer.transform_expression(actual_arg, param_map)
print("After transformation: ", gate_op.arguments[i])

@staticmethod
def get_branch_params(condition: Any) -> tuple[int, str]:
Expand Down

0 comments on commit 4f3af78

Please sign in to comment.