MCPcopy Create free account
hub / github.com/OriginQ/QPanda-2 / QSub_V2

Function QSub_V2

QAlg/ArithmeticUnit/ArithmeticUnit_V2.cpp:106–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106QCircuit QSub_V2(QVec &a, QVec &b, QVec &aux, ADDER type /* = ADDER::CDKM_RIPPLE*/)
107{
108 QCircuit qc;
109 qc << X(b.back())
110 << QAdd_V2(a, b, aux, type)
111 << X(b.back());
112 return qc;
113}
114
115/**
116 * @note circuits is reversible, so it's one to one

Callers

nothing calls this directly

Calls 2

XClass · 0.85
QAdd_V2Function · 0.70

Tested by

no test coverage detected