<jupyter_start><jupyter_text>self-attention practice<jupyter_code>cir = Q.QEqualizedConv0(4)
print(f"n_qubits:{cir.n_qubits}")
U = cir.qconv0()
# print(U.shape)
# print(U)
cir.forward
# nn.Parameter?
QT = self_attn(3)
QT.weight<jupyter_output><empty_output><jupyter_text>prepare initial data (classical) Input 1: [1， 0， 1， 0]; Input 2: [0， 2， 0， 2]; Input 3: [1， 1， 1， 1];<jupyter_code>input01 = torch.Tensor([1, 0, 1, 0])
input02 = torch.Tensor([0, 2, 0, 2])
input03 = torch.Tensor([1, 1, 1, 1])
### initialize weight
qinput01 = encoding()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18596491228070175, 'fraction_numerical': 0.06842105263157895, 'mean_word_length': 6.716216216216216, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '125407', 'license': 'Apache-2.0', 'n_tokens_mistral': 272, 'n_tokens_neox': 243, 'n_words': 52, 'path': 'Self-Attention/.ipynb_checkpoints/QuSelfAttn-checkpoint.ipynb', 'repo_name': 'KissTheDream/QuTorch', 'size': '570'}