1. 程式人生 > >量子計算 OpenFermion-Cirq 開源python庫

量子計算 OpenFermion-Cirq 開源python庫

#01 基礎資訊
NISQ,是嘈雜中型量子 (Noisy Intermediate-Scale Quantum) 的簡稱。
擁有50-100量子位元、以及高保真量子門 (Quantum Gate) 的計算機,便可稱為NISQ計算機。
谷歌開源了Cirq框架,這是專為NISQ演算法打造的框架。Cirq主要用來短期 (Near-Term) 問題,
幫助研究者瞭解NISQ計算機到底能不能解決實際應用的中的計算問題。這個框架,經Apache 2.0協議許可,可以修改,可以嵌入任何開源/付費的軟體包。

框架安裝好之後,開發者就可以給特定的量子處理器,編寫量子演算法,使用者可以精確控制量子電路 (Quantum Circuits) ;更加充分地利用NISQ架構。

Cirq支援在模擬器上執行演算法,如果將來有了量子計算機,或者更大的模擬器,也很容易通過雲,把裝置和演算法整合起來。

與Cirq框架一同釋出的,還有OpenFermion-Cirq,這是一個基於Cirq的應用示例。

OpenFermion是一個量子演算法開發平臺,專注解決化學問題。

OpenFermion-Cirq則是一個開源庫,把量子模擬演算法編譯成Cirq能用的樣子。比如,這個新庫,可以用來搭建量子變分演算法 (Variational Algorithms) ,模擬分子或者複雜材料的性質。

git clone https://github.com/quantumlib/OpenFermion-Cirq
cd OpenFermion-Cirq
python -m pip install -e .

##02 安裝
我在win10x64下,基於python2.7安裝沒成功。
後來基於python3.5.3安裝成功。

D:\git\Quantum\OpenFermion-Cirq>python -m pip install -e .
Obtaining file:///D:/git/Quantum/OpenFermion-Cirq
Unknown requires Python '>=3.5.3' but the running Python is 2.7.15
You are using pip version 9.0.3, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

D:\git\Quantum\OpenFermion-Cirq>set path=C:\Python35;%path%

D:\git\Quantum\OpenFermion-Cirq>python -m pip install -e .
Obtaining file:///D:/git/Quantum/OpenFermion-Cirq
Collecting cirq==0.3.1.* (from openfermioncirq==0.2.1a35)
  Downloading https://files.pythonhosted.org/packages/dc/c9/f17b365c7ac43c6d9576d44cf894c1c42bf43ac54ef6d76f56a99b32870a/cirq-0.3.1.35-py3-none-any.whl (368kB)
    100% |████████████████████████████████| 378kB 416kB/s
Requirement already satisfied: numpy in c:\python35\lib\site-packages (from openfermioncirq==0.2.1a35)
...
...
  Found existing installation: openfermioncirq 0.2.1a27
    Can't uninstall 'openfermioncirq'. No files were found to uninstall.
  Running setup.py develop for openfermioncirq
Successfully installed Send2Trash-1.5.0 cachetools-2.1.0 certifi-2018.8.24 chardet-3.0.4 cirq-0.3.1.35 google-api-python-client-1.7.4 google-auth-1.5.1 google-auth-httplib2-0.0.3 h5py-2.8.0 httplib2-0.11.3 ipywidgets-7.4.1 jupyter-1.0.0 jupyter-client-5.2.3 jupyter-console-5.2.0 kiwisolver-1.0.1 matplotlib-2.2.3 notebook-5.6.0 openfermion-0.8.1 openfermioncirq prometheus-client-0.3.1 protobuf-3.6.1 pubchempy-1.0.4 pyasn1-modules-0.2.2 pywinpty-0.5.4 pyzmq-17.1.2 requests-2.19.1 rsa-3.4.2 sortedcontainers-2.0.5 terminado-0.8.1 uritemplate-3.0.0 urllib3-1.23 widgetsnbextension-3.4.1
You are using pip version 9.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

