------------------------------Epoch1------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
test input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5687-0.6370j, 0.3479+0.3871j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5687-0.6370j, 0.3479+0.3871j]])
New state:  tensor([[0.1270-0.7155j, 0.6545-0.2089j]])
----------Measure----------
Probability:  tensor([[0.5280, 0.4720]])
----------
test input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5923-0.6150j, 0.3615+0.3745j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5923-0.6150j, 0.3615+0.3745j]])
New state:  tensor([[0.1329-0.6914j, 0.6811-0.2012j]])
----------Measure----------
Probability:  tensor([[0.4957, 0.5043]])
----------
test input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5441-0.6582j, 0.3337+0.3992j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5441-0.6582j, 0.3337+0.3992j]])
New state:  tensor([[0.1208-0.7387j, 0.6268-0.2164j]])
----------Measure----------
Probability:  tensor([[0.5603, 0.4397]])
----------
test input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.3873]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.3873+0.j]])
ry_matrix:  tensor([[ 0.9813-0.j, -0.1925-0.j],
        [ 0.1925+0.j,  0.9813-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9813+0.j, 0.1925+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.9813+0.j, 0.1925+0.j]])
New state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7297-0.6523j, 0.1521+0.1380j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7297-0.6523j, 0.1521+0.1380j]])
New state:  tensor([[0.3801-0.5419j, 0.6411-0.3883j]])
----------Measure----------
Probability:  tensor([[0.4381, 0.5619]])
----------
test input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3928-0.5610j, 0.4232+0.5932j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3928-0.5610j, 0.4232+0.5932j]])
New state:  tensor([[-0.0473-0.8163j,  0.5755-0.0138j]])
----------Measure----------
Probability:  tensor([[0.6687, 0.3313]])
----------
test input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5657-0.4309j, 0.5563+0.4298j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5657-0.4309j, 0.5563+0.4298j]])
New state:  tensor([[-0.0289-0.6080j,  0.7929-0.0280j]])
----------Measure----------
Probability:  tensor([[0.3705, 0.6295]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7127-0.5448j, 0.3487+0.2713j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7127-0.5448j, 0.3487+0.2713j]])
New state:  tensor([[0.2235-0.5678j, 0.7613-0.2190j]])
----------Measure----------
Probability:  tensor([[0.3724, 0.6276]])
----------
test input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4784-0.6807j, 0.3233+0.4508j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4784-0.6807j, 0.3233+0.4508j]])
New state:  tensor([[0.0842-0.7920j, 0.5712-0.1982j]])
----------Measure----------
Probability:  tensor([[0.6344, 0.3656]])
----------
test input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5768-0.5990j, 0.3857+0.3996j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5768-0.5990j, 0.3857+0.3996j]])
New state:  tensor([[0.1046-0.6991j, 0.6860-0.1725j]])
----------Measure----------
Probability:  tensor([[0.4997, 0.5003]])
----------
test input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.6797+0.j]])
rz_matrix:  tensor([[0.9428-0.3333j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9428+0.3333j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6997-0.2401j, 0.6318+0.2315j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6997-0.2401j, 0.6318+0.2315j]])
New state:  tensor([[0.0058-0.3329j, 0.9427-0.0210j]])
----------Measure----------
Probability:  tensor([[0.1108, 0.8892]])
----------
test input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.5903]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.5903+0.j]])
ry_matrix:  tensor([[ 0.2722-0.j, -0.9623-0.j],
        [ 0.9623+0.j,  0.2722-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.2722+0.j, 0.9623+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.2722+0.j, 0.9623+0.j]])
New state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.2214-0.1375j, 0.8091+0.5268j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2214-0.1375j, 0.8091+0.5268j]])
New state:  tensor([[-0.4478-0.4815j,  0.7093+0.2540j]])
----------Measure----------
Probability:  tensor([[0.4324, 0.5676]])
----------
test input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5538-0.6204j, 0.3711+0.4131j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5538-0.6204j, 0.3711+0.4131j]])
New state:  tensor([[0.0998-0.7235j, 0.6592-0.1792j]])
----------Measure----------
Probability:  tensor([[0.5334, 0.4666]])
----------
test input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6912-0.5717j, 0.3389+0.2838j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6912-0.5717j, 0.3389+0.2838j]])
New state:  tensor([[0.2163-0.5953j, 0.7388-0.2305j]])
----------Measure----------
Probability:  tensor([[0.4011, 0.5989]])
----------
test input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.9818+0.j]])
ry_matrix:  tensor([[ 0.8819-0.j, -0.4714-0.j],
        [ 0.4714+0.j,  0.8819-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8819+0.j, 0.4714+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.8819+0.j, 0.4714+0.j]])
New state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6749-0.5581j, 0.3703+0.3098j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6749-0.5581j, 0.3703+0.3098j]])
New state:  tensor([[0.1820-0.6052j, 0.7479-0.2028j]])
----------Measure----------
Probability:  tensor([[0.3994, 0.6006]])
----------
test input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.7571+0.j]])
ry_matrix:  tensor([[ 0.6383-0.j, -0.7698-0.j],
        [ 0.7698+0.j,  0.6383-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6383+0.j, 0.7698+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.6383+0.j, 0.7698+0.j]])
New state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4689-0.4179j, 0.5794+0.5194j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4689-0.4179j, 0.5794+0.5194j]])
New state:  tensor([[-0.1112-0.6654j,  0.7370+0.0421j]])
----------Measure----------
Probability:  tensor([[0.4551, 0.5449]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7127-0.5448j, 0.3487+0.2713j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7127-0.5448j, 0.3487+0.2713j]])
New state:  tensor([[0.2235-0.5678j, 0.7613-0.2190j]])
----------Measure----------
Probability:  tensor([[0.3724, 0.6276]])
----------
test input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.4619+0.j]])
rz_matrix:  tensor([[0.3333-0.9428j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.3333+0.9428j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2223-0.6510j, 0.2487+0.6819j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2223-0.6510j, 0.2487+0.6819j]])
New state:  tensor([[-0.0335-0.9425j,  0.3318-0.0204j]])
----------Measure----------
Probability:  tensor([[0.8895, 0.1105]])
----------
test input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5280-0.5484j, 0.4502+0.4666j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5280-0.5484j, 0.4502+0.4666j]])
New state:  tensor([[0.0240-0.7144j, 0.6935-0.0899j]])
----------Measure----------
Probability:  tensor([[0.5110, 0.4890]])
----------
test input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.6797+0.j]])
ry_matrix:  tensor([[ 0.9428-0.j, -0.3333-0.j],
        [ 0.3333+0.j,  0.9428-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9428+0.j, 0.3333+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.9428+0.j, 0.3333+0.j]])
New state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5983-0.7229j, 0.2223+0.2645j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5983-0.7229j, 0.2223+0.2645j]])
New state:  tensor([[0.2396-0.6830j, 0.5916-0.3551j]])
----------Measure----------
Probability:  tensor([[0.5239, 0.4761]])
----------
test input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.2519]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.2519+0.j]])
rz_matrix:  tensor([[0.4303-0.9027j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.4303+0.9027j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.3128-0.6690j, 0.2958+0.6060j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3128-0.6690j, 0.2958+0.6060j]])
New state:  tensor([[-0.0073-0.8986j,  0.4304-0.0849j]])
----------Measure----------
Probability:  tensor([[0.8076, 0.1924]])
----------
test input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.8897+0.j]])
rz_matrix:  tensor([[0.9027-0.4303j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9027+0.4303j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6460-0.3016j, 0.6304+0.3072j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6460-0.3016j, 0.6304+0.3072j]])
New state:  tensor([[-0.0294-0.4302j,  0.9021-0.0153j]])
----------Measure----------
Probability:  tensor([[0.1859, 0.8141]])
----------
test input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.2310]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.2310+0.j]])
rz_matrix:  tensor([[0.8165-0.5774j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8165+0.5774j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5610-0.3928j, 0.5932+0.4232j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5610-0.3928j, 0.5932+0.4232j]])
New state:  tensor([[-0.0593-0.5774j,  0.8143-0.0044j]])
----------Measure----------
Probability:  tensor([[0.3369, 0.6631]])
----------
test input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.9818+0.j]])
rz_matrix:  tensor([[0.8819-0.4714j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8819+0.4714j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6531-0.3436j, 0.5925+0.3229j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6531-0.3436j, 0.5925+0.3229j]])
New state:  tensor([[0.0034-0.4702j, 0.8819-0.0357j]])
----------Measure----------
Probability:  tensor([[0.2211, 0.7789]])
----------
test input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.8331+0.j]])
rz_matrix:  tensor([[0.6086-0.7935j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6086+0.7935j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4617-0.6056j, 0.3965+0.5126j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4617-0.6056j, 0.3965+0.5126j]])
New state:  tensor([[0.0189-0.7870j, 0.6083-0.1011j]])
----------Measure----------
Probability:  tensor([[0.6197, 0.3803]])
----------
test input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.7902]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.7902+0.j]])
rz_matrix:  tensor([[0.9230-0.3849j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9230+0.3849j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6845-0.2787j, 0.6190+0.2657j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6845-0.2787j, 0.6190+0.2657j]])
New state:  tensor([[0.0049-0.3841j, 0.9229-0.0265j]])
----------Measure----------
Probability:  tensor([[0.1476, 0.8524]])
----------
test input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.9106+0.j]])
ry_matrix:  tensor([[ 0.5774-0.j, -0.8165-0.j],
        [ 0.8165+0.j,  0.5774-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.5774+0.j, 0.8165+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.5774+0.j, 0.8165+0.j]])
New state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4784-0.3052j, 0.6890+0.4508j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4784-0.3052j, 0.6890+0.4508j]])
New state:  tensor([[-0.1858-0.5386j,  0.8180+0.0789j]])
----------Measure----------
Probability:  tensor([[0.3246, 0.6754]])
----------
test input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5768-0.3697j, 0.6090+0.3996j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5768-0.3697j, 0.6090+0.3996j]])
New state:  tensor([[-0.0603-0.5444j,  0.8367-0.0032j]])
----------Measure----------
Probability:  tensor([[0.3000, 0.7000]])
----------
test input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.4619+0.j]])
ry_matrix:  tensor([[ 0.3333-0.j, -0.9428-0.j],
        [ 0.9428+0.j,  0.3333-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.3333+0.j, 0.9428+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.3333+0.j, 0.9428+0.j]])
New state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2569-0.1930j, 0.7507+0.5772j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2569-0.1930j, 0.7507+0.5772j]])
New state:  tensor([[-0.3808-0.5562j,  0.6961+0.2471j]])
----------Measure----------
Probability:  tensor([[0.4543, 0.5457]])
----------
test input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.8331+0.j]])
ry_matrix:  tensor([[ 0.6086-0.j, -0.7935-0.j],
        [ 0.7935+0.j,  0.6086-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6086+0.j, 0.7935+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.0685+0.j]])
rz_matrix:  tensor([[0.8607-0.5092j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8607+0.5092j]])
Performing matrix multiplication

Current state:  tensor([[0.6086+0.j, 0.7935+0.j]])
New state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0264+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.5184-0.3008j, 0.6870+0.4109j]])
Inside  ry
ry_matrix theta:  tensor([[1.6604+0.j]])
ry_matrix:  tensor([[ 0.6747-0.j, -0.7381-0.j],
        [ 0.7381+0.j,  0.6747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5184-0.3008j, 0.6870+0.4109j]])
New state:  tensor([[-0.1572-0.5063j,  0.8461+0.0552j]])
----------Measure----------
Probability:  tensor([[0.2810, 0.7190]])
valid set accuracy: 0.7586206793785095
valid set loss: 0.5283846259117126
------------------------------Epoch2------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
test input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.8331+0.j]])
ry_matrix:  tensor([[ 0.6086-0.j, -0.7935-0.j],
        [ 0.7935+0.j,  0.6086-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6086+0.j, 0.7935+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.0685+0.j]])
rz_matrix:  tensor([[0.8607-0.5092j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8607+0.5092j]])
Performing matrix multiplication

Current state:  tensor([[0.6086+0.j, 0.7935+0.j]])
New state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.5176-0.2995j, 0.6876+0.4119j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5176-0.2995j, 0.6876+0.4119j]])
New state:  tensor([[-0.1481-0.5054j,  0.8478+0.0630j]])
----------Measure----------
Probability:  tensor([[0.2773, 0.7227]])
----------
test input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.4619+0.j]])
ry_matrix:  tensor([[ 0.3333-0.j, -0.9428-0.j],
        [ 0.9428+0.j,  0.3333-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.3333+0.j, 0.9428+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.3333+0.j, 0.9428+0.j]])
New state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2558-0.1915j, 0.7511+0.5777j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2558-0.1915j, 0.7511+0.5777j]])
New state:  tensor([[-0.3735-0.5526j,  0.7001+0.2551j]])
----------Measure----------
Probability:  tensor([[0.4448, 0.5552]])
----------
test input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.5903]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.5903+0.j]])
ry_matrix:  tensor([[ 0.2722-0.j, -0.9623-0.j],
        [ 0.9623+0.j,  0.2722-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.2722+0.j, 0.9623+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.2722+0.j, 0.9623+0.j]])
New state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.2203-0.1359j, 0.8094+0.5272j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2203-0.1359j, 0.8094+0.5272j]])
New state:  tensor([[-0.4402-0.4777j,  0.7140+0.2612j]])
----------Measure----------
Probability:  tensor([[0.4220, 0.5780]])
----------
test input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5761-0.3685j, 0.6097+0.4008j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5761-0.3685j, 0.6097+0.4008j]])
New state:  tensor([[-0.0513-0.5444j,  0.8372+0.0049j]])
----------Measure----------
Probability:  tensor([[0.2990, 0.7010]])
----------
test input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6906-0.5711j, 0.3400+0.2852j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6906-0.5711j, 0.3400+0.2852j]])
New state:  tensor([[0.2239-0.5985j, 0.7365-0.2219j]])
----------Measure----------
Probability:  tensor([[0.4083, 0.5917]])
----------
test input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.2310]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.2310+0.j]])
rz_matrix:  tensor([[0.8165-0.5774j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8165+0.5774j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5602-0.3916j, 0.5940+0.4243j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5602-0.3916j, 0.5940+0.4243j]])
New state:  tensor([[-0.0507-0.5774j,  0.8149+0.0041j]])
----------Measure----------
Probability:  tensor([[0.3360, 0.6640]])
----------
test input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.9106+0.j]])
ry_matrix:  tensor([[ 0.5774-0.j, -0.8165-0.j],
        [ 0.8165+0.j,  0.5774-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.5774+0.j, 0.8165+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.5774+0.j, 0.8165+0.j]])
New state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4775-0.3038j, 0.6896+0.4517j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4775-0.3038j, 0.6896+0.4517j]])
New state:  tensor([[-0.1770-0.5374j,  0.8199+0.0870j]])
----------Measure----------
Probability:  tensor([[0.3202, 0.6798]])
----------
test input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.6797+0.j]])
rz_matrix:  tensor([[0.9428-0.3333j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9428+0.3333j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6993-0.2389j, 0.6322+0.2329j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6993-0.2389j, 0.6322+0.2329j]])
New state:  tensor([[0.0165-0.3333j, 0.9426-0.0152j]])
----------Measure----------
Probability:  tensor([[0.1113, 0.8887]])
----------
test input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.8331+0.j]])
rz_matrix:  tensor([[0.6086-0.7935j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6086+0.7935j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4607-0.6049j, 0.3977+0.5135j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4607-0.6049j, 0.3977+0.5135j]])
New state:  tensor([[0.0246-0.7883j, 0.6081-0.0905j]])
----------Measure----------
Probability:  tensor([[0.6220, 0.3780]])
----------
test input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.8897+0.j]])
rz_matrix:  tensor([[0.9027-0.4303j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9027+0.4303j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6454-0.3003j, 0.6310+0.3084j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6454-0.3003j, 0.6310+0.3084j]])
New state:  tensor([[-0.0195-0.4304j,  0.9024-0.0084j]])
----------Measure----------
Probability:  tensor([[0.1856, 0.8144]])
----------
test input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.7571+0.j]])
ry_matrix:  tensor([[ 0.6383-0.j, -0.7698-0.j],
        [ 0.7698+0.j,  0.6383-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6383+0.j, 0.7698+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.6383+0.j, 0.7698+0.j]])
New state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4679-0.4168j, 0.5802+0.5204j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4679-0.4168j, 0.5802+0.5204j]])
New state:  tensor([[-0.1037-0.6647j,  0.7381+0.0515j]])
----------Measure----------
Probability:  tensor([[0.4526, 0.5474]])
----------
test input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.7902]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.7902+0.j]])
rz_matrix:  tensor([[0.9230-0.3849j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9230+0.3849j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6840-0.2775j, 0.6196+0.2670j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6840-0.2775j, 0.6196+0.2670j]])
New state:  tensor([[0.0152-0.3846j, 0.9227-0.0201j]])
----------Measure----------
Probability:  tensor([[0.1481, 0.8519]])
----------
test input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5530-0.6197j, 0.3723+0.4142j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5530-0.6197j, 0.3723+0.4142j]])
New state:  tensor([[0.1062-0.7259j, 0.6582-0.1692j]])
----------Measure----------
Probability:  tensor([[0.5382, 0.4618]])
----------
test input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.2519]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.2519+0.j]])
rz_matrix:  tensor([[0.4303-0.9027j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.4303+0.9027j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.3116-0.6684j, 0.2971+0.6066j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3116-0.6684j, 0.2971+0.6066j]])
New state:  tensor([[-0.0039-0.8996j,  0.4305-0.0733j]])
----------Measure----------
Probability:  tensor([[0.8093, 0.1907]])
----------
test input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3916-0.5602j, 0.4243+0.5940j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3916-0.5602j, 0.4243+0.5940j]])
New state:  tensor([[-0.0420-0.8164j,  0.5759-0.0029j]])
----------Measure----------
Probability:  tensor([[0.6683, 0.3317]])
----------
test input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.6797+0.j]])
ry_matrix:  tensor([[ 0.9428-0.j, -0.3333-0.j],
        [ 0.3333+0.j,  0.9428-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9428+0.j, 0.3333+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.9428+0.j, 0.3333+0.j]])
New state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5978-0.7225j, 0.2238+0.2657j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5978-0.7225j, 0.2238+0.2657j]])
New state:  tensor([[0.2453-0.6878j, 0.5893-0.3457j]])
----------Measure----------
Probability:  tensor([[0.5332, 0.4668]])
----------
test input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5433-0.6575j, 0.3350+0.4003j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5433-0.6575j, 0.3350+0.4003j]])
New state:  tensor([[0.1268-0.7416j, 0.6256-0.2064j]])
----------Measure----------
Probability:  tensor([[0.5660, 0.4340]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7122-0.5441j, 0.3498+0.2727j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7122-0.5441j, 0.3498+0.2727j]])
New state:  tensor([[0.2315-0.5710j, 0.7589-0.2107j]])
----------Measure----------
Probability:  tensor([[0.3796, 0.6204]])
----------
test input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.9818+0.j]])
ry_matrix:  tensor([[ 0.8819-0.j, -0.4714-0.j],
        [ 0.4714+0.j,  0.8819-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8819+0.j, 0.4714+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.8819+0.j, 0.4714+0.j]])
New state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6743-0.5573j, 0.3714+0.3112j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6743-0.5573j, 0.3714+0.3112j]])
New state:  tensor([[0.1898-0.6081j, 0.7460-0.1941j]])
----------Measure----------
Probability:  tensor([[0.4058, 0.5942]])
----------
test input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5916-0.6143j, 0.3627+0.3757j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5916-0.6143j, 0.3627+0.3757j]])
New state:  tensor([[0.1396-0.6941j, 0.6797-0.1916j]])
----------Measure----------
Probability:  tensor([[0.5013, 0.4987]])
----------
test input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5679-0.6363j, 0.3492+0.3882j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5679-0.6363j, 0.3492+0.3882j]])
New state:  tensor([[0.1333-0.7182j, 0.6532-0.1991j]])
----------Measure----------
Probability:  tensor([[0.5337, 0.4663]])
----------
test input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.4619+0.j]])
rz_matrix:  tensor([[0.3333-0.9428j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.3333+0.9428j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2210-0.6505j, 0.2499+0.6823j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2210-0.6505j, 0.2499+0.6823j]])
New state:  tensor([[-0.0314-0.9427j,  0.3321-0.0084j]])
----------Measure----------
Probability:  tensor([[0.8896, 0.1104]])
----------
test input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5761-0.5983j, 0.3868+0.4008j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5761-0.5983j, 0.3868+0.4008j]])
New state:  tensor([[0.1114-0.7014j, 0.6849-0.1628j]])
----------Measure----------
Probability:  tensor([[0.5044, 0.4956]])
----------
test input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4775-0.6801j, 0.3246+0.4517j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4775-0.6801j, 0.3246+0.4517j]])
New state:  tensor([[0.0894-0.7946j, 0.5705-0.1877j]])
----------Measure----------
Probability:  tensor([[0.6394, 0.3606]])
----------
test input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.9818+0.j]])
rz_matrix:  tensor([[0.8819-0.4714j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8819+0.4714j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6525-0.3424j, 0.5932+0.3242j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6525-0.3424j, 0.5932+0.3242j]])
New state:  tensor([[0.0130-0.4707j, 0.8817-0.0283j]])
----------Measure----------
Probability:  tensor([[0.2217, 0.7783]])
----------
test input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5271-0.5475j, 0.4513+0.4677j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5271-0.5475j, 0.4513+0.4677j]])
New state:  tensor([[0.0309-0.7156j, 0.6932-0.0800j]])
----------Measure----------
Probability:  tensor([[0.5131, 0.4869]])
----------
test input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5649-0.4298j, 0.5572+0.4309j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5649-0.4298j, 0.5572+0.4309j]])
New state:  tensor([[-0.0206-0.6083j,  0.7932-0.0192j]])
----------Measure----------
Probability:  tensor([[0.3705, 0.6295]])
----------
test input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.3873]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.3873+0.j]])
ry_matrix:  tensor([[ 0.9813-0.j, -0.1925-0.j],
        [ 0.1925+0.j,  0.9813-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9813+0.j, 0.1925+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.9813+0.j, 0.1925+0.j]])
