Skip to content

Commit

Permalink
perturbation
Browse files Browse the repository at this point in the history
  • Loading branch information
upsj committed Jan 24, 2024
1 parent b0e48fd commit 2d4c0c4
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions core/base/perturbation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,32 @@ Perturbation<ValueType>::Perturbation(std::shared_ptr<const LinOp> scalar,
}


template <typename ValueType>
std::unique_ptr<Perturbation<ValueType>> Perturbation<ValueType>::create(
std::shared_ptr<const Executor> exec)
{
return std::unique_ptr<Perturbation>{new Perturbation{exec}};
}


template <typename ValueType>
std::unique_ptr<Perturbation<ValueType>> Perturbation<ValueType>::create(
std::shared_ptr<const LinOp> scalar, std::shared_ptr<const LinOp> basis)
{
return std::unique_ptr<Perturbation>{new Perturbation{scalar, basis}};
}


template <typename ValueType>
std::unique_ptr<Perturbation<ValueType>> Perturbation<ValueType>::create(
std::shared_ptr<const LinOp> scalar, std::shared_ptr<const LinOp> basis,
std::shared_ptr<const LinOp> projector)
{
return std::unique_ptr<Perturbation>{
new Perturbation{scalar, basis, projector}};
}


template <typename ValueType>
void Perturbation<ValueType>::validate_perturbation()
{
Expand Down

0 comments on commit 2d4c0c4

Please sign in to comment.