D:\git\Quantum\OpenFermion-Cirq>

另外需要 pytest

D:\git\Quantum\OpenFermion-Cirq>pip3 install pytest

##03 執行用例

直接瀏覽器開啟,拷貝程式碼到PyCharm。配置中設定為自己的python3.5.3路徑。執行結果如下:
這裡寫圖片描述

print('01 ############################## start')
import openfermion
import numpy

# Set the number of qubits in our example.
n_qubits = 3
simulation_time = 1.
random_seed = 8317

# Generate the random one-body operator.
T = openfermion.random_hermitian_matrix(n_qubits, seed=random_seed)

# Diagonalize T and obtain basis transformation matrix (aka "u").
eigenvalues, eigenvectors = numpy.linalg.eigh(T)
basis_transformation_matrix = eigenvectors.transpose()

# Print out familiar OpenFermion "FermionOperator" form of H.
H = openfermion.FermionOperator()
for p in range(n_qubits):
    for q in range(n_qubits):
        term = ((p, 1), (q, 0))
        H += openfermion.FermionOperator(term, T[p, q])
print(H)
print('01 ############################## end')

print('02 ############################## start')
import openfermioncirq
import cirq

# Initialize the qubit register.
qubits = cirq.LineQubit.range(n_qubits)

# Start circuit with the inverse basis rotation, print out this step.
inverse_basis_rotation = cirq.inverse(openfermioncirq.bogoliubov_transform(qubits, basis_transformation_matrix))
circuit = cirq.Circuit.from_ops(inverse_basis_rotation)
print(circuit)
print('02 ############################## end')

print('03 ############################## start')
# Add diagonal phase rotations to circuit.
for k, eigenvalue in enumerate(eigenvalues):
    phase = -eigenvalue * simulation_time
    circuit.append(cirq.RotZGate(rads=phase).on(qubits[k]))

# Finally, restore basis.
basis_rotation = openfermioncirq.bogoliubov_transform(qubits, basis_transformation_matrix)
circuit.append(basis_rotation)


# Initialize a random initial state.
initial_state = openfermion.haar_random_vector(
    2 ** n_qubits, random_seed).astype(numpy.complex64)

# Numerically compute the correct circuit output.
import scipy
hamiltonian_sparse = openfermion.get_sparse_operator(H)
exact_state = scipy.sparse.linalg.expm_multiply(
    -1j * simulation_time * hamiltonian_sparse, initial_state)

# Use Cirq simulator to apply circuit.
simulator = cirq.google.XmonSimulator()
result = simulator.simulate(circuit, qubit_order=qubits,
                            initial_state=initial_state)
simulated_state = result.final_state

# Print final fidelity.
fidelity = abs(numpy.dot(simulated_state, numpy.conjugate(exact_state)))**2
print(fidelity)


xmon_circuit = cirq.google.optimized_for_xmon(circuit)
print(xmon_circuit.to_qasm())
print('03 ############################## end')

print('04 ############################## start')
xmon_circuit = cirq.google.optimized_for_xmon(circuit)
print(xmon_circuit.to_qasm())
print('04 ############################## end')

執行結果:

C:\Python35\python.exe D:/git/Quantum/OpenFermion-Cirq/examples/test01.py
01 ############################## start
(0.5367212624097257+0j) [0^ 0] +
(-0.26033703159240107+3.3259173741375454j) [0^ 1] +
(1.3433603748462144+1.544987250567917j) [0^ 2] +
(-0.26033703159240107-3.3259173741375454j) [1^ 0] +
(-2.9143303700812435+0j) [1^ 1] +
(-1.52843836446248+1.3527486791390022j) [1^ 2] +
(1.3433603748462144-1.544987250567917j) [2^ 0] +
(-1.52843836446248-1.3527486791390022j) [2^ 1] +
(2.261633626116526+0j) [2^ 2]
01 ############################## end
02 ############################## start
0: ───────────────────────────────────YXXY────────────────────Z^0.0───
                                      │