New state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7294-0.6520j, 0.1534+0.1394j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7294-0.6520j, 0.1534+0.1394j]])
New state:  tensor([[0.3866-0.5474j, 0.6372-0.3806j]])
----------Measure----------
Probability:  tensor([[0.4491, 0.5509]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7122-0.5441j, 0.3498+0.2727j]])
Inside  ry
ry_matrix theta:  tensor([[1.6365+0.j]])
ry_matrix:  tensor([[ 0.6835-0.j, -0.7299-0.j],
        [ 0.7299+0.j,  0.6835-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7122-0.5441j, 0.3498+0.2727j]])
New state:  tensor([[0.2315-0.5710j, 0.7589-0.2107j]])
----------Measure----------
Probability:  tensor([[0.3796, 0.6204]])
valid set accuracy: 0.8275862336158752
valid set loss: 0.5202982425689697
------------------------------Epoch3------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
test input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.7902]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.7902+0.j]])
rz_matrix:  tensor([[0.9230-0.3849j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9230+0.3849j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6836-0.2766j, 0.6200+0.2681j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6836-0.2766j, 0.6200+0.2681j]])
New state:  tensor([[0.0256-0.3849j, 0.9225-0.0141j]])
----------Measure----------
Probability:  tensor([[0.1488, 0.8512]])
----------
test input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5427-0.6570j, 0.3360+0.4011j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5427-0.6570j, 0.3360+0.4011j]])
New state:  tensor([[0.1331-0.7442j, 0.6243-0.1966j]])
----------Measure----------
Probability:  tensor([[0.5716, 0.4284]])
----------
test input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6902-0.5705j, 0.3408+0.2862j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6902-0.5705j, 0.3408+0.2862j]])
New state:  tensor([[0.2317-0.6015j, 0.7341-0.2137j]])
----------Measure----------
Probability:  tensor([[0.4155, 0.5845]])
----------
test input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.8897+0.j]])
rz_matrix:  tensor([[0.9027-0.4303j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9027+0.4303j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6449-0.2994j, 0.6314+0.3094j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6449-0.2994j, 0.6314+0.3094j]])
New state:  tensor([[-0.0094-0.4305j,  0.9025-0.0019j]])
----------Measure----------
Probability:  tensor([[0.1854, 0.8146]])
----------
test input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.7571+0.j]])
ry_matrix:  tensor([[ 0.6383-0.j, -0.7698-0.j],
        [ 0.7698+0.j,  0.6383-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6383+0.j, 0.7698+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.6383+0.j, 0.7698+0.j]])
New state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4671-0.4159j, 0.5808+0.5211j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4671-0.4159j, 0.5808+0.5211j]])
New state:  tensor([[-0.0959-0.6639j,  0.7391+0.0605j]])
----------Measure----------
Probability:  tensor([[0.4500, 0.5500]])
----------
test input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4768-0.6796j, 0.3257+0.4525j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4768-0.6796j, 0.3257+0.4525j]])
New state:  tensor([[0.0950-0.7969j, 0.5696-0.1773j]])
----------Measure----------
Probability:  tensor([[0.6441, 0.3559]])
----------
test input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5674-0.6357j, 0.3501+0.3890j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5674-0.6357j, 0.3501+0.3890j]])
New state:  tensor([[0.1400-0.7208j, 0.6518-0.1896j]])
----------Measure----------
Probability:  tensor([[0.5392, 0.4608]])
----------
test input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.5903]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.5903+0.j]])
ry_matrix:  tensor([[ 0.2722-0.j, -0.9623-0.j],
        [ 0.9623+0.j,  0.2722-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.2722+0.j, 0.9623+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.2722+0.j, 0.9623+0.j]])
New state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.2195-0.1347j, 0.8096+0.5275j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2195-0.1347j, 0.8096+0.5275j]])
New state:  tensor([[-0.4324-0.4739j,  0.7188+0.2679j]])
----------Measure----------
Probability:  tensor([[0.4116, 0.5884]])
----------
test input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.2519]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.2519+0.j]])
rz_matrix:  tensor([[0.4303-0.9027j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.4303+0.9027j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.3107-0.6679j, 0.2981+0.6071j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3107-0.6679j, 0.2981+0.6071j]])
New state:  tensor([[-1.3258e-04-0.9004j,  4.3054e-01-0.0619j]])
----------Measure----------
Probability:  tensor([[0.8108, 0.1892]])
----------
test input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3907-0.5595j, 0.4251+0.5946j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3907-0.5595j, 0.4251+0.5946j]])
New state:  tensor([[-0.0364-0.8164j,  0.5763+0.0076j]])
----------Measure----------
Probability:  tensor([[0.6678, 0.3322]])
----------
test input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5755-0.3676j, 0.6103+0.4016j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5755-0.3676j, 0.6103+0.4016j]])
New state:  tensor([[-0.0422-0.5443j,  0.8377+0.0127j]])
----------Measure----------
Probability:  tensor([[0.2980, 0.7020]])
----------
test input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.4619+0.j]])
ry_matrix:  tensor([[ 0.3333-0.j, -0.9428-0.j],
        [ 0.9428+0.j,  0.3333-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.3333+0.j, 0.9428+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.3333+0.j, 0.9428+0.j]])
New state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2549-0.1903j, 0.7514+0.5781j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2549-0.1903j, 0.7514+0.5781j]])
New state:  tensor([[-0.3659-0.5490j,  0.7040+0.2627j]])
----------Measure----------
Probability:  tensor([[0.4353, 0.5647]])
----------
test input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.6797+0.j]])
rz_matrix:  tensor([[0.9428-0.3333j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9428+0.3333j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6989-0.2379j, 0.6326+0.2339j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6989-0.2379j, 0.6326+0.2339j]])
New state:  tensor([[0.0271-0.3335j, 0.9423-0.0098j]])
----------Measure----------
Probability:  tensor([[0.1120, 0.8880]])
----------
test input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.9818+0.j]])
ry_matrix:  tensor([[ 0.8819-0.j, -0.4714-0.j],
        [ 0.4714+0.j,  0.8819-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8819+0.j, 0.4714+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.8819+0.j, 0.4714+0.j]])
New state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6738-0.5568j, 0.3722+0.3122j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6738-0.5568j, 0.3722+0.3122j]])
New state:  tensor([[0.1977-0.6107j, 0.7440-0.1858j]])
----------Measure----------
Probability:  tensor([[0.4120, 0.5880]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7118-0.5436j, 0.3506+0.2738j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7118-0.5436j, 0.3506+0.2738j]])
New state:  tensor([[0.2396-0.5739j, 0.7564-0.2028j]])
----------Measure----------
Probability:  tensor([[0.3867, 0.6133]])
----------
test input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5524-0.6191j, 0.3733+0.4150j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5524-0.6191j, 0.3733+0.4150j]])
New state:  tensor([[0.1129-0.7280j, 0.6571-0.1596j]])
----------Measure----------
Probability:  tensor([[0.5428, 0.4572]])
----------
test input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.4619+0.j]])
rz_matrix:  tensor([[0.3333-0.9428j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.3333+0.9428j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2199-0.6501j, 0.2509+0.6827j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2199-0.6501j, 0.2509+0.6827j]])
New state:  tensor([[-0.0289-0.9427j,  0.3324+0.0033j]])
----------Measure----------
Probability:  tensor([[0.8895, 0.1105]])
----------
test input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5755-0.5977j, 0.3877+0.4016j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5755-0.5977j, 0.3877+0.4016j]])
New state:  tensor([[0.1184-0.7035j, 0.6837-0.1534j]])
----------Measure----------
Probability:  tensor([[0.5090, 0.4910]])
----------
test input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.3873]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.3873+0.j]])
ry_matrix:  tensor([[ 0.9813-0.j, -0.1925-0.j],
        [ 0.1925+0.j,  0.9813-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9813+0.j, 0.1925+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.9813+0.j, 0.1925+0.j]])
New state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7292-0.6517j, 0.1543+0.1405j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7292-0.6517j, 0.1543+0.1405j]])
New state:  tensor([[0.3933-0.5525j, 0.6331-0.3732j]])
----------Measure----------
Probability:  tensor([[0.4599, 0.5401]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7118-0.5436j, 0.3506+0.2738j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7118-0.5436j, 0.3506+0.2738j]])
New state:  tensor([[0.2396-0.5739j, 0.7564-0.2028j]])
----------Measure----------
Probability:  tensor([[0.3867, 0.6133]])
----------
test input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5264-0.5468j, 0.4521+0.4685j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5264-0.5468j, 0.4521+0.4685j]])
New state:  tensor([[0.0380-0.7166j, 0.6929-0.0705j]])
----------Measure----------
Probability:  tensor([[0.5150, 0.4850]])
----------
test input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.8331+0.j]])
rz_matrix:  tensor([[0.6086-0.7935j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6086+0.7935j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4600-0.6043j, 0.3986+0.5142j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4600-0.6043j, 0.3986+0.5142j]])
New state:  tensor([[0.0307-0.7894j, 0.6079-0.0802j]])
----------Measure----------
Probability:  tensor([[0.6241, 0.3759]])
----------
test input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.9106+0.j]])
ry_matrix:  tensor([[ 0.5774-0.j, -0.8165-0.j],
        [ 0.8165+0.j,  0.5774-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.5774+0.j, 0.8165+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.5774+0.j, 0.8165+0.j]])
New state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4768-0.3028j, 0.6901+0.4525j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4768-0.3028j, 0.6901+0.4525j]])
New state:  tensor([[-0.1681-0.5362j,  0.8218+0.0946j]])
----------Measure----------
Probability:  tensor([[0.3157, 0.6843]])
----------
test input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.2310]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.2310+0.j]])
rz_matrix:  tensor([[0.8165-0.5774j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8165+0.5774j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5595-0.3907j, 0.5946+0.4251j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5595-0.3907j, 0.5946+0.4251j]])
New state:  tensor([[-0.0419-0.5773j,  0.8154+0.0122j]])
----------Measure----------
Probability:  tensor([[0.3350, 0.6650]])
----------
test input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5910-0.6138j, 0.3636+0.3766j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5910-0.6138j, 0.3636+0.3766j]])
New state:  tensor([[0.1466-0.6966j, 0.6782-0.1824j]])
----------Measure----------
Probability:  tensor([[0.5067, 0.4933]])
----------
test input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5642-0.4290j, 0.5578+0.4318j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5642-0.4290j, 0.5578+0.4318j]])
New state:  tensor([[-0.0121-0.6085j,  0.7934-0.0108j]])
----------Measure----------
Probability:  tensor([[0.3705, 0.6295]])
----------
test input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.6797+0.j]])
ry_matrix:  tensor([[ 0.9428-0.j, -0.3333-0.j],
        [ 0.3333+0.j,  0.9428-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9428+0.j, 0.3333+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.9428+0.j, 0.3333+0.j]])
New state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5974-0.7221j, 0.2248+0.2666j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5974-0.7221j, 0.2248+0.2666j]])
New state:  tensor([[0.2512-0.6922j, 0.5868-0.3367j]])
----------Measure----------
Probability:  tensor([[0.5423, 0.4577]])
----------
test input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.8331+0.j]])
ry_matrix:  tensor([[ 0.6086-0.j, -0.7935-0.j],
        [ 0.7935+0.j,  0.6086-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6086+0.j, 0.7935+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.0685+0.j]])
rz_matrix:  tensor([[0.8607-0.5092j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8607+0.5092j]])
Performing matrix multiplication

Current state:  tensor([[0.6086+0.j, 0.7935+0.j]])
New state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.5170-0.2984j, 0.6880+0.4127j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5170-0.2984j, 0.6880+0.4127j]])
New state:  tensor([[-0.1388-0.5044j,  0.8493+0.0703j]])
----------Measure----------
Probability:  tensor([[0.2737, 0.7263]])
----------
test input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.9818+0.j]])
rz_matrix:  tensor([[0.8819-0.4714j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8819+0.4714j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0334+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0167j],
        [0.0000+0.0167j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6520-0.3415j, 0.5937+0.3252j]])
Inside  ry
ry_matrix theta:  tensor([[1.6127+0.j]])
ry_matrix:  tensor([[ 0.6921-0.j, -0.7218-0.j],
        [ 0.7218+0.j,  0.6921-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6520-0.3415j, 0.5937+0.3252j]])
New state:  tensor([[0.0227-0.4711j, 0.8815-0.0214j]])
----------Measure----------
Probability:  tensor([[0.2224, 0.7776]])
valid set accuracy: 0.8275862336158752
valid set loss: 0.5125012397766113
------------------------------Epoch4------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
test input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.8331+0.j]])
ry_matrix:  tensor([[ 0.6086-0.j, -0.7935-0.j],
        [ 0.7935+0.j,  0.6086-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6086+0.j, 0.7935+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.0685+0.j]])
rz_matrix:  tensor([[0.8607-0.5092j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8607+0.5092j]])
Performing matrix multiplication

Current state:  tensor([[0.6086+0.j, 0.7935+0.j]])
New state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.5168-0.2981j, 0.6882+0.4130j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5168-0.2981j, 0.6882+0.4130j]])
New state:  tensor([[-0.1303-0.5036j,  0.8507+0.0759j]])
----------Measure----------
Probability:  tensor([[0.2706, 0.7294]])
----------
test input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.6797+0.j]])
rz_matrix:  tensor([[0.9428-0.3333j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9428+0.3333j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6988-0.2376j, 0.6327+0.2343j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6988-0.2376j, 0.6327+0.2343j]])
New state:  tensor([[0.0367-0.3336j, 0.9420-0.0059j]])
----------Measure----------
Probability:  tensor([[0.1127, 0.8873]])
----------
test input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.7571+0.j]])
ry_matrix:  tensor([[ 0.6383-0.j, -0.7698-0.j],
        [ 0.7698+0.j,  0.6383-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6383+0.j, 0.7698+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.6383+0.j, 0.7698+0.j]])
New state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4668-0.4156j, 0.5810+0.5213j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4668-0.4156j, 0.5810+0.5213j]])
New state:  tensor([[-0.0886-0.6632j,  0.7400+0.0677j]])
----------Measure----------
Probability:  tensor([[0.4478, 0.5522]])
----------
test input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5752-0.3673j, 0.6105+0.4019j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5752-0.3673j, 0.6105+0.4019j]])
New state:  tensor([[-0.0339-0.5441j,  0.8381+0.0187j]])
----------Measure----------
Probability:  tensor([[0.2972, 0.7028]])
----------
test input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.2519]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.2519+0.j]])
rz_matrix:  tensor([[0.4303-0.9027j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.4303+0.9027j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.3103-0.6678j, 0.2984+0.6072j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3103-0.6678j, 0.2984+0.6072j]])
New state:  tensor([[0.0038-0.9010j, 0.4305-0.0525j]])
----------Measure----------
Probability:  tensor([[0.8119, 0.1881]])
----------
test input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5640-0.4287j, 0.5581+0.4321j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5640-0.4287j, 0.5581+0.4321j]])
New state:  tensor([[-0.0043-0.6086j,  0.7934-0.0041j]])
----------Measure----------
Probability:  tensor([[0.3704, 0.6296]])
----------
test input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.7902]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.7902+0.j]])
rz_matrix:  tensor([[0.9230-0.3849j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9230+0.3849j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6834-0.2763j, 0.6202+0.2684j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6834-0.2763j, 0.6202+0.2684j]])
New state:  tensor([[0.0349-0.3850j, 0.9222-0.0097j]])
----------Measure----------
Probability:  tensor([[0.1495, 0.8505]])
----------
test input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5908-0.6136j, 0.3639+0.3769j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5908-0.6136j, 0.3639+0.3769j]])
New state:  tensor([[0.1532-0.6985j, 0.6768-0.1749j]])
----------Measure----------
Probability:  tensor([[0.5114, 0.4886]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7116-0.5434j, 0.3509+0.2742j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7116-0.5434j, 0.3509+0.2742j]])
New state:  tensor([[0.2471-0.5760j, 0.7540-0.1965j]])
----------Measure----------
Probability:  tensor([[0.3929, 0.6071]])
----------
test input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.4619+0.j]])
ry_matrix:  tensor([[ 0.3333-0.j, -0.9428-0.j],
        [ 0.9428+0.j,  0.3333-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.3333+0.j, 0.9428+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.3333+0.j, 0.9428+0.j]])
New state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2546-0.1900j, 0.7515+0.5782j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2546-0.1900j, 0.7515+0.5782j]])
New state:  tensor([[-0.3590-0.5461j,  0.7076+0.2687j]])
----------Measure----------
Probability:  tensor([[0.4271, 0.5729]])
----------
test input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.9106+0.j]])
ry_matrix:  tensor([[ 0.5774-0.j, -0.8165-0.j],
        [ 0.8165+0.j,  0.5774-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.5774+0.j, 0.8165+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.5774+0.j, 0.8165+0.j]])
New state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4766-0.3024j, 0.6902+0.4527j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4766-0.3024j, 0.6902+0.4527j]])
New state:  tensor([[-0.1599-0.5351j,  0.8234+0.1006j]])
----------Measure----------
Probability:  tensor([[0.3119, 0.6881]])
----------
test input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.8897+0.j]])
rz_matrix:  tensor([[0.9027-0.4303j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9027+0.4303j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6448-0.2990j, 0.6316+0.3097j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6448-0.2990j, 0.6316+0.3097j]])
New state:  tensor([[-3.4112e-04-0.4305j,  9.0257e-01+0.0030j]])
----------Measure----------
Probability:  tensor([[0.1854, 0.8146]])
----------
test input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5262-0.5466j, 0.4524+0.4687j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5262-0.5466j, 0.4524+0.4687j]])
New state:  tensor([[0.0448-0.7173j, 0.6925-0.0627j]])
----------Measure----------
Probability:  tensor([[0.5166, 0.4834]])
----------
test input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5522-0.6189j, 0.3736+0.4153j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5522-0.6189j, 0.3736+0.4153j]])
New state:  tensor([[0.1193-0.7297j, 0.6559-0.1518j]])
----------Measure----------
Probability:  tensor([[0.5467, 0.4533]])
----------
test input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.5903]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.5903+0.j]])
ry_matrix:  tensor([[ 0.2722-0.j, -0.9623-0.j],
        [ 0.9623+0.j,  0.2722-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.2722+0.j, 0.9623+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.2722+0.j, 0.9623+0.j]])
New state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.2193-0.1342j, 0.8096+0.5276j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2193-0.1342j, 0.8096+0.5276j]])
New state:  tensor([[-0.4252-0.4710j,  0.7230+0.2732j]])
----------Measure----------
Probability:  tensor([[0.4026, 0.5974]])
----------
test input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.3873]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.3873+0.j]])
ry_matrix:  tensor([[ 0.9813-0.j, -0.1925-0.j],
        [ 0.1925+0.j,  0.9813-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9813+0.j, 0.1925+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.9813+0.j, 0.1925+0.j]])
New state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7291-0.6516j, 0.1547+0.1409j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7291-0.6516j, 0.1547+0.1409j]])
New state:  tensor([[0.3995-0.5565j, 0.6292-0.3671j]])
----------Measure----------
Probability:  tensor([[0.4693, 0.5307]])
----------
test input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3904-0.5593j, 0.4254+0.5948j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3904-0.5593j, 0.4254+0.5948j]])
New state:  tensor([[-0.0309-0.8163j,  0.5766+0.0163j]])
----------Measure----------
Probability:  tensor([[0.6673, 0.3327]])
----------
test input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.9818+0.j]])
rz_matrix:  tensor([[0.8819-0.4714j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8819+0.4714j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6518-0.3412j, 0.5939+0.3255j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6518-0.3412j, 0.5939+0.3255j]])
New state:  tensor([[0.0315-0.4713j, 0.8813-0.0161j]])
----------Measure----------
Probability:  tensor([[0.2231, 0.7769]])
----------
test input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.9818+0.j]])
ry_matrix:  tensor([[ 0.8819-0.j, -0.4714-0.j],
        [ 0.4714+0.j,  0.8819-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8819+0.j, 0.4714+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.8819+0.j, 0.4714+0.j]])
New state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6736-0.5566j, 0.3725+0.3125j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6736-0.5566j, 0.3725+0.3125j]])
New state:  tensor([[0.2050-0.6127j, 0.7420-0.1791j]])
----------Measure----------
Probability:  tensor([[0.4174, 0.5826]])
----------
test input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6900-0.5704j, 0.3411+0.2866j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6900-0.5704j, 0.3411+0.2866j]])
New state:  tensor([[0.2389-0.6038j, 0.7318-0.2071j]])
----------Measure----------
Probability:  tensor([[0.4216, 0.5784]])
----------
test input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.8331+0.j]])
rz_matrix:  tensor([[0.6086-0.7935j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6086+0.7935j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4597-0.6041j, 0.3989+0.5145j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4597-0.6041j, 0.3989+0.5145j]])
New state:  tensor([[0.0365-0.7902j, 0.6075-0.0718j]])
----------Measure----------
Probability:  tensor([[0.6257, 0.3743]])
----------
test input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4766-0.6794j, 0.3260+0.4527j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4766-0.6794j, 0.3260+0.4527j]])
New state:  tensor([[0.1004-0.7988j, 0.5686-0.1689j]])
----------Measure----------
Probability:  tensor([[0.6481, 0.3519]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7116-0.5434j, 0.3509+0.2742j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7116-0.5434j, 0.3509+0.2742j]])
New state:  tensor([[0.2471-0.5760j, 0.7540-0.1965j]])
----------Measure----------
Probability:  tensor([[0.3929, 0.6071]])
----------
test input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.6797+0.j]])
ry_matrix:  tensor([[ 0.9428-0.j, -0.3333-0.j],
        [ 0.3333+0.j,  0.9428-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9428+0.j, 0.3333+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.9428+0.j, 0.3333+0.j]])
