Closed xumingkuan closed 10 months ago
Close #105
Now we can read and write general controlled gates.
In OpenQASM 2 (the format we write to and read from):
//ctrl x q[5]; ccz q[5],q[6],q[8]; x q[5];
In CircuitSeq::to_string():
CircuitSeq::to_string()
[Q5, Q6, Q8] = ccz[01](Q5, Q6, Q8)
OpenQASM 3 equivalent (not supported):
negctrl @ ctrl @ z q[5],q[6],q[8];
Compare with common controlled gates: In OpenQASM 2 (the format we write to and read from):
ccz q[5],q[6],q[8];
[Q5, Q6, Q8] = ccz(Q5, Q6, Q8)
ctrl(2) @ z q[5],q[6],q[8];
Close #105
Now we can read and write general controlled gates.
In OpenQASM 2 (the format we write to and read from):
In
CircuitSeq::to_string()
:OpenQASM 3 equivalent (not supported):
Compare with common controlled gates: In OpenQASM 2 (the format we write to and read from):
In
CircuitSeq::to_string()
:OpenQASM 3 equivalent (not supported):