1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

量子コンパイラを作る。

Last updated at Posted at 2020-11-30

概要

量子コンパイラを作る。
構想編

仕様

高位合成言語アセンブラのソースから、blueqat(python)のソースを生成する。

投入するソース

半加算器

make 4
in 0 1
out 2 3
and 0 1 3
xor 0 1 2

生成されたコード

from blueqat import Circuit

print (Circuit(4).h[ : 2].cx[1, 3].cx[0, 3].ccx[0, 1, 2].m[ : ].run(shots = 100))

以上。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?