New state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5973-0.7220j, 0.2252+0.2669j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5973-0.7220j, 0.2252+0.2669j]])
New state:  tensor([[0.2568-0.6958j, 0.5844-0.3293j]])
----------Measure----------
Probability:  tensor([[0.5501, 0.4499]])
----------
test input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5752-0.5975j, 0.3880+0.4019j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5752-0.5975j, 0.3880+0.4019j]])
New state:  tensor([[0.1251-0.7052j, 0.6825-0.1458j]])
----------Measure----------
Probability:  tensor([[0.5129, 0.4871]])
----------
test input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5672-0.6356j, 0.3504+0.3893j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5672-0.6356j, 0.3504+0.3893j]])
New state:  tensor([[0.1463-0.7228j, 0.6504-0.1818j]])
----------Measure----------
Probability:  tensor([[0.5439, 0.4561]])
----------
test input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.4619+0.j]])
rz_matrix:  tensor([[0.3333-0.9428j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.3333+0.9428j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2196-0.6500j, 0.2513+0.6828j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2196-0.6500j, 0.2513+0.6828j]])
New state:  tensor([[-0.0260-0.9426j,  0.3327+0.0131j]])
----------Measure----------
Probability:  tensor([[0.8892, 0.1108]])
----------
test input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.2310]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.2310+0.j]])
rz_matrix:  tensor([[0.8165-0.5774j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8165+0.5774j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5593-0.3904j, 0.5948+0.4254j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5593-0.3904j, 0.5948+0.4254j]])
New state:  tensor([[-0.0338-0.5771j,  0.8157+0.0186j]])
----------Measure----------
Probability:  tensor([[0.3342, 0.6658]])
----------
test input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0344+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0172j],
        [0.0000+0.0172j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5425-0.6568j, 0.3364+0.4014j]])
Inside  ry
ry_matrix theta:  tensor([[1.5922+0.j]])
ry_matrix:  tensor([[ 0.6995-0.j, -0.7146-0.j],
        [ 0.7146+0.j,  0.6995-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5425-0.6568j, 0.3364+0.4014j]])
New state:  tensor([[0.1391-0.7463j, 0.6230-0.1886j]])
----------Measure----------
Probability:  tensor([[0.5763, 0.4237]])
valid set accuracy: 0.8275862336158752
valid set loss: 0.5059456825256348
------------------------------Epoch5------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
test input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.2519]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.2519+0.j]])
rz_matrix:  tensor([[0.4303-0.9027j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.4303+0.9027j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.3102-0.6677j, 0.2986+0.6073j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3102-0.6677j, 0.2986+0.6073j]])
New state:  tensor([[0.0077-0.9015j, 0.4305-0.0438j]])
----------Measure----------
Probability:  tensor([[0.8128, 0.1872]])
----------
test input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.4619+0.j]])
rz_matrix:  tensor([[0.3333-0.9428j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.3333+0.9428j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2194-0.6499j, 0.2514+0.6828j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2194-0.6499j, 0.2514+0.6828j]])
New state:  tensor([[-0.0230-0.9424j,  0.3329+0.0221j]])
----------Measure----------
Probability:  tensor([[0.8887, 0.1113]])
----------
test input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.9818+0.j]])
ry_matrix:  tensor([[ 0.8819-0.j, -0.4714-0.j],
        [ 0.4714+0.j,  0.8819-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8819+0.j, 0.4714+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.8819+0.j, 0.4714+0.j]])
New state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6736-0.5565j, 0.3726+0.3127j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6736-0.5565j, 0.3726+0.3127j]])
New state:  tensor([[0.2119-0.6144j, 0.7400-0.1732j]])
----------Measure----------
Probability:  tensor([[0.4224, 0.5776]])
----------
test input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3903-0.5592j, 0.4255+0.5948j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3903-0.5592j, 0.4255+0.5948j]])
New state:  tensor([[-0.0256-0.8161j,  0.5769+0.0242j]])
----------Measure----------
Probability:  tensor([[0.6666, 0.3334]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7116-0.5433j, 0.3510+0.2743j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7116-0.5433j, 0.3510+0.2743j]])
New state:  tensor([[0.2541-0.5779j, 0.7517-0.1909j]])
----------Measure----------
Probability:  tensor([[0.3986, 0.6014]])
----------
test input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.7902]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.7902+0.j]])
rz_matrix:  tensor([[0.9230-0.3849j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9230+0.3849j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6834-0.2761j, 0.6202+0.2685j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6834-0.2761j, 0.6202+0.2685j]])
New state:  tensor([[0.0435-0.3851j, 0.9218-0.0058j]])
----------Measure----------
Probability:  tensor([[0.1502, 0.8498]])
----------
test input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5639-0.4286j, 0.5581+0.4322j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5639-0.4286j, 0.5581+0.4322j]])
New state:  tensor([[0.0031-0.6086j, 0.7934+0.0018j]])
----------Measure----------
Probability:  tensor([[0.3705, 0.6295]])
----------
test input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5424-0.6568j, 0.3365+0.4015j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5424-0.6568j, 0.3365+0.4015j]])
New state:  tensor([[0.1449-0.7481j, 0.6217-0.1814j]])
----------Measure----------
Probability:  tensor([[0.5806, 0.4194]])
----------
test input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.3873]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.3873+0.j]])
ry_matrix:  tensor([[ 0.9813-0.j, -0.1925-0.j],
        [ 0.1925+0.j,  0.9813-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9813+0.j, 0.1925+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.9813+0.j, 0.1925+0.j]])
New state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7291-0.6516j, 0.1548+0.1410j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7291-0.6516j, 0.1548+0.1410j]])
New state:  tensor([[0.4053-0.5600j, 0.6255-0.3617j]])
----------Measure----------
Probability:  tensor([[0.4779, 0.5221]])
----------
test input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.8331+0.j]])
rz_matrix:  tensor([[0.6086-0.7935j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6086+0.7935j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4596-0.6040j, 0.3990+0.5146j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4596-0.6040j, 0.3990+0.5146j]])
New state:  tensor([[0.0421-0.7908j, 0.6072-0.0642j]])
----------Measure----------
Probability:  tensor([[0.6272, 0.3728]])
----------
test input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.8897+0.j]])
rz_matrix:  tensor([[0.9027-0.4303j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9027+0.4303j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6447-0.2989j, 0.6317+0.3099j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6447-0.2989j, 0.6317+0.3099j]])
New state:  tensor([[0.0081-0.4305j, 0.9025+0.0072j]])
----------Measure----------
Probability:  tensor([[0.1854, 0.8146]])
----------
test input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5671-0.6355j, 0.3506+0.3894j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5671-0.6355j, 0.3506+0.3894j]])
New state:  tensor([[0.1523-0.7245j, 0.6491-0.1749j]])
----------Measure----------
Probability:  tensor([[0.5481, 0.4519]])
----------
test input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.8331+0.j]])
ry_matrix:  tensor([[ 0.6086-0.j, -0.7935-0.j],
        [ 0.7935+0.j,  0.6086-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6086+0.j, 0.7935+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.0685+0.j]])
rz_matrix:  tensor([[0.8607-0.5092j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8607+0.5092j]])
Performing matrix multiplication

Current state:  tensor([[0.6086+0.j, 0.7935+0.j]])
New state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.5167-0.2979j, 0.6882+0.4131j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5167-0.2979j, 0.6882+0.4131j]])
New state:  tensor([[-0.1223-0.5029j,  0.8518+0.0808j]])
----------Measure----------
Probability:  tensor([[0.2678, 0.7322]])
----------
test input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.2310]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.2310+0.j]])
rz_matrix:  tensor([[0.8165-0.5774j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8165+0.5774j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5592-0.3903j, 0.5948+0.4255j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.3903j, 0.5948+0.4255j]])
New state:  tensor([[-0.0262-0.5769j,  0.8160+0.0242j]])
----------Measure----------
Probability:  tensor([[0.3335, 0.6665]])
----------
test input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.6797+0.j]])
ry_matrix:  tensor([[ 0.9428-0.j, -0.3333-0.j],
        [ 0.3333+0.j,  0.9428-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9428+0.j, 0.3333+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.9428+0.j, 0.3333+0.j]])
New state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5972-0.7220j, 0.2254+0.2670j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.7220j, 0.2254+0.2670j]])
New state:  tensor([[0.2622-0.6989j, 0.5820-0.3225j]])
----------Measure----------
Probability:  tensor([[0.5573, 0.4427]])
----------
test input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.9818+0.j]])
rz_matrix:  tensor([[0.8819-0.4714j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8819+0.4714j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6518-0.3411j, 0.5940+0.3257j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6518-0.3411j, 0.5940+0.3257j]])
New state:  tensor([[0.0398-0.4714j, 0.8809-0.0115j]])
----------Measure----------
Probability:  tensor([[0.2238, 0.7762]])
----------
test input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.4619+0.j]])
ry_matrix:  tensor([[ 0.3333-0.j, -0.9428-0.j],
        [ 0.9428+0.j,  0.3333-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.3333+0.j, 0.9428+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.3333+0.j, 0.9428+0.j]])
New state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2545-0.1898j, 0.7515+0.5783j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2545-0.1898j, 0.7515+0.5783j]])
New state:  tensor([[-0.3523-0.5435j,  0.7109+0.2740j]])
----------Measure----------
Probability:  tensor([[0.4195, 0.5805]])
----------
test input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5752-0.5974j, 0.3882+0.4020j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5752-0.5974j, 0.3882+0.4020j]])
New state:  tensor([[0.1314-0.7065j, 0.6813-0.1390j]])
----------Measure----------
Probability:  tensor([[0.5165, 0.4835]])
----------
test input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.6797+0.j]])
rz_matrix:  tensor([[0.9428-0.3333j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9428+0.3333j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6988-0.2375j, 0.6328+0.2344j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6988-0.2375j, 0.6328+0.2344j]])
New state:  tensor([[0.0455-0.3337j, 0.9416-0.0026j]])
----------Measure----------
Probability:  tensor([[0.1134, 0.8866]])
----------
test input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5752-0.3671j, 0.6105+0.4020j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5752-0.3671j, 0.6105+0.4020j]])
New state:  tensor([[-0.0260-0.5439j,  0.8384+0.0240j]])
----------Measure----------
Probability:  tensor([[0.2965, 0.7035]])
----------
test input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5261-0.5465j, 0.4525+0.4688j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5261-0.5465j, 0.4525+0.4688j]])
New state:  tensor([[0.0512-0.7179j, 0.6920-0.0558j]])
----------Measure----------
Probability:  tensor([[0.5180, 0.4820]])
----------
test input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5521-0.6188j, 0.3737+0.4154j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5521-0.6188j, 0.3737+0.4154j]])
New state:  tensor([[0.1253-0.7311j, 0.6548-0.1447j]])
----------Measure----------
Probability:  tensor([[0.5503, 0.4497]])
----------
test input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.5903]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.5903+0.j]])
ry_matrix:  tensor([[ 0.2722-0.j, -0.9623-0.j],
        [ 0.9623+0.j,  0.2722-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.2722+0.j, 0.9623+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.2722+0.j, 0.9623+0.j]])
New state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.2192-0.1341j, 0.8097+0.5277j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2192-0.1341j, 0.8097+0.5277j]])
New state:  tensor([[-0.4184-0.4683j,  0.7270+0.2778j]])
----------Measure----------
Probability:  tensor([[0.3944, 0.6056]])
----------
test input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6900-0.5703j, 0.3412+0.2867j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6900-0.5703j, 0.3412+0.2867j]])
New state:  tensor([[0.2457-0.6058j, 0.7295-0.2013j]])
----------Measure----------
Probability:  tensor([[0.4273, 0.5727]])
----------
test input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4765-0.6794j, 0.3261+0.4528j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4765-0.6794j, 0.3261+0.4528j]])
New state:  tensor([[0.1056-0.8004j, 0.5677-0.1612j]])
----------Measure----------
Probability:  tensor([[0.6518, 0.3482]])
----------
test input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.7571+0.j]])
ry_matrix:  tensor([[ 0.6383-0.j, -0.7698-0.j],
        [ 0.7698+0.j,  0.6383-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6383+0.j, 0.7698+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.6383+0.j, 0.7698+0.j]])
New state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4667-0.4155j, 0.5811+0.5214j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4667-0.4155j, 0.5811+0.5214j]])
New state:  tensor([[-0.0818-0.6626j,  0.7408+0.0741j]])
----------Measure----------
Probability:  tensor([[0.4457, 0.5543]])
----------
test input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.9106+0.j]])
ry_matrix:  tensor([[ 0.5774-0.j, -0.8165-0.j],
        [ 0.8165+0.j,  0.5774-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.5774+0.j, 0.8165+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.5774+0.j, 0.8165+0.j]])
New state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4765-0.3023j, 0.6903+0.4528j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4765-0.3023j, 0.6903+0.4528j]])
New state:  tensor([[-0.1522-0.5341j,  0.8249+0.1058j]])
----------Measure----------
Probability:  tensor([[0.3084, 0.6916]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7116-0.5433j, 0.3510+0.2743j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7116-0.5433j, 0.3510+0.2743j]])
New state:  tensor([[0.2541-0.5779j, 0.7517-0.1909j]])
----------Measure----------
Probability:  tensor([[0.3986, 0.6014]])
----------
test input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0348+0.j]])
rx_matrix:  tensor([[0.9998+0.0000j, 0.0000+0.0174j],
        [0.0000+0.0174j, 0.9998+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5907-0.6135j, 0.3640+0.3770j]])
Inside  ry
ry_matrix theta:  tensor([[1.5732+0.j]])
ry_matrix:  tensor([[ 0.7063-0.j, -0.7080-0.j],
        [ 0.7080+0.j,  0.7063-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5907-0.6135j, 0.3640+0.3770j]])
New state:  tensor([[0.1595-0.7002j, 0.6753-0.1681j]])
----------Measure----------
Probability:  tensor([[0.5157, 0.4843]])
valid set accuracy: 0.8275862336158752
valid set loss: 0.5000295042991638
------------------------------Epoch6------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
test input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.3873]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.3873+0.j]])
ry_matrix:  tensor([[ 0.9813-0.j, -0.1925-0.j],
        [ 0.1925+0.j,  0.9813-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9813+0.j, 0.1925+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.9813+0.j, 0.1925+0.j]])
New state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7291-0.6516j, 0.1547+0.1409j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7291-0.6516j, 0.1547+0.1409j]])
New state:  tensor([[0.4110-0.5632j, 0.6218-0.3568j]])
----------Measure----------
Probability:  tensor([[0.4861, 0.5139]])
----------
test input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5752-0.3672j, 0.6105+0.4020j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5752-0.3672j, 0.6105+0.4020j]])
New state:  tensor([[-0.0184-0.5437j,  0.8386+0.0288j]])
----------Measure----------
Probability:  tensor([[0.2959, 0.7041]])
----------
test input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5640-0.4286j, 0.5581+0.4321j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5640-0.4286j, 0.5581+0.4321j]])
New state:  tensor([[0.0103-0.6086j, 0.7934+0.0072j]])
----------Measure----------
Probability:  tensor([[0.3705, 0.6295]])
----------
test input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.9818+0.j]])
rz_matrix:  tensor([[0.8819-0.4714j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8819+0.4714j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6518-0.3411j, 0.5939+0.3256j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6518-0.3411j, 0.5939+0.3256j]])
New state:  tensor([[0.0477-0.4715j, 0.8805-0.0073j]])
----------Measure----------
Probability:  tensor([[0.2246, 0.7754]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7116-0.5434j, 0.3509+0.2742j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7116-0.5434j, 0.3509+0.2742j]])
New state:  tensor([[0.2609-0.5796j, 0.7493-0.1858j]])
----------Measure----------
Probability:  tensor([[0.4040, 0.5960]])
----------
test input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5261-0.5466j, 0.4524+0.4688j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5261-0.5466j, 0.4524+0.4688j]])
New state:  tensor([[0.0575-0.7184j, 0.6915-0.0494j]])
----------Measure----------
Probability:  tensor([[0.5194, 0.4806]])
----------
test input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.5903]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.5903+0.j]])
ry_matrix:  tensor([[ 0.2722-0.j, -0.9623-0.j],
        [ 0.9623+0.j,  0.2722-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.2722+0.j, 0.9623+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.2722+0.j, 0.9623+0.j]])
New state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.2192-0.1342j, 0.8096+0.5277j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2192-0.1342j, 0.8096+0.5277j]])
New state:  tensor([[-0.4118-0.4658j,  0.7307+0.2819j]])
----------Measure----------
Probability:  tensor([[0.3866, 0.6134]])
----------
test input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3904-0.5593j, 0.4255+0.5948j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3904-0.5593j, 0.4255+0.5948j]])
New state:  tensor([[-0.0203-0.8158j,  0.5771+0.0314j]])
----------Measure----------
Probability:  tensor([[0.6660, 0.3340]])
----------
test input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.9106+0.j]])
ry_matrix:  tensor([[ 0.5774-0.j, -0.8165-0.j],
        [ 0.8165+0.j,  0.5774-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.5774+0.j, 0.8165+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.5774+0.j, 0.8165+0.j]])
New state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4766-0.3024j, 0.6903+0.4528j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4766-0.3024j, 0.6903+0.4528j]])
New state:  tensor([[-0.1447-0.5331j,  0.8262+0.1105j]])
----------Measure----------
Probability:  tensor([[0.3052, 0.6948]])
----------
test input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.7902]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.7902+0.j]])
rz_matrix:  tensor([[0.9230-0.3849j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9230+0.3849j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6834-0.2762j, 0.6202+0.2685j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6834-0.2762j, 0.6202+0.2685j]])
New state:  tensor([[0.0518-0.3852j, 0.9214-0.0025j]])
----------Measure----------
Probability:  tensor([[0.1510, 0.8490]])
----------
test input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5521-0.6189j, 0.3736+0.4153j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5521-0.6189j, 0.3736+0.4153j]])
New state:  tensor([[0.1313-0.7324j, 0.6536-0.1383j]])
----------Measure----------
Probability:  tensor([[0.5536, 0.4464]])
----------
test input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5671-0.6355j, 0.3505+0.3894j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5671-0.6355j, 0.3505+0.3894j]])
New state:  tensor([[0.1582-0.7261j, 0.6476-0.1684j]])
----------Measure----------
Probability:  tensor([[0.5522, 0.4478]])
----------
test input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.8897+0.j]])
rz_matrix:  tensor([[0.9027-0.4303j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9027+0.4303j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6447-0.2990j, 0.6316+0.3098j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6447-0.2990j, 0.6316+0.3098j]])
New state:  tensor([[0.0163-0.4304j, 0.9024+0.0110j]])
----------Measure----------
Probability:  tensor([[0.1855, 0.8145]])
----------
test input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.8331+0.j]])
ry_matrix:  tensor([[ 0.6086-0.j, -0.7935-0.j],
        [ 0.7935+0.j,  0.6086-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6086+0.j, 0.7935+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.0685+0.j]])
rz_matrix:  tensor([[0.8607-0.5092j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8607+0.5092j]])
Performing matrix multiplication

Current state:  tensor([[0.6086+0.j, 0.7935+0.j]])
New state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.5167-0.2980j, 0.6882+0.4130j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5167-0.2980j, 0.6882+0.4130j]])
New state:  tensor([[-0.1146-0.5021j,  0.8529+0.0852j]])
----------Measure----------
Probability:  tensor([[0.2653, 0.7347]])
----------
test input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.2310]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.2310+0.j]])
rz_matrix:  tensor([[0.8165-0.5774j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8165+0.5774j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5593-0.3904j, 0.5948+0.4255j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5593-0.3904j, 0.5948+0.4255j]])
New state:  tensor([[-0.0188-0.5767j,  0.8162+0.0293j]])
----------Measure----------
Probability:  tensor([[0.3329, 0.6671]])
----------
test input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.9818+0.j]])
ry_matrix:  tensor([[ 0.8819-0.j, -0.4714-0.j],
        [ 0.4714+0.j,  0.8819-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8819+0.j, 0.4714+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.8819+0.j, 0.4714+0.j]])
New state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6736-0.5566j, 0.3726+0.3126j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6736-0.5566j, 0.3726+0.3126j]])
New state:  tensor([[0.2186-0.6159j, 0.7381-0.1677j]])
----------Measure----------
Probability:  tensor([[0.4271, 0.5729]])
----------
test input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4766-0.6794j, 0.3261+0.4528j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4766-0.6794j, 0.3261+0.4528j]])
New state:  tensor([[0.1108-0.8018j, 0.5667-0.1541j]])
----------Measure----------
Probability:  tensor([[0.6551, 0.3449]])
----------
test input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5425-0.6568j, 0.3364+0.4014j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5425-0.6568j, 0.3364+0.4014j]])
New state:  tensor([[0.1505-0.7497j, 0.6203-0.1748j]])
----------Measure----------
Probability:  tensor([[0.5846, 0.4154]])
----------
test input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.6797+0.j]])
ry_matrix:  tensor([[ 0.9428-0.j, -0.3333-0.j],
        [ 0.3333+0.j,  0.9428-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9428+0.j, 0.3333+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.9428+0.j, 0.3333+0.j]])
New state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5973-0.7220j, 0.2253+0.2670j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5973-0.7220j, 0.2253+0.2670j]])
New state:  tensor([[0.2675-0.7018j, 0.5796-0.3163j]])
----------Measure----------
Probability:  tensor([[0.5641, 0.4359]])
----------
test input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6900-0.5703j, 0.3412+0.2867j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6900-0.5703j, 0.3412+0.2867j]])
New state:  tensor([[0.2523-0.6075j, 0.7272-0.1959j]])
----------Measure----------
Probability:  tensor([[0.4327, 0.5673]])
----------
test input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.4619+0.j]])
ry_matrix:  tensor([[ 0.3333-0.j, -0.9428-0.j],
        [ 0.9428+0.j,  0.3333-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.3333+0.j, 0.9428+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.3333+0.j, 0.9428+0.j]])
New state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2545-0.1899j, 0.7515+0.5783j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2545-0.1899j, 0.7515+0.5783j]])
New state:  tensor([[-0.3459-0.5410j,  0.7141+0.2788j]])
----------Measure----------
Probability:  tensor([[0.4123, 0.5877]])
----------
test input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.7571+0.j]])
ry_matrix:  tensor([[ 0.6383-0.j, -0.7698-0.j],
        [ 0.7698+0.j,  0.6383-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6383+0.j, 0.7698+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.6383+0.j, 0.7698+0.j]])
