Skip to content

Commit

Permalink
Replacing Eigen::MatrixXcd with matrix_2
Browse files Browse the repository at this point in the history
Signed-off-by: Sachin Pisal <[email protected]>
  • Loading branch information
sacpis committed Jan 15, 2025
1 parent 39bf0f7 commit 2b1fc40
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions runtime/cudaq/evolution.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include "cudaq/base_integrator.h"
#include "cudaq/operators.h"
#include "cudaq/schedule.h"
#include "cudaq/utils/tensor.h"

#include <Eigen/Dense>
#include <map>
#include <memory>
#include <string>
Expand All @@ -23,11 +23,10 @@ namespace cudaq {
class Evolution {
public:
/// Computes the Taylor series expansion of the matrix exponential.
static Eigen::MatrixXcd taylor_series_expm(const Eigen::MatrixXcd &op_matrix,
int order = 20);
static matrix_2 taylor_series_expm(const matrix_2 &op_matrix, int order = 20);

/// Computes the evolution step matrix
static Eigen::MatrixXcd compute_step_matrix(
static matrix_2 compute_step_matrix(
const operator_sum &hamiltonian, const std::map<int, int> &dimensions,
const std::map<std::string, std::complex<double>> &parameters, double dt,
bool use_gpu = false);
Expand All @@ -49,8 +48,8 @@ class Evolution {
/// Generates evolution kernels for the simulation.
static std::vector<std::string> evolution_kernel(
int num_qubits,
const std::function<Eigen::MatrixXcd(
const std::map<std::string, std::complex<double>> &, double)>
const std::function<
matrix_2(const std::map<std::string, std::complex<double>> &, double)>
&compute_step_matrix,
const std::vector<double> tlist,
const std::vector<std::map<std::string, std::complex<double>>>
Expand Down

0 comments on commit 2b1fc40

Please sign in to comment.