Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit 6162257

Browse files
pehamTomburgholzer
andauthored
Symbolic (#15)
* Made Expression a template. * Added ancilla test. * Added multiplication and division to Expression * Made Expression entirely into a template. * Removed print commands for expression. * Fixed bug in test. * Improve Coverage. * Improve Coverage. * Added operator += for constant in Expression. * Added conversion of Expressions with different constant types. * Added hash for Variable struct. * Added evaluation of symbolic expressions. * Made evaluate const. * Merged main branch. * Fixed broken merge. * Made global phase symbolic. * Formatting. * 🎨 fix format in `Rules.cpp` * ⚗️ try to fix clang-format errors Signed-off-by: Lukas Burgholzer <[email protected]> * 🔥 remove commented-out code Signed-off-by: burgholzer <[email protected]> * 🚨 fix linter warnings throughout `Rational.hpp/.cpp` Signed-off-by: burgholzer <[email protected]> * 🚨 fix linter warnings throughout `Utils.hpp/.cpp` Signed-off-by: burgholzer <[email protected]> * 🚨 fix over 200 linter warnings throughout `Rules.hpp/.cpp` Signed-off-by: burgholzer <[email protected]> * 🚨 fix over 150 linter warnings throughout `ZXDiagram.hpp/.cpp` Signed-off-by: burgholzer <[email protected]> * 🚨 fix linter warnings throughout `Expression.hpp/.cpp` Signed-off-by: burgholzer <[email protected]> * 🚨 fix linter warnings throughout tests Signed-off-by: burgholzer <[email protected]> * 🎨 code format Signed-off-by: burgholzer <[email protected]> Signed-off-by: Lukas Burgholzer <[email protected]> Signed-off-by: burgholzer <[email protected]> Co-authored-by: Lukas Burgholzer <[email protected]> Co-authored-by: burgholzer <[email protected]>
1 parent 1ea532d commit 6162257

18 files changed

+1219
-882
lines changed

include/Definitions.hpp

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#pragma once
22

3+
#include "Expression.hpp"
4+
#include "Rational.hpp"
5+
36
#include <stdexcept>
47
#include <string>
58

@@ -20,6 +23,8 @@ namespace zx {
2023
static constexpr double PI =
2124
3.141592653589793238462643383279502884197169399375105820974L;
2225

26+
using PiExpression = sym::Expression<double, PiRational>;
27+
2328
class ZXException: public std::invalid_argument {
2429
std::string msg;
2530

0 commit comments

Comments
 (0)