New state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4668-0.4155j, 0.5810+0.5214j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4668-0.4155j, 0.5810+0.5214j]])
New state:  tensor([[-0.0750-0.6619j,  0.7415+0.0800j]])
----------Measure----------
Probability:  tensor([[0.4437, 0.5563]])
----------
test input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.8331+0.j]])
rz_matrix:  tensor([[0.6086-0.7935j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6086+0.7935j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4597-0.6040j, 0.3990+0.5145j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4597-0.6040j, 0.3990+0.5145j]])
New state:  tensor([[0.0476-0.7914j, 0.6068-0.0572j]])
----------Measure----------
Probability:  tensor([[0.6286, 0.3714]])
----------
test input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5908-0.6135j, 0.3640+0.3769j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5908-0.6135j, 0.3640+0.3769j]])
New state:  tensor([[0.1656-0.7016j, 0.6738-0.1619j]])
----------Measure----------
Probability:  tensor([[0.5197, 0.4803]])
----------
test input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.4619+0.j]])
rz_matrix:  tensor([[0.3333-0.9428j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.3333+0.9428j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2195-0.6500j, 0.2513+0.6828j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2195-0.6500j, 0.2513+0.6828j]])
New state:  tensor([[-0.0199-0.9422j,  0.3331+0.0305j]])
----------Measure----------
Probability:  tensor([[0.8881, 0.1119]])
----------
test input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.6797+0.j]])
rz_matrix:  tensor([[0.9428-0.3333j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9428+0.3333j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6988-0.2375j, 0.6327+0.2343j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6988-0.2375j, 0.6327+0.2343j]])
New state:  tensor([[0.0540-3.3368e-01j, 0.9411+3.2379e-04j]])
----------Measure----------
Probability:  tensor([[0.1143, 0.8857]])
----------
test input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5752-0.5974j, 0.3881+0.4020j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5752-0.5974j, 0.3881+0.4020j]])
New state:  tensor([[0.1376-0.7077j, 0.6801-0.1327j]])
----------Measure----------
Probability:  tensor([[0.5198, 0.4802]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7116-0.5434j, 0.3509+0.2742j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7116-0.5434j, 0.3509+0.2742j]])
New state:  tensor([[0.2609-0.5796j, 0.7493-0.1858j]])
----------Measure----------
Probability:  tensor([[0.4040, 0.5960]])
----------
test input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.2519]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.2519+0.j]])
rz_matrix:  tensor([[0.4303-0.9027j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.4303+0.9027j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0346+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0173j],
        [0.0000+0.0173j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.3103-0.6677j, 0.2985+0.6072j]])
Inside  ry
ry_matrix theta:  tensor([[1.5553+0.j]])
ry_matrix:  tensor([[ 0.7126-0.j, -0.7016-0.j],
        [ 0.7016+0.j,  0.7126-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3103-0.6677j, 0.2985+0.6072j]])
New state:  tensor([[0.0117-0.9019j, 0.4304-0.0358j]])
----------Measure----------
Probability:  tensor([[0.8135, 0.1865]])
valid set accuracy: 0.8275862336158752
valid set loss: 0.49455365538597107
------------------------------Epoch7------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
test input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.8331+0.j]])
rz_matrix:  tensor([[0.6086-0.7935j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6086+0.7935j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4599-0.6042j, 0.3987+0.5143j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4599-0.6042j, 0.3987+0.5143j]])
New state:  tensor([[0.0525-0.7918j, 0.6064-0.0516j]])
----------Measure----------
Probability:  tensor([[0.6297, 0.3703]])
----------
test input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.9106+0.j]])
ry_matrix:  tensor([[ 0.5774-0.j, -0.8165-0.j],
        [ 0.8165+0.j,  0.5774-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.5774+0.j, 0.8165+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.5774+0.j, 0.8165+0.j]])
New state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4768-0.3027j, 0.6901+0.4525j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4768-0.3027j, 0.6901+0.4525j]])
New state:  tensor([[-0.1383-0.5324j,  0.8273+0.1140j]])
----------Measure----------
Probability:  tensor([[0.3025, 0.6975]])
----------
test input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.3873]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.3873+0.j]])
ry_matrix:  tensor([[ 0.9813-0.j, -0.1925-0.j],
        [ 0.1925+0.j,  0.9813-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9813+0.j, 0.1925+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.9813+0.j, 0.1925+0.j]])
New state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7292-0.6517j, 0.1544+0.1406j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7292-0.6517j, 0.1544+0.1406j]])
New state:  tensor([[0.4158-0.5657j, 0.6185-0.3529j]])
----------Measure----------
Probability:  tensor([[0.4929, 0.5071]])
----------
test input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5642-0.4289j, 0.5579+0.4318j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5642-0.4289j, 0.5579+0.4318j]])
New state:  tensor([[0.0165-0.6085j, 0.7933+0.0113j]])
----------Measure----------
Probability:  tensor([[0.3706, 0.6294]])
----------
test input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5427-0.6570j, 0.3361+0.4011j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5427-0.6570j, 0.3361+0.4011j]])
New state:  tensor([[0.1555-0.7509j, 0.6191-0.1695j]])
----------Measure----------
Probability:  tensor([[0.5880, 0.4120]])
----------
test input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.7902]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.7902+0.j]])
rz_matrix:  tensor([[0.9230-0.3849j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9230+0.3849j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6835-0.2765j, 0.6200+0.2681j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6835-0.2765j, 0.6200+0.2681j]])
New state:  tensor([[0.0589-3.8516e-01j, 0.9210-6.6623e-05j]])
----------Measure----------
Probability:  tensor([[0.1518, 0.8482]])
----------
test input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5754-0.3675j, 0.6103+0.4017j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5754-0.3675j, 0.6103+0.4017j]])
New state:  tensor([[-0.0119-0.5435j,  0.8387+0.0324j]])
----------Measure----------
Probability:  tensor([[0.2955, 0.7045]])
----------
test input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.4619+0.j]])
rz_matrix:  tensor([[0.3333-0.9428j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.3333+0.9428j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2198-0.6501j, 0.2510+0.6827j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2198-0.6501j, 0.2510+0.6827j]])
New state:  tensor([[-0.0170-0.9420j,  0.3332+0.0374j]])
----------Measure----------
Probability:  tensor([[0.8876, 0.1124]])
----------
test input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.9818+0.j]])
ry_matrix:  tensor([[ 0.8819-0.j, -0.4714-0.j],
        [ 0.4714+0.j,  0.8819-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8819+0.j, 0.4714+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.8819+0.j, 0.4714+0.j]])
New state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6737-0.5567j, 0.3723+0.3123j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6737-0.5567j, 0.3723+0.3123j]])
New state:  tensor([[0.2244-0.6170j, 0.7363-0.1635j]])
----------Measure----------
Probability:  tensor([[0.4311, 0.5689]])
----------
test input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5910-0.6137j, 0.3637+0.3766j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5910-0.6137j, 0.3637+0.3766j]])
New state:  tensor([[0.1709-0.7028j, 0.6725-0.1570j]])
----------Measure----------
Probability:  tensor([[0.5231, 0.4769]])
----------
test input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.5903]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.5903+0.j]])
ry_matrix:  tensor([[ 0.2722-0.j, -0.9623-0.j],
        [ 0.9623+0.j,  0.2722-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.2722+0.j, 0.9623+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.2722+0.j, 0.9623+0.j]])
New state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.2195-0.1346j, 0.8096+0.5275j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2195-0.1346j, 0.8096+0.5275j]])
New state:  tensor([[-0.4062-0.4639j,  0.7339+0.2850j]])
----------Measure----------
Probability:  tensor([[0.3802, 0.6198]])
----------
test input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5754-0.5976j, 0.3878+0.4017j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5754-0.5976j, 0.3878+0.4017j]])
New state:  tensor([[0.1430-0.7086j, 0.6790-0.1278j]])
----------Measure----------
Probability:  tensor([[0.5226, 0.4774]])
----------
test input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.7571+0.j]])
ry_matrix:  tensor([[ 0.6383-0.j, -0.7698-0.j],
        [ 0.7698+0.j,  0.6383-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6383+0.j, 0.7698+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.6383+0.j, 0.7698+0.j]])
New state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4671-0.4158j, 0.5808+0.5211j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4671-0.4158j, 0.5808+0.5211j]])
New state:  tensor([[-0.0692-0.6613j,  0.7421+0.0845j]])
----------Measure----------
Probability:  tensor([[0.4421, 0.5579]])
----------
test input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5264-0.5468j, 0.4522+0.4685j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5264-0.5468j, 0.4522+0.4685j]])
New state:  tensor([[0.0630-0.7187j, 0.6910-0.0444j]])
----------Measure----------
Probability:  tensor([[0.5205, 0.4795]])
----------
test input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6902-0.5705j, 0.3409+0.2863j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6902-0.5705j, 0.3409+0.2863j]])
New state:  tensor([[0.2580-0.6089j, 0.7252-0.1917j]])
----------Measure----------
Probability:  tensor([[0.4373, 0.5627]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7118-0.5435j, 0.3507+0.2739j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7118-0.5435j, 0.3507+0.2739j]])
New state:  tensor([[0.2667-0.5808j, 0.7473-0.1819j]])
----------Measure----------
Probability:  tensor([[0.4085, 0.5915]])
----------
test input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5523-0.6191j, 0.3734+0.4151j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5523-0.6191j, 0.3734+0.4151j]])
New state:  tensor([[0.1365-0.7333j, 0.6526-0.1331j]])
----------Measure----------
Probability:  tensor([[0.5564, 0.4436]])
----------
test input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.6797+0.j]])
ry_matrix:  tensor([[ 0.9428-0.j, -0.3333-0.j],
        [ 0.3333+0.j,  0.9428-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9428+0.j, 0.3333+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.9428+0.j, 0.3333+0.j]])
New state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5974-0.7221j, 0.2249+0.2667j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5974-0.7221j, 0.2249+0.2667j]])
New state:  tensor([[0.2722-0.7040j, 0.5774-0.3114j]])
----------Measure----------
Probability:  tensor([[0.5697, 0.4303]])
----------
test input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.2310]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.2310+0.j]])
rz_matrix:  tensor([[0.8165-0.5774j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8165+0.5774j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5595-0.3907j, 0.5946+0.4252j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5595-0.3907j, 0.5946+0.4252j]])
New state:  tensor([[-0.0124-0.5765j,  0.8163+0.0332j]])
----------Measure----------
Probability:  tensor([[0.3325, 0.6675]])
----------
test input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.8897+0.j]])
rz_matrix:  tensor([[0.9027-0.4303j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9027+0.4303j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6449-0.2993j, 0.6315+0.3095j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6449-0.2993j, 0.6315+0.3095j]])
New state:  tensor([[0.0232-0.4303j, 0.9023+0.0137j]])
----------Measure----------
Probability:  tensor([[0.1857, 0.8143]])
----------
test input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5673-0.6357j, 0.3502+0.3891j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5673-0.6357j, 0.3502+0.3891j]])
New state:  tensor([[0.1634-0.7272j, 0.6464-0.1633j]])
----------Measure----------
Probability:  tensor([[0.5555, 0.4445]])
----------
test input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.9818+0.j]])
rz_matrix:  tensor([[0.8819-0.4714j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8819+0.4714j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6520-0.3414j, 0.5938+0.3253j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6520-0.3414j, 0.5938+0.3253j]])
New state:  tensor([[0.0545-0.4716j, 0.8801-0.0043j]])
----------Measure----------
Probability:  tensor([[0.2253, 0.7747]])
----------
test input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.4619+0.j]])
ry_matrix:  tensor([[ 0.3333-0.j, -0.9428-0.j],
        [ 0.9428+0.j,  0.3333-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.3333+0.j, 0.9428+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.3333+0.j, 0.9428+0.j]])
New state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2548-0.1903j, 0.7514+0.5781j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2548-0.1903j, 0.7514+0.5781j]])
New state:  tensor([[-0.3403-0.5391j,  0.7168+0.2825j]])
----------Measure----------
Probability:  tensor([[0.4064, 0.5936]])
----------
test input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4768-0.6796j, 0.3257+0.4525j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4768-0.6796j, 0.3257+0.4525j]])
New state:  tensor([[0.1154-0.8028j, 0.5658-0.1484j]])
----------Measure----------
Probability:  tensor([[0.6579, 0.3421]])
----------
test input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3907-0.5595j, 0.4252+0.5946j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3907-0.5595j, 0.4252+0.5946j]])
New state:  tensor([[-0.0157-0.8156j,  0.5772+0.0372j]])
----------Measure----------
Probability:  tensor([[0.6654, 0.3346]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7118-0.5435j, 0.3507+0.2739j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7118-0.5435j, 0.3507+0.2739j]])
New state:  tensor([[0.2667-0.5808j, 0.7473-0.1819j]])
----------Measure----------
Probability:  tensor([[0.4085, 0.5915]])
----------
test input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.2519]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.2519+0.j]])
rz_matrix:  tensor([[0.4303-0.9027j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.4303+0.9027j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.3106-0.6679j, 0.2982+0.6071j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3106-0.6679j, 0.2982+0.6071j]])
New state:  tensor([[0.0153-0.9021j, 0.4303-0.0293j]])
----------Measure----------
Probability:  tensor([[0.8140, 0.1860]])
----------
test input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.6797+0.j]])
rz_matrix:  tensor([[0.9428-0.3333j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9428+0.3333j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6989-0.2378j, 0.6326+0.2340j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6989-0.2378j, 0.6326+0.2340j]])
New state:  tensor([[0.0612-0.3337j, 0.9407+0.0024j]])
----------Measure----------
Probability:  tensor([[0.1151, 0.8849]])
----------
test input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.8331+0.j]])
ry_matrix:  tensor([[ 0.6086-0.j, -0.7935-0.j],
        [ 0.7935+0.j,  0.6086-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6086+0.j, 0.7935+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.0685+0.j]])
rz_matrix:  tensor([[0.8607-0.5092j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8607+0.5092j]])
Performing matrix multiplication

Current state:  tensor([[0.6086+0.j, 0.7935+0.j]])
New state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0336+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0168j],
        [0.0000+0.0168j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.5169-0.2983j, 0.6880+0.4128j]])
Inside  ry
ry_matrix theta:  tensor([[1.5404+0.j]])
ry_matrix:  tensor([[ 0.7178-0.j, -0.6963-0.j],
        [ 0.6963+0.j,  0.7178-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5169-0.2983j, 0.6880+0.4128j]])
New state:  tensor([[-0.1081-0.5016j,  0.8538+0.0885j]])
----------Measure----------
Probability:  tensor([[0.2632, 0.7368]])
valid set accuracy: 0.8275862336158752
valid set loss: 0.49008509516716003
------------------------------Epoch8------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
test input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4771-0.6798j, 0.3252+0.4521j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4771-0.6798j, 0.3252+0.4521j]])
New state:  tensor([[0.1197-0.8037j, 0.5649-0.1437j]])
----------Measure----------
Probability:  tensor([[0.6602, 0.3398]])
----------
test input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6904-0.5708j, 0.3405+0.2858j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6904-0.5708j, 0.3405+0.2858j]])
New state:  tensor([[0.2631-0.6099j, 0.7234-0.1884j]])
----------Measure----------
Probability:  tensor([[0.4412, 0.5588]])
----------
test input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.9106+0.j]])
ry_matrix:  tensor([[ 0.5774-0.j, -0.8165-0.j],
        [ 0.8165+0.j,  0.5774-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.5774+0.j, 0.8165+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.5774+0.j, 0.8165+0.j]])
New state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4771-0.3033j, 0.6899+0.4521j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4771-0.3033j, 0.6899+0.4521j]])
New state:  tensor([[-0.1326-0.5318j,  0.8283+0.1168j]])
----------Measure----------
Probability:  tensor([[0.3004, 0.6996]])
----------
test input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.3873]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.3873+0.j]])
ry_matrix:  tensor([[ 0.9813-0.j, -0.1925-0.j],
        [ 0.1925+0.j,  0.9813-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9813+0.j, 0.1925+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.9813+0.j, 0.1925+0.j]])
New state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7293-0.6518j, 0.1539+0.1400j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7293-0.6518j, 0.1539+0.1400j]])
New state:  tensor([[0.4202-0.5676j, 0.6156-0.3498j]])
----------Measure----------
Probability:  tensor([[0.4987, 0.5013]])
----------
test input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5645-0.4294j, 0.5575+0.4314j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5645-0.4294j, 0.5575+0.4314j]])
New state:  tensor([[0.0221-0.6085j, 0.7931+0.0145j]])
----------Measure----------
Probability:  tensor([[0.3707, 0.6293]])
----------
test input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.7902]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.7902+0.j]])
rz_matrix:  tensor([[0.9230-0.3849j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9230+0.3849j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6837-0.2770j, 0.6198+0.2676j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6837-0.2770j, 0.6198+0.2676j]])
New state:  tensor([[0.0651-0.3851j, 0.9206+0.0016j]])
----------Measure----------
Probability:  tensor([[0.1526, 0.8474]])
----------
test input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.4619+0.j]])
ry_matrix:  tensor([[ 0.3333-0.j, -0.9428-0.j],
        [ 0.9428+0.j,  0.3333-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.3333+0.j, 0.9428+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.3333+0.j, 0.9428+0.j]])
New state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2553-0.1909j, 0.7513+0.5779j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2553-0.1909j, 0.7513+0.5779j]])
New state:  tensor([[-0.3353-0.5376j,  0.7191+0.2854j]])
----------Measure----------
Probability:  tensor([[0.4014, 0.5986]])
----------
test input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.2310]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.2310+0.j]])
rz_matrix:  tensor([[0.8165-0.5774j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8165+0.5774j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5598-0.3912j, 0.5943+0.4248j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5598-0.3912j, 0.5943+0.4248j]])
New state:  tensor([[-0.0068-0.5763j,  0.8164+0.0362j]])
----------Measure----------
Probability:  tensor([[0.3322, 0.6678]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7120-0.5438j, 0.3502+0.2733j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7120-0.5438j, 0.3502+0.2733j]])
New state:  tensor([[0.2719-0.5818j, 0.7454-0.1788j]])
----------Measure----------
Probability:  tensor([[0.4124, 0.5876]])
----------
test input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5757-0.5979j, 0.3873+0.4012j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5757-0.5979j, 0.3873+0.4012j]])
New state:  tensor([[0.1479-0.7093j, 0.6780-0.1238j]])
----------Measure----------
Probability:  tensor([[0.5250, 0.4750]])
----------
test input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5267-0.5472j, 0.4517+0.4681j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5267-0.5472j, 0.4517+0.4681j]])
New state:  tensor([[0.0679-0.7189j, 0.6906-0.0404j]])
----------Measure----------
Probability:  tensor([[0.5215, 0.4785]])
----------
test input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5913-0.6140j, 0.3632+0.3762j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5913-0.6140j, 0.3632+0.3762j]])
New state:  tensor([[0.1758-0.7036j, 0.6713-0.1531j]])
----------Measure----------
Probability:  tensor([[0.5260, 0.4740]])
----------
test input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.8897+0.j]])
rz_matrix:  tensor([[0.9027-0.4303j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9027+0.4303j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6451-0.2998j, 0.6312+0.3090j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6451-0.2998j, 0.6312+0.3090j]])
New state:  tensor([[0.0293-0.4302j, 0.9021+0.0158j]])
----------Measure----------
Probability:  tensor([[0.1860, 0.8140]])
----------
test input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.9818+0.j]])
ry_matrix:  tensor([[ 0.8819-0.j, -0.4714-0.j],
        [ 0.4714+0.j,  0.8819-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8819+0.j, 0.4714+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.8819+0.j, 0.4714+0.j]])
New state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6740-0.5570j, 0.3719+0.3117j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6740-0.5570j, 0.3719+0.3117j]])
New state:  tensor([[0.2295-0.6179j, 0.7347-0.1602j]])
----------Measure----------
Probability:  tensor([[0.4345, 0.5655]])
----------
test input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.6797+0.j]])
rz_matrix:  tensor([[0.9428-0.3333j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9428+0.3333j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6991-0.2384j, 0.6324+0.2334j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6991-0.2384j, 0.6324+0.2334j]])
New state:  tensor([[0.0674-0.3336j, 0.9403+0.0037j]])
----------Measure----------
Probability:  tensor([[0.1158, 0.8842]])
----------
test input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.4619+0.j]])
rz_matrix:  tensor([[0.3333-0.9428j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.3333+0.9428j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2204-0.6503j, 0.2505+0.6825j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2204-0.6503j, 0.2505+0.6825j]])
New state:  tensor([[-0.0141-0.9417j,  0.3333+0.0431j]])
----------Measure----------
Probability:  tensor([[0.8870, 0.1130]])
----------
test input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.5903]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.5903+0.j]])
ry_matrix:  tensor([[ 0.2722-0.j, -0.9623-0.j],
        [ 0.9623+0.j,  0.2722-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.2722+0.j, 0.9623+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.2722+0.j, 0.9623+0.j]])
New state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.2199-0.1352j, 0.8095+0.5274j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2199-0.1352j, 0.8095+0.5274j]])
New state:  tensor([[-0.4011-0.4624j,  0.7367+0.2873j]])
----------Measure----------
Probability:  tensor([[0.3747, 0.6253]])
----------
test input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5430-0.6573j, 0.3356+0.4007j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5430-0.6573j, 0.3356+0.4007j]])
New state:  tensor([[0.1600-0.7518j, 0.6179-0.1652j]])
----------Measure----------
Probability:  tensor([[0.5909, 0.4091]])
----------
test input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.8331+0.j]])
ry_matrix:  tensor([[ 0.6086-0.j, -0.7935-0.j],
        [ 0.7935+0.j,  0.6086-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6086+0.j, 0.7935+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.0685+0.j]])
rz_matrix:  tensor([[0.8607-0.5092j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8607+0.5092j]])
Performing matrix multiplication

Current state:  tensor([[0.6086+0.j, 0.7935+0.j]])
New state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.5172-0.2989j, 0.6878+0.4124j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5172-0.2989j, 0.6878+0.4124j]])
New state:  tensor([[-0.1022-0.5011j,  0.8545+0.0910j]])
----------Measure----------
Probability:  tensor([[0.2615, 0.7385]])
----------
test input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3912-0.5598j, 0.4248+0.5943j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3912-0.5598j, 0.4248+0.5943j]])
New state:  tensor([[-0.0113-0.8154j,  0.5773+0.0419j]])
----------Measure----------
Probability:  tensor([[0.6649, 0.3351]])
----------
test input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.7571+0.j]])
ry_matrix:  tensor([[ 0.6383-0.j, -0.7698-0.j],
        [ 0.7698+0.j,  0.6383-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6383+0.j, 0.7698+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.6383+0.j, 0.7698+0.j]])