1: ─────────────YXXY────────Z^0.522───#2^-0.656───YXXY────────Z^0.0───
                │                                 │
2: ───Z^0.762───#2^-0.249─────────────Z^-0.519────#2^-0.479───Z───────
02 ############################## end
03 ############################## start
1.00000014821
// Generated from Cirq

OPENQASM 2.0;
include "qelib1.inc";


// Qubits: [0, 1, 2]
qreg q[3];


// Gate: W(0.238)^-0.5
u3(pi*0.5,pi*0.7381494354,pi*1.2618505646) q[2];

// Gate: Y^0.5
u3(pi*0.5,pi*2.0,0) q[1];

// Gate: Y^0.5
u3(pi*0.5,pi*2.0,0) q[0];

// Gate: Exp11Gate(half_turns=0.24858996064554528)
u3(pi*0.5,pi*1.0,pi*0.75) q[1];
u3(pi*0.5,pi*1.0,pi*0.25) q[2];
rx(pi*0.5) q[1];
cx q[1],q[2];
rx(pi*0.3757050197) q[1];
ry(pi*0.5) q[2];
cx q[2],q[1];
rx(pi*-0.5) q[2];
rz(pi*0.5) q[2];
cx q[1],q[2];
u3(pi*0.5,pi*0.3742949803,0) q[1];
u3(pi*0.5,pi*0.8742949803,0) q[2];

// Gate: W(0.124)^0.5
u3(pi*0.5,pi*1.6242949803,pi*0.3757050197) q[1];

// Gate: W(0.862)^0.5
u3(pi*0.5,pi*0.3624444158,pi*1.6375555842) q[2];

// Gate: Exp11Gate(half_turns=0.24858996064554528)
u3(pi*0.5,pi*1.0,pi*0.75) q[1];
u3(pi*0.5,pi*1.0,pi*0.25) q[2];
rx(pi*0.5) q[1];
cx q[1],q[2];
rx(pi*0.3757050197) q[1];
ry(pi*0.5) q[2];
cx q[2],q[1];
rx(pi*-0.5) q[2];
rz(pi*0.5) q[2];
cx q[1],q[2];
u3(pi*0.5,pi*0.3742949803,0) q[1];
u3(pi*0.5,pi*0.8742949803,0) q[2];

// Gate: W(0.249)^0.5219350773492257
u3(pi*0.5219350773,pi*1.7485899606,pi*0.2514100394) q[1];

// Gate: W(0.987)^-0.5191093380568828
u3(pi*0.5191093381,pi*1.4867393961,pi*0.5132606039) q[2];

// Gate: Exp11Gate(half_turns=0.65648418204460857)
u3(pi*0.5,0,pi*1.4262081912) q[0];
u3(pi*0.5,0,pi*0.9262081912) q[1];
rx(pi*0.5) q[0];
cx q[0],q[1];
rx(pi*0.171757909) q[0];
ry(pi*0.5) q[1];
cx q[1],q[0];
rx(pi*-0.5) q[1];
rz(pi*0.5) q[1];
cx q[0],q[1];
u3(pi*0.5,pi*1.9020338998,pi*1.0) q[0];
u3(pi*0.5,pi*0.4020338998,pi*1.0) q[1];

// Gate: W(0.328)^-0.5
u3(pi*0.5,pi*0.828242091,pi*1.171757909) q[0];

// Gate: W(0.577)^-0.5
u3(pi*0.5,pi*1.0768320517,pi*0.9231679483) q[1];

// Gate: Exp11Gate(half_turns=0.65648418204460857)
u3(pi*0.5,0,pi*1.4262081912) q[0];
u3(pi*0.5,0,pi*0.9262081912) q[1];
rx(pi*0.5) q[0];
cx q[0],q[1];
rx(pi*0.171757909) q[0];
ry(pi*0.5) q[1];
cx q[1],q[0];
rx(pi*-0.5) q[1];
rz(pi*0.5) q[1];
cx q[0],q[1];
u3(pi*0.5,pi*1.9020338998,pi*1.0) q[0];
u3(pi*0.5,pi*0.4020338998,pi*1.0) q[1];

