Quantum machine learning constructors
Besides the arbitrary Hamiltonian constructors , Qadence also provides a complete set of program constructors useful for digital-analog quantum machine learning programs.
Feature maps
The feature_map
function can easily create several types of data-encoding blocks. The
two main types of feature maps use a Fourier basis or a Chebyshev basis.
from qadence import feature_map , BasisSet , chain
from qadence.draw import display
n_qubits = 3
fourier_fm = feature_map ( n_qubits , fm_type = BasisSet . FOURIER )
chebyshev_fm = feature_map ( n_qubits , fm_type = BasisSet . CHEBYSHEV )
block = chain ( fourier_fm , chebyshev_fm )
%3
cluster_75ef58a0bdda48d98b260666a67c0a4c
Constant Chebyshev FM
cluster_a526db4c33c94d6e80f4dd532746c966
Constant Fourier FM
f9563cf56e44491285aa6a695d0aaa09
0
47c2af95ea6042108febce1505f2d823
RX(phi)
f9563cf56e44491285aa6a695d0aaa09--47c2af95ea6042108febce1505f2d823
ecc7f8da2a16436aa151115caf356f4c
1
7e8e90028d614452b6ed280f47b10cf2
RX(acos(phi))
47c2af95ea6042108febce1505f2d823--7e8e90028d614452b6ed280f47b10cf2
5ec8ebb4e807423594cc5025abc43459
7e8e90028d614452b6ed280f47b10cf2--5ec8ebb4e807423594cc5025abc43459
0fd839a031614fdf897c02d73adaaf1e
c81bb57c5e114607afaa9d1057cc3c48
RX(phi)
ecc7f8da2a16436aa151115caf356f4c--c81bb57c5e114607afaa9d1057cc3c48
3a6faf4429e64e678de425f4def5d861
2
2bb70943ec6e4ae7ba16e75e12254d64
RX(acos(phi))
c81bb57c5e114607afaa9d1057cc3c48--2bb70943ec6e4ae7ba16e75e12254d64
2bb70943ec6e4ae7ba16e75e12254d64--0fd839a031614fdf897c02d73adaaf1e
8fec42903cdc40288e5f2475b6334389
6fdcf93a51ef41dcb53506f00eec8a60
RX(phi)
3a6faf4429e64e678de425f4def5d861--6fdcf93a51ef41dcb53506f00eec8a60
7b422e67c39f49608e122959d305b22d
RX(acos(phi))
6fdcf93a51ef41dcb53506f00eec8a60--7b422e67c39f49608e122959d305b22d
7b422e67c39f49608e122959d305b22d--8fec42903cdc40288e5f2475b6334389
A custom encoding function can also be passed with sympy
from sympy import asin , Function
n_qubits = 3
# Using a pre-defined sympy Function
custom_fm_0 = feature_map ( n_qubits , fm_type = asin )
# Creating a custom function
def custom_fn ( x ):
return asin ( x ) + x ** 2
custom_fm_1 = feature_map ( n_qubits , fm_type = custom_fn )
block = chain ( custom_fm_0 , custom_fm_1 )
%3
cluster_6f9af4f7952a472b9d6a65209bb0250e
Constant <function custom_fn at 0x7fa2f0192a70> FM
cluster_1f527a47a3ef4a76a5dce2c93f001005
Constant asin FM
44715b19aefe4f35ab64670bfdd2a42f
0
515a8591a6b9470d9f602875b9e84cb3
RX(asin(phi))
44715b19aefe4f35ab64670bfdd2a42f--515a8591a6b9470d9f602875b9e84cb3
bf022fe02d3a4591a95c217f0abede6b
1
defef2d0058643eda57bda62675bd757
RX(phi**2 + asin(phi))
515a8591a6b9470d9f602875b9e84cb3--defef2d0058643eda57bda62675bd757
70c5445f20f64672a2b6e6852f86e53f
defef2d0058643eda57bda62675bd757--70c5445f20f64672a2b6e6852f86e53f
cefec23b06fd4e119da77d4ebb2ce4f3
1b7d21f0377f43d29f58ef96304e8a69
RX(asin(phi))
bf022fe02d3a4591a95c217f0abede6b--1b7d21f0377f43d29f58ef96304e8a69
04bb13eb9c224abcad72292d5598280b
2
375badd1075d49a594b42bc32890c33a
RX(phi**2 + asin(phi))
1b7d21f0377f43d29f58ef96304e8a69--375badd1075d49a594b42bc32890c33a
375badd1075d49a594b42bc32890c33a--cefec23b06fd4e119da77d4ebb2ce4f3
1b3b950b1eff4936b9914511435b9ddb
f0709bc3c72f41acbb0cd6a2daad9c1f
RX(asin(phi))
04bb13eb9c224abcad72292d5598280b--f0709bc3c72f41acbb0cd6a2daad9c1f
0d357c1fffb8495ab219f9de8a54e01d
RX(phi**2 + asin(phi))
f0709bc3c72f41acbb0cd6a2daad9c1f--0d357c1fffb8495ab219f9de8a54e01d
0d357c1fffb8495ab219f9de8a54e01d--1b3b950b1eff4936b9914511435b9ddb
Furthermore, the reupload_scaling
argument can be used to change the scaling applied to each qubit
in the support of the feature map. The default scalings can be chosen from the ReuploadScaling
enumeration.
from qadence import ReuploadScaling
from qadence.draw import display
n_qubits = 5
# Default constant value
fm_constant = feature_map ( n_qubits , fm_type = BasisSet . FOURIER , reupload_scaling = ReuploadScaling . CONSTANT )
# Linearly increasing scaling
fm_tower = feature_map ( n_qubits , fm_type = BasisSet . FOURIER , reupload_scaling = ReuploadScaling . TOWER )
# Exponentially increasing scaling
fm_exp = feature_map ( n_qubits , fm_type = BasisSet . FOURIER , reupload_scaling = ReuploadScaling . EXP )
block = chain ( fm_constant , fm_tower , fm_exp )
%3
cluster_63fa81e934ff42bb8bcc5d47bed53268
Exponential Fourier FM
cluster_7eb973fc34964fb89e8e43b96857c2d8
Constant Fourier FM
cluster_18900544f2844349b1fb86b5a62f7f49
Tower Fourier FM
7f3f9f9b94ca42bda4c05c17abb2d1ec
0
e3b680b3305c4ebfbe206e7a7957784b
RX(phi)
7f3f9f9b94ca42bda4c05c17abb2d1ec--e3b680b3305c4ebfbe206e7a7957784b
5cb02c52ab954d878102eceb9bc5fbdf
1
57ac77de20dc4c86a855ecf81a30a348
RX(1.0*phi)
e3b680b3305c4ebfbe206e7a7957784b--57ac77de20dc4c86a855ecf81a30a348
16f553ad3d0b48cf9a467427c5fdc8ce
RX(1.0*phi)
57ac77de20dc4c86a855ecf81a30a348--16f553ad3d0b48cf9a467427c5fdc8ce
9448f306888345f9a9a05a5f150768a2
16f553ad3d0b48cf9a467427c5fdc8ce--9448f306888345f9a9a05a5f150768a2
7368187dded148568db4fb8435ae6e28
0669260c25434897a031089e48e25712
RX(phi)
5cb02c52ab954d878102eceb9bc5fbdf--0669260c25434897a031089e48e25712
37964b86bc644030b34b43e96a42828f
2
083cbe2f882b4d5ca4b8f38665fa3aff
RX(2.0*phi)
0669260c25434897a031089e48e25712--083cbe2f882b4d5ca4b8f38665fa3aff
7e7ab3b92c3d49079505103708363418
RX(2.0*phi)
083cbe2f882b4d5ca4b8f38665fa3aff--7e7ab3b92c3d49079505103708363418
7e7ab3b92c3d49079505103708363418--7368187dded148568db4fb8435ae6e28
08d16d5a1d744df1a92109c2810e0c92
244505d8cac348499fc2ed70923bfdc6
RX(phi)
37964b86bc644030b34b43e96a42828f--244505d8cac348499fc2ed70923bfdc6
17287e7a21c94234a1853ceb5ede1ede
3
bbd5ac814f50465bba696055a133481d
RX(3.0*phi)
244505d8cac348499fc2ed70923bfdc6--bbd5ac814f50465bba696055a133481d
1afe7fe719be489fa37c3f11be716fe9
RX(4.0*phi)
bbd5ac814f50465bba696055a133481d--1afe7fe719be489fa37c3f11be716fe9
1afe7fe719be489fa37c3f11be716fe9--08d16d5a1d744df1a92109c2810e0c92
971dfb06161e40c09de34a16e5d2bb0c
ff1515d4035e46709f9a746a8c215071
RX(phi)
17287e7a21c94234a1853ceb5ede1ede--ff1515d4035e46709f9a746a8c215071
18492278d40c402294a79c7df965d5de
4
e311d3e528dc4da1a9609adaaa839215
RX(4.0*phi)
ff1515d4035e46709f9a746a8c215071--e311d3e528dc4da1a9609adaaa839215
49d19d612d0a4dc0b01de44689bb7e08
RX(8.0*phi)
e311d3e528dc4da1a9609adaaa839215--49d19d612d0a4dc0b01de44689bb7e08
49d19d612d0a4dc0b01de44689bb7e08--971dfb06161e40c09de34a16e5d2bb0c
dcedc2c4afc34451860f8115eae5e9de
f0819b4730c64b9f8d69c144a252db75
RX(phi)
18492278d40c402294a79c7df965d5de--f0819b4730c64b9f8d69c144a252db75
7014f3880f024162870bba79e060aab7
RX(5.0*phi)
f0819b4730c64b9f8d69c144a252db75--7014f3880f024162870bba79e060aab7
8c4d2b2e874d42489858bcf09bd8de5a
RX(16.0*phi)
7014f3880f024162870bba79e060aab7--8c4d2b2e874d42489858bcf09bd8de5a
8c4d2b2e874d42489858bcf09bd8de5a--dcedc2c4afc34451860f8115eae5e9de
A custom scaling can also be defined with a function with an int
input and int
or float
output.
n_qubits = 5
def custom_scaling ( i : int ) -> int | float :
"""Sqrt(i+1)"""
return ( i + 1 ) ** ( 0.5 )
# Custom scaling function
fm_custom = feature_map ( n_qubits , fm_type = BasisSet . CHEBYSHEV , reupload_scaling = custom_scaling )
%3
620eba3cf9fb46718dae4d546948e584
0
afa1ce5d353041419842b61babba52b2
RX(1.0*acos(phi))
620eba3cf9fb46718dae4d546948e584--afa1ce5d353041419842b61babba52b2
94c0b8d06eeb48a8bb6c9ec1a4e764cc
1
e498879c28784ffa8e0c41e10642c1ab
afa1ce5d353041419842b61babba52b2--e498879c28784ffa8e0c41e10642c1ab
7a4e5d04370d484592c74186da8b86d4
08e84c272a2640f09f241d8eb23035c2
RX(1.414*acos(phi))
94c0b8d06eeb48a8bb6c9ec1a4e764cc--08e84c272a2640f09f241d8eb23035c2
69bc82f9643c4503a9eb51dc96e43d7c
2
08e84c272a2640f09f241d8eb23035c2--7a4e5d04370d484592c74186da8b86d4
ccdc02c03da542d888213ad0ac134f41
a619597d185e4a938e18044c5ec9cef4
RX(1.732*acos(phi))
69bc82f9643c4503a9eb51dc96e43d7c--a619597d185e4a938e18044c5ec9cef4
1df66f3e680040e0a1d65977f111fb17
3
a619597d185e4a938e18044c5ec9cef4--ccdc02c03da542d888213ad0ac134f41
8ab77b9ed3f64cc2839ad56f14bfe63e
05952f4d1f464ef2926edcb98accdfb9
RX(2.0*acos(phi))
1df66f3e680040e0a1d65977f111fb17--05952f4d1f464ef2926edcb98accdfb9
ed60f562c6c7463aa832a7c229d8f466
4
05952f4d1f464ef2926edcb98accdfb9--8ab77b9ed3f64cc2839ad56f14bfe63e
9e25b7cc4b154fbfbde86df731b2466d
b8904576e4f94cb498082555b834e0c6
RX(2.236*acos(phi))
ed60f562c6c7463aa832a7c229d8f466--b8904576e4f94cb498082555b834e0c6
b8904576e4f94cb498082555b834e0c6--9e25b7cc4b154fbfbde86df731b2466d
To add a trainable parameter that multiplies the feature parameter inside the encoding function,
simply pass a param_prefix
string:
n_qubits = 5
fm_trainable = feature_map (
n_qubits ,
fm_type = BasisSet . FOURIER ,
reupload_scaling = ReuploadScaling . EXP ,
param_prefix = "w" ,
)
%3
3f6dff0c9ea44885b3da6d138edc80f1
0
183a0bab4828472f86054470102f0125
RX(1.0*phi*w₀)
3f6dff0c9ea44885b3da6d138edc80f1--183a0bab4828472f86054470102f0125
7f0c52c3340747afb17feed9640f6ea3
1
d7936ecbd5ee4dc28040ea534f93c13b
183a0bab4828472f86054470102f0125--d7936ecbd5ee4dc28040ea534f93c13b
3d8b0ee59b174e32bf21e5fcaee6188b
1f3f9cb085d7405aa44a5a4557d61fd5
RX(2.0*phi*w₁)
7f0c52c3340747afb17feed9640f6ea3--1f3f9cb085d7405aa44a5a4557d61fd5
390fc4f788e04261ad037bd3f1ebf337
2
1f3f9cb085d7405aa44a5a4557d61fd5--3d8b0ee59b174e32bf21e5fcaee6188b
83e30a5db5864baeacbf137dbcddc1c1
27f3f3b7692943e0bb4c1a0cc15840a2
RX(4.0*phi*w₂)
390fc4f788e04261ad037bd3f1ebf337--27f3f3b7692943e0bb4c1a0cc15840a2
8d7861394ccf4b05a18ced9bc11e49de
3
27f3f3b7692943e0bb4c1a0cc15840a2--83e30a5db5864baeacbf137dbcddc1c1
8dd2716f1b7e42ec9c1c635328275801
0b006cb4685e410fa8e767c85906add9
RX(8.0*phi*w₃)
8d7861394ccf4b05a18ced9bc11e49de--0b006cb4685e410fa8e767c85906add9
9fc22d677ed3452f8067cd356dc29f36
4
0b006cb4685e410fa8e767c85906add9--8dd2716f1b7e42ec9c1c635328275801
fc932e9dc06e4cb9bd7e449e62299ca5
a6c6c5c00b1f4bcd87ff28473f4a8526
RX(16.0*phi*w₄)
9fc22d677ed3452f8067cd356dc29f36--a6c6c5c00b1f4bcd87ff28473f4a8526
a6c6c5c00b1f4bcd87ff28473f4a8526--fc932e9dc06e4cb9bd7e449e62299ca5
Note that for the Fourier feature map, the encoding function is simply \(f(x)=x\) . For other cases, like the Chebyshev acos()
encoding,
the trainable parameter may cause the feature value to be outside the domain of the encoding function. This will eventually be fixed
by adding range constraints to trainable parameters in Qadence.
A full description of the remaining arguments can be found in the feature_map
API reference . We provide an example below.
from qadence import RY
n_qubits = 5
# Custom scaling function
fm_full = feature_map (
n_qubits = n_qubits ,
support = tuple ( reversed ( range ( n_qubits ))), # Reverse the qubit support to run the scaling from bottom to top
param = "x" , # Change the name of the parameter
op = RY , # Change the rotation gate between RX, RY, RZ or PHASE
fm_type = BasisSet . CHEBYSHEV ,
reupload_scaling = ReuploadScaling . EXP ,
feature_range = ( - 1.0 , 2.0 ), # Range from which the input data comes from
target_range = ( 1.0 , 3.0 ), # Range the encoder assumes as the natural range
multiplier = 5.0 , # Extra multiplier, which can also be a Parameter
param_prefix = "w" , # Add trainable parameters
)
%3
3b7e14ed985744ee9727572c5fab0722
0
8bd4abbdfb3d441f89cfa6fa627a4800
RY(80.0*acos(w₄*(0.667*x + 1.667)))
3b7e14ed985744ee9727572c5fab0722--8bd4abbdfb3d441f89cfa6fa627a4800
3de5cb001ec1489e938ba8fe92250481
1
4cb4adb76ca04466b1ee5c482f10c7c0
8bd4abbdfb3d441f89cfa6fa627a4800--4cb4adb76ca04466b1ee5c482f10c7c0
e0db28eab4a74d9b81206a1bc13abf9b
050b4bd838bb4014b6e62137e0b35798
RY(40.0*acos(w₃*(0.667*x + 1.667)))
3de5cb001ec1489e938ba8fe92250481--050b4bd838bb4014b6e62137e0b35798
326a7c6d21574b92b6de9d359f0bfe3e
2
050b4bd838bb4014b6e62137e0b35798--e0db28eab4a74d9b81206a1bc13abf9b
0a4f6fe52e354bea9879e139d2668baa
84931744f6124d9a94294ab93700a30c
RY(20.0*acos(w₂*(0.667*x + 1.667)))
326a7c6d21574b92b6de9d359f0bfe3e--84931744f6124d9a94294ab93700a30c
d7a9c8220ec64ce8be1fe644a7cc2c74
3
84931744f6124d9a94294ab93700a30c--0a4f6fe52e354bea9879e139d2668baa
312edeb79a014a26a32a7cab8b3b0bd5
f07fea688a73411fbd5b8bded09f0784
RY(10.0*acos(w₁*(0.667*x + 1.667)))
d7a9c8220ec64ce8be1fe644a7cc2c74--f07fea688a73411fbd5b8bded09f0784
8e6ba75e2006402493d10dbefe732eb9
4
f07fea688a73411fbd5b8bded09f0784--312edeb79a014a26a32a7cab8b3b0bd5
e43b8f35d9a04b739f8570958865fb33
4c4cb617df284c93a6db7f0425fa530a
RY(5.0*acos(w₀*(0.667*x + 1.667)))
8e6ba75e2006402493d10dbefe732eb9--4c4cb617df284c93a6db7f0425fa530a
4c4cb617df284c93a6db7f0425fa530a--e43b8f35d9a04b739f8570958865fb33
Hardware-efficient ansatz
Ansatze blocks for quantum machine-learning are typically built following the Hardware-Efficient Ansatz formalism (HEA).
Both fully digital and digital-analog HEAs can easily be built with the hea
function. By default,
the digital version is returned:
from qadence import hea
from qadence.draw import display
n_qubits = 3
depth = 2
ansatz = hea ( n_qubits , depth )
%3
856b9f338ded4ae8aaeac3ce68438e41
0
24e65d90f83741c5a20881508fa1f199
RX(theta₀)
856b9f338ded4ae8aaeac3ce68438e41--24e65d90f83741c5a20881508fa1f199
25a52a31ce7f4cc5b5b0bf098968cdec
1
b6f68539d6fb400697980829c20d0f7e
RY(theta₃)
24e65d90f83741c5a20881508fa1f199--b6f68539d6fb400697980829c20d0f7e
1ffc7fe81e554c7e872d7195d760f3cc
RX(theta₆)
b6f68539d6fb400697980829c20d0f7e--1ffc7fe81e554c7e872d7195d760f3cc
4933fa85436b40a3813a201dc5b2528d
1ffc7fe81e554c7e872d7195d760f3cc--4933fa85436b40a3813a201dc5b2528d
abfc31f1b8ca4be2938692b07d426e16
4933fa85436b40a3813a201dc5b2528d--abfc31f1b8ca4be2938692b07d426e16
e8b4eb7acc5449fcae3c0e9fc06e17de
RX(theta₉)
abfc31f1b8ca4be2938692b07d426e16--e8b4eb7acc5449fcae3c0e9fc06e17de
0cf2b83cdf1243ec8cff832d7ad7c698
RY(theta₁₂)
e8b4eb7acc5449fcae3c0e9fc06e17de--0cf2b83cdf1243ec8cff832d7ad7c698
25de11f458244127b2af21d9ce0d2581
RX(theta₁₅)
0cf2b83cdf1243ec8cff832d7ad7c698--25de11f458244127b2af21d9ce0d2581
ceb2604ad0b2477bbf8ba2a565ad173b
25de11f458244127b2af21d9ce0d2581--ceb2604ad0b2477bbf8ba2a565ad173b
a45d0e06161b48bbace2ef1c00b4e6a9
ceb2604ad0b2477bbf8ba2a565ad173b--a45d0e06161b48bbace2ef1c00b4e6a9
2f0741b046db48e2bfe7430cb1d51932
a45d0e06161b48bbace2ef1c00b4e6a9--2f0741b046db48e2bfe7430cb1d51932
6091f19662dd4971a1201cff8cd328d9
8cb6855d396c4a93bc6e944b64a1b62c
RX(theta₁)
25a52a31ce7f4cc5b5b0bf098968cdec--8cb6855d396c4a93bc6e944b64a1b62c
8a2e2246e104422e9becc4f732d146dd
2
edf12a3970d5417bb10ffbb253bdbab3
RY(theta₄)
8cb6855d396c4a93bc6e944b64a1b62c--edf12a3970d5417bb10ffbb253bdbab3
fc1f49a60d61413c85727eb4c690b402
RX(theta₇)
edf12a3970d5417bb10ffbb253bdbab3--fc1f49a60d61413c85727eb4c690b402
b8a5fce4b5f147b9b0a0ef4611a451fc
X
fc1f49a60d61413c85727eb4c690b402--b8a5fce4b5f147b9b0a0ef4611a451fc
b8a5fce4b5f147b9b0a0ef4611a451fc--4933fa85436b40a3813a201dc5b2528d
10189c2bce7045f6afbe9f3ea2fbca09
b8a5fce4b5f147b9b0a0ef4611a451fc--10189c2bce7045f6afbe9f3ea2fbca09
267246245f8b4db39fada27d6262294e
RX(theta₁₀)
10189c2bce7045f6afbe9f3ea2fbca09--267246245f8b4db39fada27d6262294e
6e72a8419445432d865c80379f117dd0
RY(theta₁₃)
267246245f8b4db39fada27d6262294e--6e72a8419445432d865c80379f117dd0
2e6163a198a94cac88f4b65462318e95
RX(theta₁₆)
6e72a8419445432d865c80379f117dd0--2e6163a198a94cac88f4b65462318e95
841543d4f6bb426f9f3162634ae32703
X
2e6163a198a94cac88f4b65462318e95--841543d4f6bb426f9f3162634ae32703
841543d4f6bb426f9f3162634ae32703--ceb2604ad0b2477bbf8ba2a565ad173b
38884f564268443b9ee17aa4e644a252
841543d4f6bb426f9f3162634ae32703--38884f564268443b9ee17aa4e644a252
38884f564268443b9ee17aa4e644a252--6091f19662dd4971a1201cff8cd328d9
57a41030fd58462194f6df2444c43d70
7e9f2f76d3be422aa316d46ef6502850
RX(theta₂)
8a2e2246e104422e9becc4f732d146dd--7e9f2f76d3be422aa316d46ef6502850
43c4275790e14c9cb2adcfde3c0e4b4f
RY(theta₅)
7e9f2f76d3be422aa316d46ef6502850--43c4275790e14c9cb2adcfde3c0e4b4f
7c1450c78cb74dd2b103419c796c1aa9
RX(theta₈)
43c4275790e14c9cb2adcfde3c0e4b4f--7c1450c78cb74dd2b103419c796c1aa9
327518c351524ea48e8399fe772a455d
7c1450c78cb74dd2b103419c796c1aa9--327518c351524ea48e8399fe772a455d
509fa1e2c66f44838a7981774d4d89b4
X
327518c351524ea48e8399fe772a455d--509fa1e2c66f44838a7981774d4d89b4
509fa1e2c66f44838a7981774d4d89b4--10189c2bce7045f6afbe9f3ea2fbca09
f72b6e3913eb4d71aa03cd60a6bd96c4
RX(theta₁₁)
509fa1e2c66f44838a7981774d4d89b4--f72b6e3913eb4d71aa03cd60a6bd96c4
216a44948ade425c95ec10799c847a75
RY(theta₁₄)
f72b6e3913eb4d71aa03cd60a6bd96c4--216a44948ade425c95ec10799c847a75
c01211982ef2475db1efe3f89515828e
RX(theta₁₇)
216a44948ade425c95ec10799c847a75--c01211982ef2475db1efe3f89515828e
30ae2b2b2e114c74a745964779fd8b85
c01211982ef2475db1efe3f89515828e--30ae2b2b2e114c74a745964779fd8b85
4fa9c1ade71f4328b1c68c69265ea980
X
30ae2b2b2e114c74a745964779fd8b85--4fa9c1ade71f4328b1c68c69265ea980
4fa9c1ade71f4328b1c68c69265ea980--38884f564268443b9ee17aa4e644a252
4fa9c1ade71f4328b1c68c69265ea980--57a41030fd58462194f6df2444c43d70
As seen above, the rotation layers are automatically parameterized, and the prefix "theta"
can be changed with the param_prefix
argument.
Furthermore, both the single-qubit rotations and the two-qubit entangler can be customized with the operations
and entangler
argument. The operations can be passed as a list of single-qubit rotations, while the entangler should be either CNOT
, CZ
, CRX
, CRY
, CRZ
or CPHASE
.
from qadence import RX , RY , CPHASE
ansatz = hea (
n_qubits = n_qubits ,
depth = depth ,
param_prefix = "phi" ,
operations = [ RX , RY , RX ],
entangler = CPHASE
)
%3
777f0833b6654c6ba02642237a54044b
0
061f1a5884524e879e8dc7f34df3b003
RX(phi₀)
777f0833b6654c6ba02642237a54044b--061f1a5884524e879e8dc7f34df3b003
214f39f4010e473ebbdde0bf900fd8de
1
ac52249efe7b4a3bb8db4e763e9dad35
RY(phi₃)
061f1a5884524e879e8dc7f34df3b003--ac52249efe7b4a3bb8db4e763e9dad35
32de796e25b34bb3ac206a101f1f8f41
RX(phi₆)
ac52249efe7b4a3bb8db4e763e9dad35--32de796e25b34bb3ac206a101f1f8f41
264f78a03e5942b69fe0655d990d9a74
32de796e25b34bb3ac206a101f1f8f41--264f78a03e5942b69fe0655d990d9a74
e00a37c2b8dd48f2a5b5a4c9bbfb5349
264f78a03e5942b69fe0655d990d9a74--e00a37c2b8dd48f2a5b5a4c9bbfb5349
91aeaa86ec114709ba6208e13df95d7c
RX(phi₉)
e00a37c2b8dd48f2a5b5a4c9bbfb5349--91aeaa86ec114709ba6208e13df95d7c
2338622959324bf099139dacf377f768
RY(phi₁₂)
91aeaa86ec114709ba6208e13df95d7c--2338622959324bf099139dacf377f768
b7c3152df59149cb8fae6d2eccf16ed1
RX(phi₁₅)
2338622959324bf099139dacf377f768--b7c3152df59149cb8fae6d2eccf16ed1
7dd5ea503d944ef58220c8b73b003d3e
b7c3152df59149cb8fae6d2eccf16ed1--7dd5ea503d944ef58220c8b73b003d3e
7fcbdee83f4043899fb29b95ce64a5ed
7dd5ea503d944ef58220c8b73b003d3e--7fcbdee83f4043899fb29b95ce64a5ed
01cf28e65ada440bb35a9930fd1fdbe7
7fcbdee83f4043899fb29b95ce64a5ed--01cf28e65ada440bb35a9930fd1fdbe7
d0dd46a21f4a4b2f8d0634b7698b9c9d
27ea956e7cd34349985bef51adc3d9d6
RX(phi₁)
214f39f4010e473ebbdde0bf900fd8de--27ea956e7cd34349985bef51adc3d9d6
10082a2f54184d4cbf8c95d743401c13
2
2d7a1aaf66d84ca6b1b8f4ff5e38caf5
RY(phi₄)
27ea956e7cd34349985bef51adc3d9d6--2d7a1aaf66d84ca6b1b8f4ff5e38caf5
c423b3fb74aa4cadb060d6d5254771d0
RX(phi₇)
2d7a1aaf66d84ca6b1b8f4ff5e38caf5--c423b3fb74aa4cadb060d6d5254771d0
0bc9b38c971d4b3aa2c3dfd103e49ef5
PHASE(phi_ent₀)
c423b3fb74aa4cadb060d6d5254771d0--0bc9b38c971d4b3aa2c3dfd103e49ef5
0bc9b38c971d4b3aa2c3dfd103e49ef5--264f78a03e5942b69fe0655d990d9a74
415ef6815b0843a3948f2a4df85f4ad6
0bc9b38c971d4b3aa2c3dfd103e49ef5--415ef6815b0843a3948f2a4df85f4ad6
067386a461d349b4b910ea7702759a97
RX(phi₁₀)
415ef6815b0843a3948f2a4df85f4ad6--067386a461d349b4b910ea7702759a97
ab9319a5f98d48a49ef86fd8aa5cc1d6
RY(phi₁₃)
067386a461d349b4b910ea7702759a97--ab9319a5f98d48a49ef86fd8aa5cc1d6
3ac7f45cfd704f8e9646e6a1521d4835
RX(phi₁₆)
ab9319a5f98d48a49ef86fd8aa5cc1d6--3ac7f45cfd704f8e9646e6a1521d4835
82349c8c6a804855b68598cff1b14c4c
PHASE(phi_ent₂)
3ac7f45cfd704f8e9646e6a1521d4835--82349c8c6a804855b68598cff1b14c4c
82349c8c6a804855b68598cff1b14c4c--7dd5ea503d944ef58220c8b73b003d3e
3292c0ebc6284a9ab9433ab68a3d1d6c
82349c8c6a804855b68598cff1b14c4c--3292c0ebc6284a9ab9433ab68a3d1d6c
3292c0ebc6284a9ab9433ab68a3d1d6c--d0dd46a21f4a4b2f8d0634b7698b9c9d
f2b960b05fd04112860c3f1f7ee00535
a9f69259c76848809490d721f77ad8cb
RX(phi₂)
10082a2f54184d4cbf8c95d743401c13--a9f69259c76848809490d721f77ad8cb
344359e0fa8d49f3ac1b50ccaa485993
RY(phi₅)
a9f69259c76848809490d721f77ad8cb--344359e0fa8d49f3ac1b50ccaa485993
0734231e463f44d29e4456eee05aea23
RX(phi₈)
344359e0fa8d49f3ac1b50ccaa485993--0734231e463f44d29e4456eee05aea23
2a2b2a83111b4893aad96f6a35246681
0734231e463f44d29e4456eee05aea23--2a2b2a83111b4893aad96f6a35246681
bf48c0d330124bb5aadb2f2386bc090f
PHASE(phi_ent₁)
2a2b2a83111b4893aad96f6a35246681--bf48c0d330124bb5aadb2f2386bc090f
bf48c0d330124bb5aadb2f2386bc090f--415ef6815b0843a3948f2a4df85f4ad6
bfb9616072a044698a67efaf867da4aa
RX(phi₁₁)
bf48c0d330124bb5aadb2f2386bc090f--bfb9616072a044698a67efaf867da4aa
729756fc68f642cf8f6b86dc72b4b518
RY(phi₁₄)
bfb9616072a044698a67efaf867da4aa--729756fc68f642cf8f6b86dc72b4b518
3c3216c85c744a72b1ac78502b7a1175
RX(phi₁₇)
729756fc68f642cf8f6b86dc72b4b518--3c3216c85c744a72b1ac78502b7a1175
51d6b5d3125e4ac5b995fc12f3371b35
3c3216c85c744a72b1ac78502b7a1175--51d6b5d3125e4ac5b995fc12f3371b35
36b9eed237e344a1b0ae77b122c7e240
PHASE(phi_ent₃)
51d6b5d3125e4ac5b995fc12f3371b35--36b9eed237e344a1b0ae77b122c7e240
36b9eed237e344a1b0ae77b122c7e240--3292c0ebc6284a9ab9433ab68a3d1d6c
36b9eed237e344a1b0ae77b122c7e240--f2b960b05fd04112860c3f1f7ee00535
Having a truly hardware-efficient ansatz means that the entangling operation can be chosen according to each device's native interactions. Besides digital operations, in Qadence it is also possible to build digital-analog HEAs with the entanglement produced by the natural evolution of a set of interacting qubits, as natively implemented in neutral atom devices. As with other digital-analog functions, this can be controlled with the strategy
argument which can be chosen from the Strategy
enum type. Currently, only Strategy.DIGITAL
and Strategy.SDAQC
are available. By default, calling strategy = Strategy.SDAQC
will use a global entangling Hamiltonian with Ising-like \(NN\) interactions and constant interaction strength,
from qadence import Strategy
ansatz = hea (
n_qubits ,
depth = depth ,
strategy = Strategy . SDAQC
)
%3
cluster_c13e49f3add34e0ba65d9e76382de275
cluster_328fe189dd3e4806a643e6fb551305d5
215d17fbe1b5496c8b1724d911c220de
0
230805aa12424105b151e1d8578c7a50
RX(theta₀)
215d17fbe1b5496c8b1724d911c220de--230805aa12424105b151e1d8578c7a50
5f86f829f67c4fb0b1c9f356772448bd
1
735d01e5362a4b499ad89391dde9dba6
RY(theta₃)
230805aa12424105b151e1d8578c7a50--735d01e5362a4b499ad89391dde9dba6
fabb8a07510748b283bbe3a87d08bc3e
RX(theta₆)
735d01e5362a4b499ad89391dde9dba6--fabb8a07510748b283bbe3a87d08bc3e
6e50e9b348e5423490b7760ff21a1947
HamEvo
fabb8a07510748b283bbe3a87d08bc3e--6e50e9b348e5423490b7760ff21a1947
b94a64dcfc06405c889a1bd0924568fc
RX(theta₉)
6e50e9b348e5423490b7760ff21a1947--b94a64dcfc06405c889a1bd0924568fc
51ab8e5624454c91ba312be0cd6562e8
RY(theta₁₂)
b94a64dcfc06405c889a1bd0924568fc--51ab8e5624454c91ba312be0cd6562e8
7a682be13d024320b9fcf85b25718cb2
RX(theta₁₅)
51ab8e5624454c91ba312be0cd6562e8--7a682be13d024320b9fcf85b25718cb2
0b8a02c65043478f9200ff487d05eaaa
HamEvo
7a682be13d024320b9fcf85b25718cb2--0b8a02c65043478f9200ff487d05eaaa
8eb74e03e3eb4c119f622b5137152bc5
0b8a02c65043478f9200ff487d05eaaa--8eb74e03e3eb4c119f622b5137152bc5
b09043a3dfdc413083f9c154f161aef0
2bac25fe41b143f3a903922ea383ae09
RX(theta₁)
5f86f829f67c4fb0b1c9f356772448bd--2bac25fe41b143f3a903922ea383ae09
0c6c5fd734784d3ba37741da40345462
2
06f3a28b752e49cf9e156ebfe70af9f9
RY(theta₄)
2bac25fe41b143f3a903922ea383ae09--06f3a28b752e49cf9e156ebfe70af9f9
c104ec45e5fb462faf01e502a2259b4d
RX(theta₇)
06f3a28b752e49cf9e156ebfe70af9f9--c104ec45e5fb462faf01e502a2259b4d
379447389cc1467f955e558826c1d382
t = theta_t₀
c104ec45e5fb462faf01e502a2259b4d--379447389cc1467f955e558826c1d382
bbd751a6bd0746139bf780081dcb3bae
RX(theta₁₀)
379447389cc1467f955e558826c1d382--bbd751a6bd0746139bf780081dcb3bae
836c2d4ee21f49bd9fd9a17ae53d14b3
RY(theta₁₃)
bbd751a6bd0746139bf780081dcb3bae--836c2d4ee21f49bd9fd9a17ae53d14b3
d141720a50d54010b5c032a35576a23a
RX(theta₁₆)
836c2d4ee21f49bd9fd9a17ae53d14b3--d141720a50d54010b5c032a35576a23a
07ac2f3b9d804a3e94977309ecbcc6d8
t = theta_t₁
d141720a50d54010b5c032a35576a23a--07ac2f3b9d804a3e94977309ecbcc6d8
07ac2f3b9d804a3e94977309ecbcc6d8--b09043a3dfdc413083f9c154f161aef0
8ee7a179c8a0492891a62a7431baabed
5bb324203c35435fa9adc9b1d08469eb
RX(theta₂)
0c6c5fd734784d3ba37741da40345462--5bb324203c35435fa9adc9b1d08469eb
a11afa158919413eba13f98455696750
RY(theta₅)
5bb324203c35435fa9adc9b1d08469eb--a11afa158919413eba13f98455696750
6811bb89d2f8439f9a1e593fbaa15d4d
RX(theta₈)
a11afa158919413eba13f98455696750--6811bb89d2f8439f9a1e593fbaa15d4d
fc5dfde48c584970bba80a38aff69e21
6811bb89d2f8439f9a1e593fbaa15d4d--fc5dfde48c584970bba80a38aff69e21
c79ba3ee442743e38b38aebba483c75d
RX(theta₁₁)
fc5dfde48c584970bba80a38aff69e21--c79ba3ee442743e38b38aebba483c75d
55acf6d5847146148541c5e9aa0a60d0
RY(theta₁₄)
c79ba3ee442743e38b38aebba483c75d--55acf6d5847146148541c5e9aa0a60d0
4bc90cdb37d5467aa3d28efd6ac59bbc
RX(theta₁₇)
55acf6d5847146148541c5e9aa0a60d0--4bc90cdb37d5467aa3d28efd6ac59bbc
c03eb0a2c50c4ecc8fcab232639b4a4b
4bc90cdb37d5467aa3d28efd6ac59bbc--c03eb0a2c50c4ecc8fcab232639b4a4b
c03eb0a2c50c4ecc8fcab232639b4a4b--8ee7a179c8a0492891a62a7431baabed
Note that, by default, only the time-parameter is automatically parameterized when building a digital-analog HEA. However, as described in the Hamiltonians tutorial , arbitrary interaction Hamiltonians can be easily built with the hamiltonian_factory
function, with both customized or fully parameterized interactions, and these can be directly passed as the entangler
for a customizable digital-analog HEA.
from qadence import hamiltonian_factory , Interaction , N , Register , hea
# Build a parameterized neutral-atom Hamiltonian following a honeycomb_lattice:
register = Register . honeycomb_lattice ( 1 , 1 )
entangler = hamiltonian_factory (
register ,
interaction = Interaction . NN ,
detuning = N ,
interaction_strength = "e" ,
detuning_strength = "n"
)
# Build a fully parameterized Digital-Analog HEA:
n_qubits = register . n_qubits
depth = 2
ansatz = hea (
n_qubits = register . n_qubits ,
depth = depth ,
operations = [ RX , RY , RX ],
entangler = entangler ,
strategy = Strategy . SDAQC
)
%3
cluster_95e7add384644df4830e27e9dc8d3b07
cluster_69cb91f52cb4403e955fa58dd98fa36f
613cfae6d357415cb6ab907ab87438b0
0
c8be1b93b5444788b6fdd452323fb026
RX(theta₀)
613cfae6d357415cb6ab907ab87438b0--c8be1b93b5444788b6fdd452323fb026
304aef4acce8423ba3594dd10f9b3fb8
1
03778e4f4bae4e998fe1c75b9265af95
RY(theta₆)
c8be1b93b5444788b6fdd452323fb026--03778e4f4bae4e998fe1c75b9265af95
b60b391565a848a58ffaa063e74ae3d0
RX(theta₁₂)
03778e4f4bae4e998fe1c75b9265af95--b60b391565a848a58ffaa063e74ae3d0
997c6d51c28b4f9696477c5a6a25b98c
b60b391565a848a58ffaa063e74ae3d0--997c6d51c28b4f9696477c5a6a25b98c
d3afc5504039463bb5125f815c4d0e7e
RX(theta₁₈)
997c6d51c28b4f9696477c5a6a25b98c--d3afc5504039463bb5125f815c4d0e7e
47330089e0824b3b9eb9847cb52d1b77
RY(theta₂₄)
d3afc5504039463bb5125f815c4d0e7e--47330089e0824b3b9eb9847cb52d1b77
2aa094c357d54e85a8308337402fe902
RX(theta₃₀)
47330089e0824b3b9eb9847cb52d1b77--2aa094c357d54e85a8308337402fe902
75e26069984e4a3b916cb113c9e17ede
2aa094c357d54e85a8308337402fe902--75e26069984e4a3b916cb113c9e17ede
ca170f9422a846cab1c5a0c9688ee395
75e26069984e4a3b916cb113c9e17ede--ca170f9422a846cab1c5a0c9688ee395
6483877e89bf4e8f931249179dd65b10
cd9111587def4bd8aaf1c3d217a8c040
RX(theta₁)
304aef4acce8423ba3594dd10f9b3fb8--cd9111587def4bd8aaf1c3d217a8c040
86b2ba68c59a42bbbb1b3675cb964382
2
38aac80fc29c45f1bda11d1e1da091ad
RY(theta₇)
cd9111587def4bd8aaf1c3d217a8c040--38aac80fc29c45f1bda11d1e1da091ad
4eee72c3d2ac4428905c649188bac396
RX(theta₁₃)
38aac80fc29c45f1bda11d1e1da091ad--4eee72c3d2ac4428905c649188bac396
c93bafc20ec449d8bc301e4a1ca9860d
4eee72c3d2ac4428905c649188bac396--c93bafc20ec449d8bc301e4a1ca9860d
b92e3cb47da9437cadb1222b579ffefb
RX(theta₁₉)
c93bafc20ec449d8bc301e4a1ca9860d--b92e3cb47da9437cadb1222b579ffefb
0fdcad85a6054c58bc515eecf9959c10
RY(theta₂₅)
b92e3cb47da9437cadb1222b579ffefb--0fdcad85a6054c58bc515eecf9959c10
42dfbeea46c74106969b5dfdfa36ac7d
RX(theta₃₁)
0fdcad85a6054c58bc515eecf9959c10--42dfbeea46c74106969b5dfdfa36ac7d
85b6ec4cf1344048911cb9deb70fbf28
42dfbeea46c74106969b5dfdfa36ac7d--85b6ec4cf1344048911cb9deb70fbf28
85b6ec4cf1344048911cb9deb70fbf28--6483877e89bf4e8f931249179dd65b10
ab084789dcf445a7997417a6554c3d78
f55cfdd9488a4108bc529678a2ab26a2
RX(theta₂)
86b2ba68c59a42bbbb1b3675cb964382--f55cfdd9488a4108bc529678a2ab26a2
c52bffe2fca1457eb5cf9d1176c0ed4f
3
f5df73125218448d928db66305684c58
RY(theta₈)
f55cfdd9488a4108bc529678a2ab26a2--f5df73125218448d928db66305684c58
9b7ebf9739e64489b48a9dc856195eb9
RX(theta₁₄)
f5df73125218448d928db66305684c58--9b7ebf9739e64489b48a9dc856195eb9
0773348c2e024883a551d9db3d48055c
HamEvo
9b7ebf9739e64489b48a9dc856195eb9--0773348c2e024883a551d9db3d48055c
b662781e7ad34dcb8a1ad46c497d8b99
RX(theta₂₀)
0773348c2e024883a551d9db3d48055c--b662781e7ad34dcb8a1ad46c497d8b99
e2817598a65f4c70b0af93a5614c9204
RY(theta₂₆)
b662781e7ad34dcb8a1ad46c497d8b99--e2817598a65f4c70b0af93a5614c9204
29270f9e6e6c45bcbc868acefa1be291
RX(theta₃₂)
e2817598a65f4c70b0af93a5614c9204--29270f9e6e6c45bcbc868acefa1be291
6536e2c040df4aa196e24bc582c9eb1c
HamEvo
29270f9e6e6c45bcbc868acefa1be291--6536e2c040df4aa196e24bc582c9eb1c
6536e2c040df4aa196e24bc582c9eb1c--ab084789dcf445a7997417a6554c3d78
8beda52cee864ddbab88fc78b781d980
5321b63c58564e3c90862ea56adae1a5
RX(theta₃)
c52bffe2fca1457eb5cf9d1176c0ed4f--5321b63c58564e3c90862ea56adae1a5
0b1fe4767764423f9f298acda8d1de76
4
2a1bf104f4464e6da19fe12e5eda6465
RY(theta₉)
5321b63c58564e3c90862ea56adae1a5--2a1bf104f4464e6da19fe12e5eda6465
4986ea6e961341b68401c3d2201a4a39
RX(theta₁₅)
2a1bf104f4464e6da19fe12e5eda6465--4986ea6e961341b68401c3d2201a4a39
6ae06826c0994f3aa2c1bcad1759af56
t = theta_t₀
4986ea6e961341b68401c3d2201a4a39--6ae06826c0994f3aa2c1bcad1759af56
a532fc3b22f64f6d87a402e069ea982d
RX(theta₂₁)
6ae06826c0994f3aa2c1bcad1759af56--a532fc3b22f64f6d87a402e069ea982d
e1567a717433400c808f1b8207dd0a33
RY(theta₂₇)
a532fc3b22f64f6d87a402e069ea982d--e1567a717433400c808f1b8207dd0a33
38af16bb6e5640ab975951897f62c9b7
RX(theta₃₃)
e1567a717433400c808f1b8207dd0a33--38af16bb6e5640ab975951897f62c9b7
7bd5ba9f2e804293a1919683a28d6017
t = theta_t₁
38af16bb6e5640ab975951897f62c9b7--7bd5ba9f2e804293a1919683a28d6017
7bd5ba9f2e804293a1919683a28d6017--8beda52cee864ddbab88fc78b781d980
675b03155d2649aaaea99852ecfa5a37
5cdf3ad6291b4b9eb7ea1b5f940cd5d7
RX(theta₄)
0b1fe4767764423f9f298acda8d1de76--5cdf3ad6291b4b9eb7ea1b5f940cd5d7
92fee9d628074823ac2f9591468ed332
5
78d0e4f8c2ed40bdbbf9736045ba2c25
RY(theta₁₀)
5cdf3ad6291b4b9eb7ea1b5f940cd5d7--78d0e4f8c2ed40bdbbf9736045ba2c25
4b0d8047cd47450cb9b160a3215c0f6f
RX(theta₁₆)
78d0e4f8c2ed40bdbbf9736045ba2c25--4b0d8047cd47450cb9b160a3215c0f6f
f9c1d09d8f884c2ebcb6c513617b64a9
4b0d8047cd47450cb9b160a3215c0f6f--f9c1d09d8f884c2ebcb6c513617b64a9
43dcb728ceb841b0916e00343b1ceade
RX(theta₂₂)
f9c1d09d8f884c2ebcb6c513617b64a9--43dcb728ceb841b0916e00343b1ceade
5dce9ac066a6450eb879427a159669df
RY(theta₂₈)
43dcb728ceb841b0916e00343b1ceade--5dce9ac066a6450eb879427a159669df
22d4ba7c12a94f40b708095129e92549
RX(theta₃₄)
5dce9ac066a6450eb879427a159669df--22d4ba7c12a94f40b708095129e92549
e22902f4cf7e4bc6a5ae5fa088bc6fbe
22d4ba7c12a94f40b708095129e92549--e22902f4cf7e4bc6a5ae5fa088bc6fbe
e22902f4cf7e4bc6a5ae5fa088bc6fbe--675b03155d2649aaaea99852ecfa5a37
55847d6bcf6a417ca0b8a323f1739829
64794da889fa46a89bf4aea0d2d90777
RX(theta₅)
92fee9d628074823ac2f9591468ed332--64794da889fa46a89bf4aea0d2d90777
9f0e40cdba9f4c129fdd9062594ac246
RY(theta₁₁)
64794da889fa46a89bf4aea0d2d90777--9f0e40cdba9f4c129fdd9062594ac246
09dad94da62d4fddbcafb422c2fac4b0
RX(theta₁₇)
9f0e40cdba9f4c129fdd9062594ac246--09dad94da62d4fddbcafb422c2fac4b0
2e8a7d9f124246e3b5abba6ca9bbd21f
09dad94da62d4fddbcafb422c2fac4b0--2e8a7d9f124246e3b5abba6ca9bbd21f
04a2d4ebe50b4c85ac7fa230b7ce54cf
RX(theta₂₃)
2e8a7d9f124246e3b5abba6ca9bbd21f--04a2d4ebe50b4c85ac7fa230b7ce54cf
2934bf5e41b64c9d9096faa95c4c36ea
RY(theta₂₉)
04a2d4ebe50b4c85ac7fa230b7ce54cf--2934bf5e41b64c9d9096faa95c4c36ea
9d5d8368f8c54f06abbc5c921b05e070
RX(theta₃₅)
2934bf5e41b64c9d9096faa95c4c36ea--9d5d8368f8c54f06abbc5c921b05e070
f0570cfbb671400caab1a0777f5714b9
9d5d8368f8c54f06abbc5c921b05e070--f0570cfbb671400caab1a0777f5714b9
f0570cfbb671400caab1a0777f5714b9--55847d6bcf6a417ca0b8a323f1739829
Identity-initialized ansatz
It is widely known that parametrized quantum circuits are characterized by barren plateaus, where the gradient becomes exponentially small in the number of qubits. Here we include one of many techniques that have been proposed in recent years to mitigate this effect and facilitate QNN
s training: Grant et al. showed that initializing the weights of a QNN
so that each block of the circuit evaluates to identity reduces the effect of barren plateaus in the initial stage of training. In a similar fashion to hea
, such circuit can be created via calling the associated function, identity_initialized_ansatz
:
from qadence.constructors import identity_initialized_ansatz
from qadence.draw import display
n_qubits = 3
depth = 2
ansatz = identity_initialized_ansatz ( n_qubits , depth )
%3
cluster_243d8e2180d7484f9054cb70de53decf
BPMA-1
cluster_b5ec43184b3d4900a734f1c7ece1818e
BPMA-0
b35bc00738264a238aeeb675c9800163
0
2930b36ef6494e93b9544e0abd7f0143
RX(iia_α₀₀)
b35bc00738264a238aeeb675c9800163--2930b36ef6494e93b9544e0abd7f0143
e87a9ba359834fb49ec2c4a9e4c244ed
1
d819d271d32846e8b9ccefa51e337a85
RY(iia_α₀₃)
2930b36ef6494e93b9544e0abd7f0143--d819d271d32846e8b9ccefa51e337a85
2294b5e07b1947408b4728fbaf697b10
d819d271d32846e8b9ccefa51e337a85--2294b5e07b1947408b4728fbaf697b10
f42069cee6094b719b414c933371f87c
2294b5e07b1947408b4728fbaf697b10--f42069cee6094b719b414c933371f87c
4a2afba0425046bfac8668ea19387c47
RX(iia_γ₀₀)
f42069cee6094b719b414c933371f87c--4a2afba0425046bfac8668ea19387c47
e6173e6568da409bb5e90597dacbfc2b
4a2afba0425046bfac8668ea19387c47--e6173e6568da409bb5e90597dacbfc2b
fb7c3764aa6f4a85894a1e1d5e8ccd99
e6173e6568da409bb5e90597dacbfc2b--fb7c3764aa6f4a85894a1e1d5e8ccd99
2aa6438d4488404a94f0cd0aae44d224
RY(iia_β₀₃)
fb7c3764aa6f4a85894a1e1d5e8ccd99--2aa6438d4488404a94f0cd0aae44d224
f48f2c4e09f542acb44b533b522b0339
RX(iia_β₀₀)
2aa6438d4488404a94f0cd0aae44d224--f48f2c4e09f542acb44b533b522b0339
91a2ba93cb84402bb19dcccf002bb5d2
RX(iia_α₁₀)
f48f2c4e09f542acb44b533b522b0339--91a2ba93cb84402bb19dcccf002bb5d2
130328a0767b45688b6d1aed0d651f00
RY(iia_α₁₃)
91a2ba93cb84402bb19dcccf002bb5d2--130328a0767b45688b6d1aed0d651f00
b4789946c305443cb360373ad7ce65f0
130328a0767b45688b6d1aed0d651f00--b4789946c305443cb360373ad7ce65f0
fc711d6e21ee46c58550a359fbca17b3
b4789946c305443cb360373ad7ce65f0--fc711d6e21ee46c58550a359fbca17b3
6fbe4e2743c44b5297717082724b47e2
RX(iia_γ₁₀)
fc711d6e21ee46c58550a359fbca17b3--6fbe4e2743c44b5297717082724b47e2
b555477f568c40d9a23fe6482f09b595
6fbe4e2743c44b5297717082724b47e2--b555477f568c40d9a23fe6482f09b595
22f94501e8e04db4828a3667e8622150
b555477f568c40d9a23fe6482f09b595--22f94501e8e04db4828a3667e8622150
80aa9754a36f4850988d94e1fa2b0b1f
RY(iia_β₁₃)
22f94501e8e04db4828a3667e8622150--80aa9754a36f4850988d94e1fa2b0b1f
270ebd2928da494e840ff1fe9d1aa87c
RX(iia_β₁₀)
80aa9754a36f4850988d94e1fa2b0b1f--270ebd2928da494e840ff1fe9d1aa87c
cb4150e5aba64e899bd132c6ce1c9aed
270ebd2928da494e840ff1fe9d1aa87c--cb4150e5aba64e899bd132c6ce1c9aed
9b0c553ecbae43f98b24ff686d077806
77ac03f1c60f4b318ae7d106cc29e7c3
RX(iia_α₀₁)
e87a9ba359834fb49ec2c4a9e4c244ed--77ac03f1c60f4b318ae7d106cc29e7c3
7da1b7ac624c4639a2a21cc8a19ab1ce
2
239fef48f49c4d589762b9ff135d8423
RY(iia_α₀₄)
77ac03f1c60f4b318ae7d106cc29e7c3--239fef48f49c4d589762b9ff135d8423
c17aeb7f3cca497fb3b96c23b8751324
X
239fef48f49c4d589762b9ff135d8423--c17aeb7f3cca497fb3b96c23b8751324
c17aeb7f3cca497fb3b96c23b8751324--2294b5e07b1947408b4728fbaf697b10
3bba5b5e80f04dc5a5c73fa6136fc460
c17aeb7f3cca497fb3b96c23b8751324--3bba5b5e80f04dc5a5c73fa6136fc460
068f7b482b9549ee9ad1223cabf89b3e
RX(iia_γ₀₁)
3bba5b5e80f04dc5a5c73fa6136fc460--068f7b482b9549ee9ad1223cabf89b3e
fc5a68b67c6747389576804f2836bdd9
068f7b482b9549ee9ad1223cabf89b3e--fc5a68b67c6747389576804f2836bdd9
cdbde912d75e4ecfb2731e3e6bbc79c7
X
fc5a68b67c6747389576804f2836bdd9--cdbde912d75e4ecfb2731e3e6bbc79c7
cdbde912d75e4ecfb2731e3e6bbc79c7--fb7c3764aa6f4a85894a1e1d5e8ccd99
882693a0e65d405fb31169981119d782
RY(iia_β₀₄)
cdbde912d75e4ecfb2731e3e6bbc79c7--882693a0e65d405fb31169981119d782
b596d763e7df405e852a3af77d33e2df
RX(iia_β₀₁)
882693a0e65d405fb31169981119d782--b596d763e7df405e852a3af77d33e2df
1fbff5f44ec84dcf9859d7c7508e7889
RX(iia_α₁₁)
b596d763e7df405e852a3af77d33e2df--1fbff5f44ec84dcf9859d7c7508e7889
4de61dd99bbf4234af1cb9596ac6e022
RY(iia_α₁₄)
1fbff5f44ec84dcf9859d7c7508e7889--4de61dd99bbf4234af1cb9596ac6e022
22c8734eecf34e5c864d4c080fc8697a
X
4de61dd99bbf4234af1cb9596ac6e022--22c8734eecf34e5c864d4c080fc8697a
22c8734eecf34e5c864d4c080fc8697a--b4789946c305443cb360373ad7ce65f0
db9031dbfab84499a82ab0569f316943
22c8734eecf34e5c864d4c080fc8697a--db9031dbfab84499a82ab0569f316943
a2842624ffa54f58b023102a17e5e2ee
RX(iia_γ₁₁)
db9031dbfab84499a82ab0569f316943--a2842624ffa54f58b023102a17e5e2ee
f7d25dd7980342e8817a963fab65726b
a2842624ffa54f58b023102a17e5e2ee--f7d25dd7980342e8817a963fab65726b
71d5f9d6bef9414bbb08ed50078d7682
X
f7d25dd7980342e8817a963fab65726b--71d5f9d6bef9414bbb08ed50078d7682
71d5f9d6bef9414bbb08ed50078d7682--22f94501e8e04db4828a3667e8622150
67d62c2021aa482991eaeb8e2b2fded9
RY(iia_β₁₄)
71d5f9d6bef9414bbb08ed50078d7682--67d62c2021aa482991eaeb8e2b2fded9
99fe9859015a4017966f304040736ea4
RX(iia_β₁₁)
67d62c2021aa482991eaeb8e2b2fded9--99fe9859015a4017966f304040736ea4
99fe9859015a4017966f304040736ea4--9b0c553ecbae43f98b24ff686d077806
28ee7484201946ebb1d98d617ccc0e9e
1d5470efef8c41b88d0abea46f79102e
RX(iia_α₀₂)
7da1b7ac624c4639a2a21cc8a19ab1ce--1d5470efef8c41b88d0abea46f79102e
1f899fe0075943babf410ad748731754
RY(iia_α₀₅)
1d5470efef8c41b88d0abea46f79102e--1f899fe0075943babf410ad748731754
6fe9c365497b43b49916580e0509d7b7
1f899fe0075943babf410ad748731754--6fe9c365497b43b49916580e0509d7b7
3c94f2db34b8443d89c3c3eff39dda48
X
6fe9c365497b43b49916580e0509d7b7--3c94f2db34b8443d89c3c3eff39dda48
3c94f2db34b8443d89c3c3eff39dda48--3bba5b5e80f04dc5a5c73fa6136fc460
7aa7ea4e7b624ecea13b0abe47cc682d
RX(iia_γ₀₂)
3c94f2db34b8443d89c3c3eff39dda48--7aa7ea4e7b624ecea13b0abe47cc682d
128868ae8fca4554acdde0b1cb2952da
X
7aa7ea4e7b624ecea13b0abe47cc682d--128868ae8fca4554acdde0b1cb2952da
128868ae8fca4554acdde0b1cb2952da--fc5a68b67c6747389576804f2836bdd9
6785544289f742e894f95c0148725387
128868ae8fca4554acdde0b1cb2952da--6785544289f742e894f95c0148725387
79fac5f30e24403a886040dbd3a5fc53
RY(iia_β₀₅)
6785544289f742e894f95c0148725387--79fac5f30e24403a886040dbd3a5fc53
d7ad4d5e4ba244d78dd72ebe8e506eee
RX(iia_β₀₂)
79fac5f30e24403a886040dbd3a5fc53--d7ad4d5e4ba244d78dd72ebe8e506eee
9cb018669e134b93a300b5b0a918c5d9
RX(iia_α₁₂)
d7ad4d5e4ba244d78dd72ebe8e506eee--9cb018669e134b93a300b5b0a918c5d9
c30aaa1678e24e1f97bc57354303fc4a
RY(iia_α₁₅)
9cb018669e134b93a300b5b0a918c5d9--c30aaa1678e24e1f97bc57354303fc4a
6eaa0e3892b44b5c80b562f671db07f3
c30aaa1678e24e1f97bc57354303fc4a--6eaa0e3892b44b5c80b562f671db07f3
0884366eee5a43bc9e06958037601773
X
6eaa0e3892b44b5c80b562f671db07f3--0884366eee5a43bc9e06958037601773
0884366eee5a43bc9e06958037601773--db9031dbfab84499a82ab0569f316943
d98924a478c540eb97d91b77ebb90631
RX(iia_γ₁₂)
0884366eee5a43bc9e06958037601773--d98924a478c540eb97d91b77ebb90631
a334ff3ed8dd4b31855e3f3e29b7264a
X
d98924a478c540eb97d91b77ebb90631--a334ff3ed8dd4b31855e3f3e29b7264a
a334ff3ed8dd4b31855e3f3e29b7264a--f7d25dd7980342e8817a963fab65726b
2add93a5434f4172b45c869df838d87f
a334ff3ed8dd4b31855e3f3e29b7264a--2add93a5434f4172b45c869df838d87f
b1d469a6d50d494489304106b65749d2
RY(iia_β₁₅)
2add93a5434f4172b45c869df838d87f--b1d469a6d50d494489304106b65749d2
d1a019240a8b46469b9566272d05f733
RX(iia_β₁₂)
b1d469a6d50d494489304106b65749d2--d1a019240a8b46469b9566272d05f733
d1a019240a8b46469b9566272d05f733--28ee7484201946ebb1d98d617ccc0e9e