New state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4675-0.4163j, 0.5805+0.5208j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4675-0.4163j, 0.5805+0.5208j]])
New state:  tensor([[-0.0639-0.6608j,  0.7426+0.0881j]])
----------Measure----------
Probability:  tensor([[0.4408, 0.5592]])
----------
test input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5757-0.3680j, 0.6100+0.4012j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5757-0.3680j, 0.6100+0.4012j]])
New state:  tensor([[-0.0062-0.5433j,  0.8388+0.0352j]])
----------Measure----------
Probability:  tensor([[0.2952, 0.7048]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7120-0.5438j, 0.3502+0.2733j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7120-0.5438j, 0.3502+0.2733j]])
New state:  tensor([[0.2719-0.5818j, 0.7454-0.1788j]])
----------Measure----------
Probability:  tensor([[0.4124, 0.5876]])
----------
test input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.8331+0.j]])
rz_matrix:  tensor([[0.6086-0.7935j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6086+0.7935j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4603-0.6045j, 0.3982+0.5139j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4603-0.6045j, 0.3982+0.5139j]])
New state:  tensor([[0.0570-0.7921j, 0.6060-0.0470j]])
----------Measure----------
Probability:  tensor([[0.6306, 0.3694]])
----------
test input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.9818+0.j]])
rz_matrix:  tensor([[0.8819-0.4714j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8819+0.4714j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6522-0.3419j, 0.5935+0.3248j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6522-0.3419j, 0.5935+0.3248j]])
New state:  tensor([[0.0605-0.4716j, 0.8798-0.0020j]])
----------Measure----------
Probability:  tensor([[0.2260, 0.7740]])
----------
test input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5676-0.6360j, 0.3497+0.3887j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5676-0.6360j, 0.3497+0.3887j]])
New state:  tensor([[0.1681-0.7281j, 0.6452-0.1592j]])
----------Measure----------
Probability:  tensor([[0.5584, 0.4416]])
----------
test input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.2519]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.2519+0.j]])
rz_matrix:  tensor([[0.4303-0.9027j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.4303+0.9027j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.3111-0.6681j, 0.2976+0.6068j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3111-0.6681j, 0.2976+0.6068j]])
New state:  tensor([[0.0188-0.9023j, 0.4301-0.0239j]])
----------Measure----------
Probability:  tensor([[0.8144, 0.1856]])
----------
test input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.6797+0.j]])
ry_matrix:  tensor([[ 0.9428-0.j, -0.3333-0.j],
        [ 0.3333+0.j,  0.9428-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9428+0.j, 0.3333+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.9428+0.j, 0.3333+0.j]])
New state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5976-0.7223j, 0.2244+0.2662j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5976-0.7223j, 0.2244+0.2662j]])
New state:  tensor([[0.2764-0.7057j, 0.5754-0.3074j]])
----------Measure----------
Probability:  tensor([[0.5745, 0.4255]])
----------
test input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0320+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0160j],
        [0.0000+0.0160j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5527-0.6194j, 0.3728+0.4146j]])
Inside  ry
ry_matrix theta:  tensor([[1.5277+0.j]])
ry_matrix:  tensor([[ 0.7222-0.j, -0.6917-0.j],
        [ 0.6917+0.j,  0.7222-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5527-0.6194j, 0.3728+0.4146j]])
New state:  tensor([[0.1412-0.7341j, 0.6516-0.1290j]])
----------Measure----------
Probability:  tensor([[0.5588, 0.4412]])
valid set accuracy: 0.8275862336158752
valid set loss: 0.48630866408348083
------------------------------Epoch9------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
test input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.4619+0.j]])
ry_matrix:  tensor([[ 0.3333-0.j, -0.9428-0.j],
        [ 0.9428+0.j,  0.3333-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.3333+0.j, 0.9428+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.3333+0.j, 0.9428+0.j]])
New state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2558-0.1915j, 0.7511+0.5777j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2558-0.1915j, 0.7511+0.5777j]])
New state:  tensor([[-0.3311-0.5364j,  0.7211+0.2876j]])
----------Measure----------
Probability:  tensor([[0.3974, 0.6026]])
----------
test input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.9818+0.j]])
ry_matrix:  tensor([[ 0.8819-0.j, -0.4714-0.j],
        [ 0.4714+0.j,  0.8819-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8819+0.j, 0.4714+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.8819+0.j, 0.4714+0.j]])
New state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6743-0.5573j, 0.3714+0.3112j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6743-0.5573j, 0.3714+0.3112j]])
New state:  tensor([[0.2338-0.6186j, 0.7334-0.1576j]])
----------Measure----------
Probability:  tensor([[0.4373, 0.5627]])
----------
test input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4775-0.6801j, 0.3246+0.4517j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4775-0.6801j, 0.3246+0.4517j]])
New state:  tensor([[0.1232-0.8044j, 0.5641-0.1400j]])
----------Measure----------
Probability:  tensor([[0.6622, 0.3378]])
----------
test input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.5903]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.5903+0.j]])
ry_matrix:  tensor([[ 0.2722-0.j, -0.9623-0.j],
        [ 0.9623+0.j,  0.2722-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.2722+0.j, 0.9623+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.2722+0.j, 0.9623+0.j]])
New state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.2203-0.1359j, 0.8094+0.5272j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2203-0.1359j, 0.8094+0.5272j]])
New state:  tensor([[-0.3969-0.4613j,  0.7390+0.2891j]])
----------Measure----------
Probability:  tensor([[0.3703, 0.6297]])
----------
test input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6906-0.5711j, 0.3400+0.2852j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6906-0.5711j, 0.3400+0.2852j]])
New state:  tensor([[0.2673-0.6107j, 0.7219-0.1859j]])
----------Measure----------
Probability:  tensor([[0.4444, 0.5556]])
----------
test input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.9106+0.j]])
ry_matrix:  tensor([[ 0.5774-0.j, -0.8165-0.j],
        [ 0.8165+0.j,  0.5774-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.5774+0.j, 0.8165+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.5774+0.j, 0.8165+0.j]])
New state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4775-0.3038j, 0.6896+0.4517j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4775-0.3038j, 0.6896+0.4517j]])
New state:  tensor([[-0.1279-0.5313j,  0.8290+0.1188j]])
----------Measure----------
Probability:  tensor([[0.2986, 0.7014]])
----------
test input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.8331+0.j]])
ry_matrix:  tensor([[ 0.6086-0.j, -0.7935-0.j],
        [ 0.7935+0.j,  0.6086-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6086+0.j, 0.7935+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.0685+0.j]])
rz_matrix:  tensor([[0.8607-0.5092j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8607+0.5092j]])
Performing matrix multiplication

Current state:  tensor([[0.6086+0.j, 0.7935+0.j]])
New state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.5176-0.2995j, 0.6876+0.4119j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5176-0.2995j, 0.6876+0.4119j]])
New state:  tensor([[-0.0974-0.5007j,  0.8551+0.0929j]])
----------Measure----------
Probability:  tensor([[0.2602, 0.7398]])
----------
test input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5649-0.4298j, 0.5572+0.4309j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5649-0.4298j, 0.5572+0.4309j]])
New state:  tensor([[0.0266-0.6084j, 0.7930+0.0170j]])
----------Measure----------
Probability:  tensor([[0.3709, 0.6291]])
----------
test input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.4619+0.j]])
rz_matrix:  tensor([[0.3333-0.9428j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.3333+0.9428j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2210-0.6505j, 0.2499+0.6823j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2210-0.6505j, 0.2499+0.6823j]])
New state:  tensor([[-0.0116-0.9415j,  0.3334+0.0477j]])
----------Measure----------
Probability:  tensor([[0.8866, 0.1134]])
----------
test input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.9818+0.j]])
rz_matrix:  tensor([[0.8819-0.4714j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8819+0.4714j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6525-0.3424j, 0.5932+0.3242j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6525-0.3424j, 0.5932+0.3242j]])
New state:  tensor([[0.0654-4.7154e-01j, 0.8794-2.5314e-04j]])
----------Measure----------
Probability:  tensor([[0.2266, 0.7734]])
----------
test input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.3873]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.3873+0.j]])
ry_matrix:  tensor([[ 0.9813-0.j, -0.1925-0.j],
        [ 0.1925+0.j,  0.9813-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9813+0.j, 0.1925+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.9813+0.j, 0.1925+0.j]])
New state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7294-0.6520j, 0.1534+0.1394j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7294-0.6520j, 0.1534+0.1394j]])
New state:  tensor([[0.4238-0.5690j, 0.6131-0.3474j]])
----------Measure----------
Probability:  tensor([[0.5035, 0.4965]])
----------
test input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.2310]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.2310+0.j]])
rz_matrix:  tensor([[0.8165-0.5774j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8165+0.5774j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5602-0.3916j, 0.5940+0.4243j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5602-0.3916j, 0.5940+0.4243j]])
New state:  tensor([[-0.0021-0.5761j,  0.8164+0.0385j]])
----------Measure----------
Probability:  tensor([[0.3319, 0.6681]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7122-0.5441j, 0.3498+0.2727j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7122-0.5441j, 0.3498+0.2727j]])
New state:  tensor([[0.2762-0.5825j, 0.7438-0.1764j]])
----------Measure----------
Probability:  tensor([[0.4156, 0.5844]])
----------
test input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3916-0.5602j, 0.4243+0.5940j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3916-0.5602j, 0.4243+0.5940j]])
New state:  tensor([[-0.0077-0.8152j,  0.5774+0.0457j]])
----------Measure----------
Probability:  tensor([[0.6646, 0.3354]])
----------
test input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.8897+0.j]])
rz_matrix:  tensor([[0.9027-0.4303j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9027+0.4303j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6454-0.3003j, 0.6310+0.3084j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6454-0.3003j, 0.6310+0.3084j]])
New state:  tensor([[0.0343-0.4302j, 0.9019+0.0172j]])
----------Measure----------
Probability:  tensor([[0.1862, 0.8138]])
----------
test input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.6797+0.j]])
rz_matrix:  tensor([[0.9428-0.3333j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9428+0.3333j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6993-0.2389j, 0.6322+0.2329j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6993-0.2389j, 0.6322+0.2329j]])
New state:  tensor([[0.0725-0.3336j, 0.9399+0.0047j]])
----------Measure----------
Probability:  tensor([[0.1165, 0.8835]])
----------
test input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5679-0.6363j, 0.3492+0.3882j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5679-0.6363j, 0.3492+0.3882j]])
New state:  tensor([[0.1720-0.7288j, 0.6441-0.1560j]])
----------Measure----------
Probability:  tensor([[0.5608, 0.4392]])
----------
test input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5916-0.6143j, 0.3627+0.3757j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5916-0.6143j, 0.3627+0.3757j]])
New state:  tensor([[0.1798-0.7043j, 0.6702-0.1500j]])
----------Measure----------
Probability:  tensor([[0.5284, 0.4716]])
----------
test input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.8331+0.j]])
rz_matrix:  tensor([[0.6086-0.7935j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6086+0.7935j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4607-0.6049j, 0.3977+0.5135j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4607-0.6049j, 0.3977+0.5135j]])
New state:  tensor([[0.0608-0.7923j, 0.6056-0.0434j]])
----------Measure----------
Probability:  tensor([[0.6314, 0.3686]])
----------
test input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.7571+0.j]])
ry_matrix:  tensor([[ 0.6383-0.j, -0.7698-0.j],
        [ 0.7698+0.j,  0.6383-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6383+0.j, 0.7698+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.6383+0.j, 0.7698+0.j]])
New state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4679-0.4168j, 0.5802+0.5204j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4679-0.4168j, 0.5802+0.5204j]])
New state:  tensor([[-0.0596-0.6605j,  0.7430+0.0909j]])
----------Measure----------
Probability:  tensor([[0.4397, 0.5603]])
----------
test input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5433-0.6575j, 0.3350+0.4003j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5433-0.6575j, 0.3350+0.4003j]])
New state:  tensor([[0.1638-0.7526j, 0.6169-0.1619j]])
----------Measure----------
Probability:  tensor([[0.5932, 0.4068]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7122-0.5441j, 0.3498+0.2727j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7122-0.5441j, 0.3498+0.2727j]])
New state:  tensor([[0.2762-0.5825j, 0.7438-0.1764j]])
----------Measure----------
Probability:  tensor([[0.4156, 0.5844]])
----------
test input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5530-0.6197j, 0.3723+0.4142j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5530-0.6197j, 0.3723+0.4142j]])
New state:  tensor([[0.1452-0.7347j, 0.6507-0.1257j]])
----------Measure----------
Probability:  tensor([[0.5608, 0.4392]])
----------
test input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5761-0.5982j, 0.3868+0.4008j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5761-0.5982j, 0.3868+0.4008j]])
New state:  tensor([[0.1519-0.7099j, 0.6771-0.1207j]])
----------Measure----------
Probability:  tensor([[0.5270, 0.4730]])
----------
test input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.7902]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.7902+0.j]])
rz_matrix:  tensor([[0.9230-0.3849j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9230+0.3849j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6840-0.2775j, 0.6196+0.2670j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6840-0.2775j, 0.6196+0.2670j]])
New state:  tensor([[0.0701-0.3851j, 0.9202+0.0029j]])
----------Measure----------
Probability:  tensor([[0.1532, 0.8468]])
----------
test input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.2519]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.2519+0.j]])
rz_matrix:  tensor([[0.4303-0.9027j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.4303+0.9027j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.3116-0.6684j, 0.2971+0.6066j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3116-0.6684j, 0.2971+0.6066j]])
New state:  tensor([[0.0217-0.9024j, 0.4300-0.0196j]])
----------Measure----------
Probability:  tensor([[0.8148, 0.1852]])
----------
test input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5761-0.3685j, 0.6097+0.4008j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5761-0.3685j, 0.6097+0.4008j]])
New state:  tensor([[-0.0014-0.5431j,  0.8388+0.0373j]])
----------Measure----------
Probability:  tensor([[0.2950, 0.7050]])
----------
test input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.6797+0.j]])
ry_matrix:  tensor([[ 0.9428-0.j, -0.3333-0.j],
        [ 0.3333+0.j,  0.9428-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9428+0.j, 0.3333+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.9428+0.j, 0.3333+0.j]])
New state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5978-0.7225j, 0.2238+0.2657j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5978-0.7225j, 0.2238+0.2657j]])
New state:  tensor([[0.2799-0.7071j, 0.5737-0.3042j]])
----------Measure----------
Probability:  tensor([[0.5784, 0.4216]])
----------
test input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0304+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0152j],
        [0.0000+0.0152j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5271-0.5475j, 0.4513+0.4677j]])
Inside  ry
ry_matrix theta:  tensor([[1.5174+0.j]])
ry_matrix:  tensor([[ 0.7257-0.j, -0.6880-0.j],
        [ 0.6880+0.j,  0.7257-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5271-0.5475j, 0.4513+0.4677j]])
New state:  tensor([[0.0721-0.7191j, 0.6901-0.0373j]])
----------Measure----------
Probability:  tensor([[0.5223, 0.4777]])
valid set accuracy: 0.8620689511299133
valid set loss: 0.4832775592803955
------------------------------Epoch10------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
test input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5653-0.4303j, 0.5568+0.4304j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5653-0.4303j, 0.5568+0.4304j]])
New state:  tensor([[0.0302-0.6083j, 0.7929+0.0187j]])
----------Measure----------
Probability:  tensor([[0.3710, 0.6290]])
----------
test input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.6797+0.j]])
ry_matrix:  tensor([[ 0.9428-0.j, -0.3333-0.j],
        [ 0.3333+0.j,  0.9428-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9428+0.j, 0.3333+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.9428+0.j, 0.3333+0.j]])
New state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5981-0.7227j, 0.2231+0.2652j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5981-0.7227j, 0.2231+0.2652j]])
New state:  tensor([[0.2827-0.7081j, 0.5723-0.3020j]])
----------Measure----------
Probability:  tensor([[0.5813, 0.4187]])
----------
test input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.7902]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.7902+0.j]])
rz_matrix:  tensor([[0.9230-0.3849j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9230+0.3849j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6842-0.2781j, 0.6193+0.2664j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6842-0.2781j, 0.6193+0.2664j]])
New state:  tensor([[0.0740-0.3851j, 0.9199+0.0035j]])
----------Measure----------
Probability:  tensor([[0.1538, 0.8462]])
----------
test input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.5903]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.5903+0.j]])
ry_matrix:  tensor([[ 0.2722-0.j, -0.9623-0.j],
        [ 0.9623+0.j,  0.2722-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.2722+0.j, 0.9623+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.2722+0.j, 0.9623+0.j]])
New state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.2208-0.1366j, 0.8092+0.5270j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2208-0.1366j, 0.8092+0.5270j]])
New state:  tensor([[-0.3936-0.4606j,  0.7407+0.2903j]])
----------Measure----------
Probability:  tensor([[0.3671, 0.6329]])
----------
test input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5764-0.3690j, 0.6094+0.4002j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5764-0.3690j, 0.6094+0.4002j]])
New state:  tensor([[0.0023-0.5430j, 0.8388+0.0387j]])
----------Measure----------
Probability:  tensor([[0.2949, 0.7051]])
----------
test input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.8897+0.j]])
rz_matrix:  tensor([[0.9027-0.4303j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9027+0.4303j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6457-0.3009j, 0.6307+0.3079j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6457-0.3009j, 0.6307+0.3079j]])
New state:  tensor([[0.0381-0.4301j, 0.9018+0.0181j]])
----------Measure----------
Probability:  tensor([[0.1864, 0.8136]])
----------
test input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.9818+0.j]])
ry_matrix:  tensor([[ 0.8819-0.j, -0.4714-0.j],
        [ 0.4714+0.j,  0.8819-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8819+0.j, 0.4714+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.8819+0.j, 0.4714+0.j]])
New state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6745-0.5577j, 0.3709+0.3106j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6745-0.5577j, 0.3709+0.3106j]])
New state:  tensor([[0.2372-0.6190j, 0.7323-0.1559j]])
----------Measure----------
Probability:  tensor([[0.4394, 0.5606]])
----------
test input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.7571+0.j]])
ry_matrix:  tensor([[ 0.6383-0.j, -0.7698-0.j],
        [ 0.7698+0.j,  0.6383-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6383+0.j, 0.7698+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.6383+0.j, 0.7698+0.j]])
New state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4684-0.4173j, 0.5798+0.5199j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4684-0.4173j, 0.5798+0.5199j]])
New state:  tensor([[-0.0561-0.6602j,  0.7432+0.0928j]])
----------Measure----------
Probability:  tensor([[0.4390, 0.5610]])
----------
test input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.6797+0.j]])
rz_matrix:  tensor([[0.9428-0.3333j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9428+0.3333j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6995-0.2394j, 0.6320+0.2322j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6995-0.2394j, 0.6320+0.2322j]])
New state:  tensor([[0.0764-0.3335j, 0.9396+0.0051j]])
----------Measure----------
Probability:  tensor([[0.1171, 0.8829]])
----------
test input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4779-0.6804j, 0.3240+0.4513j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4779-0.6804j, 0.3240+0.4513j]])
New state:  tensor([[0.1261-0.8048j, 0.5635-0.1374j]])
----------Measure----------
Probability:  tensor([[0.6636, 0.3364]])
----------
test input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.3873]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.3873+0.j]])
ry_matrix:  tensor([[ 0.9813-0.j, -0.1925-0.j],
        [ 0.1925+0.j,  0.9813-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9813+0.j, 0.1925+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.9813+0.j, 0.1925+0.j]])
New state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7295-0.6521j, 0.1528+0.1387j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7295-0.6521j, 0.1528+0.1387j]])
New state:  tensor([[0.4267-0.5700j, 0.6111-0.3457j]])
----------Measure----------
Probability:  tensor([[0.5070, 0.4930]])
----------
test input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.2519]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.2519+0.j]])
rz_matrix:  tensor([[0.4303-0.9027j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.4303+0.9027j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.3121-0.6686j, 0.2965+0.6063j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3121-0.6686j, 0.2965+0.6063j]])
New state:  tensor([[0.0242-0.9024j, 0.4298-0.0165j]])
----------Measure----------
Probability:  tensor([[0.8150, 0.1850]])
----------
test input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5919-0.6146j, 0.3621+0.3751j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5919-0.6146j, 0.3621+0.3751j]])
New state:  tensor([[0.1830-0.7047j, 0.6693-0.1479j]])
----------Measure----------
Probability:  tensor([[0.5301, 0.4699]])
----------
test input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3922-0.5606j, 0.4238+0.5936j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3922-0.5606j, 0.4238+0.5936j]])
New state:  tensor([[-0.0047-0.8150j,  0.5774+0.0483j]])
----------Measure----------
Probability:  tensor([[0.6643, 0.3357]])
----------
test input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.9106+0.j]])
ry_matrix:  tensor([[ 0.5774-0.j, -0.8165-0.j],
        [ 0.8165+0.j,  0.5774-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.5774+0.j, 0.8165+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.5774+0.j, 0.8165+0.j]])
New state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4779-0.3045j, 0.6894+0.4513j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4779-0.3045j, 0.6894+0.4513j]])
New state:  tensor([[-0.1242-0.5310j,  0.8296+0.1201j]])
----------Measure----------
Probability:  tensor([[0.2974, 0.7026]])
----------
test input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5437-0.6578j, 0.3344+0.3998j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5437-0.6578j, 0.3344+0.3998j]])
New state:  tensor([[0.1669-0.7531j, 0.6161-0.1595j]])
----------Measure----------
Probability:  tensor([[0.5949, 0.4051]])
----------
test input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.8331+0.j]])
ry_matrix:  tensor([[ 0.6086-0.j, -0.7935-0.j],
        [ 0.7935+0.j,  0.6086-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6086+0.j, 0.7935+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.0685+0.j]])
rz_matrix:  tensor([[0.8607-0.5092j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8607+0.5092j]])
Performing matrix multiplication