// Gate: W(0.656)^-0.1172916153092598
u3(pi*0.1172916153,pi*1.156484182,pi*0.843515818) q[0];

// Gate: W(0.905)^0.5
u3(pi*0.5,pi*0.4050741427,pi*1.5949258573) q[1];

// Gate: Exp11Gate(half_turns=0.47878385305425208)
u3(pi*0.5,pi*1.0,pi*1.25) q[1];
u3(pi*0.5,pi*1.0,pi*0.75) q[2];
rx(pi*0.5) q[1];
cx q[1],q[2];
rx(pi*0.2606080735) q[1];
ry(pi*0.5) q[2];
cx q[2],q[1];
rx(pi*-0.5) q[2];
rz(pi*0.5) q[2];
cx q[1],q[2];
u3(pi*0.5,pi*1.9893919265,0) q[1];
u3(pi*0.5,pi*0.4893919265,0) q[2];

// Gate: W(0.144)^-0.5
u3(pi*0.5,pi*0.6444660692,pi*1.3555339308) q[1];

// Gate: W(0.226)^-0.5
u3(pi*0.5,pi*0.7261313226,pi*1.2738686774) q[2];

// Gate: Exp11Gate(half_turns=0.47878385305425208)
u3(pi*0.5,pi*1.0,pi*1.25) q[1];
u3(pi*0.5,pi*1.0,pi*0.75) q[2];
rx(pi*0.5) q[1];
cx q[1],q[2];
rx(pi*0.2606080735) q[1];
ry(pi*0.5) q[2];
cx q[2],q[1];
rx(pi*-0.5) q[2];
rz(pi*0.5) q[2];
cx q[1],q[2];
u3(pi*0.5,pi*1.9893919265,0) q[1];
u3(pi*0.5,pi*0.4893919265,0) q[2];

// Gate: W(0.384)^-0.3104017289871259
u3(pi*0.310401729,pi*0.8838579957,pi*1.1161420043) q[1];

// Gate: W(0.466)^-0.843806028656013
u3(pi*0.8438060287,pi*0.9655232491,pi*1.0344767509) q[2];

// Gate: Exp11Gate(half_turns=0.47878385305425208)
u3(pi*0.5,pi*1.0,pi*1.25) q[1];
u3(pi*0.5,pi*1.0,pi*0.75) q[2];
rx(pi*0.5) q[1];
cx q[1],q[2];
rx(pi*0.2606080735) q[1];
ry(pi*0.5) q[2];
cx q[2],q[1];
rx(pi*-0.5) q[2];
rz(pi*0.5) q[2];
cx q[1],q[2];
u3(pi*0.5,pi*1.9893919265,0) q[1];
u3(pi*0.5,pi*0.4893919265,0) q[2];

// Gate: W(0.623)^-0.5
u3(pi*0.5,pi*1.1232499223,pi*0.8767500777) q[1];

// Gate: W(0.705)^-0.5
u3(pi*0.5,pi*1.2049151757,pi*0.7950848243) q[2];

// Gate: Exp11Gate(half_turns=0.47878385305425208)
u3(pi*0.5,pi*1.0,pi*1.25) q[1];
u3(pi*0.5,pi*1.0,pi*0.75) q[2];
rx(pi*0.5) q[1];
cx q[1],q[2];
rx(pi*0.2606080735) q[1];
ry(pi*0.5) q[2];
cx q[2],q[1];
rx(pi*-0.5) q[2];
rz(pi*0.5) q[2];
cx q[1],q[2];
u3(pi*0.5,pi*1.9893919265,0) q[1];
u3(pi*0.5,pi*0.4893919265,0) q[2];

