Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/OriginQ/QPanda-2
/ MAJ
Function
MAJ
Extensions/QAlg/ArithmeticUnit/ArithmeticUnit.cpp:6–14 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
4
5
6
QPANDA_BEGIN
7
8
QCircuit MAJ(Qubit* a, Qubit* b, Qubit* c)
9
{
10
QCircuit circuit;
11
circuit << CNOT(c, b) << CNOT(c, a) << X(c).control({ a, b });
12
13
return circuit;
14
}
15
16
QCircuit UMA(Qubit* a, Qubit* b, Qubit* c)
17
{
Callers
3
addWithCin
Method · 0.70
MAJ2
Function · 0.70
QAdder
Function · 0.70
Calls
3
CNOT
Class · 0.85
X
Class · 0.85
control
Method · 0.45
Tested by
no test coverage detected