Current state:  tensor([[0.6086+0.j, 0.7935+0.j]])
New state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.5180-0.3001j, 0.6873+0.4115j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5180-0.3001j, 0.6873+0.4115j]])
New state:  tensor([[-0.0936-0.5005j,  0.8555+0.0941j]])
----------Measure----------
Probability:  tensor([[0.2593, 0.7407]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7124-0.5444j, 0.3493+0.2721j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7124-0.5444j, 0.3493+0.2721j]])
New state:  tensor([[0.2796-0.5830j, 0.7426-0.1748j]])
----------Measure----------
Probability:  tensor([[0.4180, 0.5820]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7124-0.5444j, 0.3493+0.2721j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7124-0.5444j, 0.3493+0.2721j]])
New state:  tensor([[0.2796-0.5830j, 0.7426-0.1748j]])
----------Measure----------
Probability:  tensor([[0.4180, 0.5820]])
----------
test input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5275-0.5479j, 0.4508+0.4672j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5275-0.5479j, 0.4508+0.4672j]])
New state:  tensor([[0.0754-0.7192j, 0.6898-0.0351j]])
----------Measure----------
Probability:  tensor([[0.5230, 0.4770]])
----------
test input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.4619+0.j]])
ry_matrix:  tensor([[ 0.3333-0.j, -0.9428-0.j],
        [ 0.9428+0.j,  0.3333-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.3333+0.j, 0.9428+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.3333+0.j, 0.9428+0.j]])
New state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2563-0.1921j, 0.7509+0.5775j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2563-0.1921j, 0.7509+0.5775j]])
New state:  tensor([[-0.3279-0.5356j,  0.7226+0.2890j]])
----------Measure----------
Probability:  tensor([[0.3944, 0.6056]])
----------
test input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6909-0.5714j, 0.3395+0.2846j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6909-0.5714j, 0.3395+0.2846j]])
New state:  tensor([[0.2706-0.6112j, 0.7206-0.1842j]])
----------Measure----------
Probability:  tensor([[0.4467, 0.5533]])
----------
test input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5683-0.6366j, 0.3486+0.3877j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5683-0.6366j, 0.3486+0.3877j]])
New state:  tensor([[0.1751-0.7293j, 0.6433-0.1538j]])
----------Measure----------
Probability:  tensor([[0.5625, 0.4375]])
----------
test input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.8331+0.j]])
rz_matrix:  tensor([[0.6086-0.7935j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6086+0.7935j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4612-0.6052j, 0.3971+0.5131j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4612-0.6052j, 0.3971+0.5131j]])
New state:  tensor([[0.0638-0.7924j, 0.6053-0.0409j]])
----------Measure----------
Probability:  tensor([[0.6320, 0.3680]])
----------
test input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.2310]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.2310+0.j]])
rz_matrix:  tensor([[0.8165-0.5774j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8165+0.5774j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5606-0.3922j, 0.5936+0.4238j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5606-0.3922j, 0.5936+0.4238j]])
New state:  tensor([[0.0016-0.5760j, 0.8165+0.0400j]])
----------Measure----------
Probability:  tensor([[0.3318, 0.6682]])
----------
test input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5534-0.6200j, 0.3718+0.4137j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5534-0.6200j, 0.3718+0.4137j]])
New state:  tensor([[0.1483-0.7350j, 0.6500-0.1235j]])
----------Measure----------
Probability:  tensor([[0.5623, 0.4377]])
----------
test input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5764-0.5986j, 0.3863+0.4002j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5764-0.5986j, 0.3863+0.4002j]])
New state:  tensor([[0.1552-0.7102j, 0.6763-0.1186j]])
----------Measure----------
Probability:  tensor([[0.5285, 0.4715]])
----------
test input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.4619+0.j]])
rz_matrix:  tensor([[0.3333-0.9428j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.3333+0.9428j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2216-0.6507j, 0.2494+0.6821j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2216-0.6507j, 0.2494+0.6821j]])
New state:  tensor([[-0.0095-0.9413j,  0.3334+0.0510j]])
----------Measure----------
Probability:  tensor([[0.8862, 0.1138]])
----------
test input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.9818+0.j]])
rz_matrix:  tensor([[0.8819-0.4714j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8819+0.4714j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0286+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0143j],
        [0.0000+0.0143j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6528-0.3429j, 0.5929+0.3236j]])
Inside  ry
ry_matrix theta:  tensor([[1.5097+0.j]])
ry_matrix:  tensor([[ 0.7284-0.j, -0.6852-0.j],
        [ 0.6852+0.j,  0.7284-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6528-0.3429j, 0.5929+0.3236j]])
New state:  tensor([[0.0692-0.4715j, 0.8791+0.0008j]])
----------Measure----------
Probability:  tensor([[0.2271, 0.7729]])
valid set accuracy: 0.8620689511299133
valid set loss: 0.4810437262058258
------------------------------Epoch11------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
test input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.8897+0.j]])
rz_matrix:  tensor([[0.9027-0.4303j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9027+0.4303j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6458-0.3011j, 0.6306+0.3076j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6458-0.3011j, 0.6306+0.3076j]])
New state:  tensor([[0.0408-0.4301j, 0.9017+0.0189j]])
----------Measure----------
Probability:  tensor([[0.1866, 0.8134]])
----------
test input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.6797+0.j]])
rz_matrix:  tensor([[0.9428-0.3333j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9428+0.3333j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6996-0.2397j, 0.6319+0.2320j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6996-0.2397j, 0.6319+0.2320j]])
New state:  tensor([[0.0791-0.3335j, 0.9394+0.0056j]])
----------Measure----------
Probability:  tensor([[0.1175, 0.8825]])
----------
test input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.9106+0.j]])
ry_matrix:  tensor([[ 0.5774-0.j, -0.8165-0.j],
        [ 0.8165+0.j,  0.5774-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.5774+0.j, 0.8165+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.5774+0.j, 0.8165+0.j]])
New state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4781-0.3047j, 0.6892+0.4511j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4781-0.3047j, 0.6892+0.4511j]])
New state:  tensor([[-0.1218-0.5307j,  0.8299+0.1213j]])
----------Measure----------
Probability:  tensor([[0.2965, 0.7035]])
----------
test input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.8331+0.j]])
rz_matrix:  tensor([[0.6086-0.7935j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6086+0.7935j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4614-0.6054j, 0.3969+0.5129j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4614-0.6054j, 0.3969+0.5129j]])
New state:  tensor([[0.0658-0.7925j, 0.6051-0.0390j]])
----------Measure----------
Probability:  tensor([[0.6324, 0.3676]])
----------
test input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5536-0.6202j, 0.3715+0.4135j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5536-0.6202j, 0.3715+0.4135j]])
New state:  tensor([[0.1504-0.7353j, 0.6495-0.1218j]])
----------Measure----------
Probability:  tensor([[0.5633, 0.4367]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7126-0.5445j, 0.3491+0.2718j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7126-0.5445j, 0.3491+0.2718j]])
New state:  tensor([[0.2819-0.5834j, 0.7417-0.1735j]])
----------Measure----------
Probability:  tensor([[0.4197, 0.5803]])
----------
test input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5438-0.6580j, 0.3342+0.3996j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5438-0.6580j, 0.3342+0.3996j]])
New state:  tensor([[0.1688-0.7534j, 0.6156-0.1577j]])
----------Measure----------
Probability:  tensor([[0.5962, 0.4038]])
----------
test input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.7571+0.j]])
ry_matrix:  tensor([[ 0.6383-0.j, -0.7698-0.j],
        [ 0.7698+0.j,  0.6383-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6383+0.j, 0.7698+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.6383+0.j, 0.7698+0.j]])
New state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4686-0.4175j, 0.5796+0.5198j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4686-0.4175j, 0.5796+0.5198j]])
New state:  tensor([[-0.0538-0.6600j,  0.7434+0.0943j]])
----------Measure----------
Probability:  tensor([[0.4385, 0.5615]])
----------
test input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5766-0.5987j, 0.3861+0.4000j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5766-0.5987j, 0.3861+0.4000j]])
New state:  tensor([[0.1573-0.7105j, 0.6758-0.1170j]])
----------Measure----------
Probability:  tensor([[0.5296, 0.4704]])
----------
test input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5921-0.6148j, 0.3619+0.3749j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5921-0.6148j, 0.3619+0.3749j]])
New state:  tensor([[0.1851-0.7051j, 0.6688-0.1462j]])
----------Measure----------
Probability:  tensor([[0.5314, 0.4686]])
----------
test input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3924-0.5607j, 0.4236+0.5935j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3924-0.5607j, 0.4236+0.5935j]])
New state:  tensor([[-0.0028-0.8149j,  0.5774+0.0503j]])
----------Measure----------
Probability:  tensor([[0.6641, 0.3359]])
----------
test input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4781-0.6805j, 0.3238+0.4511j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4781-0.6805j, 0.3238+0.4511j]])
New state:  tensor([[0.1279-0.8051j, 0.5631-0.1355j]])
----------Measure----------
Probability:  tensor([[0.6646, 0.3354]])
----------
test input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6910-0.5715j, 0.3392+0.2843j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6910-0.5715j, 0.3392+0.2843j]])
New state:  tensor([[0.2728-0.6116j, 0.7198-0.1828j]])
----------Measure----------
Probability:  tensor([[0.4484, 0.5516]])
----------
test input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.7902]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.7902+0.j]])
rz_matrix:  tensor([[0.9230-0.3849j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9230+0.3849j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6843-0.2783j, 0.6192+0.2661j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6843-0.2783j, 0.6192+0.2661j]])
New state:  tensor([[0.0766-0.3851j, 0.9197+0.0042j]])
----------Measure----------
Probability:  tensor([[0.1541, 0.8459]])
----------
test input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.3873]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.3873+0.j]])
ry_matrix:  tensor([[ 0.9813-0.j, -0.1925-0.j],
        [ 0.1925+0.j,  0.9813-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9813+0.j, 0.1925+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.9813+0.j, 0.1925+0.j]])
New state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7296-0.6521j, 0.1525+0.1385j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7296-0.6521j, 0.1525+0.1385j]])
New state:  tensor([[0.4286-0.5708j, 0.6098-0.3444j]])
----------Measure----------
Probability:  tensor([[0.5095, 0.4905]])
----------
test input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5766-0.3693j, 0.6092+0.4000j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5766-0.3693j, 0.6092+0.4000j]])
New state:  tensor([[0.0048-0.5429j, 0.8388+0.0398j]])
----------Measure----------
Probability:  tensor([[0.2948, 0.7052]])
----------
test input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.6797+0.j]])
ry_matrix:  tensor([[ 0.9428-0.j, -0.3333-0.j],
        [ 0.3333+0.j,  0.9428-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9428+0.j, 0.3333+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.9428+0.j, 0.3333+0.j]])
New state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5982-0.7227j, 0.2228+0.2649j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5982-0.7227j, 0.2228+0.2649j]])
New state:  tensor([[0.2846-0.7088j, 0.5714-0.3003j]])
----------Measure----------
Probability:  tensor([[0.5833, 0.4167]])
----------
test input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.5903]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.5903+0.j]])
ry_matrix:  tensor([[ 0.2722-0.j, -0.9623-0.j],
        [ 0.9623+0.j,  0.2722-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.2722+0.j, 0.9623+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.2722+0.j, 0.9623+0.j]])
New state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.2210-0.1369j, 0.8092+0.5269j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2210-0.1369j, 0.8092+0.5269j]])
New state:  tensor([[-0.3914-0.4600j,  0.7419+0.2912j]])
----------Measure----------
Probability:  tensor([[0.3648, 0.6352]])
----------
test input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5655-0.4305j, 0.5566+0.4302j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5655-0.4305j, 0.5566+0.4302j]])
New state:  tensor([[0.0326-0.6083j, 0.7928+0.0200j]])
----------Measure----------
Probability:  tensor([[0.3711, 0.6289]])
----------
test input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.4619+0.j]])
ry_matrix:  tensor([[ 0.3333-0.j, -0.9428-0.j],
        [ 0.9428+0.j,  0.3333-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.3333+0.j, 0.9428+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.3333+0.j, 0.9428+0.j]])
New state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2565-0.1924j, 0.7509+0.5774j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2565-0.1924j, 0.7509+0.5774j]])
New state:  tensor([[-0.3257-0.5350j,  0.7235+0.2902j]])
----------Measure----------
Probability:  tensor([[0.3923, 0.6077]])
----------
test input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.9818+0.j]])
ry_matrix:  tensor([[ 0.8819-0.j, -0.4714-0.j],
        [ 0.4714+0.j,  0.8819-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8819+0.j, 0.4714+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.8819+0.j, 0.4714+0.j]])
New state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6747-0.5578j, 0.3707+0.3103j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6747-0.5578j, 0.3707+0.3103j]])
New state:  tensor([[0.2394-0.6193j, 0.7316-0.1545j]])
----------Measure----------
Probability:  tensor([[0.4409, 0.5591]])
----------
test input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.8331+0.j]])
ry_matrix:  tensor([[ 0.6086-0.j, -0.7935-0.j],
        [ 0.7935+0.j,  0.6086-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6086+0.j, 0.7935+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.0685+0.j]])
rz_matrix:  tensor([[0.8607-0.5092j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8607+0.5092j]])
Performing matrix multiplication

Current state:  tensor([[0.6086+0.j, 0.7935+0.j]])
New state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.5181-0.3004j, 0.6872+0.4113j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5181-0.3004j, 0.6872+0.4113j]])
New state:  tensor([[-0.0911-0.5003j,  0.8558+0.0951j]])
----------Measure----------
Probability:  tensor([[0.2586, 0.7414]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7126-0.5445j, 0.3491+0.2718j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7126-0.5445j, 0.3491+0.2718j]])
New state:  tensor([[0.2819-0.5834j, 0.7417-0.1735j]])
----------Measure----------
Probability:  tensor([[0.4197, 0.5803]])
----------
test input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5277-0.5481j, 0.4506+0.4670j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5277-0.5481j, 0.4506+0.4670j]])
New state:  tensor([[0.0775-0.7193j, 0.6895-0.0334j]])
----------Measure----------
Probability:  tensor([[0.5234, 0.4766]])
----------
test input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.9818+0.j]])
rz_matrix:  tensor([[0.8819-0.4714j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8819+0.4714j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6529-0.3432j, 0.5928+0.3234j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6529-0.3432j, 0.5928+0.3234j]])
New state:  tensor([[0.0718-0.4715j, 0.8789+0.0017j]])
----------Measure----------
Probability:  tensor([[0.2275, 0.7725]])
----------
test input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.4619+0.j]])
rz_matrix:  tensor([[0.3333-0.9428j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.3333+0.9428j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2218-0.6508j, 0.2491+0.6820j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2218-0.6508j, 0.2491+0.6820j]])
New state:  tensor([[-0.0082-0.9412j,  0.3335+0.0534j]])
----------Measure----------
Probability:  tensor([[0.8860, 0.1140]])
----------
test input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.2310]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.2310+0.j]])
rz_matrix:  tensor([[0.8165-0.5774j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8165+0.5774j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5607-0.3924j, 0.5935+0.4236j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5607-0.3924j, 0.5935+0.4236j]])
New state:  tensor([[0.0040-0.5759j, 0.8164+0.0412j]])
----------Measure----------
Probability:  tensor([[0.3317, 0.6683]])
----------
test input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5684-0.6367j, 0.3483+0.3875j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5684-0.6367j, 0.3483+0.3875j]])
New state:  tensor([[0.1771-0.7297j, 0.6427-0.1521j]])
----------Measure----------
Probability:  tensor([[0.5638, 0.4362]])
----------
test input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.2519]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.2519+0.j]])
rz_matrix:  tensor([[0.4303-0.9027j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.4303+0.9027j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0278+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0139j],
        [0.0000+0.0139j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.3124-0.6688j, 0.2962+0.6062j]])
Inside  ry
ry_matrix theta:  tensor([[1.5043+0.j]])
ry_matrix:  tensor([[ 0.7302-0.j, -0.6832-0.j],
        [ 0.6832+0.j,  0.7302-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3124-0.6688j, 0.2962+0.6062j]])
New state:  tensor([[0.0257-0.9025j, 0.4297-0.0142j]])
----------Measure----------
Probability:  tensor([[0.8152, 0.1848]])
valid set accuracy: 0.8620689511299133
valid set loss: 0.4794694185256958
------------------------------Epoch12------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
test input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5279-0.5483j, 0.4503+0.4667j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5279-0.5483j, 0.4503+0.4667j]])
New state:  tensor([[0.0792-0.7193j, 0.6894-0.0324j]])
----------Measure----------
Probability:  tensor([[0.5237, 0.4763]])
----------
test input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5538-0.6203j, 0.3712+0.4132j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5538-0.6203j, 0.3712+0.4132j]])
New state:  tensor([[0.1520-0.7355j, 0.6491-0.1207j]])
----------Measure----------
Probability:  tensor([[0.5641, 0.4359]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7127-0.5447j, 0.3488+0.2715j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7127-0.5447j, 0.3488+0.2715j]])
New state:  tensor([[0.2835-0.5836j, 0.7411-0.1728j]])
----------Measure----------
Probability:  tensor([[0.4209, 0.5791]])
----------
test input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.7571+0.j]])
ry_matrix:  tensor([[ 0.6383-0.j, -0.7698-0.j],
        [ 0.7698+0.j,  0.6383-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6383+0.j, 0.7698+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.6383+0.j, 0.7698+0.j]])
New state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4688-0.4178j, 0.5794+0.5195j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4688-0.4178j, 0.5794+0.5195j]])
New state:  tensor([[-0.0521-0.6598j,  0.7435+0.0952j]])
----------Measure----------
Probability:  tensor([[0.4381, 0.5619]])
----------
test input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.9106+0.j]])
ry_matrix:  tensor([[ 0.5774-0.j, -0.8165-0.j],
        [ 0.8165+0.j,  0.5774-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.5774+0.j, 0.8165+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.5774+0.j, 0.8165+0.j]])
New state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4783-0.3051j, 0.6891+0.4509j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4783-0.3051j, 0.6891+0.4509j]])
New state:  tensor([[-0.1199-0.5306j,  0.8302+0.1219j]])
----------Measure----------
Probability:  tensor([[0.2959, 0.7041]])
----------
test input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.8331+0.j]])
ry_matrix:  tensor([[ 0.6086-0.j, -0.7935-0.j],
        [ 0.7935+0.j,  0.6086-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6086+0.j, 0.7935+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.0685+0.j]])
rz_matrix:  tensor([[0.8607-0.5092j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8607+0.5092j]])
Performing matrix multiplication

Current state:  tensor([[0.6086+0.j, 0.7935+0.j]])
New state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.5183-0.3007j, 0.6870+0.4110j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5183-0.3007j, 0.6870+0.4110j]])
New state:  tensor([[-0.0893-0.5002j,  0.8560+0.0957j]])
----------Measure----------
Probability:  tensor([[0.2582, 0.7418]])
----------
test input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5768-0.3696j, 0.6091+0.3997j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5768-0.3696j, 0.6091+0.3997j]])
New state:  tensor([[0.0066-0.5429j, 0.8388+0.0404j]])
----------Measure----------
Probability:  tensor([[0.2948, 0.7052]])
----------
test input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.6797+0.j]])
ry_matrix:  tensor([[ 0.9428-0.j, -0.3333-0.j],
        [ 0.3333+0.j,  0.9428-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9428+0.j, 0.3333+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.9428+0.j, 0.3333+0.j]])
New state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5983-0.7229j, 0.2225+0.2647j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5983-0.7229j, 0.2225+0.2647j]])
New state:  tensor([[0.2860-0.7092j, 0.5707-0.2993j]])
----------Measure----------
Probability:  tensor([[0.5848, 0.4152]])
----------
test input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5768-0.5989j, 0.3858+0.3997j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5768-0.5989j, 0.3858+0.3997j]])
New state:  tensor([[0.1589-0.7107j, 0.6755-0.1159j]])
----------Measure----------
Probability:  tensor([[0.5303, 0.4697]])
----------
test input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6911-0.5717j, 0.3390+0.2840j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6911-0.5717j, 0.3390+0.2840j]])
New state:  tensor([[0.2745-0.6118j, 0.7192-0.1820j]])
----------Measure----------
Probability:  tensor([[0.4496, 0.5504]])
----------
test input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.9818+0.j]])
rz_matrix:  tensor([[0.8819-0.4714j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8819+0.4714j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6531-0.3434j, 0.5926+0.3231j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6531-0.3434j, 0.5926+0.3231j]])
New state:  tensor([[0.0737-0.4715j, 0.8788+0.0022j]])
----------Measure----------
Probability:  tensor([[0.2277, 0.7723]])
----------
test input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.7902]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.7902+0.j]])
rz_matrix:  tensor([[0.9230-0.3849j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9230+0.3849j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6844-0.2786j, 0.6191+0.2658j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6844-0.2786j, 0.6191+0.2658j]])
New state:  tensor([[0.0786-0.3850j, 0.9195+0.0045j]])
----------Measure----------
Probability:  tensor([[0.1544, 0.8456]])
----------
test input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3927-0.5609j, 0.4233+0.5933j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3927-0.5609j, 0.4233+0.5933j]])
New state:  tensor([[-0.0014-0.8148j,  0.5774+0.0515j]])
----------Measure----------
Probability:  tensor([[0.6640, 0.3360]])
----------
test input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4783-0.6807j, 0.3234+0.4509j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4783-0.6807j, 0.3234+0.4509j]])
New state:  tensor([[0.1294-0.8053j, 0.5627-0.1342j]])
----------Measure----------
Probability:  tensor([[0.6653, 0.3347]])
----------
test input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.4619+0.j]])
rz_matrix:  tensor([[0.3333-0.9428j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.3333+0.9428j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2222-0.6509j, 0.2488+0.6819j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2222-0.6509j, 0.2488+0.6819j]])
New state:  tensor([[-0.0071-0.9411j,  0.3335+0.0550j]])
----------Measure----------
Probability:  tensor([[0.8858, 0.1142]])
----------
test input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.5903]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.5903+0.j]])
ry_matrix:  tensor([[ 0.2722-0.j, -0.9623-0.j],
        [ 0.9623+0.j,  0.2722-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.2722+0.j, 0.9623+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.2722+0.j, 0.9623+0.j]])