// Gate: W(0.863)^-0.5
u3(pi*0.5,pi*1.3626418488,pi*0.6373581512) q[1];

// Gate: W(0.944)^-0.5191093380568828
u3(pi*0.5191093381,pi*1.4443071022,pi*0.5556928978) q[2];

// Gate: Exp11Gate(half_turns=0.65648418204460857)
u3(pi*0.5,0,pi*1.4262081912) q[0];
u3(pi*0.5,0,pi*0.9262081912) q[1];
rx(pi*0.5) q[0];
cx q[0],q[1];
rx(pi*0.171757909) q[0];
ry(pi*0.5) q[1];
cx q[1],q[0];
rx(pi*-0.5) q[1];
rz(pi*0.5) q[1];
cx q[0],q[1];
u3(pi*0.5,pi*1.9020338998,pi*1.0) q[0];
u3(pi*0.5,pi*0.4020338998,pi*1.0) q[1];

// Gate: W(0.985)^0.5
u3(pi*0.5,pi*0.4847262731,pi*1.5152737269) q[0];

// Gate: W(0.191)^0.5
u3(pi*0.5,pi*1.6908839398,pi*0.3091160602) q[1];

// Gate: Exp11Gate(half_turns=0.65648418204460857)
u3(pi*0.5,0,pi*1.4262081912) q[0];
u3(pi*0.5,0,pi*0.9262081912) q[1];
rx(pi*0.5) q[0];
cx q[0],q[1];
rx(pi*0.171757909) q[0];
ry(pi*0.5) q[1];
cx q[1],q[0];
rx(pi*-0.5) q[1];
rz(pi*0.5) q[1];
cx q[0],q[1];
u3(pi*0.5,pi*1.9020338998,pi*1.0) q[0];
u3(pi*0.5,pi*0.4020338998,pi*1.0) q[1];

// Gate: W(0.813)^0.5
u3(pi*0.5,pi*0.3129683641,pi*1.6870316359) q[0];

// Gate: W(0.519)^0.47806492265077405
u3(pi*0.4780649227,pi*0.0191260308,pi*1.9808739692) q[1];

rz(pi*0.6870316359) q[0];

// Gate: Exp11Gate(half_turns=0.24858996064554528)
u3(pi*0.5,pi*1.0,pi*0.75) q[1];
u3(pi*0.5,pi*1.0,pi*0.25) q[2];
rx(pi*0.5) q[1];
cx q[1],q[2];
rx(pi*0.3757050197) q[1];
ry(pi*0.5) q[2];
cx q[2],q[1];
rx(pi*-0.5) q[2];
rz(pi*0.5) q[2];
cx q[1],q[2];
u3(pi*0.5,pi*0.3742949803,0) q[1];
u3(pi*0.5,pi*0.8742949803,0) q[2];

// Gate: W(0.643)^-0.5
u3(pi*0.5,pi*1.1434210112,pi*0.8565789888) q[1];

// Gate: W(0.0686)^-0.5
u3(pi*0.5,pi*0.5686020825,pi*1.4313979175) q[2];

// Gate: Exp11Gate(half_turns=0.24858996064554528)
u3(pi*0.5,pi*1.0,pi*0.75) q[1];
u3(pi*0.5,pi*1.0,pi*0.25) q[2];
rx(pi*0.5) q[1];
cx q[1],q[2];
rx(pi*0.3757050197) q[1];
ry(pi*0.5) q[2];
cx q[2],q[1];
rx(pi*-0.5) q[2];
rz(pi*0.5) q[2];
cx q[1],q[2];
u3(pi*0.5,pi*0.3742949803,0) q[1];
u3(pi*0.5,pi*0.8742949803,0) q[2];

// Gate: W(0.268)^0.5
u3(pi*0.5,pi*1.7677159915,pi*0.2322840085) q[1];

