Skip to content

Commit

Permalink
Fix QUnitMulti
Browse files Browse the repository at this point in the history
  • Loading branch information
WrathfulSpatula committed Nov 6, 2024
1 parent 1d7c0c7 commit ff4e5d6
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions include/qunitmulti.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,18 +121,23 @@ class QUnitMulti : public QUnit {
return toRet;
}

virtual void Detach(bitLenInt start, bitLenInt length, QUnitPtr dest)
virtual bool Detach(
bitLenInt start, bitLenInt length, QUnitPtr dest, bool isTry = false, real1_f tol = TRYDECOMPOSE_EPSILON)
{
Detach(start, length, std::dynamic_pointer_cast<QUnitMulti>(dest));
return Detach(start, length, std::dynamic_pointer_cast<QUnitMulti>(dest), isTry, tol);
}
virtual void Detach(bitLenInt start, bitLenInt length, QUnitMultiPtr dest)
virtual bool Detach(
bitLenInt start, bitLenInt length, QUnitMultiPtr dest, bool isTry = false, real1_f tol = TRYDECOMPOSE_EPSILON)
{
if (!length) {
return;
return true;
}

QUnit::Detach(start, length, dest);
const bool result = QUnit::Detach(start, length, dest, isTry, tol);

RedistributeQEngines();

return result;
}

virtual QInterfacePtr EntangleInCurrentBasis(
Expand Down

0 comments on commit ff4e5d6

Please sign in to comment.