New state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.2213-0.1373j, 0.8091+0.5268j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2213-0.1373j, 0.8091+0.5268j]])
New state:  tensor([[-0.3898-0.4596j,  0.7428+0.2917j]])
----------Measure----------
Probability:  tensor([[0.3632, 0.6368]])
----------
test input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5686-0.6369j, 0.3480+0.3872j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5686-0.6369j, 0.3480+0.3872j]])
New state:  tensor([[0.1787-0.7299j, 0.6423-0.1510j]])
----------Measure----------
Probability:  tensor([[0.5647, 0.4353]])
----------
test input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.8897+0.j]])
rz_matrix:  tensor([[0.9027-0.4303j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9027+0.4303j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6459-0.3014j, 0.6305+0.3073j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6459-0.3014j, 0.6305+0.3073j]])
New state:  tensor([[0.0427-0.4300j, 0.9016+0.0193j]])
----------Measure----------
Probability:  tensor([[0.1867, 0.8133]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7127-0.5447j, 0.3488+0.2715j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7127-0.5447j, 0.3488+0.2715j]])
New state:  tensor([[0.2835-0.5836j, 0.7411-0.1728j]])
----------Measure----------
Probability:  tensor([[0.4209, 0.5791]])
----------
test input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.6797+0.j]])
rz_matrix:  tensor([[0.9428-0.3333j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9428+0.3333j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6997-0.2400j, 0.6318+0.2316j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6997-0.2400j, 0.6318+0.2316j]])
New state:  tensor([[0.0811-0.3335j, 0.9392+0.0058j]])
----------Measure----------
Probability:  tensor([[0.1178, 0.8822]])
----------
test input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.3873]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.3873+0.j]])
ry_matrix:  tensor([[ 0.9813-0.j, -0.1925-0.j],
        [ 0.1925+0.j,  0.9813-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9813+0.j, 0.1925+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.9813+0.j, 0.1925+0.j]])
New state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7296-0.6522j, 0.1522+0.1381j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7296-0.6522j, 0.1522+0.1381j]])
New state:  tensor([[0.4300-0.5713j, 0.6088-0.3437j]])
----------Measure----------
Probability:  tensor([[0.5112, 0.4888]])
----------
test input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.8331+0.j]])
rz_matrix:  tensor([[0.6086-0.7935j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6086+0.7935j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4616-0.6056j, 0.3966+0.5127j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4616-0.6056j, 0.3966+0.5127j]])
New state:  tensor([[0.0673-0.7926j, 0.6049-0.0378j]])
----------Measure----------
Probability:  tensor([[0.6327, 0.3673]])
----------
test input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.4619+0.j]])
ry_matrix:  tensor([[ 0.3333-0.j, -0.9428-0.j],
        [ 0.9428+0.j,  0.3333-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.3333+0.j, 0.9428+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.3333+0.j, 0.9428+0.j]])
New state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2568-0.1928j, 0.7508+0.5773j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2568-0.1928j, 0.7508+0.5773j]])
New state:  tensor([[-0.3240-0.5346j,  0.7243+0.2908j]])
----------Measure----------
Probability:  tensor([[0.3908, 0.6092]])
----------
test input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5657-0.4308j, 0.5564+0.4299j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5657-0.4308j, 0.5564+0.4299j]])
New state:  tensor([[0.0344-0.6083j, 0.7927+0.0208j]])
----------Measure----------
Probability:  tensor([[0.3712, 0.6288]])
----------
test input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.2310]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.2310+0.j]])
rz_matrix:  tensor([[0.8165-0.5774j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8165+0.5774j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5609-0.3927j, 0.5933+0.4233j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5609-0.3927j, 0.5933+0.4233j]])
New state:  tensor([[0.0058-0.5759j, 0.8164+0.0419j]])
----------Measure----------
Probability:  tensor([[0.3317, 0.6683]])
----------
test input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5440-0.6581j, 0.3339+0.3993j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5440-0.6581j, 0.3339+0.3993j]])
New state:  tensor([[0.1703-0.7537j, 0.6152-0.1566j]])
----------Measure----------
Probability:  tensor([[0.5970, 0.4030]])
----------
test input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5922-0.6150j, 0.3616+0.3746j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5922-0.6150j, 0.3616+0.3746j]])
New state:  tensor([[0.1867-0.7053j, 0.6683-0.1452j]])
----------Measure----------
Probability:  tensor([[0.5323, 0.4677]])
----------
test input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.2519]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.2519+0.j]])
rz_matrix:  tensor([[0.4303-0.9027j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.4303+0.9027j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.3126-0.6689j, 0.2959+0.6060j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3126-0.6689j, 0.2959+0.6060j]])
New state:  tensor([[0.0270-0.9025j, 0.4296-0.0127j]])
----------Measure----------
Probability:  tensor([[0.8153, 0.1847]])
----------
test input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.9818+0.j]])
ry_matrix:  tensor([[ 0.8819-0.j, -0.4714-0.j],
        [ 0.4714+0.j,  0.8819-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8819+0.j, 0.4714+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.8819+0.j, 0.4714+0.j]])
New state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0268+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0134j],
        [0.0000+0.0134j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6748-0.5580j, 0.3704+0.3100j]])
Inside  ry
ry_matrix theta:  tensor([[1.5005+0.j]])
ry_matrix:  tensor([[ 0.7315-0.j, -0.6818-0.j],
        [ 0.6818+0.j,  0.7315-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6748-0.5580j, 0.3704+0.3100j]])
New state:  tensor([[0.2411-0.6195j, 0.7311-0.1537j]])
----------Measure----------
Probability:  tensor([[0.4419, 0.5581]])
valid set accuracy: 0.8620689511299133
valid set loss: 0.4783799946308136
------------------------------Epoch13------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
test input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.7571+0.j]])
ry_matrix:  tensor([[ 0.6383-0.j, -0.7698-0.j],
        [ 0.7698+0.j,  0.6383-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6383+0.j, 0.7698+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.6383+0.j, 0.7698+0.j]])
New state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4690-0.4179j, 0.5793+0.5194j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4690-0.4179j, 0.5793+0.5194j]])
New state:  tensor([[-0.0511-0.6598j,  0.7436+0.0957j]])
----------Measure----------
Probability:  tensor([[0.4379, 0.5621]])
----------
test input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5923-0.6150j, 0.3614+0.3745j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5923-0.6150j, 0.3614+0.3745j]])
New state:  tensor([[0.1876-0.7054j, 0.6680-0.1446j]])
----------Measure----------
Probability:  tensor([[0.5328, 0.4672]])
----------
test input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.9818+0.j]])
rz_matrix:  tensor([[0.8819-0.4714j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8819+0.4714j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6531-0.3436j, 0.5925+0.3229j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6531-0.3436j, 0.5925+0.3229j]])
New state:  tensor([[0.0748-0.4715j, 0.8787+0.0025j]])
----------Measure----------
Probability:  tensor([[0.2279, 0.7721]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7128-0.5448j, 0.3487+0.2713j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7128-0.5448j, 0.3487+0.2713j]])
New state:  tensor([[0.2845-0.5837j, 0.7407-0.1723j]])
----------Measure----------
Probability:  tensor([[0.4217, 0.5783]])
----------
test input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.9106+0.j]])
ry_matrix:  tensor([[ 0.5774-0.j, -0.8165-0.j],
        [ 0.8165+0.j,  0.5774-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.5774+0.j, 0.8165+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.5774+0.j, 0.8165+0.j]])
New state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4784-0.3052j, 0.6890+0.4508j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4784-0.3052j, 0.6890+0.4508j]])
New state:  tensor([[-0.1189-0.5305j,  0.8304+0.1222j]])
----------Measure----------
Probability:  tensor([[0.2956, 0.7044]])
----------
test input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5658-0.4309j, 0.5563+0.4298j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5658-0.4309j, 0.5563+0.4298j]])
New state:  tensor([[0.0355-0.6082j, 0.7927+0.0212j]])
----------Measure----------
Probability:  tensor([[0.3712, 0.6288]])
----------
test input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.6797+0.j]])
rz_matrix:  tensor([[0.9428-0.3333j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9428+0.3333j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6997-0.2402j, 0.6318+0.2315j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6997-0.2402j, 0.6318+0.2315j]])
New state:  tensor([[0.0822-0.3335j, 0.9391+0.0059j]])
----------Measure----------
Probability:  tensor([[0.1180, 0.8820]])
----------
test input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5281-0.5484j, 0.4502+0.4666j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5281-0.5484j, 0.4502+0.4666j]])
New state:  tensor([[0.0801-0.7194j, 0.6893-0.0318j]])
----------Measure----------
Probability:  tensor([[0.5239, 0.4761]])
----------
test input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.3873]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.3873+0.j]])
ry_matrix:  tensor([[ 0.9813-0.j, -0.1925-0.j],
        [ 0.1925+0.j,  0.9813-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9813+0.j, 0.1925+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.9813+0.j, 0.1925+0.j]])
New state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7297-0.6523j, 0.1520+0.1379j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7297-0.6523j, 0.1520+0.1379j]])
New state:  tensor([[0.4308-0.5716j, 0.6082-0.3432j]])
----------Measure----------
Probability:  tensor([[0.5123, 0.4877]])
----------
test input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5769-0.5990j, 0.3856+0.3996j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5769-0.5990j, 0.3856+0.3996j]])
New state:  tensor([[0.1598-0.7108j, 0.6752-0.1153j]])
----------Measure----------
Probability:  tensor([[0.5308, 0.4692]])
----------
test input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.6797+0.j]])
ry_matrix:  tensor([[ 0.9428-0.j, -0.3333-0.j],
        [ 0.3333+0.j,  0.9428-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9428+0.j, 0.3333+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.9428+0.j, 0.3333+0.j]])
New state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5984-0.7229j, 0.2223+0.2645j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5984-0.7229j, 0.2223+0.2645j]])
New state:  tensor([[0.2868-0.7095j, 0.5703-0.2986j]])
----------Measure----------
Probability:  tensor([[0.5856, 0.4144]])
----------
test input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5441-0.6582j, 0.3337+0.3992j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5441-0.6582j, 0.3337+0.3992j]])
New state:  tensor([[0.1712-0.7538j, 0.6149-0.1559j]])
----------Measure----------
Probability:  tensor([[0.5976, 0.4024]])
----------
test input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5769-0.3697j, 0.6090+0.3996j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5769-0.3697j, 0.6090+0.3996j]])
New state:  tensor([[0.0077-0.5429j, 0.8388+0.0408j]])
----------Measure----------
Probability:  tensor([[0.2948, 0.7052]])
----------
test input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4784-0.6807j, 0.3233+0.4508j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4784-0.6807j, 0.3233+0.4508j]])
New state:  tensor([[0.1302-0.8055j, 0.5625-0.1335j]])
----------Measure----------
Probability:  tensor([[0.6657, 0.3343]])
----------
test input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.9818+0.j]])
ry_matrix:  tensor([[ 0.8819-0.j, -0.4714-0.j],
        [ 0.4714+0.j,  0.8819-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8819+0.j, 0.4714+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.8819+0.j, 0.4714+0.j]])
New state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6749-0.5581j, 0.3703+0.3098j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6749-0.5581j, 0.3703+0.3098j]])
New state:  tensor([[0.2421-0.6197j, 0.7307-0.1532j]])
----------Measure----------
Probability:  tensor([[0.4426, 0.5574]])
----------
test input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5687-0.6370j, 0.3479+0.3870j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5687-0.6370j, 0.3479+0.3870j]])
New state:  tensor([[0.1796-0.7300j, 0.6420-0.1504j]])
----------Measure----------
Probability:  tensor([[0.5652, 0.4348]])
----------
test input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.8331+0.j]])
rz_matrix:  tensor([[0.6086-0.7935j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6086+0.7935j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4618-0.6057j, 0.3965+0.5126j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4618-0.6057j, 0.3965+0.5126j]])
New state:  tensor([[0.0682-0.7926j, 0.6048-0.0371j]])
----------Measure----------
Probability:  tensor([[0.6329, 0.3671]])
----------
test input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.5903]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.5903+0.j]])
ry_matrix:  tensor([[ 0.2722-0.j, -0.9623-0.j],
        [ 0.9623+0.j,  0.2722-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.2722+0.j, 0.9623+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.2722+0.j, 0.9623+0.j]])
New state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.2214-0.1375j, 0.8091+0.5267j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2214-0.1375j, 0.8091+0.5267j]])
New state:  tensor([[-0.3889-0.4594j,  0.7433+0.2921j]])
----------Measure----------
Probability:  tensor([[0.3623, 0.6377]])
----------
test input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.8897+0.j]])
rz_matrix:  tensor([[0.9027-0.4303j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9027+0.4303j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6460-0.3016j, 0.6304+0.3071j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6460-0.3016j, 0.6304+0.3071j]])
New state:  tensor([[0.0438-0.4300j, 0.9015+0.0195j]])
----------Measure----------
Probability:  tensor([[0.1868, 0.8132]])
----------
test input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.8331+0.j]])
ry_matrix:  tensor([[ 0.6086-0.j, -0.7935-0.j],
        [ 0.7935+0.j,  0.6086-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6086+0.j, 0.7935+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.0685+0.j]])
rz_matrix:  tensor([[0.8607-0.5092j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8607+0.5092j]])
Performing matrix multiplication

Current state:  tensor([[0.6086+0.j, 0.7935+0.j]])
New state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.5184-0.3009j, 0.6869+0.4109j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5184-0.3009j, 0.6869+0.4109j]])
New state:  tensor([[-0.0882-0.5001j,  0.8561+0.0960j]])
----------Measure----------
Probability:  tensor([[0.2579, 0.7421]])
----------
test input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3928-0.5610j, 0.4232+0.5932j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3928-0.5610j, 0.4232+0.5932j]])
New state:  tensor([[-4.9791e-04-0.8148j,  5.7740e-01+0.0523j]])
----------Measure----------
Probability:  tensor([[0.6639, 0.3361]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7128-0.5448j, 0.3487+0.2713j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7128-0.5448j, 0.3487+0.2713j]])
New state:  tensor([[0.2845-0.5837j, 0.7407-0.1723j]])
----------Measure----------
Probability:  tensor([[0.4217, 0.5783]])
----------
test input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.2310]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.2310+0.j]])
rz_matrix:  tensor([[0.8165-0.5774j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8165+0.5774j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5610-0.3928j, 0.5932+0.4232j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5610-0.3928j, 0.5932+0.4232j]])
New state:  tensor([[0.0069-0.5758j, 0.8164+0.0423j]])
----------Measure----------
Probability:  tensor([[0.3316, 0.6684]])
----------
test input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.4619+0.j]])
rz_matrix:  tensor([[0.3333-0.9428j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.3333+0.9428j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2223-0.6510j, 0.2486+0.6819j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2223-0.6510j, 0.2486+0.6819j]])
New state:  tensor([[-0.0065-0.9411j,  0.3335+0.0560j]])
----------Measure----------
Probability:  tensor([[0.8857, 0.1143]])
----------
test input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5539-0.6204j, 0.3711+0.4130j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5539-0.6204j, 0.3711+0.4130j]])
New state:  tensor([[0.1529-0.7356j, 0.6489-0.1200j]])
----------Measure----------
Probability:  tensor([[0.5645, 0.4355]])
----------
test input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.4619+0.j]])
ry_matrix:  tensor([[ 0.3333-0.j, -0.9428-0.j],
        [ 0.9428+0.j,  0.3333-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.3333+0.j, 0.9428+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.3333+0.j, 0.9428+0.j]])
New state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2569-0.1930j, 0.7507+0.5772j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2569-0.1930j, 0.7507+0.5772j]])
New state:  tensor([[-0.3231-0.5344j,  0.7247+0.2912j]])
----------Measure----------
Probability:  tensor([[0.3900, 0.6100]])
----------
test input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.2519]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.2519+0.j]])
rz_matrix:  tensor([[0.4303-0.9027j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.4303+0.9027j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.3128-0.6690j, 0.2957+0.6060j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3128-0.6690j, 0.2957+0.6060j]])
New state:  tensor([[0.0277-0.9025j, 0.4296-0.0118j]])
----------Measure----------
Probability:  tensor([[0.8153, 0.1847]])
----------
test input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6912-0.5718j, 0.3388+0.2838j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6912-0.5718j, 0.3388+0.2838j]])
New state:  tensor([[0.2754-0.6119j, 0.7188-0.1815j]])
----------Measure----------
Probability:  tensor([[0.4503, 0.5497]])
----------
test input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.7902]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.7902+0.j]])
rz_matrix:  tensor([[0.9230-0.3849j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9230+0.3849j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0263+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0132j],
        [0.0000+0.0132j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6845-0.2788j, 0.6190+0.2656j]])
Inside  ry
ry_matrix theta:  tensor([[1.4983+0.j]])
ry_matrix:  tensor([[ 0.7323-0.j, -0.6810-0.j],
        [ 0.6810+0.j,  0.7323-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6845-0.2788j, 0.6190+0.2656j]])
New state:  tensor([[0.0797-0.3850j, 0.9194+0.0047j]])
----------Measure----------
Probability:  tensor([[0.1546, 0.8454]])
valid set accuracy: 0.8620689511299133
valid set loss: 0.4777366518974304
------------------------------Epoch14------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
test input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4785-0.6808j, 0.3232+0.4508j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4785-0.6808j, 0.3232+0.4508j]])
New state:  tensor([[0.1305-0.8055j, 0.5625-0.1331j]])
----------Measure----------
Probability:  tensor([[0.6659, 0.3341]])
----------
test input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5688-0.6370j, 0.3478+0.3870j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5688-0.6370j, 0.3478+0.3870j]])
New state:  tensor([[0.1799-0.7301j, 0.6419-0.1501j]])
----------Measure----------
Probability:  tensor([[0.5654, 0.4346]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7128-0.5448j, 0.3486+0.2713j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7128-0.5448j, 0.3486+0.2713j]])
New state:  tensor([[0.2849-0.5838j, 0.7406-0.1721j]])
----------Measure----------
Probability:  tensor([[0.4220, 0.5780]])
----------
test input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.8331+0.j]])
rz_matrix:  tensor([[0.6086-0.7935j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6086+0.7935j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4618-0.6057j, 0.3964+0.5126j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4618-0.6057j, 0.3964+0.5126j]])
New state:  tensor([[0.0685-0.7926j, 0.6047-0.0368j]])
----------Measure----------
Probability:  tensor([[0.6329, 0.3671]])
----------
test input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5924-0.6151j, 0.3614+0.3744j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5924-0.6151j, 0.3614+0.3744j]])
New state:  tensor([[0.1880-0.7055j, 0.6679-0.1443j]])
----------Measure----------
Probability:  tensor([[0.5330, 0.4670]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7128-0.5448j, 0.3486+0.2713j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7128-0.5448j, 0.3486+0.2713j]])
New state:  tensor([[0.2849-0.5838j, 0.7406-0.1721j]])
----------Measure----------
Probability:  tensor([[0.4220, 0.5780]])
----------
test input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.6797+0.j]])
rz_matrix:  tensor([[0.9428-0.3333j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9428+0.3333j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6998-0.2402j, 0.6317+0.2314j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6998-0.2402j, 0.6317+0.2314j]])
New state:  tensor([[0.0827-0.3335j, 0.9391+0.0060j]])
----------Measure----------
Probability:  tensor([[0.1180, 0.8820]])
----------
test input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6912-0.5718j, 0.3388+0.2838j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6912-0.5718j, 0.3388+0.2838j]])
New state:  tensor([[0.2758-0.6120j, 0.7187-0.1813j]])
----------Measure----------
Probability:  tensor([[0.4506, 0.5494]])
----------
test input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3929-0.5611j, 0.4231+0.5931j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3929-0.5611j, 0.4231+0.5931j]])
New state:  tensor([[-1.7294e-04-0.8148j,  5.7740e-01+0.0527j]])
----------Measure----------
Probability:  tensor([[0.6638, 0.3362]])
----------
test input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.6797+0.j]])
ry_matrix:  tensor([[ 0.9428-0.j, -0.3333-0.j],
        [ 0.3333+0.j,  0.9428-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9428+0.j, 0.3333+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.9428+0.j, 0.3333+0.j]])
New state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5984-0.7229j, 0.2223+0.2645j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5984-0.7229j, 0.2223+0.2645j]])
New state:  tensor([[0.2871-0.7096j, 0.5701-0.2983j]])
----------Measure----------
Probability:  tensor([[0.5860, 0.4140]])
----------
test input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.3873]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.3873+0.j]])
ry_matrix:  tensor([[ 0.9813-0.j, -0.1925-0.j],
        [ 0.1925+0.j,  0.9813-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9813+0.j, 0.1925+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.9813+0.j, 0.1925+0.j]])
New state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7297-0.6523j, 0.1520+0.1379j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7297-0.6523j, 0.1520+0.1379j]])
New state:  tensor([[0.4311-0.5717j, 0.6080-0.3430j]])
----------Measure----------
Probability:  tensor([[0.5127, 0.4873]])
----------
test input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.4619+0.j]])
rz_matrix:  tensor([[0.3333-0.9428j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.3333+0.9428j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2224-0.6510j, 0.2486+0.6819j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2224-0.6510j, 0.2486+0.6819j]])
New state:  tensor([[-0.0063-0.9410j,  0.3335+0.0564j]])
----------Measure----------
Probability:  tensor([[0.8856, 0.1144]])
----------
test input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.9106+0.j]])
ry_matrix:  tensor([[ 0.5774-0.j, -0.8165-0.j],
        [ 0.8165+0.j,  0.5774-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.5774+0.j, 0.8165+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.5774+0.j, 0.8165+0.j]])
New state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4785-0.3053j, 0.6890+0.4508j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4785-0.3053j, 0.6890+0.4508j]])
New state:  tensor([[-0.1184-0.5304j,  0.8304+0.1224j]])
----------Measure----------
Probability:  tensor([[0.2954, 0.7046]])
----------
test input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.4619+0.j]])
ry_matrix:  tensor([[ 0.3333-0.j, -0.9428-0.j],
        [ 0.9428+0.j,  0.3333-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.3333+0.j, 0.9428+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.3333+0.j, 0.9428+0.j]])