// Gate: W(0.693)^-0.5
u3(pi*0.5,pi*1.1928970628,pi*0.8071029372) q[2];

rz(pi*-0.4547476274) q[2];
rz(pi*-0.7677159915) q[1];

03 ############################## end
04 ############################## start
// Generated from Cirq

OPENQASM 2.0;
include "qelib1.inc";


// Qubits: [0, 1, 2]
qreg q[3];


// Gate: W(0.238)^-0.5
u3(pi*0.5,pi*0.7381494354,pi*1.2618505646) q[2];

// Gate: Y^0.5
u3(pi*0.5,pi*2.0,0) q[1];

// Gate: Y^0.5
u3(pi*0.5,pi*2.0,0) q[0];

// Gate: Exp11Gate(half_turns=0.24858996064554528)
u3(pi*0.5,pi*1.0,pi*0.75) q[1];
u3(pi*0.5,pi*1.0,pi*0.25) q[2];
rx(pi*0.5) q[1];
cx q[1],q[2];
rx(pi*0.3757050197) q[1];
ry(pi*0.5) q[2];
cx q[2],q[1];
rx(pi*-0.5) q[2];
rz(pi*0.5) q[2];
cx q[1],q[2];
u3(pi*0.5,pi*0.3742949803,0) q[1];
u3(pi*0.5,pi*0.8742949803,0) q[2];

// Gate: W(0.124)^0.5
u3(pi*0.5,pi*1.6242949803,pi*0.3757050197) q[1];

// Gate: W(0.862)^0.5
u3(pi*0.5,pi*0.3624444158,pi*1.6375555842) q[2];

// Gate: Exp11Gate(half_turns=0.24858996064554528)
u3(pi*0.5,pi*1.0,pi*0.75) q[1];
u3(pi*0.5,pi*1.0,pi*0.25) q[2];
rx(pi*0.5) q[1];
cx q[1],q[2];
rx(pi*0.3757050197) q[1];
ry(pi*0.5) q[2];
cx q[2],q[1];
rx(pi*-0.5) q[2];
rz(pi*0.5) q[2];
cx q[1],q[2];
u3(pi*0.5,pi*0.3742949803,0) q[1];
u3(pi*0.5,pi*0.8742949803,0) q[2];

// Gate: W(0.249)^0.5219350773492257
u3(pi*0.5219350773,pi*1.7485899606,pi*0.2514100394) q[1];

// Gate: W(0.987)^-0.5191093380568828
u3(pi*0.5191093381,pi*1.4867393961,pi*0.5132606039) q[2];

// Gate: Exp11Gate(half_turns=0.65648418204460857)
u3(pi*0.5,0,pi*1.4262081912) q[0];
u3(pi*0.5,0,pi*0.9262081912) q[1];
rx(pi*0.5) q[0];
cx q[0],q[1];
rx(pi*0.171757909) q[0];
ry(pi*0.5) q[1];
cx q[1],q[0];
rx(pi*-0.5) q[1];
rz(pi*0.5) q[1];
cx q[0],q[1];
u3(pi*0.5,pi*1.9020338998,pi*1.0) q[0];
u3(pi*0.5,pi*0.4020338998,pi*1.0) q[1];

// Gate: W(0.328)^-0.5
u3(pi*0.5,pi*0.828242091,pi*1.171757909) q[0];

// Gate: W(0.577)^-0.5
u3(pi*0.5,pi*1.0768320517,pi*0.9231679483) q[1];

// Gate: Exp11Gate(half_turns=0.65648418204460857)
u3(pi*0.5,0,pi*1.4262081912) q[0];
u3(pi*0.5,0,pi*0.9262081912) q[1];
rx(pi*0.5) q[0];
cx q[0],q[1];
rx(pi*0.171757909) q[0];
ry(pi*0.5) q[1];
cx q[1],q[0];
rx(pi*-0.5) q[1];
rz(pi*0.5) q[1];
cx q[0],q[1];
u3(pi*0.5,pi*1.9020338998,pi*1.0) q[0];
u3(pi*0.5,pi*0.4020338998,pi*1.0) q[1];

