common.title
Cloud support

Nobisuke

Dekisugi

RAG


autoQAOA
RAG for dev
Fortune telling app
Annealing
DEEPSCORE
Translation

Overview
Service overview
Terms of service

Privacy policy

Contact
Research

Sign in
Sign up
common.title

[Review & Implementation] SCS quantum circuit with deterministic Dicke states implemented in blueqatSDK

Yuichiro Minato

2022/11/07 02:53

We will actually build a quantum circuit about Dicke state generation. the previous article is here.

https://blueqat.com/yuichiro_minato2/4190e59f-4f2a-4593-b880-c336b177b3f5

the reference is

https://arxiv.org/pdf/1904.07358.pdf

I would like to start by creating a 01/10 Dicke state from the classic bit of 01.

The circuit is going to use CX and CRY, the angles are

RY(2cos1l/n)RY(2cos^{-1}\sqrt{l/n})

Let's use numpy backend to get state vec. I forgot to implement CRY into TN backend...

SCS2,1SCS_{2,1}

|0> -----C--RY--C--
         |  |   |
|0> --X--X--C---X--
from blueqat import Circuit import numpy as np l=1 n=2 circ = Circuit(2).x[1].cx[0,1].cry(2*np.arccos(np.sqrt(l/n)))[1,0].cx[0,1] circ.run(backend="numpy")
array([0.        +0.j, 0.70710678+0.j, 0.70710678+0.j, 0.        +0.j])
circ.m[:].run(backend="numpy",shots=1000)
Counter({'10': 530, '01': 470})

done! next!

U3,1=>SCS3,1+SCS2,1U_{3,1} => SCS_{3,1} + SCS_{2,1}

|001> + |010> + |100>

|0> ---------------C--RY--C--
                   |  |   |
|0> -----C--RY--C--X--C---X--
         |  |   |
|0> --X--X--C---X------------
circ2 = Circuit(3).x[2].cx[1,2].cry(2*np.arccos(np.sqrt(1/3)))[2,1].cx[1,2].cx[0,1].cry(2*np.arccos(np.sqrt(1/2)))[1,0].cx[0,1] circ2.run(backend="numpy")
array([0.        +0.j, 0.57735027+0.j, 0.57735027+0.j, 0.        +0.j,

       0.57735027+0.j, 0.        +0.j, 0.        +0.j, 0.        +0.j])
circ2.m[:].run(backend="numpy",shots=1000)
Counter({'100': 360, '001': 299, '010': 341})

Done! Next we try U3,2U_{3,2}

U3,2=>SCS3,2+SCS2,1U_{3,2} => SCS_{3,2} + SCS_{2,1}

|011> + |110> + |101>

|0> ---------------C--RY--C--C--RY--C--
                   |  |   |  |  |   |
|0> --X--C--RY--C--|--C---|--X--C---X--
         |  |   |  |  |   |
|0> --X--X--C---X--X--C---X------

I havent prepare CCRY, so instead we use CCRY = RY(theta)-CCX-RY(-theta)-CCX

https://qiita.com/gyu-don/items/7c52c0d20f9998022803

circ3 = Circuit(3).x[1,2].cx[1,2].cry(2*np.arccos(np.sqrt(1/3)))[2,1].cx[1,2].cx[0,2].ry(np.arccos(np.sqrt(2/3)))[0].ccx[2,1,0].ry(-np.arccos(np.sqrt(2/3)))[0].ccx[2,1,0].cx[0,2].cx[0,1].cry(2*np.arccos(np.sqrt(1/2)))[1,0].cx[0,1] circ3.run(backend="numpy")
array([0.        +0.j, 0.        +0.j, 0.        +0.j, 0.57735027+0.j,

       0.        +0.j, 0.57735027+0.j, 0.57735027+0.j, 0.        +0.j])
circ3.m[:].run(backend="numpy",shots=1000)
Counter({'101': 314, '011': 339, '110': 347})

Done! Perfect.

© 2024, blueqat Inc. All rights reserved