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

[WIP] Parameter Namespaces [Variant B] #418

Draft
wants to merge 34 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4488d13
MappingPT now always accepts partial parameter mappings; deprecated t…
lumip Aug 16, 2018
09d62e7
MappingPT now optionally places unmapped parameters into namespace.
lumip Aug 16, 2018
0a45063
Merge branch 'master' into issues/344_parameter_namespaces
lumip Sep 28, 2018
15a4514
Some comments to clarify structure of utils/sympy.py.
lumip Oct 2, 2018
832b477
Attempt to enable namespace dot-notation (e.g. "foo.bar") in sympy ex…
lumip Oct 2, 2018
d760320
Alternative approach to namespace dot notation.
lumip Nov 5, 2018
610441e
Code cleanup
lumip Nov 5, 2018
2869601
Test to ensure compatibility with default parser.
lumip Nov 5, 2018
261ad5a
Merge branch 'master' into issues/344_parameter_namespaces_2
lumip Nov 13, 2018
ec1fa6b
Added tests for namespaced symbols to all expression test variants in…
lumip Nov 13, 2018
6db26e4
WIP: explicit usage of SymbolNamespace to specify namespaces
lumip Nov 13, 2018
b98c7cb
wip on parameter namespaces
lumip Nov 28, 2018
d4e6b42
wip on parameter namespaces
lumip Nov 28, 2018
fd80103
parameter namespaces: all tests running except lamdified/compiled eva…
lumip Nov 28, 2018
b8d8a6c
Making evaluate_lamdified work again
lumip Nov 28, 2018
649341d
evaluate_compiled raises a NotImplementedError for now
lumip Nov 28, 2018
9216aa5
Fixing failing tests, some cleanup and comments. recursive_substituti…
lumip Nov 28, 2018
ec72e42
Merge branch 'master' into issues/344_parameter_namespaces_3
lumip Dec 4, 2018
bc33d18
ExpressionScalar equality operator now also returns true in case of n…
lumip Dec 4, 2018
3c55a0d
Adapting MappingPT to new namespace notation + adding it to ReleaseNo…
lumip Dec 4, 2018
ce7411a
Added release notes for changes made.
lumip Dec 4, 2018
a85402b
Minor fixes + some more tests for NamespacedSymbol, SymbolNamespace, …
lumip Dec 4, 2018
dedc12e
Added subs_namespaces method to substitute namespaces in sympy.Expr o…
lumip Dec 4, 2018
d621e92
Added namespace_mapping argument to MappingPT to enable mapping of na…
lumip Dec 11, 2018
942b58c
Added convenience methods get_root_level_namespace[s,_ids]
lumip Dec 11, 2018
6f68361
fixing typos
lumip Dec 11, 2018
9beafca
Added _root_namespace property to SymbolNamespace, NamespacedSymbol
lumip Dec 11, 2018
9d19abf
Expressions now accept nested parameter dictionary representing names…
lumip Dec 11, 2018
8abb7d8
tests + fix for parameter mapping with namespaces in MappingPT
lumip Dec 11, 2018
2a6bd90
making namespaced parameters work for pulses
lumip Dec 11, 2018
8d491a7
demo notebook for parameter namespaces
lumip Dec 11, 2018
2cbc48e
Fix to PulseTemplate.create_program parameter dictionary flattening (…
lumip Dec 11, 2018
ab80085
Merge branch 'master' into issues/344_parameter_namespaces_3
terrorfisch May 2, 2019
7f57d34
Rename example
terrorfisch May 10, 2019
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
13 changes: 13 additions & 0 deletions ReleaseNotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
- `AtomicMultichannelPulseTemplate`:
- Add duration keyword argument & example (see MultiChannelTemplates notebook)
- Make duration equality check approximate (numeric tolerance)
- `MappingPulseTemplate`:
- Added `namespace_mapping` argument to enable mapping of namespaces for parameters not explicitly mapped.
- DEPRECATED: `allow_partial_parameter_mapping` argument. MappingPulseTemplate now always allows partial mapping.
- Plotting:
- Add `time_slice` keyword argument to render() and plot()
- Add `AbstractPulseTemplate` class
Expand All @@ -40,6 +43,16 @@
- Expressions:
- Make ExpressionScalar hashable
- Fix bug that prevented evaluation of expressions containing some special functions (`erfc`, `factorial`, etc.)
- ExpressionScalar equality operator now also returns true in case of numerical almost-equality
- Expressions now accept nested parameter dictionary representing namespaces in evaluate methods

- Utils/sympy:
- Add class `SymbolNamespace`, `NamespacedSymbol` to allow specifying parameter namespaces in expressions
- either by explicit python `SymbolNamespace(foo).bar` (returns symbol `bar` (as `NamespaceSymbol` in a namespace `foo`)
- or in an expression string ``"NS(foo).bar"` (same result after sympify)
- Add subs_namespaces method to substitute namespaces in sympy.Expr objects
- recursive_substitution now can handle numpy arrays of expressions as well
- (temporarily) removed incompatible substitute_with_eval and evaluate_compiled

- Parameters:
- `ConstantParameter` now accepts a `Expression` without free variables as value (given as `Expression` or string)
Expand Down
Loading