// Gate: W(0.656)^-0.1172916153092598
u3(pi*0.1172916153,pi*1.156484182,pi*0.843515818) q[0];

// Gate: W(0.905)^0.5
u3(pi*0.5,pi*0.4050741427,pi*1.5949258573) q[1];

// Gate: Exp11Gate(half_turns=0.47878385305425208)
u3(pi*0.5,pi*1.0,pi*1.25) q[1];
u3(pi*0.5,pi*1.0,pi*0.75) q[2];
rx(pi*0.5) q[1];
cx q[1],q[2];
rx(pi*0.2606080735) q[1];
ry(pi*0.5) q[2];
cx q[2],q[1];
rx(pi*-0.5) q[2];
rz(pi*0.5) q[2];
cx q[1],q[2];
u3(pi*0.5,pi*1.9893919265,0) q[1];
u3(pi*0.5,pi*0.4893919265,0) q[2];

// Gate: W(0.144)^-0.5
u3(pi*0.5,pi*0.6444660692,pi*1.3555339308) q[1];

// Gate: W(0.226)^-0.5
u3(pi*0.5,pi*0.7261313226,pi*1.2738686774) q[2];

// Gate: Exp11Gate(half_turns=0.47878385305425208)
u3(pi*0.5,pi*1.0,pi*1.25) q[1];
u3(pi*0.5,pi*1.0,pi*0.75) q[2];
rx(pi*0.5) q[1];
cx q[1],q[2];
rx(pi*0.2606080735) q[1];
ry(pi*0.5) q[2];
cx q[2],q[1];
rx(pi*-0.5) q[2];
rz(pi*0.5) q[2];
cx q[1],q[2];
u3(pi*0.5,pi*1.9893919265,0) q[1];
u3(pi*0.5,pi*0.4893919265,0) q[2];

// Gate: W(0.384)^-0.3104017289871259
u3(pi*0.310401729,pi*0.8838579957,pi*1.1161420043) q[1];

// Gate: W(0.466)^-0.843806028656013
u3(pi*0.8438060287,pi*0.9655232491,pi*1.0344767509) q[2];

// Gate: Exp11Gate(half_turns=0.47878385305425208)
u3(pi*0.5,pi*1.0,pi*1.25) q[1];
u3(pi*0.5,pi*1.0,pi*0.75) q[2];
rx(pi*0.5) q[1];
cx q[1],q[2];
rx(pi*0.2606080735) q[1];
ry(pi*0.5) q[2];
cx q[2],q[1];
rx(pi*-0.5) q[2];
rz(pi*0.5) q[2];
cx q[1],q[2];
u3(pi*0.5,pi*1.9893919265,0) q[1];
u3(pi*0.5,pi*0.4893919265,0) q[2];

// Gate: W(0.623)^-0.5
u3(pi*0.5,pi*1.1232499223,pi*0.8767500777) q[1];

// Gate: W(0.705)^-0.5
u3(pi*0.5,pi*1.2049151757,pi*0.7950848243) q[2];

// Gate: Exp11Gate(half_turns=0.47878385305425208)
u3(pi*0.5,pi*1.0,pi*1.25) q[1];
u3(pi*0.5,pi*1.0,pi*0.75) q[2];
rx(pi*0.5) q[1];
cx q[1],q[2];
rx(pi*0.2606080735) q[1];
ry(pi*0.5) q[2];
cx q[2],q[1];
rx(pi*-0.5) q[2];
rz(pi*0.5) q[2];
cx q[1],q[2];
u3(pi*0.5,pi*1.9893919265,0) q[1];
u3(pi*0.5,pi*0.4893919265,0) q[2];

// Gate: W(0.863)^-0.5
u3(pi*0.5,pi*1.3626418488,pi*0.6373581512) q[1];

