Skip to content

Commit 1145796

Browse files
authored
Update to eigen 5.0.0 (#2040)
1 parent 50f032f commit 1145796

6 files changed

Lines changed: 16 additions & 15 deletions

File tree

‎.github/workflows/build-without-conan.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ jobs:
5252
- name: Install eigen
5353
run: |
5454
cd ${TMP_DIR}
55-
wget https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.bz2
56-
bzip2 -dk eigen-3.4.0.tar.bz2
57-
tar xvf eigen-3.4.0.tar
58-
cd eigen-3.4.0/
55+
wget https://gitlab.com/libeigen/eigen/-/archive/5.0.0/eigen-5.0.0.tar.bz2
56+
bzip2 -dk eigen-5.0.0.tar.bz2
57+
tar xvf eigen-5.0.0.tar
58+
cd eigen-5.0.0/
5959
mkdir build
6060
cd build
6161
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} ..

‎TKET_VERSION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.53
1+
2.1.54

‎build-without-conan.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ cmake --install .
6363

6464
```
6565
cd ${TMP_DIR}
66-
wget https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.bz2
67-
bzip2 -dk eigen-3.4.0.tar.bz2
68-
tar xvf eigen-3.4.0.tar
69-
cd eigen-3.4.0/
66+
wget https://gitlab.com/libeigen/eigen/-/archive/5.0.0/eigen-5.0.0.tar.bz2
67+
bzip2 -dk eigen-5.0.0.tar.bz2
68+
tar xvf eigen-5.0.0.tar
69+
cd eigen-5.0.0/
7070
mkdir build
7171
cd build
7272
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} ..

‎tket/conanfile.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ def config_options(self):
5959
del self.options.fPIC
6060

6161
def configure(self):
62-
# Disable features that are still under the LGPL.
63-
self.options["eigen"].MPL2_only = True
6462
# Only need header libraries from boost.
6563
self.options["boost"].header_only = True
6664

@@ -142,7 +140,7 @@ def requirements(self):
142140
# libraries installed from remote:
143141
# https://quantinuumsw.jfrog.io/artifactory/api/conan/tket1-libs
144142
self.requires("boost/tci-1.89.0@tket/stable", transitive_headers=True)
145-
self.requires("eigen/3.4.0", transitive_headers=True)
143+
self.requires("eigen/5.0.0", transitive_headers=True)
146144
self.requires("nlohmann_json/3.12.0", transitive_headers=True)
147145
self.requires("symengine/tci-0.14.0.2@tket/stable", transitive_headers=True)
148146
self.requires("tkassert/0.3.4@tket/stable", transitive_headers=True)

‎tket/src/Circuit/CircUtils.cpp‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,6 @@ static Circuit with_controls_symbolic(const Circuit &c, unsigned n_controls) {
838838
// Return the target unitary given a Cn* gate where n >= 0
839839
static Eigen::Matrix2cd get_target_op_matrix(const Op_ptr &op) {
840840
OpType optype = op->get_type();
841-
Eigen::Matrix2cd m;
842841
switch (optype) {
843842
case OpType::CX:
844843
case OpType::CCX:

‎tket/src/Clifford/SymplecticTableau.cpp‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,12 @@ SymplecticTableau SymplecticTableau::conjugate() const {
384384

385385
void SymplecticTableau::gaussian_form() {
386386
MatrixXb fullmat = MatrixXb::Zero(get_n_rows(), 2 * get_n_qubits());
387-
fullmat(Eigen::all, Eigen::seq(0, Eigen::last, 2)) = xmat;
388-
fullmat(Eigen::all, Eigen::seq(1, Eigen::last, 2)) = zmat;
387+
fullmat(
388+
Eigen::placeholders::all, Eigen::seq(0, Eigen::placeholders::last, 2)) =
389+
xmat;
390+
fullmat(
391+
Eigen::placeholders::all, Eigen::seq(1, Eigen::placeholders::last, 2)) =
392+
zmat;
389393
std::vector<std::pair<unsigned, unsigned>> row_ops =
390394
gaussian_elimination_row_ops(fullmat);
391395
for (const std::pair<unsigned, unsigned> &op : row_ops) {

0 commit comments

Comments
 (0)