New state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2570-0.1930j, 0.7507+0.5772j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2570-0.1930j, 0.7507+0.5772j]])
New state:  tensor([[-0.3227-0.5343j,  0.7249+0.2915j]])
----------Measure----------
Probability:  tensor([[0.3896, 0.6104]])
----------
test input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.8331+0.j]])
ry_matrix:  tensor([[ 0.6086-0.j, -0.7935-0.j],
        [ 0.7935+0.j,  0.6086-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6086+0.j, 0.7935+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.0685+0.j]])
rz_matrix:  tensor([[0.8607-0.5092j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8607+0.5092j]])
Performing matrix multiplication

Current state:  tensor([[0.6086+0.j, 0.7935+0.j]])
New state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.5184-0.3009j, 0.6869+0.4109j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5184-0.3009j, 0.6869+0.4109j]])
New state:  tensor([[-0.0877-0.5001j,  0.8561+0.0962j]])
----------Measure----------
Probability:  tensor([[0.2578, 0.7422]])
----------
test input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5769-0.3698j, 0.6090+0.3996j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5769-0.3698j, 0.6090+0.3996j]])
New state:  tensor([[0.0082-0.5428j, 0.8388+0.0410j]])
----------Measure----------
Probability:  tensor([[0.2947, 0.7053]])
----------
test input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5658-0.4310j, 0.5563+0.4297j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5658-0.4310j, 0.5563+0.4297j]])
New state:  tensor([[0.0359-0.6082j, 0.7927+0.0215j]])
----------Measure----------
Probability:  tensor([[0.3712, 0.6288]])
----------
test input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5769-0.5991j, 0.3856+0.3996j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5769-0.5991j, 0.3856+0.3996j]])
New state:  tensor([[0.1602-0.7108j, 0.6751-0.1150j]])
----------Measure----------
Probability:  tensor([[0.5309, 0.4691]])
----------
test input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.9818+0.j]])
rz_matrix:  tensor([[0.8819-0.4714j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8819+0.4714j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6532-0.3436j, 0.5925+0.3229j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6532-0.3436j, 0.5925+0.3229j]])
New state:  tensor([[0.0752-0.4715j, 0.8786+0.0026j]])
----------Measure----------
Probability:  tensor([[0.2280, 0.7720]])
----------
test input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.7571+0.j]])
ry_matrix:  tensor([[ 0.6383-0.j, -0.7698-0.j],
        [ 0.7698+0.j,  0.6383-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6383+0.j, 0.7698+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.6383+0.j, 0.7698+0.j]])
New state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4690-0.4180j, 0.5793+0.5194j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4690-0.4180j, 0.5793+0.5194j]])
New state:  tensor([[-0.0507-0.6597j,  0.7436+0.0960j]])
----------Measure----------
Probability:  tensor([[0.4378, 0.5622]])
----------
test input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.2519]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.2519+0.j]])
rz_matrix:  tensor([[0.4303-0.9027j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.4303+0.9027j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.3128-0.6690j, 0.2957+0.6059j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3128-0.6690j, 0.2957+0.6059j]])
New state:  tensor([[0.0279-0.9025j, 0.4295-0.0114j]])
----------Measure----------
Probability:  tensor([[0.8154, 0.1846]])
----------
test input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5442-0.6582j, 0.3336+0.3991j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5442-0.6582j, 0.3336+0.3991j]])
New state:  tensor([[0.1716-0.7539j, 0.6148-0.1556j]])
----------Measure----------
Probability:  tensor([[0.5978, 0.4022]])
----------
test input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.9818+0.j]])
ry_matrix:  tensor([[ 0.8819-0.j, -0.4714-0.j],
        [ 0.4714+0.j,  0.8819-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8819+0.j, 0.4714+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.8819+0.j, 0.4714+0.j]])
New state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6749-0.5581j, 0.3702+0.3098j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6749-0.5581j, 0.3702+0.3098j]])
New state:  tensor([[0.2424-0.6197j, 0.7306-0.1529j]])
----------Measure----------
Probability:  tensor([[0.4428, 0.5572]])
----------
test input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.8897+0.j]])
rz_matrix:  tensor([[0.9027-0.4303j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9027+0.4303j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6460-0.3016j, 0.6304+0.3071j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6460-0.3016j, 0.6304+0.3071j]])
New state:  tensor([[0.0442-0.4300j, 0.9015+0.0197j]])
----------Measure----------
Probability:  tensor([[0.1869, 0.8131]])
----------
test input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.7902]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.7902+0.j]])
rz_matrix:  tensor([[0.9230-0.3849j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9230+0.3849j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6845-0.2788j, 0.6190+0.2656j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6845-0.2788j, 0.6190+0.2656j]])
New state:  tensor([[0.0801-0.3850j, 0.9194+0.0048j]])
----------Measure----------
Probability:  tensor([[0.1547, 0.8453]])
----------
test input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.5903]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.5903+0.j]])
ry_matrix:  tensor([[ 0.2722-0.j, -0.9623-0.j],
        [ 0.9623+0.j,  0.2722-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.2722+0.j, 0.9623+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.2722+0.j, 0.9623+0.j]])
New state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.2214-0.1376j, 0.8091+0.5267j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2214-0.1376j, 0.8091+0.5267j]])
New state:  tensor([[-0.3885-0.4593j,  0.7435+0.2923j]])
----------Measure----------
Probability:  tensor([[0.3619, 0.6381]])
----------
test input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5539-0.6205j, 0.3710+0.4130j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5539-0.6205j, 0.3710+0.4130j]])
New state:  tensor([[0.1532-0.7357j, 0.6488-0.1197j]])
----------Measure----------
Probability:  tensor([[0.5647, 0.4353]])
----------
test input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.2310]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.2310+0.j]])
rz_matrix:  tensor([[0.8165-0.5774j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8165+0.5774j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5611-0.3929j, 0.5931+0.4231j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5611-0.3929j, 0.5931+0.4231j]])
New state:  tensor([[0.0073-0.5758j, 0.8164+0.0426j]])
----------Measure----------
Probability:  tensor([[0.3316, 0.6684]])
----------
test input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0262+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5281-0.5485j, 0.4501+0.4666j]])
Inside  ry
ry_matrix theta:  tensor([[1.4973+0.j]])
ry_matrix:  tensor([[ 0.7326-0.j, -0.6807-0.j],
        [ 0.6807+0.j,  0.7326-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5281-0.5485j, 0.4501+0.4666j]])
New state:  tensor([[0.0805-0.7194j, 0.6892-0.0315j]])
----------Measure----------
Probability:  tensor([[0.5240, 0.4760]])
valid set accuracy: 0.8620689511299133
valid set loss: 0.4774649441242218
------------------------------Epoch15------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
test input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.9818+0.j]])
ry_matrix:  tensor([[ 0.8819-0.j, -0.4714-0.j],
        [ 0.4714+0.j,  0.8819-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8819+0.j, 0.4714+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.8819+0.j, 0.4714+0.j]])
New state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6749-0.5581j, 0.3702+0.3097j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6749-0.5581j, 0.3702+0.3097j]])
New state:  tensor([[0.2425-0.6197j, 0.7306-0.1529j]])
----------Measure----------
Probability:  tensor([[0.4429, 0.5571]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7128-0.5448j, 0.3486+0.2712j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7128-0.5448j, 0.3486+0.2712j]])
New state:  tensor([[0.2850-0.5838j, 0.7405-0.1721j]])
----------Measure----------
Probability:  tensor([[0.4220, 0.5780]])
----------
test input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.8331+0.j]])
rz_matrix:  tensor([[0.6086-0.7935j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6086+0.7935j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4618-0.6057j, 0.3964+0.5126j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4618-0.6057j, 0.3964+0.5126j]])
New state:  tensor([[0.0686-0.7926j, 0.6047-0.0367j]])
----------Measure----------
Probability:  tensor([[0.6329, 0.3671]])
----------
test input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.2310]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.2310+0.j]])
rz_matrix:  tensor([[0.8165-0.5774j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8165+0.5774j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5611-0.3929j, 0.5931+0.4231j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5611-0.3929j, 0.5931+0.4231j]])
New state:  tensor([[0.0074-0.5758j, 0.8164+0.0426j]])
----------Measure----------
Probability:  tensor([[0.3316, 0.6684]])
----------
test input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5658-0.4310j, 0.5563+0.4297j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5658-0.4310j, 0.5563+0.4297j]])
New state:  tensor([[0.0360-0.6082j, 0.7926+0.0215j]])
----------Measure----------
Probability:  tensor([[0.3712, 0.6288]])
----------
test input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.7902]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.7902+0.j]])
rz_matrix:  tensor([[0.9230-0.3849j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9230+0.3849j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6845-0.2788j, 0.6190+0.2656j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6845-0.2788j, 0.6190+0.2656j]])
New state:  tensor([[0.0803-0.3850j, 0.9194+0.0048j]])
----------Measure----------
Probability:  tensor([[0.1547, 0.8453]])
----------
test input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7128-0.5448j, 0.3486+0.2712j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7128-0.5448j, 0.3486+0.2712j]])
New state:  tensor([[0.2850-0.5838j, 0.7405-0.1721j]])
----------Measure----------
Probability:  tensor([[0.4220, 0.5780]])
----------
test input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.9106+0.j]])
ry_matrix:  tensor([[ 0.5774-0.j, -0.8165-0.j],
        [ 0.8165+0.j,  0.5774-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.5774+0.j, 0.8165+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.5774+0.j, 0.8165+0.j]])
New state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4785-0.3053j, 0.6890+0.4507j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4785-0.3053j, 0.6890+0.4507j]])
New state:  tensor([[-0.1183-0.5304j,  0.8304+0.1225j]])
----------Measure----------
Probability:  tensor([[0.2954, 0.7046]])
----------
test input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.8331]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.8331+0.j]])
ry_matrix:  tensor([[ 0.6086-0.j, -0.7935-0.j],
        [ 0.7935+0.j,  0.6086-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6086+0.j, 0.7935+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.0685+0.j]])
rz_matrix:  tensor([[0.8607-0.5092j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8607+0.5092j]])
Performing matrix multiplication

Current state:  tensor([[0.6086+0.j, 0.7935+0.j]])
New state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.5185-0.3009j, 0.6869+0.4108j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5185-0.3009j, 0.6869+0.4108j]])
New state:  tensor([[-0.0876-0.5001j,  0.8561+0.0962j]])
----------Measure----------
Probability:  tensor([[0.2578, 0.7422]])
----------
test input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4785-0.6808j, 0.3232+0.4507j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4785-0.6808j, 0.3232+0.4507j]])
New state:  tensor([[0.1306-0.8055j, 0.5624-0.1330j]])
----------Measure----------
Probability:  tensor([[0.6660, 0.3340]])
----------
test input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5442-0.6582j, 0.3336+0.3991j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5442-0.6582j, 0.3336+0.3991j]])
New state:  tensor([[0.1717-0.7539j, 0.6148-0.1555j]])
----------Measure----------
Probability:  tensor([[0.5978, 0.4022]])
----------
test input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5539-0.6205j, 0.3710+0.4130j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5539-0.6205j, 0.3710+0.4130j]])
New state:  tensor([[0.1533-0.7357j, 0.6488-0.1197j]])
----------Measure----------
Probability:  tensor([[0.5647, 0.4353]])
----------
test input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.5903]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.5903+0.j]])
ry_matrix:  tensor([[ 0.2722-0.j, -0.9623-0.j],
        [ 0.9623+0.j,  0.2722-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.2722+0.j, 0.9623+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.2722+0.j, 0.9623+0.j]])
New state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.2214-0.1376j, 0.8091+0.5267j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2214-0.1376j, 0.8091+0.5267j]])
New state:  tensor([[-0.3884-0.4593j,  0.7435+0.2923j]])
----------Measure----------
Probability:  tensor([[0.3618, 0.6382]])
----------
test input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.4619+0.j]])
rz_matrix:  tensor([[0.3333-0.9428j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.3333+0.9428j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2224-0.6510j, 0.2486+0.6819j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2224-0.6510j, 0.2486+0.6819j]])
New state:  tensor([[-0.0062-0.9410j,  0.3335+0.0565j]])
----------Measure----------
Probability:  tensor([[0.8856, 0.1144]])
----------
test input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.9106]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.9106+0.j]])
rz_matrix:  tensor([[0.5774-0.8165j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.5774+0.8165j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3929-0.5611j, 0.4231+0.5931j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3929-0.5611j, 0.4231+0.5931j]])
New state:  tensor([[-7.9632e-05-0.8148j,  5.7740e-01+0.0527j]])
----------Measure----------
Probability:  tensor([[0.6638, 0.3362]])
----------
test input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5924-0.6151j, 0.3614+0.3744j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5924-0.6151j, 0.3614+0.3744j]])
New state:  tensor([[0.1881-0.7055j, 0.6679-0.1443j]])
----------Measure----------
Probability:  tensor([[0.5331, 0.4669]])
----------
test input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.6078+0.j]])
ry_matrix:  tensor([[ 0.6939-0.j, -0.7201-0.j],
        [ 0.7201+0.j,  0.6939-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6939+0.j, 0.7201+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.1512+0.j]])
rz_matrix:  tensor([[0.8389-0.5443j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8389+0.5443j]])
Performing matrix multiplication

Current state:  tensor([[0.6939+0.j, 0.7201+0.j]])
New state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5769-0.3698j, 0.6089+0.3995j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5769-0.3698j, 0.6089+0.3995j]])
New state:  tensor([[0.0083-0.5428j, 0.8388+0.0411j]])
----------Measure----------
Probability:  tensor([[0.2947, 0.7053]])
----------
test input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.6797+0.j]])
ry_matrix:  tensor([[ 0.9428-0.j, -0.3333-0.j],
        [ 0.3333+0.j,  0.9428-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9428+0.j, 0.3333+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.7571+0.j]])
rz_matrix:  tensor([[0.6383-0.7698j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6383+0.7698j]])
Performing matrix multiplication

Current state:  tensor([[0.9428+0.j, 0.3333+0.j]])
New state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5984-0.7229j, 0.2222+0.2644j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5984-0.7229j, 0.2222+0.2644j]])
New state:  tensor([[0.2872-0.7097j, 0.5701-0.2982j]])
----------Measure----------
Probability:  tensor([[0.5861, 0.4139]])
----------
test input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.6797]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.6797+0.j]])
rz_matrix:  tensor([[0.9428-0.3333j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9428+0.3333j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6998-0.2402j, 0.6317+0.2314j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6998-0.2402j, 0.6317+0.2314j]])
New state:  tensor([[0.0828-0.3335j, 0.9391+0.0061j]])
----------Measure----------
Probability:  tensor([[0.1181, 0.8819]])
----------
test input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[2.2519]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[2.2519+0.j]])
rz_matrix:  tensor([[0.4303-0.9027j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.4303+0.9027j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.3129-0.6690j, 0.2957+0.6059j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3129-0.6690j, 0.2957+0.6059j]])
New state:  tensor([[0.0280-0.9025j, 0.4295-0.0113j]])
----------Measure----------
Probability:  tensor([[0.8154, 0.1846]])
----------
test input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.3873]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.3873+0.j]])
ry_matrix:  tensor([[ 0.9813-0.j, -0.1925-0.j],
        [ 0.1925+0.j,  0.9813-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9813+0.j, 0.1925+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.9813+0.j, 0.1925+0.j]])
New state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7297-0.6523j, 0.1520+0.1379j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7297-0.6523j, 0.1520+0.1379j]])
New state:  tensor([[0.4312-0.5717j, 0.6080-0.3429j]])
----------Measure----------
Probability:  tensor([[0.5128, 0.4872]])
----------
test input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.5338]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.5338+0.j]])
ry_matrix:  tensor([[ 0.7201-0.j, -0.6939-0.j],
        [ 0.6939+0.j,  0.7201-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7201+0.j, 0.6939+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.8897+0.j]])
rz_matrix:  tensor([[0.9027-0.4303j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9027+0.4303j]])
Performing matrix multiplication

Current state:  tensor([[0.7201+0.j, 0.6939+0.j]])
New state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6460-0.3017j, 0.6304+0.3071j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6460-0.3017j, 0.6304+0.3071j]])
New state:  tensor([[0.0444-0.4300j, 0.9015+0.0197j]])
----------Measure----------
Probability:  tensor([[0.1869, 0.8131]])
----------
test input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[2.4619]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[2.4619+0.j]])
ry_matrix:  tensor([[ 0.3333-0.j, -0.9428-0.j],
        [ 0.9428+0.j,  0.3333-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.3333+0.j, 0.9428+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3085]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3085+0.j]])
rz_matrix:  tensor([[0.7935-0.6086j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7935+0.6086j]])
Performing matrix multiplication

Current state:  tensor([[0.3333+0.j, 0.9428+0.j]])
New state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2570-0.1931j, 0.7507+0.5772j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2570-0.1931j, 0.7507+0.5772j]])
New state:  tensor([[-0.3226-0.5343j,  0.7249+0.2915j]])
----------Measure----------
Probability:  tensor([[0.3895, 0.6105]])
----------
test input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.0685]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.0685+0.j]])
ry_matrix:  tensor([[ 0.8607-0.j, -0.5092-0.j],
        [ 0.5092+0.j,  0.8607-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8607+0.j, 0.5092+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6821]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6821+0.j]])
rz_matrix:  tensor([[0.6667-0.7454j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6667+0.7454j]])
Performing matrix multiplication

Current state:  tensor([[0.8607+0.j, 0.5092+0.j]])
New state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5688-0.6370j, 0.3478+0.3870j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5688-0.6370j, 0.3478+0.3870j]])
New state:  tensor([[0.1800-0.7301j, 0.6419-0.1500j]])
----------Measure----------
Probability:  tensor([[0.5655, 0.4345]])
----------
test input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.4595+0.j]])
ry_matrix:  tensor([[ 0.7454-0.j, -0.6667-0.j],
        [ 0.6667+0.j,  0.7454-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7454+0.j, 0.6667+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[0.9818]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[0.9818+0.j]])
rz_matrix:  tensor([[0.8819-0.4714j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8819+0.4714j]])
Performing matrix multiplication

Current state:  tensor([[0.7454+0.j, 0.6667+0.j]])
New state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6532-0.3436j, 0.5925+0.3228j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6532-0.3436j, 0.5925+0.3228j]])
New state:  tensor([[0.0754-0.4715j, 0.8786+0.0027j]])
----------Measure----------
Probability:  tensor([[0.2280, 0.7720]])
----------
test input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.3845+0.j]])
ry_matrix:  tensor([[ 0.7698-0.j, -0.6383-0.j],
        [ 0.6383+0.j,  0.7698-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.7698+0.j, 0.6383+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.7698+0.j, 0.6383+0.j]])
New state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5281-0.5485j, 0.4501+0.4666j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5281-0.5485j, 0.4501+0.4666j]])
New state:  tensor([[0.0806-0.7194j, 0.6892-0.0314j]])
----------Measure----------
Probability:  tensor([[0.5240, 0.4760]])
----------
test input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[0.8897]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[0.8897+0.j]])
ry_matrix:  tensor([[ 0.9027-0.j, -0.4303-0.j],
        [ 0.4303+0.j,  0.9027-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.9027+0.j, 0.4303+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.3845]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.3845+0.j]])
rz_matrix:  tensor([[0.7698-0.6383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7698+0.6383j]])
Performing matrix multiplication

Current state:  tensor([[0.9027+0.j, 0.4303+0.j]])
New state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6912-0.5718j, 0.3388+0.2837j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6912-0.5718j, 0.3388+0.2837j]])
New state:  tensor([[0.2759-0.6120j, 0.7186-0.1812j]])
----------Measure----------
Probability:  tensor([[0.4507, 0.5493]])
----------
test input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
test label:  tensor([0])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.1512]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.1512+0.j]])
ry_matrix:  tensor([[ 0.8389-0.j, -0.5443-0.j],
        [ 0.5443+0.j,  0.8389-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.8389+0.j, 0.5443+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.6078]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.6078+0.j]])
rz_matrix:  tensor([[0.6939-0.7201j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6939+0.7201j]])
Performing matrix multiplication

Current state:  tensor([[0.8389+0.j, 0.5443+0.j]])
New state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5769-0.5991j, 0.3856+0.3995j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5769-0.5991j, 0.3856+0.3995j]])
New state:  tensor([[0.1603-0.7108j, 0.6751-0.1150j]])
----------Measure----------
Probability:  tensor([[0.5310, 0.4690]])
----------
test input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
test label:  tensor([1])
----------Encoding----------
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  ry
params:  tensor([[1.7571]], dtype=torch.float64)
Inside  ry
ry_matrix theta:  tensor([[1.7571+0.j]])
ry_matrix:  tensor([[ 0.6383-0.j, -0.7698-0.j],
        [ 0.7698+0.j,  0.6383-0.j]])
Performing matrix multiplication

Current state:  tensor([[1.+0.j, 0.+0.j]])
New state:  tensor([[0.6383+0.j, 0.7698+0.j]])
Encoding operations:  [{'input_idx': [0], 'func': 'ry', 'wires': [0]}, {'input_idx': [1], 'func': 'rz', 'wires': [0]}]
Will perform  rz
params:  tensor([[1.4595]], dtype=torch.float64)
Inside  rz
rz_matrix theta:  tensor([[1.4595+0.j]])
rz_matrix:  tensor([[0.7454-0.6667j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7454+0.6667j]])
Performing matrix multiplication

Current state:  tensor([[0.6383+0.j, 0.7698+0.j]])
New state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
----------Ansatz----------
Inside  rx
rx_matrix theta:  tensor([[-0.0261+0.j]])
rx_matrix:  tensor([[0.9999+0.0000j, 0.0000+0.0131j],
        [0.0000+0.0131j, 0.9999+0.0000j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4690-0.4180j, 0.5793+0.5194j]])
Inside  ry
ry_matrix theta:  tensor([[1.4971+0.j]])
ry_matrix:  tensor([[ 0.7327-0.j, -0.6806-0.j],
        [ 0.6806+0.j,  0.7327-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4690-0.4180j, 0.5793+0.5194j]])
New state:  tensor([[-0.0506-0.6597j,  0.7436+0.0961j]])
----------Measure----------
Probability:  tensor([[0.4378, 0.5622]])
valid set accuracy: 0.8620689511299133
valid set loss: 0.47739309072494507
--------------------Test--------------------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
test set accuracy: 0.8620689511299133
test set loss: 0.4773930609226227