// Gate: W(0.944)^-0.5191093380568828
u3(pi*0.5191093381,pi*1.4443071022,pi*0.5556928978) q[2];

// Gate: Exp11Gate(half_turns=0.65648418204460857)
u3(pi*0.5,0,pi*1.4262081912) q[0];
u3(pi*0.5,0,pi*0.9262081912) q[1];
rx(pi*0.5) q[0];
cx q[0],q[1];
rx(pi*0.171757909) q[0];
ry(pi*0.5) q[1];
cx q[1],q[0];
rx(pi*-0.5) q[1];
rz(pi*0.5) q[1];
cx q[0],q[1];
u3(pi*0.5,pi*1.9020338998,pi*1.0) q[0];
u3(pi*0.5,pi*0.4020338998,pi*1.0) q[1];

// Gate: W(0.985)^0.5
u3(pi*0.5,pi*0.4847262731,pi*1.5152737269) q[0];

// Gate: W(0.191)^0.5
u3(pi*0.5,pi*1.6908839398,pi*0.3091160602) q[1];

// Gate: Exp11Gate(half_turns=0.65648418204460857)
u3(pi*0.5,0,pi*1.4262081912) q[0];
u3(pi*0.5,0,pi*0.9262081912) q[1];
rx(pi*0.5) q[0];
cx q[0],q[1];
rx(pi*0.171757909) q[0];
ry(pi*0.5) q[1];
cx q[1],q[0];
rx(pi*-0.5) q[1];
rz(pi*0.5) q[1];
cx q[0],q[1];
u3(pi*0.5,pi*1.9020338998,pi*1.0) q[0];
u3(pi*0.5,pi*0.4020338998,pi*1.0) q[1];

// Gate: W(0.813)^0.5
u3(pi*0.5,pi*0.3129683641,pi*1.6870316359) q[0];

// Gate: W(0.519)^0.47806492265077405
u3(pi*0.4780649227,pi*0.0191260308,pi*1.9808739692) q[1];

rz(pi*0.6870316359) q[0];

// Gate: Exp11Gate(half_turns=0.24858996064554528)
u3(pi*0.5,pi*1.0,pi*0.75) q[1];
u3(pi*0.5,pi*1.0,pi*0.25) q[2];
rx(pi*0.5) q[1];
cx q[1],q[2];
rx(pi*0.3757050197) q[1];
ry(pi*0.5) q[2];
cx q[2],q[1];
rx(pi*-0.5) q[2];
rz(pi*0.5) q[2];
cx q[1],q[2];
u3(pi*0.5,pi*0.3742949803,0) q[1];
u3(pi*0.5,pi*0.8742949803,0) q[2];

// Gate: W(0.643)^-0.5
u3(pi*0.5,pi*1.1434210112,pi*0.8565789888) q[1];

// Gate: W(0.0686)^-0.5
u3(pi*0.5,pi*0.5686020825,pi*1.4313979175) q[2];

// Gate: Exp11Gate(half_turns=0.24858996064554528)
u3(pi*0.5,pi*1.0,pi*0.75) q[1];
u3(pi*0.5,pi*1.0,pi*0.25) q[2];
rx(pi*0.5) q[1];
cx q[1],q[2];
rx(pi*0.3757050197) q[1];
ry(pi*0.5) q[2];
cx q[2],q[1];
rx(pi*-0.5) q[2];
rz(pi*0.5) q[2];
cx q[1],q[2];
u3(pi*0.5,pi*0.3742949803,0) q[1];
u3(pi*0.5,pi*0.8742949803,0) q[2];

// Gate: W(0.268)^0.5
u3(pi*0.5,pi*1.7677159915,pi*0.2322840085) q[1];

// Gate: W(0.693)^-0.5
u3(pi*0.5,pi*1.1928970628,pi*0.8071029372) q[2];

rz(pi*-0.4547476274) q[2];
rz(pi*-0.7677159915) q[1];

04 ############################## end