You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I supposed that the CNOT gate should be available without including qelib1.inc. But I still got an error when using @code_qasm, even if I include qelib1.inc.
you need to using YaoCompiler.Intrinsics first, or you won't have the definition of X, with the ccx case, e.g
using YaoCompiler
using YaoCompiler.Intrinsics
qasm"""OPENQASM 2.0;include "qelib1.inc";"""@devicefunctionadder3()
@ctrl14=>X
@ctrl24=>X
@ctrl34=>X
(1,2,5) =>ccx()
(1,3,5) =>ccx()
(2,3,5) =>ccx()
end
This is a bit cumbersome since there is an extra step, but I don't want to export X from YaoCompiler at least because X is too short and it causes name conflicts quite often.
I supposed that the CNOT gate should be available without including
qelib1.inc
. But I still got an error when using@code_qasm
, even if I includeqelib1.inc
.The text was updated successfully, but these errors were encountered: