------------------------------Epoch1------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5741-0.6411j, 0.3388+0.3802j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.5741-0.6411j, 0.3388+0.3802j]])
New state:  tensor([[-0.0817-0.8567j, -0.0496+0.5069j]])
----------Measure----------
Probability:  tensor([[0.7406, 0.2594]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5976-0.6193j, 0.3527+0.3673j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.5976-0.6193j, 0.3527+0.3673j]])
New state:  tensor([[-0.0498-0.8592j, -0.0307+0.5083j]])
----------Measure----------
Probability:  tensor([[0.7407, 0.2593]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5497-0.6621j, 0.3244+0.3927j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.5497-0.6621j, 0.3244+0.3927j]])
New state:  tensor([[-0.1137-0.8530j, -0.0685+0.5047j]])
----------Measure----------
Probability:  tensor([[0.7406, 0.2594]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7316-0.6541j, 0.1426+0.1290j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.7316-0.6541j, 0.1426+0.1290j]])
New state:  tensor([[0.0155-0.9812j, 0.0019+0.1923j]])
----------Measure----------
Probability:  tensor([[0.9630, 0.0370]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.4011-0.5659j, 0.4153+0.5886j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.4011-0.5659j, 0.4153+0.5886j]])
New state:  tensor([[-0.1438-0.6785j, -0.1508+0.7044j]])
----------Measure----------
Probability:  tensor([[0.4811, 0.5189]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5720-0.4378j, 0.5500+0.4228j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.5720-0.4378j, 0.5500+0.4228j]])
New state:  tensor([[0.0662-0.7172j, 0.0623+0.6909j]])
----------Measure----------
Probability:  tensor([[0.5188, 0.4812]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7166-0.5491j, 0.3407+0.2625j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.7166-0.5491j, 0.3407+0.2625j]])
New state:  tensor([[0.0826-0.8990j, 0.0382+0.4284j]])
----------Measure----------
Probability:  tensor([[0.8150, 0.1850]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4847-0.6845j, 0.3137+0.4452j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.4847-0.6845j, 0.3137+0.4452j]])
New state:  tensor([[-0.1743-0.8204j, -0.1144+0.5325j]])
----------Measure----------
Probability:  tensor([[0.7034, 0.2966]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5825-0.6036j, 0.3771+0.3926j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.5825-0.6036j, 0.3771+0.3926j]])
New state:  tensor([[-0.0485-0.8374j, -0.0328+0.5434j]])
----------Measure----------
Probability:  tensor([[0.7037, 0.2963]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.7034-0.2482j, 0.6278+0.2225j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.7034-0.2482j, 0.6278+0.2225j]])
New state:  tensor([[0.2947-0.6852j, 0.2623+0.6122j]])
----------Measure----------
Probability:  tensor([[0.5564, 0.4436]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.2292-0.1476j, 0.8070+0.5239j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.2292-0.1476j, 0.8070+0.5239j]])
New state:  tensor([[0.0470-0.2685j, 0.1623+0.9483j]])
----------Measure----------
Probability:  tensor([[0.0743, 0.9257]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5596-0.6248j, 0.3623+0.4064j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.5596-0.6248j, 0.3623+0.4064j]])
New state:  tensor([[-0.0796-0.8350j, -0.0529+0.5419j]])
----------Measure----------
Probability:  tensor([[0.7036, 0.2964]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6952-0.5759j, 0.3305+0.2753j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.6952-0.5759j, 0.3305+0.2753j]])
New state:  tensor([[0.0484-0.9015j, 0.0219+0.4296j]])
----------Measure----------
Probability:  tensor([[0.8150, 0.1850]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6793-0.5626j, 0.3621+0.3015j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.6793-0.5626j, 0.3621+0.3015j]])
New state:  tensor([[0.0473-0.8807j, 0.0241+0.4706j]])
----------Measure----------
Probability:  tensor([[0.7779, 0.2221]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4764-0.4250j, 0.5733+0.5137j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.4764-0.4250j, 0.5733+0.5137j]])
New state:  tensor([[0.0108-0.6383j, 0.0113+0.7696j]])
----------Measure----------
Probability:  tensor([[0.4075, 0.5925]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7166-0.5491j, 0.3407+0.2625j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.7166-0.5491j, 0.3407+0.2625j]])
New state:  tensor([[0.0826-0.8990j, 0.0382+0.4284j]])
----------Measure----------
Probability:  tensor([[0.8150, 0.1850]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2316-0.6535j, 0.2398+0.6796j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.2316-0.6535j, 0.2398+0.6796j]])
New state:  tensor([[-0.3231-0.6134j, -0.3368+0.6371j]])
----------Measure----------
Probability:  tensor([[0.4806, 0.5194]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5346-0.5538j, 0.4423+0.4602j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.5346-0.5538j, 0.4423+0.4602j]])
New state:  tensor([[-0.0444-0.7685j, -0.0382+0.6372j]])
----------Measure----------
Probability:  tensor([[0.5926, 0.4074]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.6020-0.7255j, 0.2121+0.2574j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.6020-0.7255j, 0.2121+0.2574j]])
New state:  tensor([[-0.1248-0.9344j, -0.0453+0.3304j]])
----------Measure----------
Probability:  tensor([[0.8888, 0.1112]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.3211-0.6722j, 0.2865+0.6025j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.3211-0.6722j, 0.2865+0.6025j]])
New state:  tensor([[-0.2762-0.6918j, -0.2484+0.6192j]])
----------Measure----------
Probability:  tensor([[0.5549, 0.4451]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6507-0.3095j, 0.6256+0.2989j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.6507-0.3095j, 0.6256+0.2989j]])
New state:  tensor([[0.2138-0.6881j, 0.2047+0.6625j]])
----------Measure----------
Probability:  tensor([[0.5192, 0.4808]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5672-0.4002j, 0.5873+0.4162j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.5672-0.4002j, 0.5873+0.4162j]])
New state:  tensor([[0.0906-0.6882j, 0.0925+0.7139j]])
----------Measure----------
Probability:  tensor([[0.4818, 0.5182]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6580-0.3510j, 0.5872+0.3147j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.6580-0.3510j, 0.5872+0.3147j]])
New state:  tensor([[0.1883-0.7216j, 0.1671+0.6449j]])
----------Measure----------
Probability:  tensor([[0.5562, 0.4438]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4689-0.6103j, 0.3879+0.5071j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.4689-0.6103j, 0.3879+0.5071j]])
New state:  tensor([[-0.1304-0.7585j, -0.1096+0.6290j]])
----------Measure----------
Probability:  tensor([[0.5923, 0.4077]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6886-0.2866j, 0.6146+0.2569j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.6886-0.2866j, 0.6146+0.2569j]])
New state:  tensor([[0.2564-0.7004j, 0.2280+0.6259j]])
----------Measure----------
Probability:  tensor([[0.5563, 0.4437]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4851-0.3138j, 0.6844+0.4448j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.4851-0.3138j, 0.6844+0.4448j]])
New state:  tensor([[0.0984-0.5693j, 0.1373+0.8046j]])
----------Measure----------
Probability:  tensor([[0.3338, 0.6662]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5827-0.3773j, 0.6034+0.3924j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.5827-0.3773j, 0.6034+0.3924j]])
New state:  tensor([[0.1180-0.6841j, 0.1209+0.7095j]])
----------Measure----------
Probability:  tensor([[0.4819, 0.5181]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2653-0.2022j, 0.7478+0.5740j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.2653-0.2022j, 0.7478+0.5740j]])
New state:  tensor([[0.0313-0.3321j, 0.0854+0.9388j]])
----------Measure----------
Probability:  tensor([[0.1113, 0.8887]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[-0.0022+0.j]])
ry_matrix:  tensor([[ 1.0000+0.j,  0.0011-0.j],
        [-0.0011+0.j,  1.0000+0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.5245-0.3094j, 0.6824+0.4044j]])
Inside  rz
rz_matrix theta:  tensor([[1.6509+0.j]])
rz_matrix:  tensor([[0.6782-0.7348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6782+0.7348j]])
Performing matrix multiplication

Current state:  tensor([[0.5245-0.3094j, 0.6824+0.4044j]])
New state:  tensor([[0.1284-0.5953j, 0.1656+0.7757j]])
----------Measure----------
Probability:  tensor([[0.3709, 0.6291]])
valid set accuracy: 0.7586206793785095
valid set loss: 0.44417813420295715
------------------------------Epoch2------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.5176-0.3135j, 0.6876+0.4012j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.5176-0.3135j, 0.6876+0.4012j]])
New state:  tensor([[0.1308-0.5909j, 0.1847+0.7744j]])
----------Measure----------
Probability:  tensor([[0.3662, 0.6338]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2578-0.2080j, 0.7505+0.5719j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.2578-0.2080j, 0.7505+0.5719j]])
New state:  tensor([[0.0276-0.3301j, 0.1047+0.9377j]])
----------Measure----------
Probability:  tensor([[0.1097, 0.8903]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.2211-0.1528j, 0.8092+0.5224j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.2211-0.1528j, 0.8092+0.5224j]])
New state:  tensor([[0.0421-0.2654j, 0.1811+0.9460j]])
----------Measure----------
Probability:  tensor([[0.0722, 0.9278]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5766-0.3812j, 0.6093+0.3886j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.5766-0.3812j, 0.6093+0.3886j]])
New state:  tensor([[0.1226-0.6803j, 0.1398+0.7090j]])
----------Measure----------
Probability:  tensor([[0.4778, 0.5222]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6919-0.5786j, 0.3375+0.2695j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.6919-0.5786j, 0.3375+0.2695j]])
New state:  tensor([[0.0594-0.9000j, 0.0382+0.4302j]])
----------Measure----------
Probability:  tensor([[0.8135, 0.1865]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5613-0.4043j, 0.5930+0.4121j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.5613-0.4043j, 0.5930+0.4121j]])
New state:  tensor([[0.0952-0.6851j, 0.1115+0.7135j]])
----------Measure----------
Probability:  tensor([[0.4785, 0.5215]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4782-0.3182j, 0.6893+0.4416j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.4782-0.3182j, 0.6893+0.4416j]])
New state:  tensor([[0.1001-0.5656j, 0.1567+0.8035j]])
----------Measure----------
Probability:  tensor([[0.3299, 0.6701]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6971-0.2504j, 0.6348+0.2200j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.6971-0.2504j, 0.6348+0.2200j]])
New state:  tensor([[0.3003-0.6771j, 0.2794+0.6110j]])
----------Measure----------
Probability:  tensor([[0.5486, 0.4514]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4650-0.6154j, 0.3926+0.5010j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.4650-0.6154j, 0.3926+0.5010j]])
New state:  tensor([[-0.1239-0.7613j, -0.0911+0.6299j]])
----------Measure----------
Probability:  tensor([[0.5949, 0.4051]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6443-0.3125j, 0.6322+0.2958j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.6443-0.3125j, 0.6322+0.2958j]])
New state:  tensor([[0.2190-0.6818j, 0.2227+0.6615j]])
----------Measure----------
Probability:  tensor([[0.5129, 0.4871]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4706-0.4301j, 0.5780+0.5094j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.4706-0.4301j, 0.5780+0.5094j]])
New state:  tensor([[0.0139-0.6374j, 0.0308+0.7698j]])
----------Measure----------
Probability:  tensor([[0.4064, 0.5936]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6824-0.2892j, 0.6215+0.2540j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.6824-0.2892j, 0.6215+0.2540j]])
New state:  tensor([[0.2621-0.6932j, 0.2455+0.6249j]])
----------Measure----------
Probability:  tensor([[0.5493, 0.4507]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5560-0.6289j, 0.3679+0.4001j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.5560-0.6289j, 0.3679+0.4001j]])
New state:  tensor([[-0.0708-0.8364j, -0.0353+0.5424j]])
----------Measure----------
Probability:  tensor([[0.7046, 0.2954]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.3182-0.6782j, 0.2898+0.5957j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.3182-0.6782j, 0.2898+0.5957j]])
New state:  tensor([[-0.2707-0.6985j, -0.2307+0.6210j]])
----------Measure----------
Probability:  tensor([[0.5612, 0.4388]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3969-0.5718j, 0.4193+0.5828j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.3969-0.5718j, 0.4193+0.5828j]])
New state:  tensor([[-0.1394-0.6819j, -0.1319+0.7058j]])
----------Measure----------
Probability:  tensor([[0.4845, 0.5155]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5998-0.7281j, 0.2182+0.2501j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.5998-0.7281j, 0.2182+0.2501j]])
New state:  tensor([[-0.1122-0.9366j, -0.0302+0.3305j]])
----------Measure----------
Probability:  tensor([[0.8899, 0.1101]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5464-0.6660j, 0.3299+0.3860j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.5464-0.6660j, 0.3299+0.3860j]])
New state:  tensor([[-0.1043-0.8552j, -0.0513+0.5052j]])
----------Measure----------
Probability:  tensor([[0.7422, 0.2578]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7132-0.5517j, 0.3479+0.2569j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.7132-0.5517j, 0.3479+0.2569j]])
New state:  tensor([[0.0936-0.8968j, 0.0544+0.4290j]])
----------Measure----------
Probability:  tensor([[0.8130, 0.1870]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6756-0.5656j, 0.3690+0.2958j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.6756-0.5656j, 0.3690+0.2958j]])
New state:  tensor([[0.0576-0.8792j, 0.0409+0.4711j]])
----------Measure----------
Probability:  tensor([[0.7763, 0.2237]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5940-0.6230j, 0.3587+0.3611j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.5940-0.6230j, 0.3587+0.3611j]])
New state:  tensor([[-0.0403-0.8599j, -0.0134+0.5088j]])
----------Measure----------
Probability:  tensor([[0.7410, 0.2590]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5707-0.6449j, 0.3446+0.3737j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.5707-0.6449j, 0.3446+0.3737j]])
New state:  tensor([[-0.0722-0.8581j, -0.0323+0.5073j]])
----------Measure----------
Probability:  tensor([[0.7416, 0.2584]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2291-0.6603j, 0.2421+0.6730j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.2291-0.6603j, 0.2421+0.6730j]])
New state:  tensor([[-0.3193-0.6217j, -0.3195+0.6399j]])
----------Measure----------
Probability:  tensor([[0.4885, 0.5115]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5787-0.6076j, 0.3829+0.3865j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.5787-0.6076j, 0.3829+0.3865j]])
New state:  tensor([[-0.0397-0.8381j, -0.0151+0.5439j]])
----------Measure----------
Probability:  tensor([[0.7040, 0.2960]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4815-0.6889j, 0.3186+0.4383j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.4815-0.6889j, 0.3186+0.4383j]])
New state:  tensor([[-0.1657-0.8240j, -0.0969+0.5331j]])
----------Measure----------
Probability:  tensor([[0.7064, 0.2936]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6520-0.3542j, 0.5938+0.3111j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.6520-0.3542j, 0.5938+0.3111j]])
New state:  tensor([[0.1942-0.7162j, 0.1851+0.6443j]])
----------Measure----------
Probability:  tensor([[0.5506, 0.4494]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5302-0.5584j, 0.4477+0.4546j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.5302-0.5584j, 0.4477+0.4546j]])
New state:  tensor([[-0.0377-0.7691j, -0.0196+0.6377j]])
----------Measure----------
Probability:  tensor([[0.5929, 0.4071]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5664-0.4420j, 0.5557+0.4183j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.5664-0.4420j, 0.5557+0.4183j]])
New state:  tensor([[0.0715-0.7149j, 0.0813+0.6908j]])
----------Measure----------
Probability:  tensor([[0.5162, 0.4838]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7301-0.6553j, 0.1500+0.1224j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.7301-0.6553j, 0.1500+0.1224j]])
New state:  tensor([[0.0303-0.9806j, 0.0151+0.1930j]])
----------Measure----------
Probability:  tensor([[0.9625, 0.0375]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0180+0.j]])
ry_matrix:  tensor([[ 1.0000-0.j, -0.0090-0.j],
        [ 0.0090+0.j,  1.0000-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7132-0.5517j, 0.3479+0.2569j]])
Inside  rz
rz_matrix theta:  tensor([[1.6168+0.j]])
rz_matrix:  tensor([[0.6906-0.7232j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.6906+0.7232j]])
Performing matrix multiplication

Current state:  tensor([[0.7132-0.5517j, 0.3479+0.2569j]])
New state:  tensor([[0.0936-0.8968j, 0.0544+0.4290j]])
----------Measure----------
Probability:  tensor([[0.8130, 0.1870]])
valid set accuracy: 0.7586206793785095
valid set loss: 0.43940335512161255
------------------------------Epoch3------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6770-0.2913j, 0.6273+0.2515j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.6770-0.2913j, 0.6273+0.2515j]])
New state:  tensor([[0.2685-0.6864j, 0.2619+0.6230j]])
----------Measure----------
Probability:  tensor([[0.5433, 0.4567]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5436-0.6693j, 0.3346+0.3803j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.5436-0.6693j, 0.3346+0.3803j]])
New state:  tensor([[-0.0942-0.8571j, -0.0354+0.5053j]])
----------Measure----------
Probability:  tensor([[0.7434, 0.2566]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6890-0.5809j, 0.3434+0.2645j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.6890-0.5809j, 0.3434+0.2645j]])
New state:  tensor([[0.0709-0.8984j, 0.0531+0.4302j]])
----------Measure----------
Probability:  tensor([[0.8121, 0.1879]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6389-0.3151j, 0.6377+0.2931j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.6389-0.3151j, 0.6377+0.2931j]])
New state:  tensor([[0.2248-0.6760j, 0.2396+0.6597j]])
----------Measure----------
Probability:  tensor([[0.5075, 0.4925]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4656-0.4345j, 0.5820+0.5057j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.4656-0.4345j, 0.5820+0.5057j]])
New state:  tensor([[0.0181-0.6366j, 0.0493+0.7694j]])
----------Measure----------
Probability:  tensor([[0.4055, 0.5945]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4787-0.6926j, 0.3227+0.4324j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.4787-0.6926j, 0.3227+0.4324j]])
New state:  tensor([[-0.1564-0.8273j, -0.0808+0.5334j]])
----------Measure----------
Probability:  tensor([[0.7089, 0.2911]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5677-0.6481j, 0.3495+0.3682j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.5677-0.6481j, 0.3495+0.3682j]])
New state:  tensor([[-0.0621-0.8593j, -0.0164+0.5074j]])
----------Measure----------
Probability:  tensor([[0.7423, 0.2577]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.2141-0.1573j, 0.8111+0.5211j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.2141-0.1573j, 0.8111+0.5211j]])
New state:  tensor([[0.0385-0.2629j, 0.1992+0.9432j]])
----------Measure----------
Probability:  tensor([[0.0706, 0.9294]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.3157-0.6833j, 0.2925+0.5899j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.3157-0.6833j, 0.2925+0.5899j]])
New state:  tensor([[-0.2643-0.7047j, -0.2141+0.6226j]])
----------Measure----------
Probability:  tensor([[0.5665, 0.4335]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3933-0.5768j, 0.4227+0.5779j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.3933-0.5768j, 0.4227+0.5779j]])
New state:  tensor([[-0.1340-0.6851j, -0.1141+0.7069j]])
----------Measure----------
Probability:  tensor([[0.4873, 0.5127]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5714-0.3845j, 0.6142+0.3853j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.3845j, 0.6142+0.3853j]])
New state:  tensor([[0.1280-0.6767j, 0.1575+0.7077j]])
----------Measure----------
Probability:  tensor([[0.4743, 0.5257]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2513-0.2129j, 0.7526+0.5701j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.2513-0.2129j, 0.7526+0.5701j]])
New state:  tensor([[0.0251-0.3284j, 0.1233+0.9361j]])
----------Measure----------
Probability:  tensor([[0.1085, 0.8915]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6916-0.2523j, 0.6408+0.2178j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.6916-0.2523j, 0.6408+0.2178j]])
New state:  tensor([[0.3065-0.6693j, 0.2953+0.6090j]])
----------Measure----------
Probability:  tensor([[0.5420, 0.4580]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6724-0.5681j, 0.3747+0.2910j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.6724-0.5681j, 0.3747+0.2910j]])
New state:  tensor([[0.0684-0.8776j, 0.0563+0.4711j]])
----------Measure----------
Probability:  tensor([[0.7749, 0.2251]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7102-0.5539j, 0.3540+0.2522j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.7102-0.5539j, 0.3540+0.2522j]])
New state:  tensor([[0.1050-0.8945j, 0.0693+0.4291j]])
----------Measure----------
Probability:  tensor([[0.8111, 0.1889]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5528-0.6323j, 0.3726+0.3947j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.5528-0.6323j, 0.3726+0.3947j]])
New state:  tensor([[-0.0614-0.8376j, -0.0189+0.5425j]])
----------Measure----------
Probability:  tensor([[0.7054, 0.2946]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2270-0.6660j, 0.2440+0.6673j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.2270-0.6660j, 0.2440+0.6673j]])
New state:  tensor([[-0.3143-0.6296j, -0.3033+0.6426j]])
----------Measure----------
Probability:  tensor([[0.4951, 0.5049]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5754-0.6108j, 0.3879+0.3813j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.5754-0.6108j, 0.3879+0.3813j]])
New state:  tensor([[-0.0303-0.8386j,  0.0013+0.5439j]])
----------Measure----------
Probability:  tensor([[0.7042, 0.2958]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7288-0.6564j, 0.1563+0.1168j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.7288-0.6564j, 0.1563+0.1168j]])
New state:  tensor([[0.0452-0.9797j, 0.0267+0.1932j]])
----------Measure----------
Probability:  tensor([[0.9619, 0.0381]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7102-0.5539j, 0.3540+0.2522j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.7102-0.5539j, 0.3540+0.2522j]])
New state:  tensor([[0.1050-0.8945j, 0.0693+0.4291j]])
----------Measure----------
Probability:  tensor([[0.8111, 0.1889]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5263-0.5623j, 0.4522+0.4498j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.5263-0.5623j, 0.4522+0.4498j]])
New state:  tensor([[-0.0302-0.7696j, -0.0022+0.6378j]])
----------Measure----------
Probability:  tensor([[0.5932, 0.4068]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4616-0.6196j, 0.3966+0.4957j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.4616-0.6196j, 0.3966+0.4957j]])
New state:  tensor([[-0.1165-0.7638j, -0.0739+0.6305j]])
----------Measure----------
Probability:  tensor([[0.5970, 0.4030]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4722-0.3220j, 0.6933+0.4389j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.4722-0.3220j, 0.6933+0.4389j]])
New state:  tensor([[0.1027-0.5623j, 0.1750+0.8017j]])
----------Measure----------
Probability:  tensor([[0.3267, 0.6733]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5562-0.4079j, 0.5978+0.4086j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.5562-0.4079j, 0.5978+0.4086j]])
New state:  tensor([[0.1007-0.6823j, 0.1294+0.7125j]])
----------Measure----------
Probability:  tensor([[0.4756, 0.5244]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5909-0.6261j, 0.3637+0.3557j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.5909-0.6261j, 0.3637+0.3557j]])
New state:  tensor([[-0.0302-0.8604j,  0.0025+0.5088j]])
----------Measure----------
Probability:  tensor([[0.7412, 0.2588]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5616-0.4456j, 0.5605+0.4145j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.5616-0.4456j, 0.5605+0.4145j]])
New state:  tensor([[0.0777-0.7127j, 0.0990+0.6901j]])
----------Measure----------
Probability:  tensor([[0.5140, 0.4860]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5980-0.7302j, 0.2233+0.2438j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.5980-0.7302j, 0.2233+0.2438j]])
New state:  tensor([[-0.0993-0.9385j, -0.0166+0.3302j]])
----------Measure----------
Probability:  tensor([[0.8907, 0.1093]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.5117-0.3169j, 0.6920+0.3985j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.5117-0.3169j, 0.6920+0.3985j]])
New state:  tensor([[0.1341-0.5868j, 0.2028+0.7724j]])
----------Measure----------
Probability:  tensor([[0.3623, 0.6377]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0351+0.j]])
ry_matrix:  tensor([[ 0.9998-0.j, -0.0175-0.j],
        [ 0.0175+0.j,  0.9998-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6469-0.3568j, 0.5994+0.3081j]])
Inside  rz
rz_matrix theta:  tensor([[1.5831+0.j]])
rz_matrix:  tensor([[0.7027-0.7115j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7027+0.7115j]])
Performing matrix multiplication

Current state:  tensor([[0.6469-0.3568j, 0.5994+0.3081j]])
New state:  tensor([[0.2007-0.7110j, 0.2020+0.6429j]])
----------Measure----------
Probability:  tensor([[0.5458, 0.4542]])
valid set accuracy: 0.7586206793785095
valid set loss: 0.43545013666152954
------------------------------Epoch4------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.5048-0.3208j, 0.6970+0.3954j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.5048-0.3208j, 0.6970+0.3954j]])
New state:  tensor([[0.1362-0.5825j, 0.2214+0.7702j]])
----------Measure----------
Probability:  tensor([[0.3578, 0.6422]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6852-0.2545j, 0.6476+0.2153j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.6852-0.2545j, 0.6476+0.2153j]])
New state:  tensor([[0.3115-0.6612j, 0.3120+0.6069j]])
----------Measure----------
Probability:  tensor([[0.5343, 0.4657]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4598-0.4394j, 0.5866+0.5013j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.4598-0.4394j, 0.5866+0.5013j]])
New state:  tensor([[0.0211-0.6357j, 0.0684+0.7686j]])
----------Measure----------
Probability:  tensor([[0.4046, 0.5954]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5653-0.3883j, 0.6198+0.3815j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.5653-0.3883j, 0.6198+0.3815j]])
New state:  tensor([[0.1322-0.6730j, 0.1759+0.7062j]])
----------Measure----------
Probability:  tensor([[0.4703, 0.5297]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.3128-0.6891j, 0.2956+0.5831j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.3128-0.6891j, 0.2956+0.5831j]])
New state:  tensor([[-0.2586-0.7111j, -0.1968+0.6234j]])
----------Measure----------
Probability:  tensor([[0.5726, 0.4274]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5561-0.4496j, 0.5661+0.4101j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.5561-0.4496j, 0.5661+0.4101j]])
New state:  tensor([[0.0827-0.7103j, 0.1175+0.6891j]])
----------Measure----------
Probability:  tensor([[0.5114, 0.4886]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6708-0.2938j, 0.6339+0.2486j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.6708-0.2938j, 0.6339+0.2486j]])
New state:  tensor([[0.2737-0.6793j, 0.2790+0.6212j]])
----------Measure----------
Probability:  tensor([[0.5363, 0.4637]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5873-0.6296j, 0.3696+0.3495j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.5873-0.6296j, 0.3696+0.3495j]])
New state:  tensor([[-0.0209-0.8607j,  0.0195+0.5083j]])
----------Measure----------
Probability:  tensor([[0.7413, 0.2587]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7066-0.5563j, 0.3610+0.2467j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.7066-0.5563j, 0.3610+0.2467j]])
New state:  tensor([[0.1156-0.8919j, 0.0853+0.4288j]])
----------Measure----------
Probability:  tensor([[0.8088, 0.1912]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2439-0.2185j, 0.7551+0.5680j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.2439-0.2185j, 0.7551+0.5680j]])
New state:  tensor([[0.0214-0.3268j, 0.1421+0.9341j]])
----------Measure----------
Probability:  tensor([[0.1072, 0.8928]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4653-0.3263j, 0.6980+0.4357j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.4653-0.3263j, 0.6980+0.4357j]])
New state:  tensor([[0.1042-0.5588j, 0.1939+0.7996j]])
----------Measure----------
Probability:  tensor([[0.3231, 0.6769]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6326-0.3179j, 0.6439+0.2900j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.6326-0.3179j, 0.6439+0.2900j]])
New state:  tensor([[0.2295-0.6697j, 0.2572+0.6577j]])
----------Measure----------
Probability:  tensor([[0.5012, 0.4988]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5218-0.5667j, 0.4574+0.4442j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.5218-0.5667j, 0.4574+0.4442j]])
New state:  tensor([[-0.0237-0.7700j,  0.0160+0.6374j]])
----------Measure----------
Probability:  tensor([[0.5935, 0.4065]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5491-0.6362j, 0.3781+0.3884j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.5491-0.6362j, 0.3781+0.3884j]])
New state:  tensor([[-0.0528-0.8387j, -0.0016+0.5420j]])
----------Measure----------
Probability:  tensor([[0.7062, 0.2938]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.2061-0.1625j, 0.8132+0.5195j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.2061-0.1625j, 0.8132+0.5195j]])
New state:  tensor([[0.0336-0.2603j, 0.2175+0.9401j]])
----------Measure----------
Probability:  tensor([[0.0689, 0.9311]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7272-0.6575j, 0.1635+0.1103j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.7272-0.6575j, 0.1635+0.1103j]])
New state:  tensor([[0.0596-0.9786j, 0.0396+0.1932j]])
----------Measure----------
Probability:  tensor([[0.9611, 0.0389]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3891-0.5825j, 0.4266+0.5722j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.3891-0.5825j, 0.4266+0.5722j]])
New state:  tensor([[-0.1296-0.6884j, -0.0955+0.7073j]])
----------Measure----------
Probability:  tensor([[0.4906, 0.5094]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6410-0.3599j, 0.6058+0.3045j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.6410-0.3599j, 0.6058+0.3045j]])
New state:  tensor([[0.2062-0.7056j, 0.2197+0.6414j]])
----------Measure----------
Probability:  tensor([[0.5403, 0.4597]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6687-0.5710j, 0.3814+0.2853j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.6687-0.5710j, 0.3814+0.2853j]])
New state:  tensor([[0.0783-0.8758j, 0.0729+0.4707j]])
----------Measure----------
Probability:  tensor([[0.7731, 0.2269]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6855-0.5835j, 0.3502+0.2588j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.6855-0.5835j, 0.3502+0.2588j]])
New state:  tensor([[0.0816-0.8965j, 0.0692+0.4299j]])
----------Measure----------
Probability:  tensor([[0.8104, 0.1896]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4577-0.6245j, 0.4012+0.4895j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.4577-0.6245j, 0.4012+0.4895j]])
New state:  tensor([[-0.1099-0.7664j, -0.0559+0.6304j]])
----------Measure----------
Probability:  tensor([[0.5994, 0.4006]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4755-0.6969j, 0.3274+0.4255j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.4755-0.6969j, 0.3274+0.4255j]])
New state:  tensor([[-0.1478-0.8306j, -0.0637+0.5331j]])
----------Measure----------
Probability:  tensor([[0.7117, 0.2883]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7066-0.5563j, 0.3610+0.2467j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.7066-0.5563j, 0.3610+0.2467j]])
New state:  tensor([[0.1156-0.8919j, 0.0853+0.4288j]])
----------Measure----------
Probability:  tensor([[0.8088, 0.1912]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5957-0.7325j, 0.2292+0.2366j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.5957-0.7325j, 0.2292+0.2366j]])
New state:  tensor([[-0.0869-0.9402j, -0.0018+0.3294j]])
----------Measure----------
Probability:  tensor([[0.8915, 0.1085]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5715-0.6146j, 0.3935+0.3752j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.5715-0.6146j, 0.3935+0.3752j]])
New state:  tensor([[-0.0217-0.8390j,  0.0186+0.5434j]])
----------Measure----------
Probability:  tensor([[0.7043, 0.2957]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5642-0.6517j, 0.3551+0.3618j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.5642-0.6517j, 0.3551+0.3618j]])
New state:  tensor([[-0.0528-0.8604j,  0.0006+0.5069j]])
----------Measure----------
Probability:  tensor([[0.7430, 0.2570]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2246-0.6726j, 0.2463+0.6607j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.2246-0.6726j, 0.2463+0.6607j]])
New state:  tensor([[-0.3101-0.6377j, -0.2863+0.6444j]])
----------Measure----------
Probability:  tensor([[0.5028, 0.4972]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5502-0.4119j, 0.6033+0.4046j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.5502-0.4119j, 0.6033+0.4046j]])
New state:  tensor([[0.1049-0.6792j, 0.1479+0.7112j]])
----------Measure----------
Probability:  tensor([[0.4724, 0.5276]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0549+0.j]])
ry_matrix:  tensor([[ 0.9996-0.j, -0.0274-0.j],
        [ 0.0274+0.j,  0.9996-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5402-0.6730j, 0.3399+0.3736j]])
Inside  rz
rz_matrix theta:  tensor([[1.5498+0.j]])
rz_matrix:  tensor([[0.7145-0.6997j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7145+0.6997j]])
Performing matrix multiplication

Current state:  tensor([[0.5402-0.6730j, 0.3399+0.3736j]])
New state:  tensor([[-0.0849-0.8588j, -0.0185+0.5048j]])
----------Measure----------
Probability:  tensor([[0.7448, 0.2552]])
valid set accuracy: 0.7931034564971924
valid set loss: 0.43101051449775696
------------------------------Epoch5------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.3100-0.6945j, 0.2985+0.5766j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.3100-0.6945j, 0.2985+0.5766j]])
New state:  tensor([[-0.2527-0.7173j, -0.1799+0.6239j]])
----------Measure----------
Probability:  tensor([[0.5784, 0.4216]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2223-0.6787j, 0.2484+0.6544j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.2223-0.6787j, 0.2484+0.6544j]])
New state:  tensor([[-0.3055-0.6456j, -0.2698+0.6458j]])
----------Measure----------
Probability:  tensor([[0.5101, 0.4899]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6651-0.5736j, 0.3876+0.2800j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.6651-0.5736j, 0.3876+0.2800j]])
New state:  tensor([[0.0883-0.8738j, 0.0888+0.4698j]])
----------Measure----------
Probability:  tensor([[0.7714, 0.2286]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3850-0.5878j, 0.4302+0.5667j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.3850-0.5878j, 0.4302+0.5667j]])
New state:  tensor([[-0.1248-0.6915j, -0.0775+0.7073j]])
----------Measure----------
Probability:  tensor([[0.4938, 0.5062]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7032-0.5586j, 0.3676+0.2415j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.7032-0.5586j, 0.3676+0.2415j]])
New state:  tensor([[0.1262-0.8892j, 0.1007+0.4281j]])
----------Measure----------
Probability:  tensor([[0.8066, 0.1934]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6648-0.2961j, 0.6402+0.2459j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.6648-0.2961j, 0.6402+0.2459j]])
New state:  tensor([[0.2789-0.6722j, 0.2956+0.6188j]])
----------Measure----------
Probability:  tensor([[0.5297, 0.4703]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5507-0.4535j, 0.5712+0.4059j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.5507-0.4535j, 0.5712+0.4059j]])
New state:  tensor([[0.0879-0.7080j, 0.1355+0.6875j]])
----------Measure----------
Probability:  tensor([[0.5089, 0.4911]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5370-0.6765j, 0.3450+0.3673j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.5370-0.6765j, 0.3450+0.3673j]])
New state:  tensor([[-0.0755-0.8604j, -0.0022+0.5039j]])
----------Measure----------
Probability:  tensor([[0.7461, 0.2539]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7256-0.6585j, 0.1703+0.1041j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.7256-0.6585j, 0.1703+0.1041j]])
New state:  tensor([[0.0738-0.9771j, 0.0520+0.1927j]])
----------Measure----------
Probability:  tensor([[0.9602, 0.0398]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4539-0.6291j, 0.4054+0.4837j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.4539-0.6291j, 0.4054+0.4837j]])
New state:  tensor([[-0.1032-0.7688j, -0.0384+0.6299j]])
----------Measure----------
Probability:  tensor([[0.6017, 0.3983]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6265-0.3207j, 0.6498+0.2870j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.6265-0.3207j, 0.6498+0.2870j]])
New state:  tensor([[0.2342-0.6637j, 0.2743+0.6553j]])
----------Measure----------
Probability:  tensor([[0.4953, 0.5047]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5609-0.6550j, 0.3603+0.3557j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.5609-0.6550j, 0.3603+0.3557j]])
New state:  tensor([[-0.0434-0.8613j,  0.0169+0.5060j]])
----------Measure----------
Probability:  tensor([[0.7437, 0.2563]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.4983-0.3245j, 0.7017+0.3923j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.4983-0.3245j, 0.7017+0.3923j]])
New state:  tensor([[0.1385-0.5783j, 0.2395+0.7675j]])
----------Measure----------
Probability:  tensor([[0.3536, 0.6464]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5445-0.4156j, 0.6084+0.4007j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.5445-0.4156j, 0.6084+0.4007j]])
New state:  tensor([[0.1094-0.6763j, 0.1660+0.7093j]])
----------Measure----------
Probability:  tensor([[0.4693, 0.5307]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5935-0.7347j, 0.2348+0.2297j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.5935-0.7347j, 0.2348+0.2297j]])
New state:  tensor([[-0.0745-0.9416j,  0.0124+0.3282j]])
----------Measure----------
Probability:  tensor([[0.8921, 0.1079]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6353-0.3627j, 0.6117+0.3011j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.6353-0.3627j, 0.6117+0.3011j]])
New state:  tensor([[0.2117-0.7002j, 0.2369+0.6393j]])
----------Measure----------
Probability:  tensor([[0.5351, 0.4649]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2368-0.2238j, 0.7573+0.5659j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.2368-0.2238j, 0.7573+0.5659j]])
New state:  tensor([[0.0179-0.3253j, 0.1605+0.9317j]])
----------Measure----------
Probability:  tensor([[0.1062, 0.8938]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5678-0.6181j, 0.3989+0.3695j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.5678-0.6181j, 0.3989+0.3695j]])
New state:  tensor([[-0.0130-0.8392j,  0.0354+0.5425j]])
----------Measure----------
Probability:  tensor([[0.7044, 0.2956]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6791-0.2565j, 0.6540+0.2129j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.6791-0.2565j, 0.6540+0.2129j]])
New state:  tensor([[0.3166-0.6533j, 0.3283+0.6044j]])
----------Measure----------
Probability:  tensor([[0.5270, 0.4730]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5595-0.3919j, 0.6251+0.3778j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.5595-0.3919j, 0.6251+0.3778j]])
New state:  tensor([[0.1366-0.6693j, 0.1939+0.7042j]])
----------Measure----------
Probability:  tensor([[0.4666, 0.5334]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5175-0.5709j, 0.4623+0.4389j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.5175-0.5709j, 0.4623+0.4389j]])
New state:  tensor([[-0.0170-0.7703j,  0.0337+0.6365j]])
----------Measure----------
Probability:  tensor([[0.5937, 0.4063]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5455-0.6398j, 0.3832+0.3824j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.5455-0.6398j, 0.3832+0.3824j]])
New state:  tensor([[-0.0440-0.8396j,  0.0151+0.5412j]])
----------Measure----------
Probability:  tensor([[0.7069, 0.2931]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.1985-0.1673j, 0.8151+0.5180j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.1985-0.1673j, 0.8151+0.5180j]])
New state:  tensor([[0.0290-0.2580j, 0.2354+0.9366j]])
----------Measure----------
Probability:  tensor([[0.0674, 0.9326]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6822-0.5859j, 0.3566+0.2533j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.6822-0.5859j, 0.3566+0.2533j]])
New state:  tensor([[0.0923-0.8945j, 0.0847+0.4291j]])
----------Measure----------
Probability:  tensor([[0.8087, 0.1913]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4724-0.7008j, 0.3319+0.4189j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.4724-0.7008j, 0.3319+0.4189j]])
New state:  tensor([[-0.1391-0.8337j, -0.0472+0.5324j]])
----------Measure----------
Probability:  tensor([[0.7143, 0.2857]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4543-0.4441j, 0.5909+0.4972j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.4543-0.4441j, 0.5909+0.4972j]])
New state:  tensor([[0.0243-0.6349j, 0.0870+0.7673j]])
----------Measure----------
Probability:  tensor([[0.4036, 0.5964]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4588-0.3304j, 0.7023+0.4326j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.4588-0.3304j, 0.7023+0.4326j]])
New state:  tensor([[0.1058-0.5554j, 0.2123+0.7970j]])
----------Measure----------
Probability:  tensor([[0.3197, 0.6803]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7032-0.5586j, 0.3676+0.2415j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.7032-0.5586j, 0.3676+0.2415j]])
New state:  tensor([[0.1262-0.8892j, 0.1007+0.4281j]])
----------Measure----------
Probability:  tensor([[0.8066, 0.1934]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0736+0.j]])
ry_matrix:  tensor([[ 0.9993-0.j, -0.0368-0.j],
        [ 0.0368+0.j,  0.9993-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5838-0.6328j, 0.3750+0.3436j]])
Inside  rz
rz_matrix theta:  tensor([[1.5169+0.j]])
rz_matrix:  tensor([[0.7259-0.6878j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7259+0.6878j]])
Performing matrix multiplication

Current state:  tensor([[0.5838-0.6328j, 0.3750+0.3436j]])
New state:  tensor([[-0.0115-0.8609j,  0.0359+0.5074j]])
----------Measure----------
Probability:  tensor([[0.7413, 0.2587]])
valid set accuracy: 0.8275862336158752
valid set loss: 0.4269273281097412
------------------------------Epoch6------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7242-0.6594j, 0.1765+0.0984j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.7242-0.6594j, 0.1765+0.0984j]])
New state:  tensor([[0.0880-0.9754j, 0.0636+0.1919j]])
----------Measure----------
Probability:  tensor([[0.9591, 0.0409]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5540-0.3951j, 0.6299+0.3744j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.5540-0.3951j, 0.6299+0.3744j]])
New state:  tensor([[0.1412-0.6657j, 0.2111+0.7017j]])
----------Measure----------
Probability:  tensor([[0.4631, 0.5369]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5458-0.4570j, 0.5760+0.4019j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.5458-0.4570j, 0.5760+0.4019j]])
New state:  tensor([[0.0934-0.7057j, 0.1528+0.6855j]])
----------Measure----------
Probability:  tensor([[0.5067, 0.4933]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6300-0.3653j, 0.6172+0.2980j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.6300-0.3653j, 0.6172+0.2980j]])
New state:  tensor([[0.2174-0.6950j, 0.2535+0.6368j]])
----------Measure----------
Probability:  tensor([[0.5303, 0.4697]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7000-0.5607j, 0.3737+0.2367j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.7000-0.5607j, 0.3737+0.2367j]])
New state:  tensor([[0.1369-0.8864j, 0.1154+0.4270j]])
----------Measure----------
Probability:  tensor([[0.8044, 0.1956]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5135-0.5746j, 0.4667+0.4340j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.5135-0.5746j, 0.4667+0.4340j]])
New state:  tensor([[-0.0100-0.7706j,  0.0506+0.6353j]])
----------Measure----------
Probability:  tensor([[0.5939, 0.4061]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.1914-0.1718j, 0.8167+0.5165j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.1914-0.1718j, 0.8167+0.5165j]])
New state:  tensor([[0.0249-0.2560j, 0.2528+0.9327j]])
----------Measure----------
Probability:  tensor([[0.0661, 0.9339]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3813-0.5927j, 0.4335+0.5616j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.3813-0.5927j, 0.4335+0.5616j]])
New state:  tensor([[-0.1196-0.6945j, -0.0601+0.7069j]])
----------Measure----------
Probability:  tensor([[0.4967, 0.5033]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4527-0.3341j, 0.7062+0.4297j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.4527-0.3341j, 0.7062+0.4297j]])
New state:  tensor([[0.1078-0.5522j, 0.2300+0.7940j]])
----------Measure----------
Probability:  tensor([[0.3166, 0.6834]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6593-0.2982j, 0.6459+0.2433j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.6593-0.2982j, 0.6459+0.2433j]])
New state:  tensor([[0.2843-0.6654j, 0.3116+0.6159j]])
----------Measure----------
Probability:  tensor([[0.5236, 0.4764]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5422-0.6430j, 0.3879+0.3769j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.5422-0.6430j, 0.3879+0.3769j]])
New state:  tensor([[-0.0351-0.8404j,  0.0311+0.5400j]])
----------Measure----------
Probability:  tensor([[0.7075, 0.2925]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5578-0.6581j, 0.3652+0.3500j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.5578-0.6581j, 0.3652+0.3500j]])
New state:  tensor([[-0.0337-0.8620j,  0.0326+0.5048j]])
----------Measure----------
Probability:  tensor([[0.7442, 0.2558]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6209-0.3231j, 0.6552+0.2842j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.6209-0.3231j, 0.6552+0.2842j]])
New state:  tensor([[0.2392-0.6578j, 0.2908+0.6523j]])
----------Measure----------
Probability:  tensor([[0.4899, 0.5101]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.4922-0.3279j, 0.7060+0.3895j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.4922-0.3279j, 0.7060+0.3895j]])
New state:  tensor([[0.1411-0.5744j, 0.2570+0.7643j]])
----------Measure----------
Probability:  tensor([[0.3498, 0.6502]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5393-0.4191j, 0.6131+0.3971j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.5393-0.4191j, 0.6131+0.3971j]])
New state:  tensor([[0.1142-0.6734j, 0.1834+0.7070j]])
----------Measure----------
Probability:  tensor([[0.4664, 0.5336]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6617-0.5760j, 0.3934+0.2750j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.6617-0.5760j, 0.3934+0.2750j]])
New state:  tensor([[0.0983-0.8718j, 0.1040+0.4685j]])
----------Measure----------
Probability:  tensor([[0.7696, 0.2304]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4695-0.7044j, 0.3359+0.4129j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.4695-0.7044j, 0.3359+0.4129j]])
New state:  tensor([[-0.1301-0.8365j, -0.0315+0.5313j]])
----------Measure----------
Probability:  tensor([[0.7167, 0.2833]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5340-0.6797j, 0.3496+0.3615j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.5340-0.6797j, 0.3496+0.3615j]])
New state:  tensor([[-0.0658-0.8618j,  0.0134+0.5027j]])
----------Measure----------
Probability:  tensor([[0.7471, 0.2529]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5915-0.7367j, 0.2399+0.2234j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.5915-0.7367j, 0.2399+0.2234j]])
New state:  tensor([[-0.0620-0.9427j,  0.0258+0.3268j]])
----------Measure----------
Probability:  tensor([[0.8926, 0.1074]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6791-0.5880j, 0.3625+0.2482j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.6791-0.5880j, 0.3625+0.2482j]])
New state:  tensor([[0.1030-0.8924j, 0.0994+0.4279j]])
----------Measure----------
Probability:  tensor([[0.8070, 0.1930]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2302-0.2287j, 0.7594+0.5640j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.2302-0.2287j, 0.7594+0.5640j]])
New state:  tensor([[0.0151-0.3242j, 0.1784+0.9289j]])
----------Measure----------
Probability:  tensor([[0.1053, 0.8947]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4492-0.4484j, 0.5948+0.4933j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.4492-0.4484j, 0.5948+0.4933j]])
New state:  tensor([[0.0280-0.6341j, 0.1049+0.7656j]])
----------Measure----------
Probability:  tensor([[0.4028, 0.5972]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4504-0.6332j, 0.4093+0.4782j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.4504-0.6332j, 0.4093+0.4782j]])
New state:  tensor([[-0.0961-0.7711j, -0.0215+0.6291j]])
----------Measure----------
Probability:  tensor([[0.6038, 0.3962]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5805-0.6358j, 0.3801+0.3381j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.5805-0.6358j, 0.3801+0.3381j]])
New state:  tensor([[-0.0019-0.8609j,  0.0516+0.5061j]])
----------Measure----------
Probability:  tensor([[0.7412, 0.2588]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2202-0.6844j, 0.2503+0.6485j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.2202-0.6844j, 0.2503+0.6485j]])
New state:  tensor([[-0.3003-0.6532j, -0.2539+0.6471j]])
----------Measure----------
Probability:  tensor([[0.5168, 0.4832]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6734-0.2583j, 0.6598+0.2107j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.6734-0.2583j, 0.6598+0.2107j]])
New state:  tensor([[0.3217-0.6455j, 0.3439+0.6013j]])
----------Measure----------
Probability:  tensor([[0.5202, 0.4798]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5643-0.6212j, 0.4038+0.3641j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.5643-0.6212j, 0.4038+0.3641j]])
New state:  tensor([[-0.0040-0.8393j,  0.0515+0.5413j]])
----------Measure----------
Probability:  tensor([[0.7044, 0.2956]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.7000-0.5607j, 0.3737+0.2367j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.7000-0.5607j, 0.3737+0.2367j]])
New state:  tensor([[0.1369-0.8864j, 0.1154+0.4270j]])
----------Measure----------
Probability:  tensor([[0.8044, 0.1956]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.0909+0.j]])
ry_matrix:  tensor([[ 0.9990-0.j, -0.0454-0.j],
        [ 0.0454+0.j,  0.9990-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.3074-0.6995j, 0.3012+0.5706j]])
Inside  rz
rz_matrix theta:  tensor([[1.4844+0.j]])
rz_matrix:  tensor([[0.7370-0.6759j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7370+0.6759j]])
Performing matrix multiplication

Current state:  tensor([[0.3074-0.6995j, 0.3012+0.5706j]])
New state:  tensor([[-0.2462-0.7233j, -0.1637+0.6241j]])
----------Measure----------
Probability:  tensor([[0.5837, 0.4163]])
valid set accuracy: 0.8275862336158752
valid set loss: 0.4232666790485382
------------------------------Epoch7------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4470-0.6371j, 0.4130+0.4730j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.4470-0.6371j, 0.4130+0.4730j]])
New state:  tensor([[-0.0888-0.7732j, -0.0052+0.6279j]])
----------Measure----------
Probability:  tensor([[0.6057, 0.3943]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4469-0.3376j, 0.7099+0.4270j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.4469-0.3376j, 0.7099+0.4270j]])
New state:  tensor([[0.1100-0.5492j, 0.2473+0.7906j]])
----------Measure----------
Probability:  tensor([[0.3137, 0.6863]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7227-0.6601j, 0.1825+0.0930j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.7227-0.6601j, 0.1825+0.0930j]])
New state:  tensor([[0.1020-0.9735j, 0.0747+0.1907j]])
----------Measure----------
Probability:  tensor([[0.9581, 0.0419]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5410-0.4602j, 0.5804+0.3982j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.5410-0.4602j, 0.5804+0.3982j]])
New state:  tensor([[0.0990-0.7034j, 0.1696+0.6831j]])
----------Measure----------
Probability:  tensor([[0.5045, 0.4955]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5311-0.6826j, 0.3540+0.3559j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.5311-0.6826j, 0.3540+0.3559j]])
New state:  tensor([[-0.0561-0.8631j,  0.0284+0.5011j]])
----------Measure----------
Probability:  tensor([[0.7480, 0.2520]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6540-0.3002j, 0.6513+0.2408j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.6540-0.3002j, 0.6513+0.2408j]])
New state:  tensor([[0.2896-0.6587j, 0.3271+0.6126j]])
----------Measure----------
Probability:  tensor([[0.5178, 0.4822]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5489-0.3982j, 0.6344+0.3711j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.5489-0.3982j, 0.6344+0.3711j]])
New state:  tensor([[0.1460-0.6622j, 0.2279+0.6988j]])
----------Measure----------
Probability:  tensor([[0.4598, 0.5402]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2181-0.6897j, 0.2521+0.6428j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.2181-0.6897j, 0.2521+0.6428j]])
New state:  tensor([[-0.2949-0.6605j, -0.2384+0.6481j]])
----------Measure----------
Probability:  tensor([[0.5232, 0.4768]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6585-0.5782j, 0.3988+0.2703j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.6585-0.5782j, 0.3988+0.2703j]])
New state:  tensor([[0.1084-0.8696j, 0.1187+0.4669j]])
----------Measure----------
Probability:  tensor([[0.7679, 0.2321]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5774-0.6385j, 0.3848+0.3329j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.5774-0.6385j, 0.3848+0.3329j]])
New state:  tensor([[0.0078-0.8608j, 0.0667+0.5044j]])
----------Measure----------
Probability:  tensor([[0.7411, 0.2589]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.1847-0.1760j, 0.8183+0.5151j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.1847-0.1760j, 0.8183+0.5151j]])
New state:  tensor([[0.0212-0.2543j, 0.2698+0.9285j]])
----------Measure----------
Probability:  tensor([[0.0651, 0.9349]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5610-0.6242j, 0.4084+0.3590j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.5610-0.6242j, 0.4084+0.3590j]])
New state:  tensor([[0.0050-0.8392j, 0.0670+0.5396j]])
----------Measure----------
Probability:  tensor([[0.7043, 0.2957]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4443-0.4524j, 0.5985+0.4896j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.4443-0.4524j, 0.5985+0.4896j]])
New state:  tensor([[0.0318-0.6333j, 0.1224+0.7635j]])
----------Measure----------
Probability:  tensor([[0.4021, 0.5979]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5096-0.5782j, 0.4709+0.4292j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.5096-0.5782j, 0.4709+0.4292j]])
New state:  tensor([[-0.0028-0.7707j,  0.0671+0.6336j]])
----------Measure----------
Probability:  tensor([[0.5940, 0.4060]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6761-0.5901j, 0.3681+0.2434j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.6761-0.5901j, 0.3681+0.2434j]])
New state:  tensor([[0.1138-0.8901j, 0.1136+0.4264j]])
----------Measure----------
Probability:  tensor([[0.8053, 0.1947]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6969-0.5626j, 0.3794+0.2321j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.6969-0.5626j, 0.3794+0.2321j]])
New state:  tensor([[0.1476-0.8834j, 0.1296+0.4254j]])
----------Measure----------
Probability:  tensor([[0.8022, 0.1978]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5390-0.6461j, 0.3924+0.3716j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.5390-0.6461j, 0.3924+0.3716j]])
New state:  tensor([[-0.0260-0.8410j,  0.0466+0.5384j]])
----------Measure----------
Probability:  tensor([[0.7080, 0.2920]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5895-0.7385j, 0.2447+0.2173j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.5895-0.7385j, 0.2447+0.2173j]])
New state:  tensor([[-0.0496-0.9436j,  0.0387+0.3250j]])
----------Measure----------
Probability:  tensor([[0.8929, 0.1071]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5342-0.4223j, 0.6175+0.3937j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.4223j, 0.6175+0.3937j]])
New state:  tensor([[0.1190-0.6705j, 0.2003+0.7044j]])
----------Measure----------
Probability:  tensor([[0.4638, 0.5362]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6155-0.3254j, 0.6603+0.2816j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.6155-0.3254j, 0.6603+0.2816j]])
New state:  tensor([[0.2441-0.6520j, 0.3068+0.6490j]])
----------Measure----------
Probability:  tensor([[0.4847, 0.5153]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5547-0.6609j, 0.3697+0.3446j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.5547-0.6609j, 0.3697+0.3446j]])
New state:  tensor([[-0.0240-0.8625j,  0.0477+0.5031j]])
----------Measure----------
Probability:  tensor([[0.7446, 0.2554]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6249-0.3677j, 0.6223+0.2950j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.6249-0.3677j, 0.6223+0.2950j]])
New state:  tensor([[0.2231-0.6899j, 0.2695+0.6338j]])
----------Measure----------
Probability:  tensor([[0.5257, 0.4743]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2240-0.2333j, 0.7612+0.5621j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.2240-0.2333j, 0.7612+0.5621j]])
New state:  tensor([[0.0126-0.3232j, 0.1960+0.9257j]])
----------Measure----------
Probability:  tensor([[0.1046, 0.8954]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4668-0.7078j, 0.3398+0.4071j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.4668-0.7078j, 0.3398+0.4071j]])
New state:  tensor([[-0.1209-0.8392j, -0.0162+0.5300j]])
----------Measure----------
Probability:  tensor([[0.7188, 0.2812]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3777-0.5973j, 0.4366+0.5567j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.3777-0.5973j, 0.4366+0.5567j]])
New state:  tensor([[-0.1141-0.6974j, -0.0432+0.7062j]])
----------Measure----------
Probability:  tensor([[0.4994, 0.5006]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6969-0.5626j, 0.3794+0.2321j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.6969-0.5626j, 0.3794+0.2321j]])
New state:  tensor([[0.1476-0.8834j, 0.1296+0.4254j]])
----------Measure----------
Probability:  tensor([[0.8022, 0.1978]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.3049-0.7041j, 0.3037+0.5648j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.3049-0.7041j, 0.3037+0.5648j]])
New state:  tensor([[-0.2395-0.7289j, -0.1480+0.6240j]])
----------Measure----------
Probability:  tensor([[0.5887, 0.4113]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6680-0.2600j, 0.6653+0.2086j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.6680-0.2600j, 0.6653+0.2086j]])
New state:  tensor([[0.3269-0.6380j, 0.3590+0.5977j]])
----------Measure----------
Probability:  tensor([[0.5139, 0.4861]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1073+0.j]])
ry_matrix:  tensor([[ 0.9986-0.j, -0.0536-0.j],
        [ 0.0536+0.j,  0.9986-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.4864-0.3311j, 0.7100+0.3868j]])
Inside  rz
rz_matrix theta:  tensor([[1.4523+0.j]])
rz_matrix:  tensor([[0.7477-0.6640j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7477+0.6640j]])
Performing matrix multiplication

Current state:  tensor([[0.4864-0.3311j, 0.7100+0.3868j]])
New state:  tensor([[0.1439-0.5705j, 0.2741+0.7607j]])
----------Measure----------
Probability:  tensor([[0.3462, 0.6538]])
valid set accuracy: 0.8275862336158752
valid set loss: 0.4198894500732422
------------------------------Epoch8------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4639-0.7112j, 0.3437+0.4011j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.4639-0.7112j, 0.3437+0.4011j]])
New state:  tensor([[-0.1120-0.8417j, -0.0010+0.5282j]])
----------Measure----------
Probability:  tensor([[0.7210, 0.2790]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6730-0.5921j, 0.3737+0.2384j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.6730-0.5921j, 0.3737+0.2384j]])
New state:  tensor([[0.1242-0.8877j, 0.1279+0.4245j]])
----------Measure----------
Probability:  tensor([[0.8035, 0.1965]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4409-0.3412j, 0.7137+0.4241j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.4409-0.3412j, 0.7137+0.4241j]])
New state:  tensor([[0.1118-0.5462j, 0.2645+0.7869j]])
----------Measure----------
Probability:  tensor([[0.3108, 0.6892]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7211-0.6609j, 0.1885+0.0875j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.7211-0.6609j, 0.1885+0.0875j]])
New state:  tensor([[0.1158-0.9713j, 0.0859+0.1893j]])
----------Measure----------
Probability:  tensor([[0.9568, 0.0432]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5361-0.4636j, 0.5850+0.3943j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.5361-0.4636j, 0.5850+0.3943j]])
New state:  tensor([[0.1042-0.7011j, 0.1864+0.6804j]])
----------Measure----------
Probability:  tensor([[0.5023, 0.4977]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6484-0.3023j, 0.6568+0.2383j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.6484-0.3023j, 0.6568+0.2383j]])
New state:  tensor([[0.2945-0.6520j, 0.3426+0.6089j]])
----------Measure----------
Probability:  tensor([[0.5118, 0.4882]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2176-0.2381j, 0.7631+0.5601j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.2176-0.2381j, 0.7631+0.5601j]])
New state:  tensor([[0.0097-0.3224j, 0.2133+0.9222j]])
----------Measure----------
Probability:  tensor([[0.1040, 0.8960]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5290-0.4256j, 0.6220+0.3901j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.5290-0.4256j, 0.6220+0.3901j]])
New state:  tensor([[0.1235-0.6676j, 0.2172+0.7013j]])
----------Measure----------
Probability:  tensor([[0.4610, 0.5390]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6937-0.5645j, 0.3852+0.2273j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.6937-0.5645j, 0.3852+0.2273j]])
New state:  tensor([[0.1578-0.8803j, 0.1438+0.4235j]])
----------Measure----------
Probability:  tensor([[0.7999, 0.2001]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5575-0.6272j, 0.4131+0.3537j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.5575-0.6272j, 0.4131+0.3537j]])
New state:  tensor([[0.0137-0.8391j, 0.0825+0.5376j]])
----------Measure----------
Probability:  tensor([[0.7042, 0.2958]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5057-0.5818j, 0.4752+0.4244j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.5057-0.5818j, 0.4752+0.4244j]])
New state:  tensor([[0.0040-0.7708j, 0.0836+0.6316j]])
----------Measure----------
Probability:  tensor([[0.5941, 0.4059]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5741-0.6413j, 0.3897+0.3275j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.5741-0.6413j, 0.3897+0.3275j]])
New state:  tensor([[0.0171-0.8606j, 0.0819+0.5024j]])
----------Measure----------
Probability:  tensor([[0.7409, 0.2591]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6099-0.3278j, 0.6655+0.2788j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.6099-0.3278j, 0.6655+0.2788j]])
New state:  tensor([[0.2487-0.6462j, 0.3227+0.6453j]])
----------Measure----------
Probability:  tensor([[0.4794, 0.5206]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6551-0.5805j, 0.4043+0.2654j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.6551-0.5805j, 0.4043+0.2654j]])
New state:  tensor([[0.1181-0.8673j, 0.1335+0.4648j]])
----------Measure----------
Probability:  tensor([[0.7661, 0.2339]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6624-0.2618j, 0.6709+0.2064j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.6624-0.2618j, 0.6709+0.2064j]])
New state:  tensor([[0.3315-0.6304j, 0.3741+0.5940j]])
----------Measure----------
Probability:  tensor([[0.5073, 0.4927]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2160-0.6951j, 0.2539+0.6370j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.2160-0.6951j, 0.2539+0.6370j]])
New state:  tensor([[-0.2895-0.6678j, -0.2229+0.6485j]])
----------Measure----------
Probability:  tensor([[0.5297, 0.4703]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.1778-0.1803j, 0.8198+0.5136j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.1778-0.1803j, 0.8198+0.5136j]])
New state:  tensor([[0.0172-0.2527j, 0.2867+0.9240j]])
----------Measure----------
Probability:  tensor([[0.0641, 0.9359]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5281-0.6856j, 0.3584+0.3501j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.5281-0.6856j, 0.3584+0.3501j]])
New state:  tensor([[-0.0466-0.8642j,  0.0435+0.4992j]])
----------Measure----------
Probability:  tensor([[0.7489, 0.2511]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.4804-0.3343j, 0.7141+0.3840j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.4804-0.3343j, 0.7141+0.3840j]])
New state:  tensor([[0.1462-0.5667j, 0.2910+0.7568j]])
----------Measure----------
Probability:  tensor([[0.3426, 0.6574]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3741-0.6019j, 0.4398+0.5517j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.3741-0.6019j, 0.4398+0.5517j]])
New state:  tensor([[-0.1089-0.7003j, -0.0263+0.7050j]])
----------Measure----------
Probability:  tensor([[0.5022, 0.4978]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4392-0.4565j, 0.6022+0.4858j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.4392-0.4565j, 0.6022+0.4858j]])
New state:  tensor([[0.0353-0.6325j, 0.1398+0.7610j]])
----------Measure----------
Probability:  tensor([[0.4014, 0.5986]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5435-0.4013j, 0.6390+0.3678j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.5435-0.4013j, 0.6390+0.3678j]])
New state:  tensor([[0.1504-0.6586j, 0.2446+0.6955j]])
----------Measure----------
Probability:  tensor([[0.4564, 0.5436]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6937-0.5645j, 0.3852+0.2273j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.6937-0.5645j, 0.3852+0.2273j]])
New state:  tensor([[0.1578-0.8803j, 0.1438+0.4235j]])
----------Measure----------
Probability:  tensor([[0.7999, 0.2001]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4435-0.6411j, 0.4168+0.4676j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.4435-0.6411j, 0.4168+0.4676j]])
New state:  tensor([[-0.0818-0.7752j,  0.0111+0.6263j]])
----------Measure----------
Probability:  tensor([[0.6077, 0.3923]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6196-0.3702j, 0.6276+0.2919j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.6196-0.3702j, 0.6276+0.2919j]])
New state:  tensor([[0.2284-0.6847j, 0.2855+0.6305j]])
----------Measure----------
Probability:  tensor([[0.5210, 0.4790]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5516-0.6638j, 0.3744+0.3390j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.5516-0.6638j, 0.3744+0.3390j]])
New state:  tensor([[-0.0146-0.8630j,  0.0628+0.5011j]])
----------Measure----------
Probability:  tensor([[0.7449, 0.2551]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.3023-0.7088j, 0.3062+0.5589j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.3023-0.7088j, 0.3062+0.5589j]])
New state:  tensor([[-0.2330-0.7346j, -0.1323+0.6234j]])
----------Measure----------
Probability:  tensor([[0.5939, 0.4061]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5874-0.7403j, 0.2497+0.2111j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.5874-0.7403j, 0.2497+0.2111j]])
New state:  tensor([[-0.0374-0.9443j,  0.0516+0.3228j]])
----------Measure----------
Probability:  tensor([[0.8931, 0.1069]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1241+0.j]])
ry_matrix:  tensor([[ 0.9981-0.j, -0.0620-0.j],
        [ 0.0620+0.j,  0.9981-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5357-0.6492j, 0.3969+0.3662j]])
Inside  rz
rz_matrix theta:  tensor([[1.4206+0.j]])
rz_matrix:  tensor([[0.7582-0.6521j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7582+0.6521j]])
Performing matrix multiplication

Current state:  tensor([[0.5357-0.6492j, 0.3969+0.3662j]])
New state:  tensor([[-0.0172-0.8415j,  0.0621+0.5364j]])
----------Measure----------
Probability:  tensor([[0.7084, 0.2916]])
valid set accuracy: 0.8620689511299133
valid set loss: 0.4165152311325073
------------------------------Epoch9------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2116-0.2424j, 0.7648+0.5582j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.2116-0.2424j, 0.7648+0.5582j]])
New state:  tensor([[0.0074-0.3217j, 0.2302+0.9184j]])
----------Measure----------
Probability:  tensor([[0.1036, 0.8964]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6519-0.5826j, 0.4094+0.2608j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.6519-0.5826j, 0.4094+0.2608j]])
New state:  tensor([[0.1279-0.8649j, 0.1476+0.4625j]])
----------Measure----------
Probability:  tensor([[0.7643, 0.2357]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4612-0.7143j, 0.3473+0.3955j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.4612-0.7143j, 0.3473+0.3955j]])
New state:  tensor([[-0.1030-0.8440j,  0.0137+0.5262j]])
----------Measure----------
Probability:  tensor([[0.7229, 0.2771]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.1714-0.1844j, 0.8212+0.5122j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.1714-0.1844j, 0.8212+0.5122j]])
New state:  tensor([[0.0136-0.2513j, 0.3030+0.9191j]])
----------Measure----------
Probability:  tensor([[0.0634, 0.9366]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6700-0.5939j, 0.3790+0.2338j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.6700-0.5939j, 0.3790+0.2338j]])
New state:  tensor([[0.1346-0.8852j, 0.1415+0.4222j]])
----------Measure----------
Probability:  tensor([[0.8017, 0.1983]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4353-0.3446j, 0.7171+0.4214j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.4353-0.3446j, 0.7171+0.4214j]])
New state:  tensor([[0.1139-0.5434j, 0.2812+0.7828j]])
----------Measure----------
Probability:  tensor([[0.3082, 0.6918]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.4748-0.3373j, 0.7179+0.3814j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.4748-0.3373j, 0.7179+0.3814j]])
New state:  tensor([[0.1488-0.5631j, 0.3074+0.7525j]])
----------Measure----------
Probability:  tensor([[0.3392, 0.6608]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5315-0.4667j, 0.5892+0.3906j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.5315-0.4667j, 0.5892+0.3906j]])
New state:  tensor([[0.1096-0.6988j, 0.2026+0.6773j]])
----------Measure----------
Probability:  tensor([[0.5003, 0.4997]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2140-0.7000j, 0.2556+0.6315j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.2140-0.7000j, 0.2556+0.6315j]])
New state:  tensor([[-0.2837-0.6748j, -0.2079+0.6488j]])
----------Measure----------
Probability:  tensor([[0.5358, 0.4642]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6147-0.3725j, 0.6324+0.2890j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.6147-0.3725j, 0.6324+0.2890j]])
New state:  tensor([[0.2338-0.6796j, 0.3009+0.6268j]])
----------Measure----------
Probability:  tensor([[0.5165, 0.4835]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7196-0.6616j, 0.1942+0.0823j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.7196-0.6616j, 0.1942+0.0823j]])
New state:  tensor([[0.1294-0.9689j, 0.0965+0.1875j]])
----------Measure----------
Probability:  tensor([[0.9555, 0.0445]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5241-0.4287j, 0.6261+0.3867j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.5241-0.4287j, 0.6261+0.3867j]])
New state:  tensor([[0.1282-0.6648j, 0.2334+0.6979j]])
----------Measure----------
Probability:  tensor([[0.4584, 0.5416]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6907-0.5663j, 0.3907+0.2229j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.6907-0.5663j, 0.3907+0.2229j]])
New state:  tensor([[0.1681-0.8772j, 0.1575+0.4213j]])
----------Measure----------
Probability:  tensor([[0.7977, 0.2023]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3706-0.6062j, 0.4427+0.5469j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.3706-0.6062j, 0.4427+0.5469j]])
New state:  tensor([[-0.1034-0.7030j, -0.0100+0.7036j]])
----------Measure----------
Probability:  tensor([[0.5049, 0.4951]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.6047-0.3300j, 0.6702+0.2762j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.6047-0.3300j, 0.6702+0.2762j]])
New state:  tensor([[0.2533-0.6406j, 0.3381+0.6413j]])
----------Measure----------
Probability:  tensor([[0.4745, 0.5255]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6571-0.2634j, 0.6761+0.2043j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.6571-0.2634j, 0.6761+0.2043j]])
New state:  tensor([[0.3362-0.6230j, 0.3886+0.5898j]])
----------Measure----------
Probability:  tensor([[0.5011, 0.4989]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5487-0.6664j, 0.3787+0.3338j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.5487-0.6664j, 0.3787+0.3338j]])
New state:  tensor([[-0.0051-0.8632j,  0.0773+0.4988j]])
----------Measure----------
Probability:  tensor([[0.7452, 0.2548]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5711-0.6438j, 0.3942+0.3225j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.5711-0.6438j, 0.3942+0.3225j]])
New state:  tensor([[0.0266-0.8602j, 0.0964+0.5001j]])
----------Measure----------
Probability:  tensor([[0.7407, 0.2593]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4402-0.6447j, 0.4202+0.4626j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.4402-0.6447j, 0.4202+0.4626j]])
New state:  tensor([[-0.0745-0.7771j,  0.0267+0.6244j]])
----------Measure----------
Probability:  tensor([[0.6094, 0.3906]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4345-0.4603j, 0.6056+0.4822j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.4345-0.4603j, 0.6056+0.4822j]])
New state:  tensor([[0.0391-0.6318j, 0.1566+0.7581j]])
----------Measure----------
Probability:  tensor([[0.4007, 0.5993]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5253-0.6883j, 0.3626+0.3447j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.5253-0.6883j, 0.3626+0.3447j]])
New state:  tensor([[-0.0370-0.8651j,  0.0579+0.4969j]])
----------Measure----------
Probability:  tensor([[0.7497, 0.2503]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6907-0.5663j, 0.3907+0.2229j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.6907-0.5663j, 0.3907+0.2229j]])
New state:  tensor([[0.1681-0.8772j, 0.1575+0.4213j]])
----------Measure----------
Probability:  tensor([[0.7977, 0.2023]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5325-0.6521j, 0.4011+0.3610j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.5325-0.6521j, 0.4011+0.3610j]])
New state:  tensor([[-0.0083-0.8419j,  0.0770+0.5341j]])
----------Measure----------
Probability:  tensor([[0.7088, 0.2912]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5543-0.6300j, 0.4174+0.3488j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.5543-0.6300j, 0.4174+0.3488j]])
New state:  tensor([[0.0226-0.8388j, 0.0974+0.5352j]])
----------Measure----------
Probability:  tensor([[0.7041, 0.2959]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6433-0.3041j, 0.6619+0.2359j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.6433-0.3041j, 0.6619+0.2359j]])
New state:  tensor([[0.2995-0.6454j, 0.3575+0.6049j]])
----------Measure----------
Probability:  tensor([[0.5063, 0.4937]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2999-0.7132j, 0.3086+0.5533j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.2999-0.7132j, 0.3086+0.5533j]])
New state:  tensor([[-0.2261-0.7399j, -0.1171+0.6226j]])
----------Measure----------
Probability:  tensor([[0.5986, 0.4014]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5385-0.4042j, 0.6432+0.3646j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.5385-0.4042j, 0.6432+0.3646j]])
New state:  tensor([[0.1550-0.6552j, 0.2608+0.6919j]])
----------Measure----------
Probability:  tensor([[0.4533, 0.5467]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5854-0.7419j, 0.2543+0.2053j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.5854-0.7419j, 0.2543+0.2053j]])
New state:  tensor([[-0.0252-0.9448j,  0.0640+0.3205j]])
----------Measure----------
Probability:  tensor([[0.8932, 0.1068]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1398+0.j]])
ry_matrix:  tensor([[ 0.9976-0.j, -0.0699-0.j],
        [ 0.0699+0.j,  0.9976-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.5019-0.5851j, 0.4791+0.4198j]])
Inside  rz
rz_matrix theta:  tensor([[1.3894+0.j]])
rz_matrix:  tensor([[0.7683-0.6401j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7683+0.6401j]])
Performing matrix multiplication

Current state:  tensor([[0.5019-0.5851j, 0.4791+0.4198j]])
New state:  tensor([[0.0111-0.7708j, 0.0994+0.6292j]])
----------Measure----------
Probability:  tensor([[0.5942, 0.4058]])
valid set accuracy: 0.8620689511299133
valid set loss: 0.41345518827438354
------------------------------Epoch10------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5269-0.4697j, 0.5933+0.3870j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.5269-0.4697j, 0.5933+0.3870j]])
New state:  tensor([[0.1149-0.6965j, 0.2185+0.6738j]])
----------Measure----------
Probability:  tensor([[0.4982, 0.5018]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5834-0.7435j, 0.2588+0.1995j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.5834-0.7435j, 0.2588+0.1995j]])
New state:  tensor([[-0.0132-0.9450j,  0.0761+0.3178j]])
----------Measure----------
Probability:  tensor([[0.8932, 0.1068]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6381-0.3059j, 0.6669+0.2335j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.6381-0.3059j, 0.6669+0.2335j]])
New state:  tensor([[0.3042-0.6389j, 0.3721+0.6007j]])
----------Measure----------
Probability:  tensor([[0.5007, 0.4993]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.1649-0.1884j, 0.8225+0.5107j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.1649-0.1884j, 0.8225+0.5107j]])
New state:  tensor([[0.0100-0.2502j, 0.3191+0.9141j]])
----------Measure----------
Probability:  tensor([[0.0627, 0.9373]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5334-0.4070j, 0.6474+0.3615j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.5334-0.4070j, 0.6474+0.3615j]])
New state:  tensor([[0.1593-0.6518j, 0.2766+0.6880j]])
----------Measure----------
Probability:  tensor([[0.4502, 0.5498]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5994-0.3321j, 0.6749+0.2736j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.5994-0.3321j, 0.6749+0.2736j]])
New state:  tensor([[0.2577-0.6350j, 0.3532+0.6369j]])
----------Measure----------
Probability:  tensor([[0.4696, 0.5304]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6487-0.5846j, 0.4145+0.2563j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.6487-0.5846j, 0.4145+0.2563j]])
New state:  tensor([[0.1374-0.8623j, 0.1615+0.4598j]])
----------Measure----------
Probability:  tensor([[0.7625, 0.2375]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4298-0.4641j, 0.6090+0.4786j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.4298-0.4641j, 0.6090+0.4786j]])
New state:  tensor([[0.0428-0.6311j, 0.1731+0.7550j]])
----------Measure----------
Probability:  tensor([[0.4001, 0.5999]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6518-0.2650j, 0.6812+0.2023j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.6518-0.2650j, 0.6812+0.2023j]])
New state:  tensor([[0.3407-0.6156j, 0.4029+0.5853j]])
----------Measure----------
Probability:  tensor([[0.4950, 0.5050]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4585-0.7174j, 0.3509+0.3899j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.4585-0.7174j, 0.3509+0.3899j]])
New state:  tensor([[-0.0940-0.8462j,  0.0281+0.5238j]])
----------Measure----------
Probability:  tensor([[0.7248, 0.2752]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7181-0.6622j, 0.1998+0.0771j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.7181-0.6622j, 0.1998+0.0771j]])
New state:  tensor([[0.1427-0.9663j, 0.1070+0.1855j]])
----------Measure----------
Probability:  tensor([[0.9541, 0.0459]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2975-0.7175j, 0.3109+0.5477j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.2975-0.7175j, 0.3109+0.5477j]])
New state:  tensor([[-0.2193-0.7451j, -0.1022+0.6215j]])
----------Measure----------
Probability:  tensor([[0.6033, 0.3967]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5680-0.6463j, 0.3986+0.3174j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.5680-0.6463j, 0.3986+0.3174j]])
New state:  tensor([[0.0358-0.8597j, 0.1107+0.4974j]])
----------Measure----------
Probability:  tensor([[0.7404, 0.2596]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3671-0.6105j, 0.4456+0.5422j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.3671-0.6105j, 0.4456+0.5422j]])
New state:  tensor([[-0.0979-0.7056j,  0.0061+0.7018j]])
----------Measure----------
Probability:  tensor([[0.5075, 0.4925]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4297-0.3478j, 0.7205+0.4187j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.4297-0.3478j, 0.7205+0.4187j]])
New state:  tensor([[0.1158-0.5406j, 0.2975+0.7784j]])
----------Measure----------
Probability:  tensor([[0.3056, 0.6944]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5225-0.6910j, 0.3667+0.3393j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.5225-0.6910j, 0.3667+0.3393j]])
New state:  tensor([[-0.0276-0.8658j,  0.0721+0.4944j]])
----------Measure----------
Probability:  tensor([[0.7504, 0.2496]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.4692-0.3403j, 0.7215+0.3787j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.4692-0.3403j, 0.7215+0.3787j]])
New state:  tensor([[0.1512-0.5595j, 0.3234+0.7480j]])
----------Measure----------
Probability:  tensor([[0.3359, 0.6641]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6876-0.5680j, 0.3960+0.2184j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.6876-0.5680j, 0.3960+0.2184j]])
New state:  tensor([[0.1781-0.8739j, 0.1709+0.4188j]])
----------Measure----------
Probability:  tensor([[0.7954, 0.2046]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6876-0.5680j, 0.3960+0.2184j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.6876-0.5680j, 0.3960+0.2184j]])
New state:  tensor([[0.1781-0.8739j, 0.1709+0.4188j]])
----------Measure----------
Probability:  tensor([[0.7954, 0.2046]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4982-0.5883j, 0.4830+0.4152j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.4982-0.5883j, 0.4830+0.4152j]])
New state:  tensor([[0.0180-0.7707j, 0.1150+0.6265j]])
----------Measure----------
Probability:  tensor([[0.5943, 0.4057]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.2056-0.2468j, 0.7664+0.5563j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.2056-0.2468j, 0.7664+0.5563j]])
New state:  tensor([[0.0049-0.3212j, 0.2468+0.9143j]])
----------Measure----------
Probability:  tensor([[0.1032, 0.8968]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6671-0.5957j, 0.3842+0.2291j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.6671-0.5957j, 0.3842+0.2291j]])
New state:  tensor([[0.1447-0.8826j, 0.1550+0.4196j]])
----------Measure----------
Probability:  tensor([[0.7999, 0.2001]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5457-0.6690j, 0.3830+0.3286j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.5457-0.6690j, 0.3830+0.3286j]])
New state:  tensor([[0.0043-0.8633j, 0.0916+0.4962j]])
----------Measure----------
Probability:  tensor([[0.7454, 0.2546]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4369-0.6483j, 0.4237+0.4575j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.4369-0.6483j, 0.4237+0.4575j]])
New state:  tensor([[-0.0674-0.7789j,  0.0422+0.6221j]])
----------Measure----------
Probability:  tensor([[0.6112, 0.3888]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5192-0.4317j, 0.6302+0.3834j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.5192-0.4317j, 0.6302+0.3834j]])
New state:  tensor([[0.1327-0.6620j, 0.2494+0.6942j]])
----------Measure----------
Probability:  tensor([[0.4559, 0.5441]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5294-0.6549j, 0.4052+0.3559j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.5294-0.6549j, 0.4052+0.3559j]])
New state:  tensor([[0.0005-0.8421j, 0.0917+0.5315j]])
----------Measure----------
Probability:  tensor([[0.7091, 0.2909]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5510-0.6327j, 0.4218+0.3439j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.5510-0.6327j, 0.4218+0.3439j]])
New state:  tensor([[0.0312-0.8384j, 0.1121+0.5325j]])
----------Measure----------
Probability:  tensor([[0.7039, 0.2961]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2120-0.7049j, 0.2573+0.6261j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.2120-0.7049j, 0.2573+0.6261j]])
New state:  tensor([[-0.2780-0.6816j, -0.1931+0.6487j]])
----------Measure----------
Probability:  tensor([[0.5419, 0.4581]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1555+0.j]])
ry_matrix:  tensor([[ 0.9970-0.j, -0.0776-0.j],
        [ 0.0776+0.j,  0.9970-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6097-0.3747j, 0.6372+0.2860j]])
Inside  rz
rz_matrix theta:  tensor([[1.3586+0.j]])
rz_matrix:  tensor([[0.7780-0.6282j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7780+0.6282j]])
Performing matrix multiplication

Current state:  tensor([[0.6097-0.3747j, 0.6372+0.2860j]])
New state:  tensor([[0.2390-0.6746j, 0.3161+0.6229j]])
----------Measure----------
Probability:  tensor([[0.5121, 0.4879]])
valid set accuracy: 0.931034505367279
valid set loss: 0.41049692034721375
------------------------------Epoch11------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5938-0.3344j, 0.6798+0.2709j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.5938-0.3344j, 0.6798+0.2709j]])
New state:  tensor([[0.2616-0.6293j, 0.3684+0.6323j]])
----------Measure----------
Probability:  tensor([[0.4644, 0.5356]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6462-0.2666j, 0.6865+0.2001j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.6462-0.2666j, 0.6865+0.2001j]])
New state:  tensor([[0.3445-0.6082j, 0.4173+0.5807j]])
----------Measure----------
Probability:  tensor([[0.4886, 0.5114]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4237-0.3513j, 0.7240+0.4158j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.4237-0.3513j, 0.7240+0.4158j]])
New state:  tensor([[0.1172-0.5378j, 0.3138+0.7737j]])
----------Measure----------
Probability:  tensor([[0.3029, 0.6971]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4334-0.6520j, 0.4272+0.4522j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.4334-0.6520j, 0.4272+0.4522j]])
New state:  tensor([[-0.0606-0.7806j,  0.0577+0.6194j]])
----------Measure----------
Probability:  tensor([[0.6130, 0.3870]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5260-0.6578j, 0.4095+0.3506j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.5260-0.6578j, 0.4095+0.3506j]])
New state:  tensor([[0.0088-0.8422j, 0.1064+0.5285j]])
----------Measure----------
Probability:  tensor([[0.7094, 0.2906]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6843-0.5698j, 0.4017+0.2138j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.6843-0.5698j, 0.4017+0.2138j]])
New state:  tensor([[0.1877-0.8705j, 0.1846+0.4159j]])
----------Measure----------
Probability:  tensor([[0.7930, 0.2070]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5194-0.6937j, 0.3709+0.3337j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.5194-0.6937j, 0.3709+0.3337j]])
New state:  tensor([[-0.0185-0.8664j,  0.0865+0.4914j]])
----------Measure----------
Probability:  tensor([[0.7511, 0.2489]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4247-0.4680j, 0.6125+0.4748j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.4247-0.4680j, 0.6125+0.4748j]])
New state:  tensor([[0.0460-0.6303j, 0.1897+0.7514j]])
----------Measure----------
Probability:  tensor([[0.3994, 0.6006]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5475-0.6355j, 0.4263+0.3387j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.5475-0.6355j, 0.4263+0.3387j]])
New state:  tensor([[0.0395-0.8379j, 0.1269+0.5294j]])
----------Measure----------
Probability:  tensor([[0.7036, 0.2964]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5647-0.6489j, 0.4033+0.3121j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.5647-0.6489j, 0.4033+0.3121j]])
New state:  tensor([[0.0447-0.8591j, 0.1252+0.4943j]])
----------Measure----------
Probability:  tensor([[0.7400, 0.2600]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3635-0.6149j, 0.4486+0.5371j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.3635-0.6149j, 0.4486+0.5371j]])
New state:  tensor([[-0.0928-0.7083j,  0.0222+0.6995j]])
----------Measure----------
Probability:  tensor([[0.5102, 0.4898]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4556-0.7206j, 0.3547+0.3840j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.4556-0.7206j, 0.3547+0.3840j]])
New state:  tensor([[-0.0854-0.8482j,  0.0426+0.5210j]])
----------Measure----------
Probability:  tensor([[0.7267, 0.2733]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6639-0.5976j, 0.3897+0.2242j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.6639-0.5976j, 0.3897+0.2242j]])
New state:  tensor([[0.1545-0.8798j, 0.1687+0.4167j]])
----------Measure----------
Probability:  tensor([[0.7979, 0.2021]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6326-0.3079j, 0.6721+0.2310j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.6326-0.3079j, 0.6721+0.2310j]])
New state:  tensor([[0.3084-0.6323j, 0.3869+0.5962j]])
----------Measure----------
Probability:  tensor([[0.4949, 0.5051]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7164-0.6628j, 0.2057+0.0717j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.7164-0.6628j, 0.2057+0.0717j]])
New state:  tensor([[0.1556-0.9635j, 0.1178+0.1832j]])
----------Measure----------
Probability:  tensor([[0.9526, 0.0474]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5281-0.4100j, 0.6518+0.3581j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.5281-0.4100j, 0.6518+0.3581j]])
New state:  tensor([[0.1632-0.6483j, 0.2926+0.6837j]])
----------Measure----------
Probability:  tensor([[0.4469, 0.5531]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5813-0.7451j, 0.2636+0.1934j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.5813-0.7451j, 0.2636+0.1934j]])
New state:  tensor([[-0.0015-0.9450j,  0.0884+0.3148j]])
----------Measure----------
Probability:  tensor([[0.8931, 0.1069]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.1582-0.1926j, 0.8238+0.5091j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.1582-0.1926j, 0.8238+0.5091j]])
New state:  tensor([[0.0059-0.2491j, 0.3349+0.9087j]])
----------Measure----------
Probability:  tensor([[0.0621, 0.9379]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5220-0.4729j, 0.5976+0.3831j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.5220-0.4729j, 0.5976+0.3831j]])
New state:  tensor([[0.1196-0.6941j, 0.2345+0.6700j]])
----------Measure----------
Probability:  tensor([[0.4961, 0.5039]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1993-0.2514j, 0.7681+0.5542j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.1993-0.2514j, 0.7681+0.5542j]])
New state:  tensor([[0.0020-0.3208j, 0.2632+0.9098j]])
----------Measure----------
Probability:  tensor([[0.1029, 0.8971]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6452-0.5867j, 0.4198+0.2515j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.6452-0.5867j, 0.4198+0.2515j]])
New state:  tensor([[0.1465-0.8597j, 0.1756+0.4568j]])
----------Measure----------
Probability:  tensor([[0.7605, 0.2395]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.4632-0.3434j, 0.7254+0.3759j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.4632-0.3434j, 0.7254+0.3759j]])
New state:  tensor([[0.1531-0.5559j, 0.3395+0.7431j]])
----------Measure----------
Probability:  tensor([[0.3325, 0.6675]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6843-0.5698j, 0.4017+0.2138j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.6843-0.5698j, 0.4017+0.2138j]])
New state:  tensor([[0.1877-0.8705j, 0.1846+0.4159j]])
----------Measure----------
Probability:  tensor([[0.7930, 0.2070]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4942-0.5917j, 0.4871+0.4103j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.4942-0.5917j, 0.4871+0.4103j]])
New state:  tensor([[0.0244-0.7705j, 0.1307+0.6234j]])
----------Measure----------
Probability:  tensor([[0.5943, 0.4057]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.6045-0.3770j, 0.6422+0.2830j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.6045-0.3770j, 0.6422+0.2830j]])
New state:  tensor([[0.2436-0.6695j, 0.3313+0.6186j]])
----------Measure----------
Probability:  tensor([[0.5075, 0.4925]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2098-0.7101j, 0.2590+0.6202j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.2098-0.7101j, 0.2590+0.6202j]])
New state:  tensor([[-0.2724-0.6885j, -0.1783+0.6481j]])
----------Measure----------
Probability:  tensor([[0.5482, 0.4518]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5140-0.4348j, 0.6344+0.3798j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.5140-0.4348j, 0.6344+0.3798j]])
New state:  tensor([[0.1368-0.6592j, 0.2655+0.6901j]])
----------Measure----------
Probability:  tensor([[0.4533, 0.5467]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5425-0.6717j, 0.3874+0.3231j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.5425-0.6717j, 0.3874+0.3231j]])
New state:  tensor([[0.0132-0.8633j, 0.1060+0.4932j]])
----------Measure----------
Probability:  tensor([[0.7455, 0.2545]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1719+0.j]])
ry_matrix:  tensor([[ 0.9963-0.j, -0.0858-0.j],
        [ 0.0858+0.j,  0.9963-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2949-0.7220j, 0.3134+0.5418j]])
Inside  rz
rz_matrix theta:  tensor([[1.3282+0.j]])
rz_matrix:  tensor([[0.7875-0.6163j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7875+0.6163j]])
Performing matrix multiplication

Current state:  tensor([[0.2949-0.7220j, 0.3134+0.5418j]])
New state:  tensor([[-0.2127-0.7503j, -0.0872+0.6198j]])
----------Measure----------
Probability:  tensor([[0.6082, 0.3918]])
valid set accuracy: 0.9655172228813171
valid set loss: 0.4074782729148865
------------------------------Epoch12------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4906-0.5947j, 0.4907+0.4060j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.4906-0.5947j, 0.4907+0.4060j]])
New state:  tensor([[0.0313-0.7703j, 0.1455+0.6201j]])
----------Measure----------
Probability:  tensor([[0.5944, 0.4056]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5230-0.6603j, 0.4134+0.3457j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.5230-0.6603j, 0.4134+0.3457j]])
New state:  tensor([[0.0175-0.8422j, 0.1203+0.5253j]])
----------Measure----------
Probability:  tensor([[0.7096, 0.2904]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6813-0.5714j, 0.4067+0.2096j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.6813-0.5714j, 0.4067+0.2096j]])
New state:  tensor([[0.1974-0.8670j, 0.1973+0.4128j]])
----------Measure----------
Probability:  tensor([[0.7907, 0.2093]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4202-0.4715j, 0.6156+0.4713j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.4202-0.4715j, 0.6156+0.4713j]])
New state:  tensor([[0.0498-0.6296j, 0.2055+0.7476j]])
----------Measure----------
Probability:  tensor([[0.3989, 0.6011]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4184-0.3543j, 0.7271+0.4132j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.4184-0.3543j, 0.7271+0.4132j]])
New state:  tensor([[0.1192-0.5352j, 0.3294+0.7687j]])
----------Measure----------
Probability:  tensor([[0.3006, 0.6994]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.4579-0.3462j, 0.7287+0.3734j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.4579-0.3462j, 0.7287+0.3734j]])
New state:  tensor([[0.1555-0.5526j, 0.3548+0.7380j]])
----------Measure----------
Probability:  tensor([[0.3295, 0.6705]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5233-0.4126j, 0.6556+0.3551j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.5233-0.4126j, 0.6556+0.3551j]])
New state:  tensor([[0.1675-0.6450j, 0.3076+0.6792j]])
----------Measure----------
Probability:  tensor([[0.4441, 0.5559]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5794-0.7465j, 0.2679+0.1879j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.5794-0.7465j, 0.2679+0.1879j]])
New state:  tensor([[0.0102-0.9449j, 0.0998+0.3116j]])
----------Measure----------
Probability:  tensor([[0.8929, 0.1071]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5444-0.6379j, 0.4303+0.3340j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.5444-0.6379j, 0.4303+0.3340j]])
New state:  tensor([[0.0480-0.8373j, 0.1409+0.5262j]])
----------Measure----------
Probability:  tensor([[0.7033, 0.2967]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6610-0.5992j, 0.3945+0.2198j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.6610-0.5992j, 0.3945+0.2198j]])
New state:  tensor([[0.1643-0.8769j, 0.1814+0.4136j]])
----------Measure----------
Probability:  tensor([[0.7960, 0.2040]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5997-0.3791j, 0.6466+0.2802j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.5997-0.3791j, 0.6466+0.2802j]])
New state:  tensor([[0.2486-0.6645j, 0.3457+0.6141j]])
----------Measure----------
Probability:  tensor([[0.5034, 0.4966]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6276-0.3095j, 0.6767+0.2288j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.6276-0.3095j, 0.6767+0.2288j]])
New state:  tensor([[0.3129-0.6260j, 0.4008+0.5913j]])
----------Measure----------
Probability:  tensor([[0.4897, 0.5103]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3602-0.6189j, 0.4512+0.5326j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.3602-0.6189j, 0.4512+0.5326j]])
New state:  tensor([[-0.0872-0.7107j,  0.0375+0.6971j]])
----------Measure----------
Probability:  tensor([[0.5127, 0.4873]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4529-0.7233j, 0.3580+0.3787j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.4529-0.7233j, 0.3580+0.3787j]])
New state:  tensor([[-0.0764-0.8500j,  0.0563+0.5181j]])
----------Measure----------
Probability:  tensor([[0.7284, 0.2716]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2079-0.7146j, 0.2605+0.6150j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.2079-0.7146j, 0.2605+0.6150j]])
New state:  tensor([[-0.2663-0.6949j, -0.1642+0.6474j]])
----------Measure----------
Probability:  tensor([[0.5539, 0.4461]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.1521-0.1963j, 0.8250+0.5077j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.1521-0.1963j, 0.8250+0.5077j]])
New state:  tensor([[0.0025-0.2483j, 0.3503+0.9031j]])
----------Measure----------
Probability:  tensor([[0.0617, 0.9383]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5397-0.6741j, 0.3914+0.3181j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.5397-0.6741j, 0.3914+0.3181j]])
New state:  tensor([[0.0224-0.8632j, 0.1195+0.4900j]])
----------Measure----------
Probability:  tensor([[0.7456, 0.2544]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5888-0.3363j, 0.6842+0.2684j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.5888-0.3363j, 0.6842+0.2684j]])
New state:  tensor([[0.2658-0.6239j, 0.3827+0.6274j]])
----------Measure----------
Probability:  tensor([[0.4599, 0.5401]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6813-0.5714j, 0.4067+0.2096j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.6813-0.5714j, 0.4067+0.2096j]])
New state:  tensor([[0.1974-0.8670j, 0.1973+0.4128j]])
----------Measure----------
Probability:  tensor([[0.7907, 0.2093]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6411-0.2681j, 0.6913+0.1981j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.6411-0.2681j, 0.6913+0.1981j]])
New state:  tensor([[0.3487-0.6011j, 0.4309+0.5757j]])
----------Measure----------
Probability:  tensor([[0.4829, 0.5171]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7149-0.6633j, 0.2109+0.0668j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.7149-0.6633j, 0.2109+0.0668j]])
New state:  tensor([[0.1685-0.9605j, 0.1276+0.1807j]])
----------Measure----------
Probability:  tensor([[0.9510, 0.0490]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4303-0.6553j, 0.4304+0.4474j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.4303-0.6553j, 0.4304+0.4474j]])
New state:  tensor([[-0.0534-0.7822j,  0.0724+0.6166j]])
----------Measure----------
Probability:  tensor([[0.6146, 0.3854]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1937-0.2554j, 0.7695+0.5524j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.1937-0.2554j, 0.7695+0.5524j]])
New state:  tensor([[-1.1286e-04-0.3205j,  2.7907e-01+0.9052j]])
----------Measure----------
Probability:  tensor([[0.1027, 0.8973]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5176-0.4757j, 0.6014+0.3796j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.5176-0.4757j, 0.6014+0.3796j]])
New state:  tensor([[0.1248-0.6918j, 0.2496+0.6660j]])
----------Measure----------
Probability:  tensor([[0.4942, 0.5058]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5093-0.4376j, 0.6382+0.3766j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.5093-0.4376j, 0.6382+0.3766j]])
New state:  tensor([[0.1412-0.6565j, 0.2807+0.6858j]])
----------Measure----------
Probability:  tensor([[0.4509, 0.5491]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5167-0.6962j, 0.3747+0.3286j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.5167-0.6962j, 0.3747+0.3286j]])
New state:  tensor([[-0.0092-0.8669j,  0.0999+0.4883j]])
----------Measure----------
Probability:  tensor([[0.7516, 0.2484]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5617-0.6512j, 0.4074+0.3073j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.5617-0.6512j, 0.4074+0.3073j]])
New state:  tensor([[0.0538-0.8583j, 0.1387+0.4911j]])
----------Measure----------
Probability:  tensor([[0.7396, 0.2604]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2926-0.7259j, 0.3155+0.5365j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.2926-0.7259j, 0.3155+0.5365j]])
New state:  tensor([[-0.2057-0.7552j, -0.0730+0.6181j]])
----------Measure----------
Probability:  tensor([[0.6126, 0.3874]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.1865+0.j]])
ry_matrix:  tensor([[ 0.9957-0.j, -0.0931-0.j],
        [ 0.0931+0.j,  0.9957-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6422-0.5885j, 0.4245+0.2472j]])
Inside  rz
rz_matrix theta:  tensor([[1.2983+0.j]])
rz_matrix:  tensor([[0.7966-0.6045j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.7966+0.6045j]])
Performing matrix multiplication

Current state:  tensor([[0.6422-0.5885j, 0.4245+0.2472j]])
New state:  tensor([[0.1558-0.8570j, 0.1888+0.4535j]])
----------Measure----------
Probability:  tensor([[0.7587, 0.2413]])
valid set accuracy: 0.9655172228813171
valid set loss: 0.4048599302768707
------------------------------Epoch13------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4159-0.4747j, 0.6185+0.4680j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.4159-0.4747j, 0.6185+0.4680j]])
New state:  tensor([[0.0536-0.6289j, 0.2208+0.7436j]])
----------Measure----------
Probability:  tensor([[0.3984, 0.6016]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5588-0.6533j, 0.4113+0.3028j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.5588-0.6533j, 0.4113+0.3028j]])
New state:  tensor([[0.0629-0.8574j, 0.1518+0.4876j]])
----------Measure----------
Probability:  tensor([[0.7392, 0.2608]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5952-0.3811j, 0.6508+0.2775j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.5952-0.3811j, 0.6508+0.2775j]])
New state:  tensor([[0.2535-0.6597j, 0.3597+0.6092j]])
----------Measure----------
Probability:  tensor([[0.4995, 0.5005]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6785-0.5728j, 0.4114+0.2056j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.6785-0.5728j, 0.4114+0.2056j]])
New state:  tensor([[0.2070-0.8635j, 0.2095+0.4094j]])
----------Measure----------
Probability:  tensor([[0.7885, 0.2115]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4133-0.3572j, 0.7300+0.4108j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.4133-0.3572j, 0.7300+0.4108j]])
New state:  tensor([[0.1212-0.5327j, 0.3445+0.7635j]])
----------Measure----------
Probability:  tensor([[0.2984, 0.7016]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5134-0.4783j, 0.6050+0.3763j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.5134-0.4783j, 0.6050+0.3763j]])
New state:  tensor([[0.1300-0.6895j, 0.2643+0.6617j]])
----------Measure----------
Probability:  tensor([[0.4924, 0.5077]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6363-0.2694j, 0.6957+0.1962j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.6363-0.2694j, 0.6957+0.1962j]])
New state:  tensor([[0.3528-0.5942j, 0.4440+0.5704j]])
----------Measure----------
Probability:  tensor([[0.4775, 0.5225]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4872-0.5975j, 0.4941+0.4018j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.4872-0.5975j, 0.4941+0.4018j]])
New state:  tensor([[0.0382-0.7700j, 0.1598+0.6165j]])
----------Measure----------
Probability:  tensor([[0.5944, 0.4056]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7134-0.6638j, 0.2159+0.0622j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.7134-0.6638j, 0.2159+0.0622j]])
New state:  tensor([[0.1812-0.9574j, 0.1371+0.1781j]])
----------Measure----------
Probability:  tensor([[0.9495, 0.0505]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5414-0.6402j, 0.4341+0.3295j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.5414-0.6402j, 0.4341+0.3295j]])
New state:  tensor([[0.0566-0.8365j, 0.1543+0.5227j]])
----------Measure----------
Probability:  tensor([[0.7030, 0.2970]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5775-0.7478j, 0.2719+0.1827j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.5775-0.7478j, 0.2719+0.1827j]])
New state:  tensor([[0.0219-0.9446j, 0.1107+0.3083j]])
----------Measure----------
Probability:  tensor([[0.8927, 0.1073]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5141-0.6984j, 0.3783+0.3237j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.5141-0.6984j, 0.3783+0.3237j]])
New state:  tensor([[7.7099e-05-0.8672j, 1.1288e-01+0.4850j]])
----------Measure----------
Probability:  tensor([[0.7521, 0.2479]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5187-0.4150j, 0.6593+0.3522j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.5187-0.4150j, 0.6593+0.3522j]])
New state:  tensor([[0.1718-0.6417j, 0.3223+0.6744j]])
----------Measure----------
Probability:  tensor([[0.4413, 0.5587]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4504-0.7260j, 0.3612+0.3737j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.4504-0.7260j, 0.3612+0.3737j]])
New state:  tensor([[-0.0675-0.8517j,  0.0694+0.5150j]])
----------Measure----------
Probability:  tensor([[0.7299, 0.2701]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6392-0.5902j, 0.4290+0.2430j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.6392-0.5902j, 0.4290+0.2430j]])
New state:  tensor([[0.1650-0.8542j, 0.2015+0.4500j]])
----------Measure----------
Probability:  tensor([[0.7569, 0.2431]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5369-0.6763j, 0.3952+0.3134j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.5369-0.6763j, 0.3952+0.3134j]])
New state:  tensor([[0.0316-0.8629j, 0.1325+0.4866j]])
----------Measure----------
Probability:  tensor([[0.7456, 0.2544]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4273-0.6584j, 0.4334+0.4428j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.4273-0.6584j, 0.4334+0.4428j]])
New state:  tensor([[-0.0461-0.7836j,  0.0866+0.6135j]])
----------Measure----------
Probability:  tensor([[0.6161, 0.3839]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.1464-0.1998j, 0.8260+0.5063j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.1464-0.1998j, 0.8260+0.5063j]])
New state:  tensor([[-0.0005-0.2477j,  0.3652+0.8974j]])
----------Measure----------
Probability:  tensor([[0.0614, 0.9386]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5841-0.3382j, 0.6883+0.2661j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.5841-0.3382j, 0.6883+0.2661j]])
New state:  tensor([[0.2700-0.6186j, 0.3966+0.6222j]])
----------Measure----------
Probability:  tensor([[0.4555, 0.5445]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.4528-0.3488j, 0.7319+0.3710j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.4528-0.3488j, 0.7319+0.3710j]])
New state:  tensor([[0.1580-0.5493j, 0.3696+0.7326j]])
----------Measure----------
Probability:  tensor([[0.3267, 0.6733]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3570-0.6226j, 0.4537+0.5283j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.3570-0.6226j, 0.4537+0.5283j]])
New state:  tensor([[-0.0814-0.7130j,  0.0523+0.6944j]])
----------Measure----------
Probability:  tensor([[0.5150, 0.4850]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6785-0.5728j, 0.4114+0.2056j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.6785-0.5728j, 0.4114+0.2056j]])
New state:  tensor([[0.2070-0.8635j, 0.2095+0.4094j]])
----------Measure----------
Probability:  tensor([[0.7885, 0.2115]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5049-0.4402j, 0.6417+0.3736j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.5049-0.4402j, 0.6417+0.3736j]])
New state:  tensor([[0.1457-0.6538j, 0.2954+0.6812j]])
----------Measure----------
Probability:  tensor([[0.4487, 0.5513]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2061-0.7189j, 0.2620+0.6100j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.2061-0.7189j, 0.2620+0.6100j]])
New state:  tensor([[-0.2601-0.7012j, -0.1506+0.6466j]])
----------Measure----------
Probability:  tensor([[0.5592, 0.4408]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5201-0.6627j, 0.4170+0.3411j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.5201-0.6627j, 0.4170+0.3411j]])
New state:  tensor([[0.0261-0.8420j, 0.1337+0.5219j]])
----------Measure----------
Probability:  tensor([[0.7097, 0.2903]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1883-0.2593j, 0.7708+0.5506j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.1883-0.2593j, 0.7708+0.5506j]])
New state:  tensor([[-0.0020-0.3204j,  0.2945+0.9003j]])
----------Measure----------
Probability:  tensor([[0.1027, 0.8973]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2904-0.7297j, 0.3175+0.5314j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.2904-0.7297j, 0.3175+0.5314j]])
New state:  tensor([[-0.1985-0.7598j, -0.0592+0.6162j]])
----------Measure----------
Probability:  tensor([[0.6167, 0.3833]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6582-0.6008j, 0.3991+0.2156j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.6582-0.6008j, 0.3991+0.2156j]])
New state:  tensor([[0.1741-0.8740j, 0.1937+0.4103j]])
----------Measure----------
Probability:  tensor([[0.7942, 0.2058]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2005+0.j]])
ry_matrix:  tensor([[ 0.9950-0.j, -0.1001-0.j],
        [ 0.1001+0.j,  0.9950-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6229-0.3111j, 0.6811+0.2266j]])
Inside  rz
rz_matrix theta:  tensor([[1.2688+0.j]])
rz_matrix:  tensor([[0.8054-0.5927j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8054+0.5927j]])
Performing matrix multiplication

Current state:  tensor([[0.6229-0.3111j, 0.6811+0.2266j]])
New state:  tensor([[0.3173-0.6198j, 0.4142+0.5862j]])
----------Measure----------
Probability:  tensor([[0.4848, 0.5152]])
valid set accuracy: 1.0
valid set loss: 0.4024365544319153
------------------------------Epoch14------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4479-0.7286j, 0.3643+0.3685j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.4479-0.7286j, 0.3643+0.3685j]])
New state:  tensor([[-0.0588-0.8532j,  0.0825+0.5116j]])
----------Measure----------
Probability:  tensor([[0.7315, 0.2685]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5341-0.6785j, 0.3990+0.3086j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.5341-0.6785j, 0.3990+0.3086j]])
New state:  tensor([[0.0406-0.8625j, 0.1454+0.4830j]])
----------Measure----------
Probability:  tensor([[0.7456, 0.2544]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6756-0.5742j, 0.4162+0.2015j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.6756-0.5742j, 0.4162+0.2015j]])
New state:  tensor([[0.2162-0.8599j, 0.2217+0.4058j]])
----------Measure----------
Probability:  tensor([[0.7861, 0.2139]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4242-0.6616j, 0.4364+0.4381j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.4242-0.6616j, 0.4364+0.4381j]])
New state:  tensor([[-0.0391-0.7849j,  0.1007+0.6101j]])
----------Measure----------
Probability:  tensor([[0.6176, 0.3824]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5559-0.6555j, 0.4153+0.2981j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.5559-0.6555j, 0.4153+0.2981j]])
New state:  tensor([[0.0717-0.8565j, 0.1648+0.4839j]])
----------Measure----------
Probability:  tensor([[0.7387, 0.2613]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6756-0.5742j, 0.4162+0.2015j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.6756-0.5742j, 0.4162+0.2015j]])
New state:  tensor([[0.2162-0.8599j, 0.2217+0.4058j]])
----------Measure----------
Probability:  tensor([[0.7861, 0.2139]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6313-0.2708j, 0.7002+0.1943j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.6313-0.2708j, 0.7002+0.1943j]])
New state:  tensor([[0.3565-0.5872j, 0.4570+0.5650j]])
----------Measure----------
Probability:  tensor([[0.4719, 0.5281]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6554-0.6023j, 0.4038+0.2114j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.6554-0.6023j, 0.4038+0.2114j]])
New state:  tensor([[0.1835-0.8710j, 0.2059+0.4066j]])
----------Measure----------
Probability:  tensor([[0.7923, 0.2077]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3538-0.6263j, 0.4563+0.5239j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.3538-0.6263j, 0.4563+0.5239j]])
New state:  tensor([[-0.0759-0.7153j,  0.0670+0.6915j]])
----------Measure----------
Probability:  tensor([[0.5174, 0.4826]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5755-0.7491j, 0.2760+0.1774j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.5755-0.7491j, 0.2760+0.1774j]])
New state:  tensor([[0.0332-0.9441j, 0.1216+0.3047j]])
----------Measure----------
Probability:  tensor([[0.8924, 0.1076]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7118-0.6642j, 0.2210+0.0575j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.7118-0.6642j, 0.2210+0.0575j]])
New state:  tensor([[0.1935-0.9542j, 0.1465+0.1752j]])
----------Measure----------
Probability:  tensor([[0.9479, 0.0521]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2042-0.7232j, 0.2634+0.6049j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.2042-0.7232j, 0.2634+0.6049j]])
New state:  tensor([[-0.2539-0.7073j, -0.1370+0.6454j]])
----------Measure----------
Probability:  tensor([[0.5647, 0.4353]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4082-0.3601j, 0.7329+0.4082j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.4082-0.3601j, 0.7329+0.4082j]])
New state:  tensor([[0.1230-0.5302j, 0.3594+0.7580j]])
----------Measure----------
Probability:  tensor([[0.2962, 0.7038]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1828-0.2632j, 0.7721+0.5487j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.1828-0.2632j, 0.7721+0.5487j]])
New state:  tensor([[-0.0041-0.3204j,  0.3097+0.8952j]])
----------Measure----------
Probability:  tensor([[0.1027, 0.8973]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.4476-0.3514j, 0.7351+0.3685j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.4476-0.3514j, 0.7351+0.3685j]])
New state:  tensor([[0.1602-0.5460j, 0.3842+0.7270j]])
----------Measure----------
Probability:  tensor([[0.3238, 0.6762]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5140-0.4175j, 0.6629+0.3492j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.5140-0.4175j, 0.6629+0.3492j]])
New state:  tensor([[0.1758-0.6385j, 0.3367+0.6694j]])
----------Measure----------
Probability:  tensor([[0.4385, 0.5615]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5091-0.4809j, 0.6086+0.3729j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.5091-0.4809j, 0.6086+0.3729j]])
New state:  tensor([[0.1350-0.6872j, 0.2787+0.6571j]])
----------Measure----------
Probability:  tensor([[0.4905, 0.5095]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5383-0.6426j, 0.4379+0.3250j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.5383-0.6426j, 0.4379+0.3250j]])
New state:  tensor([[0.0648-0.8357j, 0.1676+0.5189j]])
----------Measure----------
Probability:  tensor([[0.7026, 0.2974]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5906-0.3830j, 0.6550+0.2748j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.5906-0.3830j, 0.6550+0.2748j]])
New state:  tensor([[0.2582-0.6548j, 0.3735+0.6042j]])
----------Measure----------
Probability:  tensor([[0.4955, 0.5045]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4115-0.4781j, 0.6214+0.4647j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.4115-0.4781j, 0.6214+0.4647j]])
New state:  tensor([[0.0572-0.6282j, 0.2359+0.7392j]])
----------Measure----------
Probability:  tensor([[0.3979, 0.6021]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2882-0.7334j, 0.3196+0.5262j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.2882-0.7334j, 0.3196+0.5262j]])
New state:  tensor([[-0.1915-0.7644j, -0.0456+0.6140j]])
----------Measure----------
Probability:  tensor([[0.6209, 0.3791]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5114-0.7007j, 0.3820+0.3187j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.5114-0.7007j, 0.3820+0.3187j]])
New state:  tensor([[0.0091-0.8674j, 0.1257+0.4813j]])
----------Measure----------
Probability:  tensor([[0.7525, 0.2475]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6361-0.5919j, 0.4335+0.2389j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.6361-0.5919j, 0.4335+0.2389j]])
New state:  tensor([[0.1739-0.8513j, 0.2141+0.4463j]])
----------Measure----------
Probability:  tensor([[0.7550, 0.2450]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5792-0.3401j, 0.6924+0.2637j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.5792-0.3401j, 0.6924+0.2637j]])
New state:  tensor([[0.2738-0.6133j, 0.4104+0.6169j]])
----------Measure----------
Probability:  tensor([[0.4511, 0.5489]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6181-0.3127j, 0.6855+0.2244j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.6181-0.3127j, 0.6855+0.2244j]])
New state:  tensor([[0.3214-0.6136j, 0.4276+0.5809j]])
----------Measure----------
Probability:  tensor([[0.4798, 0.5202]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.1405-0.2034j, 0.8270+0.5049j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.1405-0.2034j, 0.8270+0.5049j]])
New state:  tensor([[-0.0038-0.2472j,  0.3798+0.8914j]])
----------Measure----------
Probability:  tensor([[0.0611, 0.9389]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5172-0.6651j, 0.4207+0.3364j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.5172-0.6651j, 0.4207+0.3364j]])
New state:  tensor([[0.0345-0.8418j, 0.1470+0.5182j]])
----------Measure----------
Probability:  tensor([[0.7098, 0.2902]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.5003-0.4429j, 0.6453+0.3704j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.5003-0.4429j, 0.6453+0.3704j]])
New state:  tensor([[0.1499-0.6511j, 0.3100+0.6764j]])
----------Measure----------
Probability:  tensor([[0.4464, 0.5536]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2147+0.j]])
ry_matrix:  tensor([[ 0.9942-0.j, -0.1071-0.j],
        [ 0.1071+0.j,  0.9942-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4836-0.6004j, 0.4976+0.3976j]])
Inside  rz
rz_matrix theta:  tensor([[1.2398+0.j]])
rz_matrix:  tensor([[0.8139-0.5810j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8139+0.5810j]])
Performing matrix multiplication

Current state:  tensor([[0.4836-0.6004j, 0.4976+0.3976j]])
New state:  tensor([[0.0449-0.7696j, 0.1740+0.6127j]])
----------Measure----------
Probability:  tensor([[0.5943, 0.4057]])
valid set accuracy: 1.0
valid set loss: 0.4000413417816162
------------------------------Epoch15------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6333-0.5935j, 0.4377+0.2350j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.6333-0.5935j, 0.4377+0.2350j]])
New state:  tensor([[0.1828-0.8484j, 0.2261+0.4424j]])
----------Measure----------
Probability:  tensor([[0.7532, 0.2468]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6728-0.5756j, 0.4207+0.1978j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.6728-0.5756j, 0.4207+0.1978j]])
New state:  tensor([[0.2255-0.8562j, 0.2332+0.4021j]])
----------Measure----------
Probability:  tensor([[0.7839, 0.2161]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4213-0.6644j, 0.4392+0.4338j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.4213-0.6644j, 0.4392+0.4338j]])
New state:  tensor([[-0.0319-0.7861j,  0.1141+0.6066j]])
----------Measure----------
Probability:  tensor([[0.6190, 0.3810]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4961-0.4453j, 0.6485+0.3675j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.4961-0.4453j, 0.6485+0.3675j]])
New state:  tensor([[0.1543-0.6485j, 0.3239+0.6713j]])
----------Measure----------
Probability:  tensor([[0.4443, 0.5557]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5051-0.4834j, 0.6120+0.3697j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.5051-0.4834j, 0.6120+0.3697j]])
New state:  tensor([[0.1401-0.6850j, 0.2926+0.6524j]])
----------Measure----------
Probability:  tensor([[0.4888, 0.5112]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6135-0.3142j, 0.6895+0.2223j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.6135-0.3142j, 0.6895+0.2223j]])
New state:  tensor([[0.3256-0.6076j, 0.4403+0.5753j]])
----------Measure----------
Probability:  tensor([[0.4752, 0.5248]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6728-0.5756j, 0.4207+0.1978j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.6728-0.5756j, 0.4207+0.1978j]])
New state:  tensor([[0.2255-0.8562j, 0.2332+0.4021j]])
----------Measure----------
Probability:  tensor([[0.7839, 0.2161]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.4033-0.3627j, 0.7355+0.4059j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.4033-0.3627j, 0.7355+0.4059j]])
New state:  tensor([[0.1251-0.5278j, 0.3737+0.7524j]])
----------Measure----------
Probability:  tensor([[0.2943, 0.7057]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.4428-0.3538j, 0.7380+0.3662j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.4428-0.3538j, 0.7380+0.3662j]])
New state:  tensor([[0.1626-0.5429j, 0.3983+0.7212j]])
----------Measure----------
Probability:  tensor([[0.3212, 0.6788]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4455-0.7310j, 0.3673+0.3637j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.4455-0.7310j, 0.3673+0.3637j]])
New state:  tensor([[-0.0499-0.8546j,  0.0949+0.5081j]])
----------Measure----------
Probability:  tensor([[0.7328, 0.2672]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5089-0.7028j, 0.3853+0.3141j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.5089-0.7028j, 0.3853+0.3141j]])
New state:  tensor([[0.0183-0.8675j, 0.1380+0.4776j]])
----------Measure----------
Probability:  tensor([[0.7528, 0.2472]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5144-0.6673j, 0.4241+0.3320j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.5144-0.6673j, 0.4241+0.3320j]])
New state:  tensor([[0.0430-0.8415j, 0.1596+0.5144j]])
----------Measure----------
Probability:  tensor([[0.7099, 0.2901]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.1351-0.2067j, 0.8279+0.5036j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.1351-0.2067j, 0.8279+0.5036j]])
New state:  tensor([[-0.0066-0.2469j,  0.3940+0.8853j]])
----------Measure----------
Probability:  tensor([[0.0610, 0.9390]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2025-0.7271j, 0.2648+0.6002j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.2025-0.7271j, 0.2648+0.6002j]])
New state:  tensor([[-0.2474-0.7131j, -0.1240+0.6441j]])
----------Measure----------
Probability:  tensor([[0.5697, 0.4303]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3508-0.6297j, 0.4586+0.5197j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.3508-0.6297j, 0.4586+0.5197j]])
New state:  tensor([[-0.0701-0.7174j,  0.0811+0.6884j]])
----------Measure----------
Probability:  tensor([[0.5196, 0.4804]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5532-0.6574j, 0.4189+0.2938j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.5532-0.6574j, 0.4189+0.2938j]])
New state:  tensor([[0.0805-0.8554j, 0.1771+0.4800j]])
----------Measure----------
Probability:  tensor([[0.7382, 0.2618]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5097-0.4198j, 0.6663+0.3465j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.5097-0.4198j, 0.6663+0.3465j]])
New state:  tensor([[0.1800-0.6353j, 0.3505+0.6642j]])
----------Measure----------
Probability:  tensor([[0.4360, 0.5640]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5737-0.7502j, 0.2798+0.1725j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.5737-0.7502j, 0.2798+0.1725j]])
New state:  tensor([[0.0446-0.9434j, 0.1318+0.3011j]])
----------Measure----------
Probability:  tensor([[0.8920, 0.1080]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6267-0.2721j, 0.7043+0.1925j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.6267-0.2721j, 0.7043+0.1925j]])
New state:  tensor([[0.3604-0.5805j, 0.4694+0.5593j]])
----------Measure----------
Probability:  tensor([[0.4668, 0.5332]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2861-0.7368j, 0.3215+0.5214j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.2861-0.7368j, 0.3215+0.5214j]])
New state:  tensor([[-0.1843-0.7686j, -0.0325+0.6117j]])
----------Measure----------
Probability:  tensor([[0.6248, 0.3752]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7104-0.6645j, 0.2256+0.0531j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.7104-0.6645j, 0.2256+0.0531j]])
New state:  tensor([[0.2057-0.9508j, 0.1553+0.1721j]])
----------Measure----------
Probability:  tensor([[0.9463, 0.0537]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5746-0.3418j, 0.6962+0.2615j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.5746-0.3418j, 0.6962+0.2615j]])
New state:  tensor([[0.2778-0.6081j, 0.4235+0.6113j]])
----------Measure----------
Probability:  tensor([[0.4470, 0.5530]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1778-0.2668j, 0.7733+0.5470j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.1778-0.2668j, 0.7733+0.5470j]])
New state:  tensor([[-0.0057-0.3205j,  0.3244+0.8900j]])
----------Measure----------
Probability:  tensor([[0.1028, 0.8972]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5315-0.6805j, 0.4025+0.3042j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.5315-0.6805j, 0.4025+0.3042j]])
New state:  tensor([[0.0496-0.8620j, 0.1577+0.4792j]])
----------Measure----------
Probability:  tensor([[0.7455, 0.2545]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5863-0.3848j, 0.6588+0.2723j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.5863-0.3848j, 0.6588+0.2723j]])
New state:  tensor([[0.2629-0.6501j, 0.3866+0.5989j]])
----------Measure----------
Probability:  tensor([[0.4918, 0.5082]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4804-0.6030j, 0.5007+0.3936j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.4804-0.6030j, 0.5007+0.3936j]])
New state:  tensor([[0.0517-0.7692j, 0.1876+0.6087j]])
----------Measure----------
Probability:  tensor([[0.5943, 0.4057]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6527-0.6036j, 0.4081+0.2074j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.6527-0.6036j, 0.4081+0.2074j]])
New state:  tensor([[0.1930-0.8679j, 0.2174+0.4028j]])
----------Measure----------
Probability:  tensor([[0.7904, 0.2096]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5354-0.6447j, 0.4414+0.3208j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.5354-0.6447j, 0.4414+0.3208j]])
New state:  tensor([[0.0731-0.8348j, 0.1803+0.5150j]])
----------Measure----------
Probability:  tensor([[0.7023, 0.2977]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2278+0.j]])
ry_matrix:  tensor([[ 0.9935-0.j, -0.1136-0.j],
        [ 0.1136+0.j,  0.9935-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4075-0.4811j, 0.6241+0.4615j]])
Inside  rz
rz_matrix theta:  tensor([[1.2113+0.j]])
rz_matrix:  tensor([[0.8221-0.5693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8221+0.5693j]])
Performing matrix multiplication

Current state:  tensor([[0.4075-0.4811j, 0.6241+0.4615j]])
New state:  tensor([[0.0611-0.6275j, 0.2504+0.7347j]])
----------Measure----------
Probability:  tensor([[0.3975, 0.6025]])
valid set accuracy: 1.0
valid set loss: 0.3978923261165619
------------------------------Epoch16------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5501-0.6595j, 0.4229+0.2890j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.5501-0.6595j, 0.4229+0.2890j]])
New state:  tensor([[0.0888-0.8542j, 0.1899+0.4758j]])
----------Measure----------
Probability:  tensor([[0.7376, 0.2624]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7087-0.6649j, 0.2308+0.0482j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.7087-0.6649j, 0.2308+0.0482j]])
New state:  tensor([[0.2174-0.9472j, 0.1647+0.1688j]])
----------Measure----------
Probability:  tensor([[0.9444, 0.0556]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6085-0.3158j, 0.6940+0.2200j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.6085-0.3158j, 0.6940+0.2200j]])
New state:  tensor([[0.3289-0.6015j, 0.4533+0.5697j]])
----------Measure----------
Probability:  tensor([[0.4700, 0.5300]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.1290-0.2104j, 0.8289+0.5020j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.1290-0.2104j, 0.8289+0.5020j]])
New state:  tensor([[-0.0102-0.2466j,  0.4080+0.8790j]])
----------Measure----------
Probability:  tensor([[0.0609, 0.9391]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6697-0.5770j, 0.4256+0.1935j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.6697-0.5770j, 0.4256+0.1935j]])
New state:  tensor([[0.2341-0.8524j, 0.2453+0.3980j]])
----------Measure----------
Probability:  tensor([[0.7814, 0.2186]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5321-0.6470j, 0.4453+0.3160j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.5321-0.6470j, 0.4453+0.3160j]])
New state:  tensor([[0.0808-0.8338j, 0.1934+0.5107j]])
----------Measure----------
Probability:  tensor([[0.7018, 0.2982]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5716-0.7515j, 0.2840+0.1670j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.5716-0.7515j, 0.2840+0.1670j]])
New state:  tensor([[0.0554-0.9426j, 0.1426+0.2970j]])
----------Measure----------
Probability:  tensor([[0.8915, 0.1085]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5113-0.6697j, 0.4279+0.3271j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.5113-0.6697j, 0.4279+0.3271j]])
New state:  tensor([[0.0508-0.8410j, 0.1727+0.5102j]])
----------Measure----------
Probability:  tensor([[0.7099, 0.2901]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.5006-0.4861j, 0.6156+0.3662j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.5006-0.4861j, 0.6156+0.3662j]])
New state:  tensor([[0.1444-0.6827j, 0.3068+0.6473j]])
----------Measure----------
Probability:  tensor([[0.4869, 0.5131]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6697-0.5770j, 0.4256+0.1935j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.6697-0.5770j, 0.4256+0.1935j]])
New state:  tensor([[0.2341-0.8524j, 0.2453+0.3980j]])
----------Measure----------
Probability:  tensor([[0.7814, 0.2186]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5695-0.3437j, 0.7004+0.2589j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.5695-0.3437j, 0.7004+0.2589j]])
New state:  tensor([[0.2810-0.6029j, 0.4369+0.6055j]])
----------Measure----------
Probability:  tensor([[0.4425, 0.5576]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4767-0.6058j, 0.5042+0.3892j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.4767-0.6058j, 0.5042+0.3892j]])
New state:  tensor([[0.0578-0.7687j, 0.2015+0.6043j]])
----------Measure----------
Probability:  tensor([[0.5943, 0.4057]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5060-0.7051j, 0.3890+0.3090j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.5060-0.7051j, 0.3890+0.3090j]])
New state:  tensor([[0.0268-0.8674j, 0.1506+0.4734j]])
----------Measure----------
Probability:  tensor([[0.7532, 0.2468]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5814-0.3868j, 0.6631+0.2695j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.5814-0.3868j, 0.6631+0.2695j]])
New state:  tensor([[0.2669-0.6453j, 0.4001+0.5935j]])
----------Measure----------
Probability:  tensor([[0.4877, 0.5123]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6216-0.2735j, 0.7089+0.1905j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.6216-0.2735j, 0.7089+0.1905j]])
New state:  tensor([[0.3634-0.5737j, 0.4821+0.5535j]])
----------Measure----------
Probability:  tensor([[0.4611, 0.5389]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.2006-0.7315j, 0.2662+0.5948j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.2006-0.7315j, 0.2662+0.5948j]])
New state:  tensor([[-0.2415-0.7190j, -0.1107+0.6422j]])
----------Measure----------
Probability:  tensor([[0.5753, 0.4247]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2837-0.7406j, 0.3236+0.5160j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.2837-0.7406j, 0.3236+0.5160j]])
New state:  tensor([[-0.1776-0.7730j, -0.0192+0.6088j]])
----------Measure----------
Probability:  tensor([[0.6290, 0.3710]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1721-0.2708j, 0.7746+0.5450j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.1721-0.2708j, 0.7746+0.5450j]])
New state:  tensor([[-0.0082-0.3207j,  0.3390+0.8844j]])
----------Measure----------
Probability:  tensor([[0.1029, 0.8971]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6300-0.5952j, 0.4423+0.2306j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.6300-0.5952j, 0.4423+0.2306j]])
New state:  tensor([[0.1910-0.8454j, 0.2385+0.4381j]])
----------Measure----------
Probability:  tensor([[0.7512, 0.2488]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.4029-0.4845j, 0.6271+0.4580j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.4029-0.4845j, 0.6271+0.4580j]])
New state:  tensor([[0.0642-0.6268j, 0.2651+0.7299j]])
----------Measure----------
Probability:  tensor([[0.3970, 0.6030]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4428-0.7337j, 0.3705+0.3584j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.4428-0.7337j, 0.3705+0.3584j]])
New state:  tensor([[-0.0417-0.8559j,  0.1077+0.5041j]])
----------Measure----------
Probability:  tensor([[0.7343, 0.2657]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4913-0.4479j, 0.6521+0.3642j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.4913-0.4479j, 0.6521+0.3642j]])
New state:  tensor([[0.1580-0.6458j, 0.3382+0.6660j]])
----------Measure----------
Probability:  tensor([[0.4420, 0.5580]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3979-0.3657j, 0.7385+0.4032j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.3979-0.3657j, 0.7385+0.4032j]])
New state:  tensor([[0.1263-0.5255j, 0.3881+0.7465j]])
----------Measure----------
Probability:  tensor([[0.2921, 0.7079]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4181-0.6676j, 0.4422+0.4289j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.4181-0.6676j, 0.4422+0.4289j]])
New state:  tensor([[-0.0253-0.7873j,  0.1279+0.6026j]])
----------Measure----------
Probability:  tensor([[0.6205, 0.3795]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3474-0.6335j, 0.4611+0.5151j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.3474-0.6335j, 0.4611+0.5151j]])
New state:  tensor([[-0.0650-0.7196j,  0.0955+0.6847j]])
----------Measure----------
Probability:  tensor([[0.5220, 0.4780]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5048-0.4223j, 0.6700+0.3434j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.5048-0.4223j, 0.6700+0.3434j]])
New state:  tensor([[0.1834-0.6321j, 0.3646+0.6587j]])
----------Measure----------
Probability:  tensor([[0.4332, 0.5668]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6497-0.6051j, 0.4129+0.2030j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.6497-0.6051j, 0.4129+0.2030j]])
New state:  tensor([[0.2018-0.8646j, 0.2295+0.3987j]])
----------Measure----------
Probability:  tensor([[0.7883, 0.2117]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.4374-0.3565j, 0.7413+0.3636j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.4374-0.3565j, 0.7413+0.3636j]])
New state:  tensor([[0.1642-0.5398j, 0.4125+0.7152j]])
----------Measure----------
Probability:  tensor([[0.3183, 0.6817]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2424+0.j]])
ry_matrix:  tensor([[ 0.9927-0.j, -0.1209-0.j],
        [ 0.1209+0.j,  0.9927-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5285-0.6827j, 0.4063+0.2992j]])
Inside  rz
rz_matrix theta:  tensor([[1.1832+0.j]])
rz_matrix:  tensor([[0.8300-0.5577j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8300+0.5577j]])
Performing matrix multiplication

Current state:  tensor([[0.5285-0.6827j, 0.4063+0.2992j]])
New state:  tensor([[0.0579-0.8614j, 0.1704+0.4749j]])
----------Measure----------
Probability:  tensor([[0.7454, 0.2546]])
valid set accuracy: 1.0
valid set loss: 0.3955576419830322
------------------------------Epoch17------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5773-0.3884j, 0.6667+0.2671j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.5773-0.3884j, 0.6667+0.2671j]])
New state:  tensor([[0.2714-0.6407j, 0.4125+0.5879j]])
----------Measure----------
Probability:  tensor([[0.4842, 0.5158]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6671-0.5782j, 0.4297+0.1900j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.6671-0.5782j, 0.4297+0.1900j]])
New state:  tensor([[0.2430-0.8487j, 0.2561+0.3938j]])
----------Measure----------
Probability:  tensor([[0.7793, 0.2207]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5699-0.7525j, 0.2875+0.1623j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.5699-0.7525j, 0.2875+0.1623j]])
New state:  tensor([[0.0663-0.9416j, 0.1521+0.2930j]])
----------Measure----------
Probability:  tensor([[0.8910, 0.1090]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6273-0.5966j, 0.4462+0.2270j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.6273-0.5966j, 0.4462+0.2270j]])
New state:  tensor([[0.1996-0.8424j, 0.2498+0.4338j]])
----------Measure----------
Probability:  tensor([[0.7494, 0.2506]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6671-0.5782j, 0.4297+0.1900j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.6671-0.5782j, 0.4297+0.1900j]])
New state:  tensor([[0.2430-0.8487j, 0.2561+0.3938j]])
----------Measure----------
Probability:  tensor([[0.7793, 0.2207]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.1239-0.2135j, 0.8297+0.5007j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.1239-0.2135j, 0.8297+0.5007j]])
New state:  tensor([[-0.0128-0.2465j,  0.4215+0.8726j]])
----------Measure----------
Probability:  tensor([[0.0609, 0.9391]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6472-0.6064j, 0.4168+0.1993j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.6472-0.6064j, 0.4168+0.1993j]])
New state:  tensor([[0.2109-0.8614j, 0.2403+0.3946j]])
----------Measure----------
Probability:  tensor([[0.7865, 0.2135]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5294-0.6489j, 0.4486+0.3121j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.5294-0.6489j, 0.4486+0.3121j]])
New state:  tensor([[0.0890-0.8328j, 0.2053+0.5064j]])
----------Measure----------
Probability:  tensor([[0.7014, 0.2986]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4405-0.7358j, 0.3732+0.3539j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.4405-0.7358j, 0.3732+0.3539j]])
New state:  tensor([[-0.0330-0.8570j,  0.1194+0.5003j]])
----------Measure----------
Probability:  tensor([[0.7355, 0.2645]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5652-0.3453j, 0.7038+0.2568j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.5652-0.3453j, 0.7038+0.2568j]])
New state:  tensor([[0.2848-0.5979j, 0.4493+0.5996j]])
----------Measure----------
Probability:  tensor([[0.4387, 0.5613]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3990-0.4873j, 0.6296+0.4550j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.3990-0.4873j, 0.6296+0.4550j]])
New state:  tensor([[0.0681-0.6261j, 0.2788+0.7250j]])
----------Measure----------
Probability:  tensor([[0.3966, 0.6034]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4873-0.4502j, 0.6551+0.3615j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.4873-0.4502j, 0.6551+0.3615j]])
New state:  tensor([[0.1623-0.6433j, 0.3513+0.6606j]])
----------Measure----------
Probability:  tensor([[0.4401, 0.5599]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4736-0.6082j, 0.5072+0.3855j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.4736-0.6082j, 0.5072+0.3855j]])
New state:  tensor([[0.0645-0.7681j, 0.2143+0.5999j]])
----------Measure----------
Probability:  tensor([[0.5942, 0.4058]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7073-0.6652j, 0.2352+0.0442j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.7073-0.6652j, 0.2352+0.0442j]])
New state:  tensor([[0.2291-0.9435j, 0.1729+0.1655j]])
----------Measure----------
Probability:  tensor([[0.9427, 0.0573]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.4328-0.3587j, 0.7439+0.3614j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.4328-0.3587j, 0.7439+0.3614j]])
New state:  tensor([[0.1666-0.5369j, 0.4257+0.7091j]])
----------Measure----------
Probability:  tensor([[0.3160, 0.6840]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6042-0.3172j, 0.6977+0.2181j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.6042-0.3172j, 0.6977+0.2181j]])
New state:  tensor([[0.3329-0.5957j, 0.4653+0.5638j]])
----------Measure----------
Probability:  tensor([[0.4657, 0.5343]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5260-0.6845j, 0.4096+0.2950j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.5260-0.6845j, 0.4096+0.2950j]])
New state:  tensor([[0.0667-0.8607j, 0.1820+0.4708j]])
----------Measure----------
Probability:  tensor([[0.7452, 0.2548]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4968-0.4883j, 0.6187+0.3632j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.4968-0.4883j, 0.6187+0.3632j]])
New state:  tensor([[0.1494-0.6804j, 0.3199+0.6422j]])
----------Measure----------
Probability:  tensor([[0.4853, 0.5147]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1673-0.2741j, 0.7756+0.5434j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.1673-0.2741j, 0.7756+0.5434j]])
New state:  tensor([[-0.0095-0.3210j,  0.3529+0.8788j]])
----------Measure----------
Probability:  tensor([[0.1031, 0.8969]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5475-0.6613j, 0.4263+0.2850j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.5475-0.6613j, 0.4263+0.2850j]])
New state:  tensor([[0.0974-0.8530j, 0.2014+0.4716j]])
----------Measure----------
Probability:  tensor([[0.7371, 0.2629]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.5006-0.4244j, 0.6731+0.3408j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.5006-0.4244j, 0.6731+0.3408j]])
New state:  tensor([[0.1875-0.6290j, 0.3777+0.6531j]])
----------Measure----------
Probability:  tensor([[0.4308, 0.5692]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5036-0.7070j, 0.3921+0.3046j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.5036-0.7070j, 0.3921+0.3046j]])
New state:  tensor([[0.0357-0.8673j, 0.1621+0.4694j]])
----------Measure----------
Probability:  tensor([[0.7534, 0.2466]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5086-0.6717j, 0.4310+0.3230j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.5086-0.6717j, 0.4310+0.3230j]])
New state:  tensor([[0.0591-0.8405j, 0.1846+0.5060j]])
----------Measure----------
Probability:  tensor([[0.7099, 0.2901]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3934-0.3682j, 0.7409+0.4009j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.3934-0.3682j, 0.7409+0.4009j]])
New state:  tensor([[0.1284-0.5233j, 0.4016+0.7405j]])
----------Measure----------
Probability:  tensor([[0.2903, 0.7097]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6172-0.2747j, 0.7127+0.1889j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.6172-0.2747j, 0.7127+0.1889j]])
New state:  tensor([[0.3670-0.5672j, 0.4938+0.5475j]])
----------Measure----------
Probability:  tensor([[0.4564, 0.5436]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1989-0.7351j, 0.2675+0.5903j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.1989-0.7351j, 0.2675+0.5903j]])
New state:  tensor([[-0.2349-0.7244j, -0.0984+0.6406j]])
----------Measure----------
Probability:  tensor([[0.5800, 0.4200]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3446-0.6366j, 0.4633+0.5112j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.3446-0.6366j, 0.4633+0.5112j]])
New state:  tensor([[-0.0591-0.7215j,  0.1088+0.6813j]])
----------Measure----------
Probability:  tensor([[0.5240, 0.4760]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2817-0.7438j, 0.3253+0.5115j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.2817-0.7438j, 0.3253+0.5115j]])
New state:  tensor([[-0.1703-0.7769j, -0.0069+0.6061j]])
----------Measure----------
Probability:  tensor([[0.6326, 0.3674]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2547+0.j]])
ry_matrix:  tensor([[ 0.9919-0.j, -0.1270-0.j],
        [ 0.1270+0.j,  0.9919-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4154-0.6702j, 0.4448+0.4248j]])
Inside  rz
rz_matrix theta:  tensor([[1.1557+0.j]])
rz_matrix:  tensor([[0.8376-0.5462j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8376+0.5462j]])
Performing matrix multiplication

Current state:  tensor([[0.4154-0.6702j, 0.4448+0.4248j]])
New state:  tensor([[-0.0182-0.7883j,  0.1406+0.5988j]])
----------Measure----------
Probability:  tensor([[0.6217, 0.3783]])
valid set accuracy: 1.0
valid set loss: 0.39366263151168823
------------------------------Epoch18------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6246-0.5979j, 0.4500+0.2233j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.6246-0.5979j, 0.4500+0.2233j]])
New state:  tensor([[0.2080-0.8393j, 0.2608+0.4294j]])
----------Measure----------
Probability:  tensor([[0.7476, 0.2524]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5235-0.6863j, 0.4128+0.2908j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.5235-0.6863j, 0.4128+0.2908j]])
New state:  tensor([[0.0753-0.8599j, 0.1932+0.4665j]])
----------Measure----------
Probability:  tensor([[0.7451, 0.2549]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6645-0.5793j, 0.4337+0.1865j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.6645-0.5793j, 0.4337+0.1865j]])
New state:  tensor([[0.2516-0.8449j, 0.2667+0.3895j]])
----------Measure----------
Probability:  tensor([[0.7771, 0.2229]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4382-0.7380j, 0.3759+0.3494j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.4382-0.7380j, 0.3759+0.3494j]])
New state:  tensor([[-0.0244-0.8579j,  0.1308+0.4963j]])
----------Measure----------
Probability:  tensor([[0.7366, 0.2634]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4705-0.6105j, 0.5100+0.3818j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.4705-0.6105j, 0.5100+0.3818j]])
New state:  tensor([[0.0710-0.7675j, 0.2268+0.5954j]])
----------Measure----------
Probability:  tensor([[0.5941, 0.4059]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3952-0.4900j, 0.6320+0.4520j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.3952-0.4900j, 0.6320+0.4520j]])
New state:  tensor([[0.0718-0.6254j, 0.2922+0.7199j]])
----------Measure----------
Probability:  tensor([[0.3963, 0.6037]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6446-0.6076j, 0.4208+0.1956j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.6446-0.6076j, 0.4208+0.1956j]])
New state:  tensor([[0.2197-0.8581j, 0.2509+0.3903j]])
----------Measure----------
Probability:  tensor([[0.7847, 0.2153]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3889-0.3706j, 0.7433+0.3987j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.3889-0.3706j, 0.7433+0.3987j]])
New state:  tensor([[0.1304-0.5211j, 0.4148+0.7344j]])
----------Measure----------
Probability:  tensor([[0.2886, 0.7114]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4965-0.4265j, 0.6761+0.3382j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.4965-0.4265j, 0.6761+0.3382j]])
New state:  tensor([[0.1915-0.6259j, 0.3904+0.6474j]])
----------Measure----------
Probability:  tensor([[0.4285, 0.5715]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5449-0.6630j, 0.4296+0.2809j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.5449-0.6630j, 0.4296+0.2809j]])
New state:  tensor([[0.1058-0.8516j, 0.2128+0.4672j]])
----------Measure----------
Probability:  tensor([[0.7365, 0.2635]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6129-0.2758j, 0.7164+0.1872j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.6129-0.2758j, 0.7164+0.1872j]])
New state:  tensor([[0.3703-0.5608j, 0.5053+0.5413j]])
----------Measure----------
Probability:  tensor([[0.4517, 0.5483]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5609-0.3468j, 0.7073+0.2547j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.5609-0.3468j, 0.7073+0.2547j]])
New state:  tensor([[0.2884-0.5930j, 0.4614+0.5935j]])
----------Measure----------
Probability:  tensor([[0.4349, 0.5651]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.5012-0.7088j, 0.3952+0.3003j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.5012-0.7088j, 0.3952+0.3003j]])
New state:  tensor([[0.0444-0.8670j, 0.1733+0.4651j]])
----------Measure----------
Probability:  tensor([[0.7536, 0.2464]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.6000-0.3185j, 0.7014+0.2162j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.6000-0.3185j, 0.7014+0.2162j]])
New state:  tensor([[0.3366-0.5900j, 0.4770+0.5577j]])
----------Measure----------
Probability:  tensor([[0.4614, 0.5386]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4126-0.6728j, 0.4473+0.4207j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.4126-0.6728j, 0.4473+0.4207j]])
New state:  tensor([[-0.0112-0.7892j,  0.1530+0.5947j]])
----------Measure----------
Probability:  tensor([[0.6229, 0.3771]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5060-0.6737j, 0.4341+0.3189j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.5060-0.6737j, 0.4341+0.3189j]])
New state:  tensor([[0.0673-0.8399j, 0.1962+0.5016j]])
----------Measure----------
Probability:  tensor([[0.7099, 0.2901]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6645-0.5793j, 0.4337+0.1865j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.6645-0.5793j, 0.4337+0.1865j]])
New state:  tensor([[0.2516-0.8449j, 0.2667+0.3895j]])
----------Measure----------
Probability:  tensor([[0.7771, 0.2229]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1626-0.2774j, 0.7766+0.5417j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.1626-0.2774j, 0.7766+0.5417j]])
New state:  tensor([[-0.0109-0.3214j,  0.3665+0.8731j]])
----------Measure----------
Probability:  tensor([[0.1034, 0.8966]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.4283-0.3609j, 0.7465+0.3592j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.4283-0.3609j, 0.7465+0.3592j]])
New state:  tensor([[0.1689-0.5340j, 0.4387+0.7028j]])
----------Measure----------
Probability:  tensor([[0.3136, 0.6864]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5733-0.3901j, 0.6702+0.2647j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.5733-0.3901j, 0.6702+0.2647j]])
New state:  tensor([[0.2758-0.6362j, 0.4247+0.5821j]])
----------Measure----------
Probability:  tensor([[0.4808, 0.5192]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3417-0.6397j, 0.4653+0.5073j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.3417-0.6397j, 0.4653+0.5073j]])
New state:  tensor([[-0.0534-0.7233j,  0.1219+0.6776j]])
----------Measure----------
Probability:  tensor([[0.5261, 0.4739]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7058-0.6655j, 0.2395+0.0401j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.7058-0.6655j, 0.2395+0.0401j]])
New state:  tensor([[0.2405-0.9398j, 0.1809+0.1620j]])
----------Measure----------
Probability:  tensor([[0.9410, 0.0590]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4931-0.4905j, 0.6217+0.3602j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.4931-0.4905j, 0.6217+0.3602j]])
New state:  tensor([[0.1543-0.6782j, 0.3327+0.6369j]])
----------Measure----------
Probability:  tensor([[0.4837, 0.5163]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5267-0.6508j, 0.4518+0.3081j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.5267-0.6508j, 0.4518+0.3081j]])
New state:  tensor([[0.0969-0.8316j, 0.2170+0.5020j]])
----------Measure----------
Probability:  tensor([[0.7010, 0.2990]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2797-0.7469j, 0.3270+0.5069j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.2797-0.7469j, 0.3270+0.5069j]])
New state:  tensor([[-0.1631-0.7807j,  0.0052+0.6032j]])
----------Measure----------
Probability:  tensor([[0.6361, 0.3639]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4833-0.4524j, 0.6581+0.3587j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.4833-0.4524j, 0.6581+0.3587j]])
New state:  tensor([[0.1664-0.6407j, 0.3642+0.6551j]])
----------Measure----------
Probability:  tensor([[0.4382, 0.5618]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5681-0.7535j, 0.2909+0.1578j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.5681-0.7535j, 0.2909+0.1578j]])
New state:  tensor([[0.0771-0.9405j, 0.1615+0.2889j]])
----------Measure----------
Probability:  tensor([[0.8905, 0.1095]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.1189-0.2165j, 0.8304+0.4994j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.1189-0.2165j, 0.8304+0.4994j]])
New state:  tensor([[-0.0153-0.2465j,  0.4346+0.8661j]])
----------Measure----------
Probability:  tensor([[0.0610, 0.9390]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2669+0.j]])
ry_matrix:  tensor([[ 0.9911-0.j, -0.1330-0.j],
        [ 0.1330+0.j,  0.9911-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1973-0.7387j, 0.2687+0.5858j]])
Inside  rz
rz_matrix theta:  tensor([[1.1286+0.j]])
rz_matrix:  tensor([[0.8450-0.5348j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8450+0.5348j]])
Performing matrix multiplication

Current state:  tensor([[0.1973-0.7387j, 0.2687+0.5858j]])
New state:  tensor([[-0.2284-0.7297j, -0.0863+0.6387j]])
----------Measure----------
Probability:  tensor([[0.5846, 0.4154]])
valid set accuracy: 1.0
valid set loss: 0.3918333947658539
------------------------------Epoch19------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4101-0.6751j, 0.4496+0.4169j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.4101-0.6751j, 0.4496+0.4169j]])
New state:  tensor([[-0.0040-0.7899j,  0.1648+0.5906j]])
----------Measure----------
Probability:  tensor([[0.6240, 0.3760]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5212-0.6879j, 0.4157+0.2869j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.5212-0.6879j, 0.4157+0.2869j]])
New state:  tensor([[0.0839-0.8590j, 0.2040+0.4621j]])
----------Measure----------
Probability:  tensor([[0.7449, 0.2551]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5569-0.3483j, 0.7104+0.2528j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.5569-0.3483j, 0.7104+0.2528j]])
New state:  tensor([[0.2921-0.5883j, 0.4729+0.5873j]])
----------Measure----------
Probability:  tensor([[0.4314, 0.5686]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6220-0.5992j, 0.4535+0.2200j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.6220-0.5992j, 0.4535+0.2200j]])
New state:  tensor([[0.2163-0.8362j, 0.2712+0.4248j]])
----------Measure----------
Probability:  tensor([[0.7460, 0.2540]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5960-0.3197j, 0.7047+0.2144j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.5960-0.3197j, 0.7047+0.2144j]])
New state:  tensor([[0.3404-0.5844j, 0.4882+0.5516j]])
----------Measure----------
Probability:  tensor([[0.4574, 0.5426]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6088-0.2769j, 0.7199+0.1856j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.6088-0.2769j, 0.7199+0.1856j]])
New state:  tensor([[0.3738-0.5546j, 0.5161+0.5350j]])
----------Measure----------
Probability:  tensor([[0.4473, 0.5527]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3847-0.3728j, 0.7455+0.3966j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.3847-0.3728j, 0.7455+0.3966j]])
New state:  tensor([[0.1326-0.5191j, 0.4275+0.7282j]])
----------Measure----------
Probability:  tensor([[0.2870, 0.7130]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2779-0.7497j, 0.3286+0.5027j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.2779-0.7497j, 0.3286+0.5027j]])
New state:  tensor([[-0.1558-0.7843j,  0.0168+0.6003j]])
----------Measure----------
Probability:  tensor([[0.6393, 0.3607]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.4241-0.3629j, 0.7489+0.3572j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.4241-0.3629j, 0.7489+0.3572j]])
New state:  tensor([[0.1713-0.5312j, 0.4511+0.6964j]])
----------Measure----------
Probability:  tensor([[0.3115, 0.6885]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3916-0.4926j, 0.6342+0.4493j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.3916-0.4926j, 0.6342+0.4493j]])
New state:  tensor([[0.0758-0.6247j, 0.3051+0.7148j]])
----------Measure----------
Probability:  tensor([[0.3960, 0.6040]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4361-0.7399j, 0.3784+0.3452j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.4361-0.7399j, 0.3784+0.3452j]])
New state:  tensor([[-0.0158-0.8587j,  0.1416+0.4922j]])
----------Measure----------
Probability:  tensor([[0.7377, 0.2623]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5035-0.6755j, 0.4369+0.3151j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.5035-0.6755j, 0.4369+0.3151j]])
New state:  tensor([[0.0754-0.8391j, 0.2073+0.4972j]])
----------Measure----------
Probability:  tensor([[0.7098, 0.2902]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4927-0.4284j, 0.6789+0.3358j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.4927-0.4284j, 0.6789+0.3358j]])
New state:  tensor([[0.1955-0.6230j, 0.4026+0.6416j]])
----------Measure----------
Probability:  tensor([[0.4263, 0.5737]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1582-0.2804j, 0.7776+0.5401j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.1582-0.2804j, 0.7776+0.5401j]])
New state:  tensor([[-0.0120-0.3218j,  0.3797+0.8673j]])
----------Measure----------
Probability:  tensor([[0.1037, 0.8963]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6620-0.5803j, 0.4375+0.1832j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.6620-0.5803j, 0.4375+0.1832j]])
New state:  tensor([[0.2602-0.8410j, 0.2768+0.3851j]])
----------Measure----------
Probability:  tensor([[0.7751, 0.2249]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5695-0.3915j, 0.6734+0.2625j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.5695-0.3915j, 0.6734+0.2625j]])
New state:  tensor([[0.2802-0.6317j, 0.4363+0.5762j]])
----------Measure----------
Probability:  tensor([[0.4776, 0.5224]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1958-0.7420j, 0.2698+0.5817j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.1958-0.7420j, 0.2698+0.5817j]])
New state:  tensor([[-0.2216-0.7347j, -0.0747+0.6368j]])
----------Measure----------
Probability:  tensor([[0.5889, 0.4111]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.1142-0.2193j, 0.8311+0.4982j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.1142-0.2193j, 0.8311+0.4982j]])
New state:  tensor([[-0.0175-0.2467j,  0.4472+0.8596j]])
----------Measure----------
Probability:  tensor([[0.0611, 0.9389]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4990-0.7105j, 0.3980+0.2963j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.4990-0.7105j, 0.3980+0.2963j]])
New state:  tensor([[0.0532-0.8666j, 0.1840+0.4609j]])
----------Measure----------
Probability:  tensor([[0.7538, 0.2462]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4895-0.4925j, 0.6245+0.3575j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.4895-0.4925j, 0.6245+0.3575j]])
New state:  tensor([[0.1592-0.6759j, 0.3449+0.6315j]])
----------Measure----------
Probability:  tensor([[0.4822, 0.5178]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4676-0.6127j, 0.5127+0.3783j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.4676-0.6127j, 0.5127+0.3783j]])
New state:  tensor([[0.0776-0.7668j, 0.2387+0.5907j]])
----------Measure----------
Probability:  tensor([[0.5940, 0.4060]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7045-0.6657j, 0.2434+0.0364j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.7045-0.6657j, 0.2434+0.0364j]])
New state:  tensor([[0.2517-0.9360j, 0.1884+0.1584j]])
----------Measure----------
Probability:  tensor([[0.9394, 0.0606]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6620-0.5803j, 0.4375+0.1832j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.6620-0.5803j, 0.4375+0.1832j]])
New state:  tensor([[0.2602-0.8410j, 0.2768+0.3851j]])
----------Measure----------
Probability:  tensor([[0.7751, 0.2249]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5665-0.7543j, 0.2941+0.1535j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.5665-0.7543j, 0.2941+0.1535j]])
New state:  tensor([[0.0877-0.9393j, 0.1702+0.2848j]])
----------Measure----------
Probability:  tensor([[0.8899, 0.1101]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5425-0.6646j, 0.4327+0.2772j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.5425-0.6646j, 0.4327+0.2772j]])
New state:  tensor([[0.1142-0.8502j, 0.2235+0.4627j]])
----------Measure----------
Probability:  tensor([[0.7359, 0.2641]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5241-0.6526j, 0.4547+0.3044j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.5241-0.6526j, 0.4547+0.3044j]])
New state:  tensor([[0.1049-0.8304j, 0.2281+0.4975j]])
----------Measure----------
Probability:  tensor([[0.7005, 0.2995]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4796-0.4544j, 0.6608+0.3562j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.4796-0.4544j, 0.6608+0.3562j]])
New state:  tensor([[0.1707-0.6382j, 0.3765+0.6494j]])
----------Measure----------
Probability:  tensor([[0.4365, 0.5635]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6423-0.6087j, 0.4244+0.1922j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.6423-0.6087j, 0.4244+0.1922j]])
New state:  tensor([[0.2285-0.8548j, 0.2610+0.3859j]])
----------Measure----------
Probability:  tensor([[0.7830, 0.2170]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2781+0.j]])
ry_matrix:  tensor([[ 0.9903-0.j, -0.1386-0.j],
        [ 0.1386+0.j,  0.9903-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3391-0.6426j, 0.4673+0.5037j]])
Inside  rz
rz_matrix theta:  tensor([[1.1020+0.j]])
rz_matrix:  tensor([[0.8520-0.5235j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8520+0.5235j]])
Performing matrix multiplication

Current state:  tensor([[0.3391-0.6426j, 0.4673+0.5037j]])
New state:  tensor([[-0.0475-0.7250j,  0.1344+0.6738j]])
----------Measure----------
Probability:  tensor([[0.5279, 0.4721]])
valid set accuracy: 1.0
valid set loss: 0.39018765091896057
------------------------------Epoch20------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6593-0.5815j, 0.4416+0.1796j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.6593-0.5815j, 0.4416+0.1796j]])
New state:  tensor([[0.2682-0.8371j, 0.2872+0.3805j]])
----------Measure----------
Probability:  tensor([[0.7728, 0.2272]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1941-0.7456j, 0.2710+0.5770j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.1941-0.7456j, 0.2710+0.5770j]])
New state:  tensor([[-0.2153-0.7398j, -0.0629+0.6344j]])
----------Measure----------
Probability:  tensor([[0.5936, 0.4064]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2758-0.7528j, 0.3303+0.4980j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.2758-0.7528j, 0.3303+0.4980j]])
New state:  tensor([[-0.1489-0.7878j,  0.0285+0.5969j]])
----------Measure----------
Probability:  tensor([[0.6429, 0.3571]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5186-0.6897j, 0.4189+0.2826j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.5186-0.6897j, 0.4189+0.2826j]])
New state:  tensor([[0.0920-0.8580j, 0.2150+0.4574j]])
----------Measure----------
Probability:  tensor([[0.7446, 0.2554]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5213-0.6544j, 0.4580+0.3004j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.5213-0.6544j, 0.4580+0.3004j]])
New state:  tensor([[0.1123-0.8291j, 0.2394+0.4926j]])
----------Measure----------
Probability:  tensor([[0.7000, 0.3000]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5653-0.3932j, 0.6769+0.2601j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.5653-0.3932j, 0.6769+0.2601j]])
New state:  tensor([[0.2840-0.6273j, 0.4481+0.5702j]])
----------Measure----------
Probability:  tensor([[0.4741, 0.5259]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5646-0.7553j, 0.2976+0.1488j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.5646-0.7553j, 0.2976+0.1488j]])
New state:  tensor([[0.0979-0.9379j, 0.1794+0.2803j]])
----------Measure----------
Probability:  tensor([[0.8893, 0.1107]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4885-0.4305j, 0.6820+0.3332j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.4885-0.4305j, 0.6820+0.3332j]])
New state:  tensor([[0.1989-0.6200j, 0.4149+0.6355j]])
----------Measure----------
Probability:  tensor([[0.4239, 0.5761]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6396-0.6099j, 0.4284+0.1884j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.6396-0.6099j, 0.4284+0.1884j]])
New state:  tensor([[0.2368-0.8514j, 0.2714+0.3813j]])
----------Measure----------
Probability:  tensor([[0.7810, 0.2190]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4755-0.4566j, 0.6638+0.3534j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.4755-0.4566j, 0.6638+0.3534j]])
New state:  tensor([[0.1744-0.6357j, 0.3890+0.6436j]])
----------Measure----------
Probability:  tensor([[0.4345, 0.5655]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3801-0.3753j, 0.7478+0.3943j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.3801-0.3753j, 0.7478+0.3943j]])
New state:  tensor([[0.1341-0.5170j, 0.4402+0.7217j]])
----------Measure----------
Probability:  tensor([[0.2853, 0.7147]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4856-0.4947j, 0.6275+0.3544j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.4856-0.4947j, 0.6275+0.3544j]])
New state:  tensor([[0.1636-0.6737j, 0.3573+0.6259j]])
----------Measure----------
Probability:  tensor([[0.4806, 0.5194]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3877-0.4953j, 0.6366+0.4462j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.3877-0.4953j, 0.6366+0.4462j]])
New state:  tensor([[0.0791-0.6240j, 0.3181+0.7093j]])
----------Measure----------
Probability:  tensor([[0.3956, 0.6044]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4337-0.7421j, 0.3811+0.3406j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.4337-0.7421j, 0.3811+0.3406j]])
New state:  tensor([[-0.0077-0.8595j,  0.1527+0.4877j]])
----------Measure----------
Probability:  tensor([[0.7388, 0.2612]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.1090-0.2224j, 0.8318+0.4968j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.1090-0.2224j, 0.8318+0.4968j]])
New state:  tensor([[-0.0203-0.2469j,  0.4597+0.8528j]])
----------Measure----------
Probability:  tensor([[0.0614, 0.9386]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5398-0.6663j, 0.4360+0.2731j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.5398-0.6663j, 0.4360+0.2731j]])
New state:  tensor([[0.1221-0.8488j, 0.2346+0.4579j]])
----------Measure----------
Probability:  tensor([[0.7353, 0.2647]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4965-0.7123j, 0.4011+0.2919j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.4965-0.7123j, 0.4011+0.2919j]])
New state:  tensor([[0.0614-0.8661j, 0.1949+0.4562j]])
----------Measure----------
Probability:  tensor([[0.7539, 0.2461]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6043-0.2780j, 0.7237+0.1839j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.6043-0.2780j, 0.7237+0.1839j]])
New state:  tensor([[0.3765-0.5484j, 0.5272+0.5287j]])
----------Measure----------
Probability:  tensor([[0.4425, 0.5575]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4073-0.6777j, 0.4522+0.4127j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.4073-0.6777j, 0.4522+0.4127j]])
New state:  tensor([[0.0025-0.7907j, 0.1769+0.5861j]])
----------Measure----------
Probability:  tensor([[0.6252, 0.3748]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.5008-0.6774j, 0.4400+0.3109j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.5008-0.6774j, 0.4400+0.3109j]])
New state:  tensor([[0.0830-0.8383j, 0.2186+0.4925j]])
----------Measure----------
Probability:  tensor([[0.7097, 0.2903]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5916-0.3210j, 0.7084+0.2124j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.5916-0.3210j, 0.7084+0.2124j]])
New state:  tensor([[0.3436-0.5788j, 0.4996+0.5453j]])
----------Measure----------
Probability:  tensor([[0.4530, 0.5470]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5525-0.3498j, 0.7139+0.2506j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.5525-0.3498j, 0.7139+0.2506j]])
New state:  tensor([[0.2952-0.5835j, 0.4846+0.5810j]])
----------Measure----------
Probability:  tensor([[0.4276, 0.5724]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3362-0.6457j, 0.4694+0.4997j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.3362-0.6457j, 0.4694+0.4997j]])
New state:  tensor([[-0.0421-0.7268j,  0.1470+0.6696j]])
----------Measure----------
Probability:  tensor([[0.5300, 0.4700]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.4194-0.3651j, 0.7516+0.3549j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.4194-0.3651j, 0.7516+0.3549j]])
New state:  tensor([[0.1731-0.5284j, 0.4636+0.6899j]])
----------Measure----------
Probability:  tensor([[0.3092, 0.6908]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6593-0.5815j, 0.4416+0.1796j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.6593-0.5815j, 0.4416+0.1796j]])
New state:  tensor([[0.2682-0.8371j, 0.2872+0.3805j]])
----------Measure----------
Probability:  tensor([[0.7728, 0.2272]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7029-0.6659j, 0.2478+0.0322j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.7029-0.6659j, 0.2478+0.0322j]])
New state:  tensor([[0.2625-0.9320j, 0.1963+0.1547j]])
----------Measure----------
Probability:  tensor([[0.9375, 0.0625]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6192-0.6005j, 0.4574+0.2162j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.6192-0.6005j, 0.4574+0.2162j]])
New state:  tensor([[0.2241-0.8330j, 0.2820+0.4200j]])
----------Measure----------
Probability:  tensor([[0.7441, 0.2559]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1534-0.2838j, 0.7785+0.5384j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.1534-0.2838j, 0.7785+0.5384j]])
New state:  tensor([[-0.0137-0.3223j,  0.3927+0.8612j]])
----------Measure----------
Probability:  tensor([[0.1041, 0.8959]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.2906+0.j]])
ry_matrix:  tensor([[ 0.9895-0.j, -0.1448-0.j],
        [ 0.1448+0.j,  0.9895-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4644-0.6150j, 0.5156+0.3745j]])
Inside  rz
rz_matrix theta:  tensor([[1.0759+0.j]])
rz_matrix:  tensor([[0.8588-0.5124j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8588+0.5124j]])
Performing matrix multiplication

Current state:  tensor([[0.4644-0.6150j, 0.5156+0.3745j]])
New state:  tensor([[0.0837-0.7661j, 0.2509+0.5858j]])
----------Measure----------
Probability:  tensor([[0.5939, 0.4061]])
valid set accuracy: 1.0
valid set loss: 0.3884175419807434
------------------------------Epoch21------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4721-0.4584j, 0.6662+0.3510j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.4721-0.4584j, 0.6662+0.3510j]])
New state:  tensor([[0.1787-0.6333j, 0.4004+0.6377j]])
----------Measure----------
Probability:  tensor([[0.4330, 0.5670]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4318-0.7438j, 0.3833+0.3368j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.4318-0.7438j, 0.3833+0.3368j]])
New state:  tensor([[0.0007-0.8600j, 0.1628+0.4836j]])
----------Measure----------
Probability:  tensor([[0.7396, 0.2604]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4050-0.6798j, 0.4542+0.4093j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.4050-0.6798j, 0.4542+0.4093j]])
New state:  tensor([[0.0096-0.7912j, 0.1878+0.5818j]])
----------Measure----------
Probability:  tensor([[0.6262, 0.3738]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5376-0.6677j, 0.4388+0.2697j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.5376-0.6677j, 0.4388+0.2697j]])
New state:  tensor([[0.1304-0.8472j, 0.2444+0.4533j]])
----------Measure----------
Probability:  tensor([[0.7347, 0.2653]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1495-0.2865j, 0.7793+0.5369j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.1495-0.2865j, 0.7793+0.5369j]])
New state:  tensor([[-0.0143-0.3228j,  0.4051+0.8553j]])
----------Measure----------
Probability:  tensor([[0.1044, 0.8956]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4618-0.6169j, 0.5179+0.3714j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.4618-0.6169j, 0.5179+0.3714j]])
New state:  tensor([[0.0903-0.7653j, 0.2619+0.5810j]])
----------Measure----------
Probability:  tensor([[0.5938, 0.4062]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6169-0.6016j, 0.4605+0.2132j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.6169-0.6016j, 0.4605+0.2132j]])
New state:  tensor([[0.2322-0.8298j, 0.2916+0.4153j]])
----------Measure----------
Probability:  tensor([[0.7425, 0.2575]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5165-0.6911j, 0.4216+0.2792j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.5165-0.6911j, 0.4216+0.2792j]])
New state:  tensor([[0.1004-0.8569j, 0.2248+0.4529j]])
----------Measure----------
Probability:  tensor([[0.7444, 0.2556]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.1048-0.2249j, 0.8323+0.4957j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.1048-0.2249j, 0.8323+0.4957j]])
New state:  tensor([[-0.0220-0.2472j,  0.4716+0.8461j]])
----------Measure----------
Probability:  tensor([[0.0616, 0.9384]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1927-0.7485j, 0.2720+0.5733j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.1927-0.7485j, 0.2720+0.5733j]])
New state:  tensor([[-0.2085-0.7443j, -0.0521+0.6324j]])
----------Measure----------
Probability:  tensor([[0.5974, 0.4026]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2742-0.7554j, 0.3317+0.4942j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.2742-0.7554j, 0.3317+0.4942j]])
New state:  tensor([[-0.1415-0.7910j,  0.0392+0.5939j]])
----------Measure----------
Probability:  tensor([[0.6457, 0.3543]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5489-0.3511j, 0.7166+0.2488j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.5489-0.3511j, 0.7166+0.2488j]])
New state:  tensor([[0.2989-0.5789j, 0.4953+0.5746j]])
----------Measure----------
Probability:  tensor([[0.4245, 0.5755]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4945-0.7138j, 0.4036+0.2883j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.4945-0.7138j, 0.4036+0.2883j]])
New state:  tensor([[0.0700-0.8655j, 0.2047+0.4518j]])
----------Measure----------
Probability:  tensor([[0.7540, 0.2460]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4825-0.4965j, 0.6300+0.3519j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.4825-0.4965j, 0.6300+0.3519j]])
New state:  tensor([[0.1685-0.6715j, 0.3687+0.6203j]])
----------Measure----------
Probability:  tensor([[0.4793, 0.5207]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.6007-0.2789j, 0.7267+0.1825j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.6007-0.2789j, 0.7267+0.1825j]])
New state:  tensor([[0.3799-0.5425j, 0.5373+0.5222j]])
----------Measure----------
Probability:  tensor([[0.4386, 0.5614]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5189-0.6559j, 0.4606+0.2971j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.5189-0.6559j, 0.4606+0.2971j]])
New state:  tensor([[0.1202-0.8277j, 0.2496+0.4880j]])
----------Measure----------
Probability:  tensor([[0.6996, 0.3004]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4986-0.6790j, 0.4426+0.3075j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.4986-0.6790j, 0.4426+0.3075j]])
New state:  tensor([[0.0910-0.8374j, 0.2288+0.4879j]])
----------Measure----------
Probability:  tensor([[0.7096, 0.2904]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3844-0.4976j, 0.6386+0.4437j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.3844-0.4976j, 0.6386+0.4437j]])
New state:  tensor([[0.0832-0.6233j, 0.3301+0.7040j]])
----------Measure----------
Probability:  tensor([[0.3954, 0.6046]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7017-0.6660j, 0.2514+0.0289j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.7017-0.6660j, 0.2514+0.0289j]])
New state:  tensor([[0.2732-0.9281j, 0.2030+0.1510j]])
----------Measure----------
Probability:  tensor([[0.9360, 0.0640]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3763-0.3773j, 0.7497+0.3924j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.3763-0.3773j, 0.7497+0.3924j]])
New state:  tensor([[0.1364-0.5151j, 0.4520+0.7154j]])
----------Measure----------
Probability:  tensor([[0.2839, 0.7161]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5880-0.3221j, 0.7114+0.2107j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.5880-0.3221j, 0.7114+0.2107j]])
New state:  tensor([[0.3473-0.5735j, 0.5099+0.5390j]])
----------Measure----------
Probability:  tensor([[0.4495, 0.5505]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3338-0.6482j, 0.4711+0.4965j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.3338-0.6482j, 0.4711+0.4965j]])
New state:  tensor([[-0.0361-0.7282j,  0.1587+0.6657j]])
----------Measure----------
Probability:  tensor([[0.5316, 0.4684]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6570-0.5824j, 0.4449+0.1767j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.6570-0.5824j, 0.4449+0.1767j]])
New state:  tensor([[0.2765-0.8333j, 0.2964+0.3759j]])
----------Measure----------
Probability:  tensor([[0.7709, 0.2291]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.4156-0.3669j, 0.7537+0.3531j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.4156-0.3669j, 0.7537+0.3531j]])
New state:  tensor([[0.1757-0.5258j, 0.4751+0.6833j]])
----------Measure----------
Probability:  tensor([[0.3073, 0.6927]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4850-0.4322j, 0.6844+0.3310j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.4850-0.4322j, 0.6844+0.3310j]])
New state:  tensor([[0.2030-0.6171j, 0.4263+0.6295j]])
----------Measure----------
Probability:  tensor([[0.4220, 0.5780]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6570-0.5824j, 0.4449+0.1767j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.6570-0.5824j, 0.4449+0.1767j]])
New state:  tensor([[0.2765-0.8333j, 0.2964+0.3759j]])
----------Measure----------
Probability:  tensor([[0.7709, 0.2291]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5631-0.7560j, 0.3005+0.1450j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.5631-0.7560j, 0.3005+0.1450j]])
New state:  tensor([[0.1082-0.9365j, 0.1873+0.2761j]])
----------Measure----------
Probability:  tensor([[0.8887, 0.1113]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5619-0.3945j, 0.6798+0.2581j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.5619-0.3945j, 0.6798+0.2581j]])
New state:  tensor([[0.2884-0.6230j, 0.4588+0.5641j]])
----------Measure----------
Probability:  tensor([[0.4713, 0.5287]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3007+0.j]])
ry_matrix:  tensor([[ 0.9887-0.j, -0.1498-0.j],
        [ 0.1498+0.j,  0.9887-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6374-0.6108j, 0.4316+0.1853j]])
Inside  rz
rz_matrix theta:  tensor([[1.0503+0.j]])
rz_matrix:  tensor([[0.8653-0.5013j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8653+0.5013j]])
Performing matrix multiplication

Current state:  tensor([[0.6374-0.6108j, 0.4316+0.1853j]])
New state:  tensor([[0.2453-0.8481j, 0.2806+0.3767j]])
----------Measure----------
Probability:  tensor([[0.7794, 0.2206]])
valid set accuracy: 1.0
valid set loss: 0.3870205283164978
------------------------------Epoch22------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4962-0.6806j, 0.4453+0.3038j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.4962-0.6806j, 0.4453+0.3038j]])
New state:  tensor([[0.0986-0.8365j, 0.2391+0.4831j]])
----------Measure----------
Probability:  tensor([[0.7094, 0.2906]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4923-0.7153j, 0.4063+0.2844j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.4923-0.7153j, 0.4063+0.2844j]])
New state:  tensor([[0.0782-0.8648j, 0.2146+0.4471j]])
----------Measure----------
Probability:  tensor([[0.7540, 0.2460]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4297-0.7456j, 0.3856+0.3328j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.4297-0.7456j, 0.3856+0.3328j]])
New state:  tensor([[0.0088-0.8605j, 0.1728+0.4791j]])
----------Measure----------
Probability:  tensor([[0.7406, 0.2594]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5615-0.7568j, 0.3036+0.1409j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.5615-0.7568j, 0.3036+0.1409j]])
New state:  tensor([[0.1182-0.9349j, 0.1955+0.2716j]])
----------Measure----------
Probability:  tensor([[0.8880, 0.1120]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5841-0.3232j, 0.7146+0.2090j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.5841-0.3232j, 0.7146+0.2090j]])
New state:  tensor([[0.3505-0.5682j, 0.5203+0.5326j]])
----------Measure----------
Probability:  tensor([[0.4457, 0.5543]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2724-0.7580j, 0.3332+0.4901j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.2724-0.7580j, 0.3332+0.4901j]])
New state:  tensor([[-0.1344-0.7942j,  0.0500+0.5905j]])
----------Measure----------
Probability:  tensor([[0.6488, 0.3512]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5142-0.6926j, 0.4244+0.2754j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.5142-0.6926j, 0.4244+0.2754j]])
New state:  tensor([[0.1084-0.8558j, 0.2348+0.4481j]])
----------Measure----------
Probability:  tensor([[0.7441, 0.2559]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5352-0.6691j, 0.4417+0.2661j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.5352-0.6691j, 0.4417+0.2661j]])
New state:  tensor([[0.1382-0.8456j, 0.2545+0.4485j]])
----------Measure----------
Probability:  tensor([[0.7341, 0.2659]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6546-0.5833j, 0.4485+0.1735j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.6546-0.5833j, 0.4485+0.1735j]])
New state:  tensor([[0.2844-0.8294j, 0.3057+0.3711j]])
----------Measure----------
Probability:  tensor([[0.7688, 0.2312]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1452-0.2894j, 0.7801+0.5354j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.1452-0.2894j, 0.7801+0.5354j]])
New state:  tensor([[-0.0154-0.3235j,  0.4173+0.8491j]])
----------Measure----------
Probability:  tensor([[0.1049, 0.8951]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.1003-0.2276j, 0.8329+0.4945j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.1003-0.2276j, 0.8329+0.4945j]])
New state:  tensor([[-0.0242-0.2476j,  0.4833+0.8394j]])
----------Measure----------
Probability:  tensor([[0.0619, 0.9381]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5967-0.2799j, 0.7300+0.1810j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.5967-0.2799j, 0.7300+0.1810j]])
New state:  tensor([[0.3827-0.5366j, 0.5474+0.5157j]])
----------Measure----------
Probability:  tensor([[0.4344, 0.5656]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6144-0.6028j, 0.4638+0.2099j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.6144-0.6028j, 0.4638+0.2099j]])
New state:  tensor([[0.2398-0.8266j, 0.3013+0.4104j]])
----------Measure----------
Probability:  tensor([[0.7408, 0.2592]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3313-0.6509j, 0.4729+0.4929j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.3313-0.6509j, 0.4729+0.4929j]])
New state:  tensor([[-0.0305-0.7297j,  0.1704+0.6615j]])
----------Measure----------
Probability:  tensor([[0.5334, 0.4666]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4790-0.4984j, 0.6326+0.3492j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.4790-0.4984j, 0.6326+0.3492j]])
New state:  tensor([[0.1730-0.6693j, 0.3800+0.6145j]])
----------Measure----------
Probability:  tensor([[0.4779, 0.5221]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5582-0.3959j, 0.6828+0.2559j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.5582-0.3959j, 0.6828+0.2559j]])
New state:  tensor([[0.2923-0.6187j, 0.4695+0.5579j]])
----------Measure----------
Probability:  tensor([[0.4683, 0.5317]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5449-0.3525j, 0.7196+0.2469j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.5449-0.3525j, 0.7196+0.2469j]])
New state:  tensor([[0.3021-0.5744j, 0.5060+0.5681j]])
----------Measure----------
Probability:  tensor([[0.4212, 0.5788]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.7003-0.6662j, 0.2552+0.0252j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.7003-0.6662j, 0.2552+0.0252j]])
New state:  tensor([[0.2836-0.9240j, 0.2100+0.1471j]])
----------Measure----------
Probability:  tensor([[0.9342, 0.0658]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5164-0.6576j, 0.4634+0.2935j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.5164-0.6576j, 0.4634+0.2935j]])
New state:  tensor([[0.1276-0.8263j, 0.2600+0.4831j]])
----------Measure----------
Probability:  tensor([[0.6991, 0.3009]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4685-0.4603j, 0.6687+0.3485j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.4603j, 0.6687+0.3485j]])
New state:  tensor([[0.1825-0.6309j, 0.4119+0.6317j]])
----------Measure----------
Probability:  tensor([[0.4313, 0.5687]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4813-0.4339j, 0.6871+0.3286j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.4813-0.4339j, 0.6871+0.3286j]])
New state:  tensor([[0.2066-0.6142j, 0.4376+0.6233j]])
----------Measure----------
Probability:  tensor([[0.4200, 0.5800]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6546-0.5833j, 0.4485+0.1735j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.6546-0.5833j, 0.4485+0.1735j]])
New state:  tensor([[0.2844-0.8294j, 0.3057+0.3711j]])
----------Measure----------
Probability:  tensor([[0.7688, 0.2312]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4590-0.6189j, 0.5204+0.3680j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.4590-0.6189j, 0.5204+0.3680j]])
New state:  tensor([[0.0965-0.7645j, 0.2730+0.5760j]])
----------Measure----------
Probability:  tensor([[0.5937, 0.4063]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.4115-0.3688j, 0.7559+0.3511j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.4115-0.3688j, 0.7559+0.3511j]])
New state:  tensor([[0.1777-0.5232j, 0.4866+0.6767j]])
----------Measure----------
Probability:  tensor([[0.3053, 0.6947]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4025-0.6820j, 0.4564+0.4056j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.4025-0.6820j, 0.4564+0.4056j]])
New state:  tensor([[0.0163-0.7918j, 0.1989+0.5773j]])
----------Measure----------
Probability:  tensor([[0.6272, 0.3728]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1913-0.7516j, 0.2730+0.5692j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.1913-0.7516j, 0.2730+0.5692j]])
New state:  tensor([[-0.2019-0.7488j, -0.0412+0.6299j]])
----------Measure----------
Probability:  tensor([[0.6015, 0.3985]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3810-0.5000j, 0.6406+0.4410j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.3810-0.5000j, 0.6406+0.4410j]])
New state:  tensor([[0.0868-0.6226j, 0.3421+0.6985j]])
----------Measure----------
Probability:  tensor([[0.3951, 0.6049]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6351-0.6118j, 0.4351+0.1820j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.6351-0.6118j, 0.4351+0.1820j]])
New state:  tensor([[0.2534-0.8446j, 0.2899+0.3719j]])
----------Measure----------
Probability:  tensor([[0.7776, 0.2224]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3116+0.j]])
ry_matrix:  tensor([[ 0.9879-0.j, -0.1552-0.j],
        [ 0.1552+0.j,  0.9879-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3722-0.3794j, 0.7518+0.3903j]])
Inside  rz
rz_matrix theta:  tensor([[1.0251+0.j]])
rz_matrix:  tensor([[0.8715-0.4904j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8715+0.4904j]])
Performing matrix multiplication

Current state:  tensor([[0.3722-0.3794j, 0.7518+0.3903j]])
New state:  tensor([[0.1383-0.5132j, 0.4638+0.7088j]])
----------Measure----------
Probability:  tensor([[0.2825, 0.7175]])
valid set accuracy: 1.0
valid set loss: 0.3855549693107605
------------------------------Epoch23------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5140-0.6591j, 0.4661+0.2901j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.5140-0.6591j, 0.4661+0.2901j]])
New state:  tensor([[0.1349-0.8249j, 0.2699+0.4781j]])
----------Measure----------
Probability:  tensor([[0.6986, 0.3014]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2706-0.7606j, 0.3346+0.4861j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.2706-0.7606j, 0.3346+0.4861j]])
New state:  tensor([[-0.1274-0.7972j,  0.0604+0.5871j]])
----------Measure----------
Probability:  tensor([[0.6517, 0.3483]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4757-0.5003j, 0.6351+0.3466j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.5003j, 0.6351+0.3466j]])
New state:  tensor([[0.1775-0.6671j, 0.3910+0.6087j]])
----------Measure----------
Probability:  tensor([[0.4766, 0.5234]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4938-0.6822j, 0.4478+0.3002j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.4938-0.6822j, 0.4478+0.3002j]])
New state:  tensor([[0.1061-0.8355j, 0.2490+0.4783j]])
----------Measure----------
Probability:  tensor([[0.7093, 0.2907]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6523-0.5842j, 0.4519+0.1704j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.6523-0.5842j, 0.4519+0.1704j]])
New state:  tensor([[0.2921-0.8255j, 0.3148+0.3663j]])
----------Measure----------
Probability:  tensor([[0.7668, 0.2332]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5546-0.3972j, 0.6857+0.2539j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.5546-0.3972j, 0.6857+0.2539j]])
New state:  tensor([[0.2961-0.6145j, 0.4799+0.5517j]])
----------Measure----------
Probability:  tensor([[0.4653, 0.5347]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4650-0.4621j, 0.6712+0.3461j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.4650-0.4621j, 0.6712+0.3461j]])
New state:  tensor([[0.1864-0.6285j, 0.4229+0.6256j]])
----------Measure----------
Probability:  tensor([[0.4297, 0.5703]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6523-0.5842j, 0.4519+0.1704j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.6523-0.5842j, 0.4519+0.1704j]])
New state:  tensor([[0.2921-0.8255j, 0.3148+0.3663j]])
----------Measure----------
Probability:  tensor([[0.7668, 0.2332]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4562-0.6208j, 0.5228+0.3648j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.4562-0.6208j, 0.5228+0.3648j]])
New state:  tensor([[0.1026-0.7636j, 0.2838+0.5709j]])
----------Measure----------
Probability:  tensor([[0.5936, 0.4064]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.4075-0.3706j, 0.7581+0.3491j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.4075-0.3706j, 0.7581+0.3491j]])
New state:  tensor([[0.1798-0.5207j, 0.4977+0.6699j]])
----------Measure----------
Probability:  tensor([[0.3034, 0.6966]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6119-0.6039j, 0.4670+0.2068j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.6119-0.6039j, 0.4670+0.2068j]])
New state:  tensor([[0.2473-0.8234j, 0.3106+0.4054j]])
----------Measure----------
Probability:  tensor([[0.7391, 0.2609]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6990-0.6663j, 0.2588+0.0218j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.6990-0.6663j, 0.2588+0.0218j]])
New state:  tensor([[0.2937-0.9199j, 0.2167+0.1433j]])
----------Measure----------
Probability:  tensor([[0.9325, 0.0675]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6328-0.6127j, 0.4384+0.1788j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.6328-0.6127j, 0.4384+0.1788j]])
New state:  tensor([[0.2613-0.8412j, 0.2989+0.3671j]])
----------Measure----------
Probability:  tensor([[0.7759, 0.2241]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5119-0.6940j, 0.4270+0.2718j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.5119-0.6940j, 0.4270+0.2718j]])
New state:  tensor([[0.1163-0.8545j, 0.2444+0.4433j]])
----------Measure----------
Probability:  tensor([[0.7438, 0.2562]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1898-0.7546j, 0.2740+0.5652j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.1898-0.7546j, 0.2740+0.5652j]])
New state:  tensor([[-0.1954-0.7532j, -0.0307+0.6274j]])
----------Measure----------
Probability:  tensor([[0.6054, 0.3946]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0960-0.2302j, 0.8334+0.4933j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.0960-0.2302j, 0.8334+0.4933j]])
New state:  tensor([[-0.0262-0.2480j,  0.4947+0.8325j]])
----------Measure----------
Probability:  tensor([[0.0622, 0.9378]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.4002-0.6841j, 0.4585+0.4020j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.4002-0.6841j, 0.4585+0.4020j]])
New state:  tensor([[0.0230-0.7922j, 0.2095+0.5727j]])
----------Measure----------
Probability:  tensor([[0.6281, 0.3719]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3776-0.5023j, 0.6426+0.4383j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.3776-0.5023j, 0.6426+0.4383j]])
New state:  tensor([[0.0904-0.6219j, 0.3536+0.6929j]])
----------Measure----------
Probability:  tensor([[0.3949, 0.6051]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5328-0.6705j, 0.4445+0.2626j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.5328-0.6705j, 0.4445+0.2626j]])
New state:  tensor([[0.1459-0.8439j, 0.2641+0.4436j]])
----------Measure----------
Probability:  tensor([[0.7335, 0.2665]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3288-0.6535j, 0.4746+0.4895j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.3288-0.6535j, 0.4746+0.4895j]])
New state:  tensor([[-0.0249-0.7311j,  0.1816+0.6572j]])
----------Measure----------
Probability:  tensor([[0.5351, 0.4649]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4901-0.7168j, 0.4089+0.2807j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.4901-0.7168j, 0.4089+0.2807j]])
New state:  tensor([[0.0863-0.8641j, 0.2241+0.4424j]])
----------Measure----------
Probability:  tensor([[0.7540, 0.2460]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4277-0.7473j, 0.3878+0.3289j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.4277-0.7473j, 0.3878+0.3289j]])
New state:  tensor([[0.0168-0.8609j, 0.1826+0.4746j]])
----------Measure----------
Probability:  tensor([[0.7414, 0.2586]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4777-0.4357j, 0.6896+0.3263j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.4777-0.4357j, 0.6896+0.3263j]])
New state:  tensor([[0.2102-0.6114j, 0.4485+0.6171j]])
----------Measure----------
Probability:  tensor([[0.4180, 0.5820]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5929-0.2809j, 0.7331+0.1795j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.5929-0.2809j, 0.7331+0.1795j]])
New state:  tensor([[0.3855-0.5308j, 0.5571+0.5091j]])
----------Measure----------
Probability:  tensor([[0.4304, 0.5696]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1411-0.2922j, 0.7808+0.5338j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.1411-0.2922j, 0.7808+0.5338j]])
New state:  tensor([[-0.0163-0.3241j,  0.4291+0.8429j]])
----------Measure----------
Probability:  tensor([[0.1053, 0.8947]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5599-0.7575j, 0.3065+0.1369j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.5599-0.7575j, 0.3065+0.1369j]])
New state:  tensor([[0.1279-0.9332j, 0.2032+0.2672j]])
----------Measure----------
Probability:  tensor([[0.8873, 0.1127]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5804-0.3243j, 0.7176+0.2073j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.5804-0.3243j, 0.7176+0.2073j]])
New state:  tensor([[0.3537-0.5630j, 0.5303+0.5261j]])
----------Measure----------
Probability:  tensor([[0.4420, 0.5580]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5412-0.3537j, 0.7225+0.2451j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.5412-0.3537j, 0.7225+0.2451j]])
New state:  tensor([[0.3052-0.5700j, 0.5164+0.5616j]])
----------Measure----------
Probability:  tensor([[0.4180, 0.5820]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3220+0.j]])
ry_matrix:  tensor([[ 0.9871-0.j, -0.1603-0.j],
        [ 0.1603+0.j,  0.9871-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3683-0.3815j, 0.7537+0.3883j]])
Inside  rz
rz_matrix theta:  tensor([[1.0005+0.j]])
rz_matrix:  tensor([[0.8775-0.4796j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8775+0.4796j]])
Performing matrix multiplication

Current state:  tensor([[0.3683-0.3815j, 0.7537+0.3883j]])
New state:  tensor([[0.1402-0.5113j, 0.4751+0.7023j]])
----------Measure----------
Probability:  tensor([[0.2811, 0.7189]])
valid set accuracy: 1.0
valid set loss: 0.3841876983642578
------------------------------Epoch24------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3261-0.6563j, 0.4765+0.4858j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.3261-0.6563j, 0.4765+0.4858j]])
New state:  tensor([[-0.0198-0.7325j,  0.1930+0.6525j]])
----------Measure----------
Probability:  tensor([[0.5370, 0.4630]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4532-0.6229j, 0.5254+0.3612j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.4532-0.6229j, 0.5254+0.3612j]])
New state:  tensor([[0.1081-0.7627j, 0.2946+0.5655j]])
----------Measure----------
Probability:  tensor([[0.5934, 0.4066]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1882-0.7578j, 0.2751+0.5609j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.1882-0.7578j, 0.2751+0.5609j]])
New state:  tensor([[-0.1892-0.7576j, -0.0201+0.6244j]])
----------Measure----------
Probability:  tensor([[0.6097, 0.3903]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5303-0.6720j, 0.4475+0.2587j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.5303-0.6720j, 0.4475+0.2587j]])
New state:  tensor([[0.1531-0.8422j, 0.2739+0.4384j]])
----------Measure----------
Probability:  tensor([[0.7328, 0.2672]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5763-0.3255j, 0.7210+0.2054j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.5763-0.3255j, 0.7210+0.2054j]])
New state:  tensor([[0.3563-0.5578j, 0.5404+0.5196j]])
----------Measure----------
Probability:  tensor([[0.4380, 0.5620]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4737-0.4375j, 0.6923+0.3238j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.4737-0.4375j, 0.6923+0.3238j]])
New state:  tensor([[0.2132-0.6086j, 0.4595+0.6107j]])
----------Measure----------
Probability:  tensor([[0.4159, 0.5841]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3975-0.6864j, 0.4608+0.3981j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.3975-0.6864j, 0.4608+0.3981j]])
New state:  tensor([[0.0291-0.7927j, 0.2203+0.5677j]])
----------Measure----------
Probability:  tensor([[0.6292, 0.3708]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6497-0.5852j, 0.4556+0.1671j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.6497-0.5852j, 0.4556+0.1671j]])
New state:  tensor([[0.2993-0.8215j, 0.3240+0.3613j]])
----------Measure----------
Probability:  tensor([[0.7645, 0.2355]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5095-0.6956j, 0.4300+0.2678j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.5095-0.6956j, 0.4300+0.2678j]])
New state:  tensor([[0.1237-0.8533j, 0.2542+0.4382j]])
----------Measure----------
Probability:  tensor([[0.7434, 0.2566]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3639-0.3837j, 0.7558+0.3861j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.3639-0.3837j, 0.7558+0.3861j]])
New state:  tensor([[0.1415-0.5095j, 0.4864+0.6955j]])
----------Measure----------
Probability:  tensor([[0.2796, 0.7204]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4254-0.7492j, 0.3903+0.3246j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.4254-0.7492j, 0.3903+0.3246j]])
New state:  tensor([[0.0243-0.8612j, 0.1925+0.4697j]])
----------Measure----------
Probability:  tensor([[0.7423, 0.2577]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5581-0.7583j, 0.3097+0.1326j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.5581-0.7583j, 0.3097+0.1326j]])
New state:  tensor([[0.1373-0.9315j, 0.2113+0.2623j]])
----------Measure----------
Probability:  tensor([[0.8865, 0.1135]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0912-0.2330j, 0.8339+0.4919j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.0912-0.2330j, 0.8339+0.4919j]])
New state:  tensor([[-0.0288-0.2486j,  0.5058+0.8256j]])
----------Measure----------
Probability:  tensor([[0.0626, 0.9374]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4721-0.5022j, 0.6378+0.3437j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.4721-0.5022j, 0.6378+0.3437j]])
New state:  tensor([[0.1814-0.6650j, 0.4021+0.6027j]])
----------Measure----------
Probability:  tensor([[0.4751, 0.5249]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6303-0.6138j, 0.4420+0.1752j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.6303-0.6138j, 0.4420+0.1752j]])
New state:  tensor([[0.2688-0.8377j, 0.3082+0.3621j]])
----------Measure----------
Probability:  tensor([[0.7739, 0.2261]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6497-0.5852j, 0.4556+0.1671j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.6497-0.5852j, 0.4556+0.1671j]])
New state:  tensor([[0.2993-0.8215j, 0.3240+0.3613j]])
----------Measure----------
Probability:  tensor([[0.7645, 0.2355]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4878-0.7184j, 0.4117+0.2766j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.4878-0.7184j, 0.4117+0.2766j]])
New state:  tensor([[0.0939-0.8633j, 0.2339+0.4373j]])
----------Measure----------
Probability:  tensor([[0.7540, 0.2460]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6975-0.6664j, 0.2629+0.0179j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.6975-0.6664j, 0.2629+0.0179j]])
New state:  tensor([[0.3034-0.9157j, 0.2237+0.1391j]])
----------Measure----------
Probability:  tensor([[0.9306, 0.0694]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.4032-0.3726j, 0.7604+0.3470j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.4032-0.3726j, 0.7604+0.3470j]])
New state:  tensor([[0.1813-0.5182j, 0.5088+0.6631j]])
----------Measure----------
Probability:  tensor([[0.3014, 0.6986]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4611-0.4641j, 0.6738+0.3435j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.4611-0.4641j, 0.6738+0.3435j]])
New state:  tensor([[0.1896-0.6261j, 0.4340+0.6194j]])
----------Measure----------
Probability:  tensor([[0.4280, 0.5720]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1367-0.2953j, 0.7816+0.5321j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.1367-0.2953j, 0.7816+0.5321j]])
New state:  tensor([[-0.0178-0.3249j,  0.4407+0.8366j]])
----------Measure----------
Probability:  tensor([[0.1059, 0.8941]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5506-0.3987j, 0.6889+0.2516j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.5506-0.3987j, 0.6889+0.2516j]])
New state:  tensor([[0.2993-0.6103j, 0.4904+0.5453j]])
----------Measure----------
Probability:  tensor([[0.4621, 0.5379]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6093-0.6050j, 0.4705+0.2033j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.6093-0.6050j, 0.4705+0.2033j]])
New state:  tensor([[0.2543-0.8201j, 0.3202+0.4002j]])
----------Measure----------
Probability:  tensor([[0.7373, 0.2627]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5370-0.3551j, 0.7256+0.2430j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.5370-0.3551j, 0.7256+0.2430j]])
New state:  tensor([[0.3077-0.5655j, 0.5268+0.5549j]])
----------Measure----------
Probability:  tensor([[0.4145, 0.5855]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5113-0.6607j, 0.4691+0.2863j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.5113-0.6607j, 0.4691+0.2863j]])
New state:  tensor([[0.1417-0.8234j, 0.2800+0.4728j]])
----------Measure----------
Probability:  tensor([[0.6980, 0.3020]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5887-0.2819j, 0.7365+0.1779j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.5887-0.2819j, 0.7365+0.1779j]])
New state:  tensor([[0.3877-0.5251j, 0.5670+0.5025j]])
----------Measure----------
Probability:  tensor([[0.4260, 0.5740]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4913-0.6839j, 0.4507+0.2963j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.4913-0.6839j, 0.4507+0.2963j]])
New state:  tensor([[0.1131-0.8344j, 0.2591+0.4731j]])
----------Measure----------
Probability:  tensor([[0.7091, 0.2909]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3739-0.5048j, 0.6448+0.4355j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.3739-0.5048j, 0.6448+0.4355j]])
New state:  tensor([[0.0935-0.6212j, 0.3652+0.6870j]])
----------Measure----------
Probability:  tensor([[0.3946, 0.6054]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3335+0.j]])
ry_matrix:  tensor([[ 0.9861-0.j, -0.1660-0.j],
        [ 0.1660+0.j,  0.9861-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2687-0.7634j, 0.3361+0.4818j]])
Inside  rz
rz_matrix theta:  tensor([[0.9764+0.j]])
rz_matrix:  tensor([[0.8832-0.4690j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8832+0.4690j]])
Performing matrix multiplication

Current state:  tensor([[0.2687-0.7634j, 0.3361+0.4818j]])
New state:  tensor([[-0.1207-0.8002j,  0.0709+0.5831j]])
----------Measure----------
Probability:  tensor([[0.6549, 0.3451]])
valid set accuracy: 1.0
valid set loss: 0.3827288746833801
------------------------------Epoch25------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0876-0.2352j, 0.8343+0.4909j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.0876-0.2352j, 0.8343+0.4909j]])
New state:  tensor([[-0.0300-0.2491j,  0.5163+0.8188j]])
----------Measure----------
Probability:  tensor([[0.0630, 0.9370]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5339-0.3562j, 0.7279+0.2415j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.5339-0.3562j, 0.7279+0.2415j]])
New state:  tensor([[0.3111-0.5613j, 0.5361+0.5484j]])
----------Measure----------
Probability:  tensor([[0.4119, 0.5881]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1333-0.2976j, 0.7822+0.5309j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.1333-0.2976j, 0.7822+0.5309j]])
New state:  tensor([[-0.0180-0.3256j,  0.4517+0.8305j]])
----------Measure----------
Probability:  tensor([[0.1063, 0.8937]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3711-0.5067j, 0.6464+0.4333j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.3711-0.5067j, 0.6464+0.4333j]])
New state:  tensor([[0.0975-0.6204j, 0.3757+0.6814j]])
----------Measure----------
Probability:  tensor([[0.3945, 0.6055]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3999-0.3741j, 0.7621+0.3454j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.3999-0.3741j, 0.7621+0.3454j]])
New state:  tensor([[0.1838-0.5158j, 0.5189+0.6564j]])
----------Measure----------
Probability:  tensor([[0.2999, 0.7001]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6477-0.5859j, 0.4584+0.1646j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.6477-0.5859j, 0.4584+0.1646j]])
New state:  tensor([[0.3069-0.8177j, 0.3319+0.3564j]])
----------Measure----------
Probability:  tensor([[0.7628, 0.2372]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5093-0.6620j, 0.4713+0.2834j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.5093-0.6620j, 0.4713+0.2834j]])
New state:  tensor([[0.1490-0.8218j, 0.2889+0.4680j]])
----------Measure----------
Probability:  tensor([[0.6976, 0.3024]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6963-0.6665j, 0.2659+0.0151j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.6963-0.6665j, 0.2659+0.0151j]])
New state:  tensor([[0.3132-0.9116j, 0.2294+0.1353j]])
----------Measure----------
Probability:  tensor([[0.9291, 0.0709]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6477-0.5859j, 0.4584+0.1646j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.6477-0.5859j, 0.4584+0.1646j]])
New state:  tensor([[0.3069-0.8177j, 0.3319+0.3564j]])
----------Measure----------
Probability:  tensor([[0.7628, 0.2372]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4708-0.4389j, 0.6943+0.3219j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.4708-0.4389j, 0.6943+0.3219j]])
New state:  tensor([[0.2171-0.6059j, 0.4694+0.6045j]])
----------Measure----------
Probability:  tensor([[0.4143, 0.5857]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4893-0.6852j, 0.4528+0.2934j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.4893-0.6852j, 0.4528+0.2934j]])
New state:  tensor([[0.1206-0.8333j, 0.2679+0.4683j]])
----------Measure----------
Probability:  tensor([[0.7089, 0.2911]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4238-0.7506j, 0.3921+0.3214j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.4238-0.7506j, 0.3921+0.3214j]])
New state:  tensor([[0.0324-0.8613j, 0.2011+0.4654j]])
----------Measure----------
Probability:  tensor([[0.7430, 0.2570]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3955-0.6881j, 0.4625+0.3951j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.3955-0.6881j, 0.4625+0.3951j]])
New state:  tensor([[0.0359-0.7929j, 0.2299+0.5632j]])
----------Measure----------
Probability:  tensor([[0.6300, 0.3700]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1871-0.7602j, 0.2759+0.5576j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.1871-0.7602j, 0.2759+0.5576j]])
New state:  tensor([[-0.1824-0.7614j, -0.0105+0.6221j]])
----------Measure----------
Probability:  tensor([[0.6129, 0.3871]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4693-0.5037j, 0.6398+0.3415j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.4693-0.5037j, 0.6398+0.3415j]])
New state:  tensor([[0.1861-0.6628j, 0.4120+0.5969j]])
----------Measure----------
Probability:  tensor([[0.4740, 0.5260]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6072-0.6059j, 0.4732+0.2007j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.6072-0.6059j, 0.4732+0.2007j]])
New state:  tensor([[0.2618-0.8169j, 0.3285+0.3953j]])
----------Measure----------
Probability:  tensor([[0.7358, 0.2642]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5076-0.6967j, 0.4322+0.2648j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.5076-0.6967j, 0.4322+0.2648j]])
New state:  tensor([[0.1316-0.8519j, 0.2626+0.4335j]])
----------Measure----------
Probability:  tensor([[0.7431, 0.2569]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5283-0.6731j, 0.4498+0.2558j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.5283-0.6731j, 0.4498+0.2558j]])
New state:  tensor([[0.1609-0.8405j, 0.2824+0.4336j]])
----------Measure----------
Probability:  tensor([[0.7322, 0.2678]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3607-0.3853j, 0.7574+0.3845j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.3607-0.3853j, 0.7574+0.3845j]])
New state:  tensor([[0.1438-0.5078j, 0.4968+0.6890j]])
----------Measure----------
Probability:  tensor([[0.2786, 0.7214]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6283-0.6145j, 0.4447+0.1726j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.6283-0.6145j, 0.4447+0.1726j]])
New state:  tensor([[0.2766-0.8342j, 0.3161+0.3573j]])
----------Measure----------
Probability:  tensor([[0.7724, 0.2276]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5477-0.3997j, 0.6913+0.2499j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.5477-0.3997j, 0.6913+0.2499j]])
New state:  tensor([[0.3034-0.6064j, 0.4997+0.5390j]])
----------Measure----------
Probability:  tensor([[0.4597, 0.5403]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5568-0.7589j, 0.3121+0.1293j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.5568-0.7589j, 0.3121+0.1293j]])
New state:  tensor([[0.1468-0.9297j, 0.2181+0.2580j]])
----------Measure----------
Probability:  tensor([[0.8859, 0.1141]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5855-0.2827j, 0.7390+0.1767j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.5855-0.2827j, 0.7390+0.1767j]])
New state:  tensor([[0.3907-0.5197j, 0.5757+0.4959j]])
----------Measure----------
Probability:  tensor([[0.4227, 0.5773]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2672-0.7654j, 0.3373+0.4785j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.2672-0.7654j, 0.3373+0.4785j]])
New state:  tensor([[-0.1135-0.8028j,  0.0803+0.5799j]])
----------Measure----------
Probability:  tensor([[0.6573, 0.3427]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5731-0.3264j, 0.7234+0.2040j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.5731-0.3264j, 0.7234+0.2040j]])
New state:  tensor([[0.3597-0.5529j, 0.5493+0.5130j]])
----------Measure----------
Probability:  tensor([[0.4350, 0.5650]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4510-0.6245j, 0.5274+0.3585j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.4510-0.6245j, 0.5274+0.3585j]])
New state:  tensor([[0.1144-0.7617j, 0.3042+0.5605j]])
----------Measure----------
Probability:  tensor([[0.5933, 0.4067]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3240-0.6584j, 0.4779+0.4829j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.3240-0.6584j, 0.4779+0.4829j]])
New state:  tensor([[-0.0140-0.7336j,  0.2032+0.6483j]])
----------Measure----------
Probability:  tensor([[0.5384, 0.4616]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4860-0.7196j, 0.4138+0.2735j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.4860-0.7196j, 0.4138+0.2735j]])
New state:  tensor([[0.1019-0.8623j, 0.2423+0.4327j]])
----------Measure----------
Probability:  tensor([[0.7540, 0.2460]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3421+0.j]])
ry_matrix:  tensor([[ 0.9854-0.j, -0.1702-0.j],
        [ 0.1702+0.j,  0.9854-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4582-0.4655j, 0.6758+0.3415j]])
Inside  rz
rz_matrix theta:  tensor([[0.9527+0.j]])
rz_matrix:  tensor([[0.8887-0.4586j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8887+0.4586j]])
Performing matrix multiplication

Current state:  tensor([[0.4582-0.4655j, 0.6758+0.3415j]])
New state:  tensor([[0.1937-0.6238j, 0.4440+0.6134j]])
----------Measure----------
Probability:  tensor([[0.4267, 0.5733]])
valid set accuracy: 1.0
valid set loss: 0.3816627562046051
------------------------------Epoch26------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4837-0.7211j, 0.4164+0.2695j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.4837-0.7211j, 0.4164+0.2695j]])
New state:  tensor([[0.1092-0.8614j, 0.2515+0.4276j]])
----------Measure----------
Probability:  tensor([[0.7540, 0.2460]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0830-0.2378j, 0.8348+0.4896j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.0830-0.2378j, 0.8348+0.4896j]])
New state:  tensor([[-0.0324-0.2498j,  0.5267+0.8119j]])
----------Measure----------
Probability:  tensor([[0.0635, 0.9365]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4545-0.4674j, 0.6783+0.3389j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.4545-0.4674j, 0.6783+0.3389j]])
New state:  tensor([[0.1968-0.6215j, 0.4544+0.6070j]])
----------Measure----------
Probability:  tensor([[0.4250, 0.5750]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6949-0.6666j, 0.2697+0.0114j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.6666j, 0.2697+0.0114j]])
New state:  tensor([[0.3224-0.9073j, 0.2360+0.1311j]])
----------Measure----------
Probability:  tensor([[0.9271, 0.0729]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5052-0.6982j, 0.4350+0.2609j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.5052-0.6982j, 0.4350+0.2609j]])
New state:  tensor([[0.1387-0.8506j, 0.2718+0.4282j]])
----------Measure----------
Probability:  tensor([[0.7427, 0.2573]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5692-0.3275j, 0.7266+0.2022j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.5692-0.3275j, 0.7266+0.2022j]])
New state:  tensor([[0.3620-0.5479j, 0.5588+0.5064j]])
----------Measure----------
Probability:  tensor([[0.4312, 0.5688]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4868-0.6868j, 0.4555+0.2896j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.4868-0.6868j, 0.4555+0.2896j]])
New state:  tensor([[0.1273-0.8321j, 0.2773+0.4630j]])
----------Measure----------
Probability:  tensor([[0.7087, 0.2913]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3565-0.3874j, 0.7594+0.3823j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.3565-0.3874j, 0.7594+0.3823j]])
New state:  tensor([[0.1450-0.5061j, 0.5074+0.6822j]])
----------Measure----------
Probability:  tensor([[0.2772, 0.7228]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4481-0.6264j, 0.5298+0.3551j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.4481-0.6264j, 0.5298+0.3551j]])
New state:  tensor([[0.1197-0.7608j, 0.3144+0.5549j]])
----------Measure----------
Probability:  tensor([[0.5932, 0.4068]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5299-0.3575j, 0.7308+0.2395j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.5299-0.3575j, 0.7308+0.2395j]])
New state:  tensor([[0.3134-0.5571j, 0.5459+0.5417j]])
----------Measure----------
Probability:  tensor([[0.4086, 0.5914]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5814-0.2836j, 0.7422+0.1751j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.5814-0.2836j, 0.7422+0.1751j]])
New state:  tensor([[0.3926-0.5141j, 0.5850+0.4892j]])
----------Measure----------
Probability:  tensor([[0.4185, 0.5815]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6046-0.6070j, 0.4765+0.1973j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.6046-0.6070j, 0.4765+0.1973j]])
New state:  tensor([[0.2684-0.8136j, 0.3375+0.3900j]])
----------Measure----------
Probability:  tensor([[0.7340, 0.2660]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3930-0.6903j, 0.4647+0.3913j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.3930-0.6903j, 0.4647+0.3913j]])
New state:  tensor([[0.0419-0.7932j, 0.2400+0.5581j]])
----------Measure----------
Probability:  tensor([[0.6309, 0.3691]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6259-0.6154j, 0.4482+0.1692j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.6259-0.6154j, 0.4482+0.1692j]])
New state:  tensor([[0.2836-0.8307j, 0.3248+0.3521j]])
----------Measure----------
Probability:  tensor([[0.7705, 0.2295]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3957-0.3760j, 0.7643+0.3433j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.3957-0.3760j, 0.7643+0.3433j]])
New state:  tensor([[0.1852-0.5135j, 0.5293+0.6495j]])
----------Measure----------
Probability:  tensor([[0.2980, 0.7020]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3214-0.6610j, 0.4796+0.4793j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.3214-0.6610j, 0.4796+0.4793j]])
New state:  tensor([[-0.0090-0.7349j,  0.2139+0.6434j]])
----------Measure----------
Probability:  tensor([[0.5402, 0.4598]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3676-0.5090j, 0.6484+0.4305j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.3676-0.5090j, 0.6484+0.4305j]])
New state:  tensor([[0.1004-0.6198j, 0.3867+0.6755j]])
----------Measure----------
Probability:  tensor([[0.3942, 0.6058]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6452-0.5868j, 0.4620+0.1613j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.6452-0.5868j, 0.4620+0.1613j]])
New state:  tensor([[0.3137-0.8137j, 0.3406+0.3513j]])
----------Measure----------
Probability:  tensor([[0.7606, 0.2394]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6452-0.5868j, 0.4620+0.1613j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.6452-0.5868j, 0.4620+0.1613j]])
New state:  tensor([[0.3137-0.8137j, 0.3406+0.3513j]])
----------Measure----------
Probability:  tensor([[0.7606, 0.2394]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5259-0.6745j, 0.4527+0.2521j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.5259-0.6745j, 0.4527+0.2521j]])
New state:  tensor([[0.1677-0.8387j, 0.2917+0.4283j]])
----------Measure----------
Probability:  tensor([[0.7315, 0.2685]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4669-0.4407j, 0.6969+0.3195j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.4669-0.4407j, 0.6969+0.3195j]])
New state:  tensor([[0.2199-0.6032j, 0.4797+0.5980j]])
----------Measure----------
Probability:  tensor([[0.4122, 0.5878]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4216-0.7523j, 0.3945+0.3172j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.4216-0.7523j, 0.3945+0.3172j]])
New state:  tensor([[0.0396-0.8615j, 0.2104+0.4604j]])
----------Measure----------
Probability:  tensor([[0.7438, 0.2562]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5067-0.6635j, 0.4741+0.2798j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.5067-0.6635j, 0.4741+0.2798j]])
New state:  tensor([[0.1555-0.8202j, 0.2984+0.4626j]])
----------Measure----------
Probability:  tensor([[0.6970, 0.3030]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1290-0.3005j, 0.7829+0.5292j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.1290-0.3005j, 0.7829+0.5292j]])
New state:  tensor([[-0.0194-0.3264j,  0.4627+0.8240j]])
----------Measure----------
Probability:  tensor([[0.1069, 0.8931]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1855-0.7633j, 0.2769+0.5534j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.1855-0.7633j, 0.2769+0.5534j]])
New state:  tensor([[-0.1763-0.7655j, -0.0005+0.6189j]])
----------Measure----------
Probability:  tensor([[0.6170, 0.3830]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5439-0.4011j, 0.6943+0.2477j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.5439-0.4011j, 0.6943+0.2477j]])
New state:  tensor([[0.3064-0.6023j, 0.5096+0.5326j]])
----------Measure----------
Probability:  tensor([[0.4567, 0.5433]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4658-0.5056j, 0.6424+0.3388j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.4658-0.5056j, 0.6424+0.3388j]])
New state:  tensor([[0.1897-0.6607j, 0.4224+0.5908j]])
----------Measure----------
Probability:  tensor([[0.4726, 0.5274]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2654-0.7680j, 0.3388+0.4743j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.2654-0.7680j, 0.3388+0.4743j]])
New state:  tensor([[-0.1071-0.8055j,  0.0902+0.5758j]])
----------Measure----------
Probability:  tensor([[0.6603, 0.3397]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3531+0.j]])
ry_matrix:  tensor([[ 0.9845-0.j, -0.1756-0.j],
        [ 0.1756+0.j,  0.9845-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5551-0.7596j, 0.3152+0.1251j]])
Inside  rz
rz_matrix theta:  tensor([[0.9296+0.j]])
rz_matrix:  tensor([[0.8939-0.4482j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8939+0.4482j]])
Performing matrix multiplication

Current state:  tensor([[0.5551-0.7596j, 0.3152+0.1251j]])
New state:  tensor([[0.1557-0.9278j, 0.2256+0.2531j]])
----------Measure----------
Probability:  tensor([[0.8850, 0.1150]])
valid set accuracy: 1.0
valid set loss: 0.38034364581108093
------------------------------Epoch27------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4200-0.7536j, 0.3961+0.3143j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.4200-0.7536j, 0.3961+0.3143j]])
New state:  tensor([[0.0474-0.8614j, 0.2184+0.4560j]])
----------Measure----------
Probability:  tensor([[0.7443, 0.2557]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4821-0.7221j, 0.4183+0.2667j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.4821-0.7221j, 0.4183+0.2667j]])
New state:  tensor([[0.1170-0.8603j, 0.2592+0.4230j]])
----------Measure----------
Probability:  tensor([[0.7539, 0.2461]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5241-0.6755j, 0.4548+0.2495j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.5241-0.6755j, 0.4548+0.2495j]])
New state:  tensor([[0.1752-0.8368j, 0.2995+0.4235j]])
----------Measure----------
Probability:  tensor([[0.7310, 0.2690]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4850-0.6879j, 0.4574+0.2869j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.4850-0.6879j, 0.4574+0.2869j]])
New state:  tensor([[0.1346-0.8309j, 0.2855+0.4583j]])
----------Measure----------
Probability:  tensor([[0.7085, 0.2915]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3195-0.6629j, 0.4809+0.4767j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.3195-0.6629j, 0.4809+0.4767j]])
New state:  tensor([[-0.0032-0.7359j,  0.2235+0.6392j]])
----------Measure----------
Probability:  tensor([[0.5415, 0.4585]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5048-0.6646j, 0.4761+0.2772j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.5048-0.6646j, 0.4761+0.2772j]])
New state:  tensor([[0.1626-0.8186j, 0.3065+0.4577j]])
----------Measure----------
Probability:  tensor([[0.6966, 0.3034]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6433-0.5874j, 0.4645+0.1590j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.6433-0.5874j, 0.4645+0.1590j]])
New state:  tensor([[0.3210-0.8099j, 0.3479+0.3464j]])
----------Measure----------
Probability:  tensor([[0.7590, 0.2410]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5538-0.7600j, 0.3173+0.1222j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.5538-0.7600j, 0.3173+0.1222j]])
New state:  tensor([[0.1649-0.9259j, 0.2317+0.2488j]])
----------Measure----------
Probability:  tensor([[0.8844, 0.1156]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4633-0.5069j, 0.6442+0.3368j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.4633-0.5069j, 0.6442+0.3368j]])
New state:  tensor([[0.1944-0.6586j, 0.4316+0.5850j]])
----------Measure----------
Probability:  tensor([[0.4716, 0.5284]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4518-0.4687j, 0.6801+0.3371j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.4518-0.4687j, 0.6801+0.3371j]])
New state:  tensor([[0.2008-0.6193j, 0.4637+0.6010j]])
----------Measure----------
Probability:  tensor([[0.4239, 0.5761]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1845-0.7654j, 0.2776+0.5504j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.1845-0.7654j, 0.2776+0.5504j]])
New state:  tensor([[-0.1695-0.7689j,  0.0084+0.6164j]])
----------Measure----------
Probability:  tensor([[0.6199, 0.3801]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5411-0.4021j, 0.6964+0.2461j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.5411-0.4021j, 0.6964+0.2461j]])
New state:  tensor([[0.3103-0.5985j, 0.5182+0.5263j]])
----------Measure----------
Probability:  tensor([[0.4545, 0.5455]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3650-0.5107j, 0.6499+0.4285j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.3650-0.5107j, 0.6499+0.4285j]])
New state:  tensor([[0.1044-0.6190j, 0.3965+0.6699j]])
----------Measure----------
Probability:  tensor([[0.3941, 0.6059]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3912-0.6918j, 0.4662+0.3886j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.3912-0.6918j, 0.4662+0.3886j]])
New state:  tensor([[0.0485-0.7933j, 0.2489+0.5536j]])
----------Measure----------
Probability:  tensor([[0.6316, 0.3684]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5785-0.2843j, 0.7445+0.1740j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.5785-0.2843j, 0.7445+0.1740j]])
New state:  tensor([[0.3955-0.5090j, 0.5930+0.4826j]])
----------Measure----------
Probability:  tensor([[0.4155, 0.5845]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5035-0.6992j, 0.4369+0.2582j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.5035-0.6992j, 0.4369+0.2582j]])
New state:  tensor([[0.1463-0.8491j, 0.2796+0.4235j]])
----------Measure----------
Probability:  tensor([[0.7424, 0.2576]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4460-0.6278j, 0.5316+0.3527j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.4460-0.6278j, 0.5316+0.3527j]])
New state:  tensor([[0.1259-0.7597j, 0.3234+0.5499j]])
----------Measure----------
Probability:  tensor([[0.5931, 0.4069]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1259-0.3026j, 0.7834+0.5280j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.1259-0.3026j, 0.7834+0.5280j]])
New state:  tensor([[-0.0194-0.3271j,  0.4729+0.8179j]])
----------Measure----------
Probability:  tensor([[0.1074, 0.8926]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2640-0.7699j, 0.3398+0.4712j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.2640-0.7699j, 0.3398+0.4712j]])
New state:  tensor([[-0.0999-0.8078j,  0.0990+0.5725j]])
----------Measure----------
Probability:  tensor([[0.6625, 0.3375]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3927-0.3774j, 0.7659+0.3418j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.3927-0.3774j, 0.7659+0.3418j]])
New state:  tensor([[0.1877-0.5113j, 0.5387+0.6428j]])
----------Measure----------
Probability:  tensor([[0.2966, 0.7034]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5663-0.3283j, 0.7288+0.2009j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.5663-0.3283j, 0.7288+0.2009j]])
New state:  tensor([[0.3653-0.5432j, 0.5671+0.4999j]])
----------Measure----------
Probability:  tensor([[0.4285, 0.5715]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6938-0.6666j, 0.2724+0.0088j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.6938-0.6666j, 0.2724+0.0088j]])
New state:  tensor([[0.3316-0.9032j, 0.2410+0.1272j]])
----------Measure----------
Probability:  tensor([[0.9257, 0.0743]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5270-0.3584j, 0.7329+0.2381j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.5270-0.3584j, 0.7329+0.2381j]])
New state:  tensor([[0.3167-0.5531j, 0.5545+0.5351j]])
----------Measure----------
Probability:  tensor([[0.4062, 0.5938]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3535-0.3889j, 0.7607+0.3808j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.3535-0.3889j, 0.7607+0.3808j]])
New state:  tensor([[0.1474-0.5045j, 0.5170+0.6756j]])
----------Measure----------
Probability:  tensor([[0.2762, 0.7238]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4642-0.4419j, 0.6987+0.3178j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.4642-0.4419j, 0.6987+0.3178j]])
New state:  tensor([[0.2237-0.6006j, 0.4889+0.5918j]])
----------Measure----------
Probability:  tensor([[0.4108, 0.5892]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6241-0.6161j, 0.4506+0.1668j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.6241-0.6161j, 0.4506+0.1668j]])
New state:  tensor([[0.2911-0.8273j, 0.3320+0.3473j]])
----------Measure----------
Probability:  tensor([[0.7691, 0.2309]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6433-0.5874j, 0.4645+0.1590j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.6433-0.5874j, 0.4645+0.1590j]])
New state:  tensor([[0.3210-0.8099j, 0.3479+0.3464j]])
----------Measure----------
Probability:  tensor([[0.7590, 0.2410]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0797-0.2398j, 0.8351+0.4887j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.0797-0.2398j, 0.8351+0.4887j]])
New state:  tensor([[-0.0334-0.2504j,  0.5366+0.8051j]])
----------Measure----------
Probability:  tensor([[0.0638, 0.9362]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3610+0.j]])
ry_matrix:  tensor([[ 0.9838-0.j, -0.1795-0.j],
        [ 0.1795+0.j,  0.9838-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6027-0.6078j, 0.4789+0.1950j]])
Inside  rz
rz_matrix theta:  tensor([[0.9070+0.j]])
rz_matrix:  tensor([[0.8989-0.4381j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.8989+0.4381j]])
Performing matrix multiplication

Current state:  tensor([[0.6027-0.6078j, 0.4789+0.1950j]])
New state:  tensor([[0.2756-0.8104j, 0.3450+0.3850j]])
----------Measure----------
Probability:  tensor([[0.7327, 0.2673]])
valid set accuracy: 1.0
valid set loss: 0.3794281482696533
------------------------------Epoch28------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5631-0.3292j, 0.7313+0.1995j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.5631-0.3292j, 0.7313+0.1995j]])
New state:  tensor([[0.3680-0.5385j, 0.5755+0.4934j]])
----------Measure----------
Probability:  tensor([[0.4254, 0.5746]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0760-0.2419j, 0.8354+0.4876j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.0760-0.2419j, 0.8354+0.4876j]])
New state:  tensor([[-0.0349-0.2512j,  0.5462+0.7983j]])
----------Measure----------
Probability:  tensor([[0.0643, 0.9357]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6926-0.6666j, 0.2755+0.0058j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.6926-0.6666j, 0.2755+0.0058j]])
New state:  tensor([[0.3405-0.8990j, 0.2464+0.1232j]])
----------Measure----------
Probability:  tensor([[0.9241, 0.0759]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4183-0.7550j, 0.3980+0.3109j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.4183-0.7550j, 0.3980+0.3109j]])
New state:  tensor([[0.0548-0.8614j, 0.2265+0.4514j]])
----------Measure----------
Probability:  tensor([[0.7449, 0.2551]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5380-0.4032j, 0.6988+0.2443j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.5380-0.4032j, 0.6988+0.2443j]])
New state:  tensor([[0.3137-0.5947j, 0.5269+0.5199j]])
----------Measure----------
Probability:  tensor([[0.4520, 0.5480]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5016-0.7003j, 0.4392+0.2551j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.5016-0.7003j, 0.4392+0.2551j]])
New state:  tensor([[0.1535-0.8477j, 0.2877+0.4186j]])
----------Measure----------
Probability:  tensor([[0.7421, 0.2579]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6221-0.6168j, 0.4534+0.1641j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.6221-0.6168j, 0.4534+0.1641j]])
New state:  tensor([[0.2982-0.8238j, 0.3395+0.3424j]])
----------Measure----------
Probability:  tensor([[0.7675, 0.2325]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5027-0.6658j, 0.4783+0.2742j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.5027-0.6658j, 0.4783+0.2742j]])
New state:  tensor([[0.1693-0.8169j, 0.3148+0.4526j]])
----------Measure----------
Probability:  tensor([[0.6960, 0.3040]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5752-0.2851j, 0.7470+0.1728j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.5752-0.2851j, 0.7470+0.1728j]])
New state:  tensor([[0.3978-0.5039j, 0.6011+0.4759j]])
----------Measure----------
Probability:  tensor([[0.4121, 0.5879]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5221-0.6766j, 0.4571+0.2465j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.5221-0.6766j, 0.4571+0.2465j]])
New state:  tensor([[0.1822-0.8350j, 0.3076+0.4184j]])
----------Measure----------
Probability:  tensor([[0.7303, 0.2697]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1225-0.3049j, 0.7840+0.5267j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.1225-0.3049j, 0.7840+0.5267j]])
New state:  tensor([[-0.0199-0.3280j,  0.4830+0.8116j]])
----------Measure----------
Probability:  tensor([[0.1080, 0.8920]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4436-0.6294j, 0.5336+0.3499j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.4436-0.6294j, 0.5336+0.3499j]])
New state:  tensor([[0.1315-0.7587j, 0.3324+0.5446j]])
----------Measure----------
Probability:  tensor([[0.5929, 0.4071]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1832-0.7679j, 0.2785+0.5471j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.1832-0.7679j, 0.2785+0.5471j]])
New state:  tensor([[-0.1631-0.7724j,  0.0174+0.6136j]])
----------Measure----------
Probability:  tensor([[0.6232, 0.3768]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5524-0.7606j, 0.3198+0.1188j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.5524-0.7606j, 0.3198+0.1188j]])
New state:  tensor([[0.1736-0.9238j, 0.2381+0.2443j]])
----------Measure----------
Probability:  tensor([[0.8836, 0.1164]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6413-0.5881j, 0.4673+0.1564j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.6413-0.5881j, 0.4673+0.1564j]])
New state:  tensor([[0.3278-0.8060j, 0.3554+0.3414j]])
----------Measure----------
Probability:  tensor([[0.7571, 0.2429]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4802-0.7233j, 0.4205+0.2635j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.4802-0.7233j, 0.4205+0.2635j]])
New state:  tensor([[0.1243-0.8593j, 0.2672+0.4181j]])
----------Measure----------
Probability:  tensor([[0.7538, 0.2462]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5238-0.3595j, 0.7352+0.2365j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3595j, 0.7352+0.2365j]])
New state:  tensor([[0.3194-0.5491j, 0.5631+0.5285j]])
----------Measure----------
Probability:  tensor([[0.4036, 0.5964]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6413-0.5881j, 0.4673+0.1564j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.6413-0.5881j, 0.4673+0.1564j]])
New state:  tensor([[0.3278-0.8060j, 0.3554+0.3414j]])
----------Measure----------
Probability:  tensor([[0.7571, 0.2429]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4611-0.4433j, 0.7008+0.3158j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.4611-0.4433j, 0.7008+0.3158j]])
New state:  tensor([[0.2269-0.5981j, 0.4981+0.5854j]])
----------Measure----------
Probability:  tensor([[0.4092, 0.5908]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3501-0.3906j, 0.7623+0.3791j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.3501-0.3906j, 0.7623+0.3791j]])
New state:  tensor([[0.1492-0.5029j, 0.5266+0.6689j]])
----------Measure----------
Probability:  tensor([[0.2752, 0.7248]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4488-0.4702j, 0.6821+0.3350j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.4488-0.4702j, 0.6821+0.3350j]])
New state:  tensor([[0.2043-0.6171j, 0.4730+0.5948j]])
----------Measure----------
Probability:  tensor([[0.4225, 0.5775]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3174-0.6650j, 0.4823+0.4738j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.3174-0.6650j, 0.4823+0.4738j]])
New state:  tensor([[0.0021-0.7368j, 0.2330+0.6346j]])
----------Measure----------
Probability:  tensor([[0.5429, 0.4571]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4830-0.6892j, 0.4595+0.2839j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.4830-0.6892j, 0.4595+0.2839j]])
New state:  tensor([[0.1414-0.8296j, 0.2938+0.4533j]])
----------Measure----------
Probability:  tensor([[0.7083, 0.2917]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3891-0.6935j, 0.4680+0.3855j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.3891-0.6935j, 0.4680+0.3855j]])
New state:  tensor([[0.0547-0.7933j, 0.2578+0.5488j]])
----------Measure----------
Probability:  tensor([[0.6324, 0.3676]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4604-0.5084j, 0.6463+0.3345j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.4604-0.5084j, 0.6463+0.3345j]])
New state:  tensor([[0.1984-0.6566j, 0.4408+0.5790j]])
----------Measure----------
Probability:  tensor([[0.4704, 0.5296]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3622-0.5126j, 0.6515+0.4262j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.3622-0.5126j, 0.6515+0.4262j]])
New state:  tensor([[0.1078-0.6183j, 0.4063+0.6641j]])
----------Measure----------
Probability:  tensor([[0.3939, 0.6061]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2625-0.7720j, 0.3410+0.4678j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.2625-0.7720j, 0.3410+0.4678j]])
New state:  tensor([[-0.0932-0.8101j,  0.1079+0.5688j]])
----------Measure----------
Probability:  tensor([[0.6649, 0.3351]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.6006-0.6086j, 0.4815+0.1923j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.6006-0.6086j, 0.4815+0.1923j]])
New state:  tensor([[0.2822-0.8072j, 0.3528+0.3799j]])
----------Measure----------
Probability:  tensor([[0.7312, 0.2688]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3698+0.j]])
ry_matrix:  tensor([[ 0.9830-0.j, -0.1838-0.j],
        [ 0.1838+0.j,  0.9830-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3893-0.3789j, 0.7676+0.3402j]])
Inside  rz
rz_matrix theta:  tensor([[0.8848+0.j]])
rz_matrix:  tensor([[0.9037-0.4281j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9037+0.4281j]])
Performing matrix multiplication

Current state:  tensor([[0.3893-0.3789j, 0.7676+0.3402j]])
New state:  tensor([[0.1896-0.5091j, 0.5481+0.6360j]])
----------Measure----------
Probability:  tensor([[0.2951, 0.7049]])
valid set accuracy: 1.0
valid set loss: 0.37842047214508057
------------------------------Epoch29------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4417-0.6306j, 0.5351+0.3476j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.4417-0.6306j, 0.5351+0.3476j]])
New state:  tensor([[0.1374-0.7576j, 0.3406+0.5396j]])
----------Measure----------
Probability:  tensor([[0.5928, 0.4072]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3156-0.6667j, 0.4834+0.4714j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.3156-0.6667j, 0.4834+0.4714j]])
New state:  tensor([[0.0078-0.7376j, 0.2419+0.6304j]])
----------Measure----------
Probability:  tensor([[0.5441, 0.4559]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4169-0.7561j, 0.3994+0.3083j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.4169-0.7561j, 0.3994+0.3083j]])
New state:  tensor([[0.0624-0.8611j, 0.2339+0.4471j]])
----------Measure----------
Probability:  tensor([[0.7454, 0.2546]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3866-0.3801j, 0.7690+0.3388j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.3866-0.3801j, 0.7690+0.3388j]])
New state:  tensor([[0.1921-0.5069j, 0.5567+0.6294j]])
----------Measure----------
Probability:  tensor([[0.2939, 0.7061]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4814-0.6902j, 0.4612+0.2814j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.4814-0.6902j, 0.4612+0.2814j]])
New state:  tensor([[0.1485-0.8283j, 0.3012+0.4485j]])
----------Measure----------
Probability:  tensor([[0.7081, 0.2919]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5725-0.2857j, 0.7491+0.1717j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.5725-0.2857j, 0.7491+0.1717j]])
New state:  tensor([[0.4005-0.4990j, 0.6085+0.4693j]])
----------Measure----------
Probability:  tensor([[0.4094, 0.5906]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4787-0.7242j, 0.4222+0.2609j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.4787-0.7242j, 0.4222+0.2609j]])
New state:  tensor([[0.1319-0.8581j, 0.2743+0.4136j]])
----------Measure----------
Probability:  tensor([[0.7537, 0.2463]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6916-0.6667j, 0.2779+0.0035j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.6916-0.6667j, 0.2779+0.0035j]])
New state:  tensor([[0.3493-0.8948j, 0.2510+0.1194j]])
----------Measure----------
Probability:  tensor([[0.9227, 0.0773]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1197-0.3068j, 0.7844+0.5256j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.1197-0.3068j, 0.7844+0.5256j]])
New state:  tensor([[-0.0196-0.3287j,  0.4926+0.8055j]])
----------Measure----------
Probability:  tensor([[0.1084, 0.8916]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6396-0.5887j, 0.4696+0.1543j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.6396-0.5887j, 0.4696+0.1543j]])
New state:  tensor([[0.3347-0.8023j, 0.3620+0.3366j]])
----------Measure----------
Probability:  tensor([[0.7557, 0.2443]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3474-0.3920j, 0.7635+0.3777j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.3474-0.3920j, 0.7635+0.3777j]])
New state:  tensor([[0.1516-0.5014j, 0.5355+0.6625j]])
----------Measure----------
Probability:  tensor([[0.2744, 0.7256]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4464-0.4714j, 0.6837+0.3333j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.4464-0.4714j, 0.6837+0.3333j]])
New state:  tensor([[0.2083-0.6149j, 0.4815+0.5888j]])
----------Measure----------
Probability:  tensor([[0.4215, 0.5785]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.5000-0.7012j, 0.4409+0.2526j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.5000-0.7012j, 0.4409+0.2526j]])
New state:  tensor([[0.1609-0.8461j, 0.2948+0.4139j]])
----------Measure----------
Probability:  tensor([[0.7418, 0.2582]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5204-0.6775j, 0.4589+0.2441j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.5204-0.6775j, 0.4589+0.2441j]])
New state:  tensor([[0.1893-0.8330j, 0.3148+0.4137j]])
----------Measure----------
Probability:  tensor([[0.7298, 0.2702]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1822-0.7698j, 0.2791+0.5443j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.1822-0.7698j, 0.2791+0.5443j]])
New state:  tensor([[-0.1565-0.7754j,  0.0258+0.6112j]])
----------Measure----------
Probability:  tensor([[0.6258, 0.3742]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5605-0.3299j, 0.7333+0.1983j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.5605-0.3299j, 0.7333+0.1983j]])
New state:  tensor([[0.3711-0.5341j, 0.5831+0.4869j]])
----------Measure----------
Probability:  tensor([[0.4230, 0.5770]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0731-0.2436j, 0.8357+0.4868j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.0731-0.2436j, 0.8357+0.4868j]])
New state:  tensor([[-0.0356-0.2519j,  0.5554+0.7917j]])
----------Measure----------
Probability:  tensor([[0.0647, 0.9353]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6396-0.5887j, 0.4696+0.1543j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.6396-0.5887j, 0.4696+0.1543j]])
New state:  tensor([[0.3347-0.8023j, 0.3620+0.3366j]])
----------Measure----------
Probability:  tensor([[0.7557, 0.2443]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3598-0.5141j, 0.6527+0.4244j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.3598-0.5141j, 0.6527+0.4244j]])
New state:  tensor([[0.1118-0.6175j, 0.4154+0.6585j]])
----------Measure----------
Probability:  tensor([[0.3938, 0.6062]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5989-0.6093j, 0.4836+0.1901j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.5989-0.6093j, 0.4836+0.1901j]])
New state:  tensor([[0.2891-0.8040j, 0.3598+0.3750j]])
----------Measure----------
Probability:  tensor([[0.7299, 0.2701]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6205-0.6174j, 0.4556+0.1619j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.6205-0.6174j, 0.4556+0.1619j]])
New state:  tensor([[0.3054-0.8204j, 0.3461+0.3376j]])
----------Measure----------
Probability:  tensor([[0.7662, 0.2338]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.5010-0.6668j, 0.4801+0.2719j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.5010-0.6668j, 0.4801+0.2719j]])
New state:  tensor([[0.1762-0.8152j, 0.3223+0.4478j]])
----------Measure----------
Probability:  tensor([[0.6956, 0.3044]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5513-0.7610j, 0.3217+0.1161j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.5513-0.7610j, 0.3217+0.1161j]])
New state:  tensor([[0.1824-0.9218j, 0.2437+0.2400j]])
----------Measure----------
Probability:  tensor([[0.8830, 0.1170]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2613-0.7736j, 0.3419+0.4651j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.2613-0.7736j, 0.3419+0.4651j]])
New state:  tensor([[-0.0862-0.8120j,  0.1160+0.5655j]])
----------Measure----------
Probability:  tensor([[0.6668, 0.3332]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5356-0.4040j, 0.7007+0.2429j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.5356-0.4040j, 0.7007+0.2429j]])
New state:  tensor([[0.3175-0.5910j, 0.5348+0.5137j]])
----------Measure----------
Probability:  tensor([[0.4501, 0.5499]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5212-0.3603j, 0.7370+0.2353j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.5212-0.3603j, 0.7370+0.2353j]])
New state:  tensor([[0.3226-0.5453j, 0.5710+0.5220j]])
----------Measure----------
Probability:  tensor([[0.4014, 0.5986]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4586-0.4444j, 0.7024+0.3143j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.4586-0.4444j, 0.7024+0.3143j]])
New state:  tensor([[0.2307-0.5955j, 0.5065+0.5793j]])
----------Measure----------
Probability:  tensor([[0.4079, 0.5921]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3874-0.6949j, 0.4693+0.3831j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.3874-0.6949j, 0.4693+0.3831j]])
New state:  tensor([[0.0612-0.7932j, 0.2661+0.5443j]])
----------Measure----------
Probability:  tensor([[0.6330, 0.3670]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3769+0.j]])
ry_matrix:  tensor([[ 0.9823-0.j, -0.1873-0.j],
        [ 0.1873+0.j,  0.9823-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4581-0.5096j, 0.6479+0.3327j]])
Inside  rz
rz_matrix theta:  tensor([[0.8632+0.j]])
rz_matrix:  tensor([[0.9083-0.4183j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9083+0.4183j]])
Performing matrix multiplication

Current state:  tensor([[0.4581-0.5096j, 0.6479+0.3327j]])
New state:  tensor([[0.2030-0.6545j, 0.4493+0.5732j]])
----------Measure----------
Probability:  tensor([[0.4695, 0.5305]])
valid set accuracy: 1.0
valid set loss: 0.3776337802410126
------------------------------Epoch30------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3443-0.3935j, 0.7650+0.3761j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.3443-0.3935j, 0.7650+0.3761j]])
New state:  tensor([[0.1534-0.4999j, 0.5445+0.6559j]])
----------Measure----------
Probability:  tensor([[0.2734, 0.7266]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5574-0.3307j, 0.7356+0.1969j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.5574-0.3307j, 0.7356+0.1969j]])
New state:  tensor([[0.3736-0.5296j, 0.5909+0.4804j]])
----------Measure----------
Probability:  tensor([[0.4201, 0.5799]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3136-0.6686j, 0.4847+0.4686j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.3136-0.6686j, 0.4847+0.4686j]])
New state:  tensor([[0.0130-0.7384j, 0.2509+0.6258j]])
----------Measure----------
Probability:  tensor([[0.5454, 0.4546]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3834-0.3815j, 0.7706+0.3372j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.3834-0.3815j, 0.7706+0.3372j]])
New state:  tensor([[0.1940-0.5048j, 0.5654+0.6227j]])
----------Measure----------
Probability:  tensor([[0.2925, 0.7075]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4554-0.5110j, 0.6498+0.3306j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.4554-0.5110j, 0.6498+0.3306j]])
New state:  tensor([[0.2069-0.6525j, 0.4579+0.5673j]])
----------Measure----------
Probability:  tensor([[0.4685, 0.5315]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4557-0.4457j, 0.7043+0.3124j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.4557-0.4457j, 0.7043+0.3124j]])
New state:  tensor([[0.2338-0.5931j, 0.5151+0.5730j]])
----------Measure----------
Probability:  tensor([[0.4064, 0.5936]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4990-0.6679j, 0.4821+0.2691j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.4990-0.6679j, 0.4821+0.2691j]])
New state:  tensor([[0.1825-0.8135j, 0.3301+0.4426j]])
----------Measure----------
Probability:  tensor([[0.6951, 0.3049]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5694-0.2864j, 0.7514+0.1706j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.5694-0.2864j, 0.7514+0.1706j]])
New state:  tensor([[0.4027-0.4941j, 0.6161+0.4628j]])
----------Measure----------
Probability:  tensor([[0.4063, 0.5937]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5499-0.7615j, 0.3240+0.1129j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.5499-0.7615j, 0.3240+0.1129j]])
New state:  tensor([[0.1907-0.9197j, 0.2496+0.2355j]])
----------Measure----------
Probability:  tensor([[0.8823, 0.1177]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5181-0.3613j, 0.7392+0.2338j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.5181-0.3613j, 0.7392+0.2338j]])
New state:  tensor([[0.3252-0.5415j, 0.5791+0.5154j]])
----------Measure----------
Probability:  tensor([[0.3990, 0.6010]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4436-0.4728j, 0.6855+0.3314j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.4436-0.4728j, 0.6855+0.3314j]])
New state:  tensor([[0.2116-0.6128j, 0.4902+0.5826j]])
----------Measure----------
Probability:  tensor([[0.4203, 0.5797]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0696-0.2457j, 0.8360+0.4857j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.0696-0.2457j, 0.8360+0.4857j]])
New state:  tensor([[-0.0369-0.2527j,  0.5645+0.7850j]])
----------Measure----------
Probability:  tensor([[0.0652, 0.9348]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4152-0.7573j, 0.4012+0.3051j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.4152-0.7573j, 0.4012+0.3051j]])
New state:  tensor([[0.0695-0.8609j, 0.2414+0.4424j]])
----------Measure----------
Probability:  tensor([[0.7460, 0.2540]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6186-0.6181j, 0.4581+0.1593j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.6186-0.6181j, 0.4581+0.1593j]])
New state:  tensor([[0.3120-0.8169j, 0.3530+0.3326j]])
----------Measure----------
Probability:  tensor([[0.7647, 0.2353]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4795-0.6914j, 0.4632+0.2785j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.4795-0.6914j, 0.4632+0.2785j]])
New state:  tensor([[0.1551-0.8269j, 0.3089+0.4435j]])
----------Measure----------
Probability:  tensor([[0.7078, 0.2922]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6377-0.5893j, 0.4722+0.1519j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.6377-0.5893j, 0.4722+0.1519j]])
New state:  tensor([[0.3411-0.7985j, 0.3689+0.3316j]])
----------Measure----------
Probability:  tensor([[0.7539, 0.2461]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5969-0.6101j, 0.4861+0.1876j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.5969-0.6101j, 0.4861+0.1876j]])
New state:  tensor([[0.2954-0.8008j, 0.3670+0.3699j]])
----------Measure----------
Probability:  tensor([[0.7285, 0.2715]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3571-0.5159j, 0.6542+0.4223j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.3571-0.5159j, 0.6542+0.4223j]])
New state:  tensor([[0.1151-0.6168j, 0.4245+0.6528j]])
----------Measure----------
Probability:  tensor([[0.3937, 0.6063]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5327-0.4050j, 0.7029+0.2412j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.5327-0.4050j, 0.7029+0.2412j]])
New state:  tensor([[0.3206-0.5873j, 0.5429+0.5074j]])
----------Measure----------
Probability:  tensor([[0.4478, 0.5522]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5185-0.6785j, 0.4611+0.2413j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.5185-0.6785j, 0.4611+0.2413j]])
New state:  tensor([[0.1960-0.8311j, 0.3222+0.4086j]])
----------Measure----------
Probability:  tensor([[0.7292, 0.2708]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6904-0.6667j, 0.2808+0.0007j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.6904-0.6667j, 0.2808+0.0007j]])
New state:  tensor([[0.3577-0.8906j, 0.2560+0.1154j]])
----------Measure----------
Probability:  tensor([[0.9212, 0.0788]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4770-0.7253j, 0.4241+0.2579j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.4770-0.7253j, 0.4241+0.2579j]])
New state:  tensor([[0.1389-0.8569j, 0.2817+0.4087j]])
----------Measure----------
Probability:  tensor([[0.7536, 0.2464]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2599-0.7756j, 0.3430+0.4619j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.2599-0.7756j, 0.3430+0.4619j]])
New state:  tensor([[-0.0797-0.8140j,  0.1243+0.5617j]])
----------Measure----------
Probability:  tensor([[0.6690, 0.3310]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4982-0.7023j, 0.4430+0.2497j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.4982-0.7023j, 0.4430+0.2497j]])
New state:  tensor([[0.1677-0.8446j, 0.3023+0.4090j]])
----------Measure----------
Probability:  tensor([[0.7414, 0.2586]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3855-0.6965j, 0.4709+0.3802j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.3855-0.6965j, 0.4709+0.3802j]])
New state:  tensor([[0.0672-0.7932j, 0.2744+0.5395j]])
----------Measure----------
Probability:  tensor([[0.6337, 0.3663]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1164-0.3089j, 0.7849+0.5243j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.1164-0.3089j, 0.7849+0.5243j]])
New state:  tensor([[-0.0200-0.3295j,  0.5021+0.7993j]])
----------Measure----------
Probability:  tensor([[0.1090, 0.8910]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1811-0.7720j, 0.2799+0.5411j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.1811-0.7720j, 0.2799+0.5411j]])
New state:  tensor([[-0.1502-0.7786j,  0.0343+0.6083j]])
----------Measure----------
Probability:  tensor([[0.6289, 0.3711]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4395-0.6320j, 0.5369+0.3450j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.4395-0.6320j, 0.5369+0.3450j]])
New state:  tensor([[0.1428-0.7565j, 0.3491+0.5343j]])
----------Measure----------
Probability:  tensor([[0.5926, 0.4074]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3852+0.j]])
ry_matrix:  tensor([[ 0.9815-0.j, -0.1914-0.j],
        [ 0.1914+0.j,  0.9815-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6377-0.5893j, 0.4722+0.1519j]])
Inside  rz
rz_matrix theta:  tensor([[0.8420+0.j]])
rz_matrix:  tensor([[0.9127-0.4087j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9127+0.4087j]])
Performing matrix multiplication

Current state:  tensor([[0.6377-0.5893j, 0.4722+0.1519j]])
New state:  tensor([[0.3411-0.7985j, 0.3689+0.3316j]])
----------Measure----------
Probability:  tensor([[0.7539, 0.2461]])
valid set accuracy: 1.0
valid set loss: 0.3767343759536743
------------------------------Epoch31------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6357-0.5900j, 0.4749+0.1494j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.6357-0.5900j, 0.4749+0.1494j]])
New state:  tensor([[0.3473-0.7947j, 0.3758+0.3266j]])
----------Measure----------
Probability:  tensor([[0.7521, 0.2479]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2585-0.7775j, 0.3441+0.4586j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.2585-0.7775j, 0.3441+0.4586j]])
New state:  tensor([[-0.0734-0.8160j,  0.1324+0.5578j]])
----------Measure----------
Probability:  tensor([[0.6713, 0.3287]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4752-0.7264j, 0.4261+0.2548j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.4752-0.7264j, 0.4261+0.2548j]])
New state:  tensor([[0.1457-0.8557j, 0.2890+0.4038j]])
----------Measure----------
Probability:  tensor([[0.7535, 0.2465]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4406-0.4742j, 0.6874+0.3294j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.4406-0.4742j, 0.6874+0.3294j]])
New state:  tensor([[0.2147-0.6107j, 0.4987+0.5764j]])
----------Measure----------
Probability:  tensor([[0.4190, 0.5810]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5486-0.7619j, 0.3263+0.1097j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.5486-0.7619j, 0.3263+0.1097j]])
New state:  tensor([[0.1988-0.9176j, 0.2554+0.2309j]])
----------Measure----------
Probability:  tensor([[0.8815, 0.1185]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1131-0.3111j, 0.7854+0.5230j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.1131-0.3111j, 0.7854+0.5230j]])
New state:  tensor([[-0.0205-0.3304j,  0.5113+0.7931j]])
----------Measure----------
Probability:  tensor([[0.1096, 0.8904]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6357-0.5900j, 0.4749+0.1494j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.6357-0.5900j, 0.4749+0.1494j]])
New state:  tensor([[0.3473-0.7947j, 0.3758+0.3266j]])
----------Measure----------
Probability:  tensor([[0.7521, 0.2479]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4963-0.7033j, 0.4451+0.2467j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.4963-0.7033j, 0.4451+0.2467j]])
New state:  tensor([[0.1743-0.8430j, 0.3096+0.4039j]])
----------Measure----------
Probability:  tensor([[0.7410, 0.2590]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5166-0.6795j, 0.4633+0.2384j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.5166-0.6795j, 0.4633+0.2384j]])
New state:  tensor([[0.2024-0.8292j, 0.3296+0.4035j]])
----------Measure----------
Probability:  tensor([[0.7286, 0.2714]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3801-0.3829j, 0.7722+0.3356j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.3801-0.3829j, 0.7722+0.3356j]])
New state:  tensor([[0.1957-0.5028j, 0.5740+0.6160j]])
----------Measure----------
Probability:  tensor([[0.2911, 0.7089]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4775-0.6925j, 0.4652+0.2756j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.4775-0.6925j, 0.4652+0.2756j]])
New state:  tensor([[0.1613-0.8256j, 0.3165+0.4384j]])
----------Measure----------
Probability:  tensor([[0.7076, 0.2924]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4135-0.7586j, 0.4029+0.3019j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.4135-0.7586j, 0.4029+0.3019j]])
New state:  tensor([[0.0763-0.8606j, 0.2489+0.4377j]])
----------Measure----------
Probability:  tensor([[0.7465, 0.2535]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5663-0.2871j, 0.7538+0.1693j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.5663-0.2871j, 0.7538+0.1693j]])
New state:  tensor([[0.4046-0.4893j, 0.6235+0.4562j]])
----------Measure----------
Probability:  tensor([[0.4031, 0.5969]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4372-0.6335j, 0.5388+0.3423j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.4372-0.6335j, 0.5388+0.3423j]])
New state:  tensor([[0.1480-0.7554j, 0.3573+0.5290j]])
----------Measure----------
Probability:  tensor([[0.5925, 0.4075]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3116-0.6706j, 0.4861+0.4658j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.3116-0.6706j, 0.4861+0.4658j]])
New state:  tensor([[0.0180-0.7392j, 0.2597+0.6211j]])
----------Measure----------
Probability:  tensor([[0.5468, 0.4532]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4527-0.5123j, 0.6517+0.3284j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.4527-0.5123j, 0.6517+0.3284j]])
New state:  tensor([[0.2105-0.6505j, 0.4664+0.5613j]])
----------Measure----------
Probability:  tensor([[0.4674, 0.5326]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5297-0.4060j, 0.7051+0.2395j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.5297-0.4060j, 0.7051+0.2395j]])
New state:  tensor([[0.3235-0.5837j, 0.5509+0.5011j]])
----------Measure----------
Probability:  tensor([[0.4454, 0.5546]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1799-0.7743j, 0.2806+0.5379j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.1799-0.7743j, 0.2806+0.5379j]])
New state:  tensor([[-0.1442-0.7818j,  0.0426+0.6052j]])
----------Measure----------
Probability:  tensor([[0.6320, 0.3680]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5948-0.6109j, 0.4886+0.1850j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.5948-0.6109j, 0.4886+0.1850j]])
New state:  tensor([[0.3015-0.7976j, 0.3742+0.3647j]])
----------Measure----------
Probability:  tensor([[0.7270, 0.2730]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3544-0.5177j, 0.6557+0.4201j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.3544-0.5177j, 0.6557+0.4201j]])
New state:  tensor([[0.1182-0.6161j, 0.4335+0.6469j]])
----------Measure----------
Probability:  tensor([[0.3935, 0.6065]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6167-0.6187j, 0.4608+0.1567j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.6167-0.6187j, 0.4608+0.1567j]])
New state:  tensor([[0.3184-0.8135j, 0.3599+0.3276j]])
----------Measure----------
Probability:  tensor([[0.7631, 0.2369]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5543-0.3315j, 0.7380+0.1955j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.5543-0.3315j, 0.7380+0.1955j]])
New state:  tensor([[0.3759-0.5253j, 0.5985+0.4739j]])
----------Measure----------
Probability:  tensor([[0.4172, 0.5828]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0661-0.2477j, 0.8363+0.4847j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.0661-0.2477j, 0.8363+0.4847j]])
New state:  tensor([[-0.0383-0.2535j,  0.5732+0.7783j]])
----------Measure----------
Probability:  tensor([[0.0657, 0.9343]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6893-0.6667j, 0.2837-0.0021j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.6893-0.6667j, 0.2837-0.0021j]])
New state:  tensor([[0.3658-0.8864j, 0.2610+0.1113j]])
----------Measure----------
Probability:  tensor([[0.9195, 0.0805]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3410-0.3951j, 0.7664+0.3744j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.3410-0.3951j, 0.7664+0.3744j]])
New state:  tensor([[0.1549-0.4984j, 0.5532+0.6492j]])
----------Measure----------
Probability:  tensor([[0.2724, 0.7276]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4527-0.4471j, 0.7062+0.3105j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.4527-0.4471j, 0.7062+0.3105j]])
New state:  tensor([[0.2366-0.5906j, 0.5235+0.5667j]])
----------Measure----------
Probability:  tensor([[0.4048, 0.5952]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3835-0.6981j, 0.4726+0.3772j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.3835-0.6981j, 0.4726+0.3772j]])
New state:  tensor([[0.0729-0.7931j, 0.2827+0.5345j]])
----------Measure----------
Probability:  tensor([[0.6344, 0.3656]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5150-0.3623j, 0.7414+0.2322j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.5150-0.3623j, 0.7414+0.2322j]])
New state:  tensor([[0.3275-0.5377j, 0.5870+0.5089j]])
----------Measure----------
Probability:  tensor([[0.3964, 0.6036]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.3936+0.j]])
ry_matrix:  tensor([[ 0.9807-0.j, -0.1955-0.j],
        [ 0.1955+0.j,  0.9807-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4970-0.6690j, 0.4842+0.2663j]])
Inside  rz
rz_matrix theta:  tensor([[0.8213+0.j]])
rz_matrix:  tensor([[0.9169-0.3992j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9169+0.3992j]])
Performing matrix multiplication

Current state:  tensor([[0.4970-0.6690j, 0.4842+0.2663j]])
New state:  tensor([[0.1886-0.8118j, 0.3377+0.4375j]])
----------Measure----------
Probability:  tensor([[0.6946, 0.3054]])
valid set accuracy: 1.0
valid set loss: 0.37584149837493896
------------------------------Epoch32------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4760-0.6934j, 0.4668+0.2734j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.4760-0.6934j, 0.4668+0.2734j]])
New state:  tensor([[0.1679-0.8241j, 0.3232+0.4338j]])
----------Measure----------
Probability:  tensor([[0.7074, 0.2926]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6342-0.5904j, 0.4770+0.1475j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.6342-0.5904j, 0.4770+0.1475j]])
New state:  tensor([[0.3537-0.7910j, 0.3817+0.3218j]])
----------Measure----------
Probability:  tensor([[0.7508, 0.2492]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5520-0.3321j, 0.7397+0.1945j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.5520-0.3321j, 0.7397+0.1945j]])
New state:  tensor([[0.3788-0.5211j, 0.6053+0.4675j]])
----------Measure----------
Probability:  tensor([[0.4150, 0.5850]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6342-0.5904j, 0.4770+0.1475j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.6342-0.5904j, 0.4770+0.1475j]])
New state:  tensor([[0.3537-0.7910j, 0.3817+0.3218j]])
----------Measure----------
Probability:  tensor([[0.7508, 0.2492]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6152-0.6192j, 0.4627+0.1547j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.6152-0.6192j, 0.4627+0.1547j]])
New state:  tensor([[0.3250-0.8101j, 0.3657+0.3229j]])
----------Measure----------
Probability:  tensor([[0.7620, 0.2380]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5274-0.4068j, 0.7068+0.2382j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.5274-0.4068j, 0.7068+0.2382j]])
New state:  tensor([[0.3271-0.5803j, 0.5580+0.4950j]])
----------Measure----------
Probability:  tensor([[0.4437, 0.5563]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2574-0.7790j, 0.3449+0.4561j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.2574-0.7790j, 0.3449+0.4561j]])
New state:  tensor([[-0.0668-0.8176j,  0.1397+0.5545j]])
----------Measure----------
Probability:  tensor([[0.6730, 0.3270]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4122-0.7596j, 0.4042+0.2995j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.4122-0.7596j, 0.4042+0.2995j]])
New state:  tensor([[0.0834-0.8602j, 0.2554+0.4334j]])
----------Measure----------
Probability:  tensor([[0.7469, 0.2531]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5933-0.6115j, 0.4905+0.1831j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.5933-0.6115j, 0.4905+0.1831j]])
New state:  tensor([[0.3079-0.7944j, 0.3803+0.3599j]])
----------Measure----------
Probability:  tensor([[0.7259, 0.2741]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3523-0.5190j, 0.6569+0.4184j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.3523-0.5190j, 0.6569+0.4184j]])
New state:  tensor([[0.1220-0.6153j, 0.4417+0.6415j]])
----------Measure----------
Probability:  tensor([[0.3935, 0.6065]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4954-0.6699j, 0.4858+0.2641j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.4954-0.6699j, 0.4858+0.2641j]])
New state:  tensor([[0.1950-0.8101j, 0.3443+0.4327j]])
----------Measure----------
Probability:  tensor([[0.6942, 0.3058]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5151-0.6802j, 0.4649+0.2362j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.5151-0.6802j, 0.4649+0.2362j]])
New state:  tensor([[0.2091-0.8273j, 0.3360+0.3988j]])
----------Measure----------
Probability:  tensor([[0.7281, 0.2719]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3820-0.6993j, 0.4738+0.3750j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.3820-0.6993j, 0.4738+0.3750j]])
New state:  tensor([[0.0791-0.7929j, 0.2900+0.5301j]])
----------Measure----------
Probability:  tensor([[0.6349, 0.3651]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5126-0.3630j, 0.7430+0.2311j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.5126-0.3630j, 0.7430+0.2311j]])
New state:  tensor([[0.3305-0.5342j, 0.5941+0.5025j]])
----------Measure----------
Probability:  tensor([[0.3946, 0.6054]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1106-0.3128j, 0.7857+0.5220j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.1106-0.3128j, 0.7857+0.5220j]])
New state:  tensor([[-0.0201-0.3312j,  0.5200+0.7871j]])
----------Measure----------
Probability:  tensor([[0.1101, 0.8899]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3100-0.6721j, 0.4870+0.4637j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.3100-0.6721j, 0.4870+0.4637j]])
New state:  tensor([[0.0234-0.7398j, 0.2677+0.6169j]])
----------Measure----------
Probability:  tensor([[0.5478, 0.4522]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5475-0.7623j, 0.3281+0.1073j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.5475-0.7623j, 0.3281+0.1073j]])
New state:  tensor([[0.2069-0.9154j, 0.2603+0.2267j]])
----------Measure----------
Probability:  tensor([[0.8809, 0.1191]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4385-0.4752j, 0.6888+0.3279j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.4385-0.4752j, 0.6888+0.3279j]])
New state:  tensor([[0.2184-0.6086j, 0.5064+0.5705j]])
----------Measure----------
Probability:  tensor([[0.4181, 0.5819]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6883-0.6667j, 0.2859-0.0042j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.6883-0.6667j, 0.2859-0.0042j]])
New state:  tensor([[0.3739-0.8823j, 0.2649+0.1076j]])
----------Measure----------
Probability:  tensor([[0.9182, 0.0818]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4355-0.6346j, 0.5402+0.3403j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.4355-0.6346j, 0.5402+0.3403j]])
New state:  tensor([[0.1536-0.7542j, 0.3647+0.5240j]])
----------Measure----------
Probability:  tensor([[0.5924, 0.4076]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1790-0.7760j, 0.2812+0.5354j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.1790-0.7760j, 0.2812+0.5354j]])
New state:  tensor([[-0.1378-0.7844j,  0.0502+0.6027j]])
----------Measure----------
Probability:  tensor([[0.6343, 0.3657]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5639-0.2876j, 0.7556+0.1684j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.5639-0.2876j, 0.7556+0.1684j]])
New state:  tensor([[0.4071-0.4848j, 0.6301+0.4498j]])
----------Measure----------
Probability:  tensor([[0.4007, 0.5993]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4949-0.7041j, 0.4467+0.2445j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.4949-0.7041j, 0.4467+0.2445j]])
New state:  tensor([[0.1812-0.8414j, 0.3160+0.3993j]])
----------Measure----------
Probability:  tensor([[0.7407, 0.2593]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4505-0.4480j, 0.7077+0.3091j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.4505-0.4480j, 0.7077+0.3091j]])
New state:  tensor([[0.2401-0.5882j, 0.5311+0.5606j]])
----------Measure----------
Probability:  tensor([[0.4037, 0.5963]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4738-0.7272j, 0.4277+0.2525j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.4738-0.7272j, 0.4277+0.2525j]])
New state:  tensor([[0.1528-0.8544j, 0.2953+0.3993j]])
----------Measure----------
Probability:  tensor([[0.7533, 0.2467]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0634-0.2492j, 0.8365+0.4839j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.0634-0.2492j, 0.8365+0.4839j]])
New state:  tensor([[-0.0388-0.2542j,  0.5816+0.7718j]])
----------Measure----------
Probability:  tensor([[0.0661, 0.9339]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3386-0.3963j, 0.7675+0.3732j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.3386-0.3963j, 0.7675+0.3732j]])
New state:  tensor([[0.1573-0.4970j, 0.5612+0.6429j]])
----------Measure----------
Probability:  tensor([[0.2717, 0.7283]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4506-0.5134j, 0.6531+0.3268j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.4506-0.5134j, 0.6531+0.3268j]])
New state:  tensor([[0.2147-0.6485j, 0.4740+0.5556j]])
----------Measure----------
Probability:  tensor([[0.4666, 0.5334]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4000+0.j]])
ry_matrix:  tensor([[ 0.9801-0.j, -0.1987-0.j],
        [ 0.1987+0.j,  0.9801-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3777-0.3840j, 0.7734+0.3344j]])
Inside  rz
rz_matrix theta:  tensor([[0.8012+0.j]])
rz_matrix:  tensor([[0.9208-0.3900j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9208+0.3900j]])
Performing matrix multiplication

Current state:  tensor([[0.3777-0.3840j, 0.7734+0.3344j]])
New state:  tensor([[0.1980-0.5008j, 0.5817+0.6095j]])
----------Measure----------
Probability:  tensor([[0.2901, 0.7099]])
valid set accuracy: 1.0
valid set loss: 0.3751882314682007
------------------------------Epoch33------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5462-0.7627j, 0.3303+0.1042j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.5462-0.7627j, 0.3303+0.1042j]])
New state:  tensor([[0.2145-0.9133j, 0.2657+0.2222j]])
----------Measure----------
Probability:  tensor([[0.8801, 0.1199]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6134-0.6199j, 0.4652+0.1523j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.6134-0.6199j, 0.4652+0.1523j]])
New state:  tensor([[0.3310-0.8067j, 0.3721+0.3179j]])
----------Measure----------
Probability:  tensor([[0.7604, 0.2396]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3355-0.3978j, 0.7689+0.3716j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.3355-0.3978j, 0.7689+0.3716j]])
New state:  tensor([[0.1587-0.4956j, 0.5694+0.6364j]])
----------Measure----------
Probability:  tensor([[0.2708, 0.7292]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5913-0.6122j, 0.4929+0.1806j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.5913-0.6122j, 0.4929+0.1806j]])
New state:  tensor([[0.3136-0.7913j, 0.3870+0.3547j]])
----------Measure----------
Probability:  tensor([[0.7244, 0.2756]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4721-0.7282j, 0.4296+0.2496j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.4721-0.7282j, 0.4296+0.2496j]])
New state:  tensor([[0.1592-0.8531j, 0.3021+0.3944j]])
----------Measure----------
Probability:  tensor([[0.7532, 0.2468]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0600-0.2512j, 0.8367+0.4829j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.0600-0.2512j, 0.8367+0.4829j]])
New state:  tensor([[-0.0402-0.2551j,  0.5897+0.7652j]])
----------Measure----------
Probability:  tensor([[0.0667, 0.9333]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5490-0.3329j, 0.7419+0.1932j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.5490-0.3329j, 0.7419+0.1932j]])
New state:  tensor([[0.3808-0.5169j, 0.6124+0.4612j]])
----------Measure----------
Probability:  tensor([[0.4122, 0.5878]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4106-0.7608j, 0.4059+0.2965j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.4106-0.7608j, 0.4059+0.2965j]])
New state:  tensor([[0.0899-0.8598j, 0.2624+0.4287j]])
----------Measure----------
Probability:  tensor([[0.7474, 0.2526]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6322-0.5910j, 0.4795+0.1452j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.6322-0.5910j, 0.4795+0.1452j]])
New state:  tensor([[0.3595-0.7873j, 0.3881+0.3168j]])
----------Measure----------
Probability:  tensor([[0.7490, 0.2510]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1074-0.3149j, 0.7862+0.5208j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.1074-0.3149j, 0.7862+0.5208j]])
New state:  tensor([[-0.0206-0.3321j,  0.5286+0.7810j]])
----------Measure----------
Probability:  tensor([[0.1107, 0.8893]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4476-0.4493j, 0.7095+0.3073j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.4476-0.4493j, 0.7095+0.3073j]])
New state:  tensor([[0.2428-0.5859j, 0.5389+0.5544j]])
----------Measure----------
Probability:  tensor([[0.4022, 0.5978]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1779-0.7782j, 0.2819+0.5323j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.1779-0.7782j, 0.2819+0.5323j]])
New state:  tensor([[-0.1319-0.7873j,  0.0579+0.5995j]])
----------Measure----------
Probability:  tensor([[0.6372, 0.3628]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3801-0.7008j, 0.4753+0.3722j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.3801-0.7008j, 0.4753+0.3722j]])
New state:  tensor([[0.0845-0.7927j, 0.2977+0.5252j]])
----------Measure----------
Probability:  tensor([[0.6355, 0.3645]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4357-0.4765j, 0.6905+0.3260j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.4357-0.4765j, 0.6905+0.3260j]])
New state:  tensor([[0.2214-0.6066j, 0.5143+0.5644j]])
----------Measure----------
Probability:  tensor([[0.4169, 0.5831]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5246-0.4077j, 0.7089+0.2366j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.5246-0.4077j, 0.7089+0.2366j]])
New state:  tensor([[0.3298-0.5768j, 0.5654+0.4887j]])
----------Measure----------
Probability:  tensor([[0.4415, 0.5585]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4741-0.6945j, 0.4687+0.2706j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.4741-0.6945j, 0.4687+0.2706j]])
New state:  tensor([[0.1739-0.8227j, 0.3303+0.4287j]])
----------Measure----------
Probability:  tensor([[0.7071, 0.2929]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5132-0.6812j, 0.4670+0.2335j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.5132-0.6812j, 0.4670+0.2335j]])
New state:  tensor([[0.2151-0.8253j, 0.3429+0.3937j]])
----------Measure----------
Probability:  tensor([[0.7274, 0.2726]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5608-0.2883j, 0.7579+0.1673j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.5608-0.2883j, 0.7579+0.1673j]])
New state:  tensor([[0.4087-0.4802j, 0.6370+0.4433j]])
----------Measure----------
Probability:  tensor([[0.3976, 0.6024]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2560-0.7808j, 0.3459+0.4530j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.2560-0.7808j, 0.3459+0.4530j]])
New state:  tensor([[-0.0607-0.8194j,  0.1473+0.5506j]])
----------Measure----------
Probability:  tensor([[0.6751, 0.3249]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4480-0.5147j, 0.6549+0.3247j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.4480-0.5147j, 0.6549+0.3247j]])
New state:  tensor([[0.2182-0.6465j, 0.4819+0.5497j]])
----------Measure----------
Probability:  tensor([[0.4656, 0.5344]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4931-0.7051j, 0.4487+0.2417j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.4931-0.7051j, 0.4487+0.2417j]])
New state:  tensor([[0.1874-0.8398j, 0.3228+0.3943j]])
----------Measure----------
Probability:  tensor([[0.7403, 0.2597]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6872-0.6666j, 0.2887-0.0069j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.6872-0.6666j, 0.2887-0.0069j]])
New state:  tensor([[0.3815-0.8781j, 0.2695+0.1036j]])
----------Measure----------
Probability:  tensor([[0.9166, 0.0834]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3496-0.5207j, 0.6583+0.4163j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.3496-0.5207j, 0.6583+0.4163j]])
New state:  tensor([[0.1250-0.6146j, 0.4501+0.6357j]])
----------Measure----------
Probability:  tensor([[0.3933, 0.6067]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5096-0.3639j, 0.7451+0.2296j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.5096-0.3639j, 0.7451+0.2296j]])
New state:  tensor([[0.3326-0.5306j, 0.6014+0.4961j]])
----------Measure----------
Probability:  tensor([[0.3922, 0.6078]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3746-0.3853j, 0.7749+0.3329j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.3746-0.3853j, 0.7749+0.3329j]])
New state:  tensor([[0.1996-0.4989j, 0.5897+0.6029j]])
----------Measure----------
Probability:  tensor([[0.2888, 0.7112]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3081-0.6739j, 0.4883+0.4610j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.3081-0.6739j, 0.4883+0.4610j]])
New state:  tensor([[0.0282-0.7405j, 0.2759+0.6122j]])
----------Measure----------
Probability:  tensor([[0.5491, 0.4509]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6322-0.5910j, 0.4795+0.1452j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.6322-0.5910j, 0.4795+0.1452j]])
New state:  tensor([[0.3595-0.7873j, 0.3881+0.3168j]])
----------Measure----------
Probability:  tensor([[0.7490, 0.2510]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4935-0.6709j, 0.4878+0.2615j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.4935-0.6709j, 0.4878+0.2615j]])
New state:  tensor([[0.2008-0.8083j, 0.3515+0.4275j]])
----------Measure----------
Probability:  tensor([[0.6937, 0.3063]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4080+0.j]])
ry_matrix:  tensor([[ 0.9793-0.j, -0.2026-0.j],
        [ 0.2026+0.j,  0.9793-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4333-0.6359j, 0.5419+0.3378j]])
Inside  rz
rz_matrix theta:  tensor([[0.7815+0.j]])
rz_matrix:  tensor([[0.9246-0.3809j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9246+0.3809j]])
Performing matrix multiplication

Current state:  tensor([[0.4333-0.6359j, 0.5419+0.3378j]])
New state:  tensor([[0.1585-0.7531j, 0.3724+0.5187j]])
----------Measure----------
Probability:  tensor([[0.5922, 0.4078]])
valid set accuracy: 1.0
valid set loss: 0.37438175082206726
------------------------------Epoch34------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1769-0.7799j, 0.2825+0.5297j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.1769-0.7799j, 0.2825+0.5297j]])
New state:  tensor([[-0.1259-0.7898j,  0.0652+0.5968j]])
----------Measure----------
Probability:  tensor([[0.6396, 0.3604]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3065-0.6755j, 0.4893+0.4587j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.3065-0.6755j, 0.4893+0.4587j]])
New state:  tensor([[0.0332-0.7410j, 0.2836+0.6078j]])
----------Measure----------
Probability:  tensor([[0.5502, 0.4498]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3720-0.3864j, 0.7761+0.3316j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.3720-0.3864j, 0.7761+0.3316j]])
New state:  tensor([[0.2016-0.4970j, 0.5971+0.5965j]])
----------Measure----------
Probability:  tensor([[0.2877, 0.7123]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5451-0.7631j, 0.3321+0.1017j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.5451-0.7631j, 0.3321+0.1017j]])
New state:  tensor([[0.2221-0.9111j, 0.2704+0.2179j]])
----------Measure----------
Probability:  tensor([[0.8794, 0.1206]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4453-0.4503j, 0.7109+0.3058j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.4453-0.4503j, 0.7109+0.3058j]])
New state:  tensor([[0.2458-0.5836j, 0.5462+0.5483j]])
----------Measure----------
Probability:  tensor([[0.4010, 0.5990]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5583-0.2889j, 0.7597+0.1663j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.5583-0.2889j, 0.7597+0.1663j]])
New state:  tensor([[0.4108-0.4758j, 0.6434+0.4370j]])
----------Measure----------
Probability:  tensor([[0.3951, 0.6049]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2548-0.7823j, 0.3468+0.4504j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.2548-0.7823j, 0.3468+0.4504j]])
New state:  tensor([[-0.0544-0.8209j,  0.1544+0.5471j]])
----------Measure----------
Probability:  tensor([[0.6769, 0.3231]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4916-0.7059j, 0.4503+0.2393j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.4916-0.7059j, 0.4503+0.2393j]])
New state:  tensor([[0.1938-0.8381j, 0.3290+0.3897j]])
----------Measure----------
Probability:  tensor([[0.7400, 0.2600]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4726-0.6954j, 0.4702+0.2683j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.4726-0.6954j, 0.4702+0.2683j]])
New state:  tensor([[0.1800-0.8213j, 0.3367+0.4240j]])
----------Measure----------
Probability:  tensor([[0.7069, 0.2931]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4093-0.7618j, 0.4072+0.2939j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.4093-0.7618j, 0.4072+0.2939j]])
New state:  tensor([[0.0965-0.8593j, 0.2687+0.4243j]])
----------Measure----------
Probability:  tensor([[0.7478, 0.2522]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3785-0.7020j, 0.4766+0.3699j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.3785-0.7020j, 0.4766+0.3699j]])
New state:  tensor([[0.0902-0.7924j, 0.3048+0.5206j]])
----------Measure----------
Probability:  tensor([[0.6361, 0.3639]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4334-0.4776j, 0.6920+0.3244j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.4334-0.4776j, 0.6920+0.3244j]])
New state:  tensor([[0.2246-0.6046j, 0.5217+0.5585j]])
----------Measure----------
Probability:  tensor([[0.4160, 0.5840]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5465-0.3336j, 0.7437+0.1920j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.5465-0.3336j, 0.7437+0.1920j]])
New state:  tensor([[0.3832-0.5129j, 0.6189+0.4549j]])
----------Measure----------
Probability:  tensor([[0.4100, 0.5900]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4315-0.6371j, 0.5434+0.3357j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.4315-0.6371j, 0.5434+0.3357j]])
New state:  tensor([[0.1636-0.7519j, 0.3795+0.5137j]])
----------Measure----------
Probability:  tensor([[0.5921, 0.4079]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6306-0.5915j, 0.4816+0.1432j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.6306-0.5915j, 0.4816+0.1432j]])
New state:  tensor([[0.3654-0.7836j, 0.3938+0.3121j]])
----------Measure----------
Probability:  tensor([[0.7476, 0.2524]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1048-0.3166j, 0.7865+0.5197j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.1048-0.3166j, 0.7865+0.5197j]])
New state:  tensor([[-0.0205-0.3329j,  0.5368+0.7750j]])
----------Measure----------
Probability:  tensor([[0.1112, 0.8888]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6118-0.6204j, 0.4672+0.1502j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.6118-0.6204j, 0.4672+0.1502j]])
New state:  tensor([[0.3371-0.8034j, 0.3778+0.3132j]])
----------Measure----------
Probability:  tensor([[0.7592, 0.2408]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5071-0.3647j, 0.7467+0.2284j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.5071-0.3647j, 0.7467+0.2284j]])
New state:  tensor([[0.3351-0.5272j, 0.6082+0.4898j]])
----------Measure----------
Probability:  tensor([[0.3902, 0.6098]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5222-0.4085j, 0.7107+0.2352j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.5222-0.4085j, 0.7107+0.2352j]])
New state:  tensor([[0.3328-0.5735j, 0.5722+0.4827j]])
----------Measure----------
Probability:  tensor([[0.4396, 0.5604]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5897-0.6128j, 0.4949+0.1786j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.5897-0.6128j, 0.4949+0.1786j]])
New state:  tensor([[0.3194-0.7882j, 0.3929+0.3498j]])
----------Measure----------
Probability:  tensor([[0.7232, 0.2768]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6862-0.6666j, 0.2909-0.0091j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.6862-0.6666j, 0.2909-0.0091j]])
New state:  tensor([[0.3890-0.8740j, 0.2734+0.0998j]])
----------Measure----------
Probability:  tensor([[0.9153, 0.0847]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6306-0.5915j, 0.4816+0.1432j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.6306-0.5915j, 0.4816+0.1432j]])
New state:  tensor([[0.3654-0.7836j, 0.3938+0.3121j]])
----------Measure----------
Probability:  tensor([[0.7476, 0.2524]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4458-0.5158j, 0.6564+0.3230j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.4458-0.5158j, 0.6564+0.3230j]])
New state:  tensor([[0.2220-0.6446j, 0.4892+0.5440j]])
----------Measure----------
Probability:  tensor([[0.4648, 0.5352]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4707-0.7290j, 0.4311+0.2472j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.4707-0.7290j, 0.4311+0.2472j]])
New state:  tensor([[0.1657-0.8518j, 0.3082+0.3898j]])
----------Measure----------
Probability:  tensor([[0.7530, 0.2470]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4919-0.6718j, 0.4894+0.2592j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.4919-0.6718j, 0.4894+0.2592j]])
New state:  tensor([[0.2067-0.8066j, 0.3579+0.4227j]])
----------Measure----------
Probability:  tensor([[0.6933, 0.3067]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5117-0.6819j, 0.4687+0.2312j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.5117-0.6819j, 0.4687+0.2312j]])
New state:  tensor([[0.2213-0.8233j, 0.3490+0.3890j]])
----------Measure----------
Probability:  tensor([[0.7269, 0.2731]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0573-0.2528j, 0.8369+0.4821j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.0573-0.2528j, 0.8369+0.4821j]])
New state:  tensor([[-0.0409-0.2560j,  0.5975+0.7588j]])
----------Measure----------
Probability:  tensor([[0.0672, 0.9328]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3330-0.3990j, 0.7700+0.3702j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.3330-0.3990j, 0.7700+0.3702j]])
New state:  tensor([[0.1606-0.4942j, 0.5770+0.6301j]])
----------Measure----------
Probability:  tensor([[0.2701, 0.7299]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4147+0.j]])
ry_matrix:  tensor([[ 0.9786-0.j, -0.2058-0.j],
        [ 0.2058+0.j,  0.9786-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3474-0.5221j, 0.6594+0.4146j]])
Inside  rz
rz_matrix theta:  tensor([[0.7623+0.j]])
rz_matrix:  tensor([[0.9282-0.3720j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9282+0.3720j]])
Performing matrix multiplication

Current state:  tensor([[0.3474-0.5221j, 0.6594+0.4146j]])
New state:  tensor([[0.1283-0.6138j, 0.4579+0.6302j]])
----------Measure----------
Probability:  tensor([[0.3933, 0.6067]])
valid set accuracy: 1.0
valid set loss: 0.3737313449382782
------------------------------Epoch35------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0547-0.2543j, 0.8371+0.4813j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.0547-0.2543j, 0.8371+0.4813j]])
New state:  tensor([[-0.0414-0.2568j,  0.6051+0.7525j]])
----------Measure----------
Probability:  tensor([[0.0677, 0.9323]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3049-0.6769j, 0.4902+0.4566j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.3049-0.6769j, 0.4902+0.4566j]])
New state:  tensor([[0.0382-0.7414j, 0.2909+0.6035j]])
----------Measure----------
Probability:  tensor([[0.5511, 0.4489]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6291-0.5919j, 0.4835+0.1414j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.6291-0.5919j, 0.4835+0.1414j]])
New state:  tensor([[0.3711-0.7800j, 0.3992+0.3074j]])
----------Measure----------
Probability:  tensor([[0.7462, 0.2538]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4299-0.6381j, 0.5447+0.3337j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.4299-0.6381j, 0.5447+0.3337j]])
New state:  tensor([[0.1687-0.7507j, 0.3863+0.5088j]])
----------Measure----------
Probability:  tensor([[0.5919, 0.4081]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6853-0.6666j, 0.2931-0.0112j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.6853-0.6666j, 0.2931-0.0112j]])
New state:  tensor([[0.3964-0.8700j, 0.2771+0.0960j]])
----------Measure----------
Probability:  tensor([[0.9140, 0.0860]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4902-0.7066j, 0.4518+0.2371j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.4902-0.7066j, 0.4518+0.2371j]])
New state:  tensor([[0.2000-0.8364j, 0.3348+0.3851j]])
----------Measure----------
Probability:  tensor([[0.7396, 0.2604]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5102-0.6827j, 0.4703+0.2291j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.5102-0.6827j, 0.4703+0.2291j]])
New state:  tensor([[0.2274-0.8214j, 0.3549+0.3843j]])
----------Measure----------
Probability:  tensor([[0.7264, 0.2736]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4080-0.7627j, 0.4085+0.2916j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.4080-0.7627j, 0.4085+0.2916j]])
New state:  tensor([[0.1031-0.8588j, 0.2747+0.4200j]])
----------Measure----------
Probability:  tensor([[0.7481, 0.2519]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5881-0.6133j, 0.4967+0.1767j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.5881-0.6133j, 0.4967+0.1767j]])
New state:  tensor([[0.3251-0.7851j, 0.3986+0.3450j]])
----------Measure----------
Probability:  tensor([[0.7221, 0.2779]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5048-0.3654j, 0.7483+0.2273j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.5048-0.3654j, 0.7483+0.2273j]])
New state:  tensor([[0.3376-0.5238j, 0.6146+0.4836j]])
----------Measure----------
Probability:  tensor([[0.3884, 0.6116]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1761-0.7816j, 0.2830+0.5273j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.1761-0.7816j, 0.2830+0.5273j]])
New state:  tensor([[-0.1199-0.7921j,  0.0722+0.5941j]])
----------Measure----------
Probability:  tensor([[0.6419, 0.3581]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5200-0.4093j, 0.7123+0.2339j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.5200-0.4093j, 0.7123+0.2339j]])
New state:  tensor([[0.3358-0.5702j, 0.5786+0.4767j]])
----------Measure----------
Probability:  tensor([[0.4379, 0.5621]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4693-0.7298j, 0.4326+0.2449j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.4693-0.7298j, 0.4326+0.2449j]])
New state:  tensor([[0.1722-0.8504j, 0.3141+0.3853j]])
----------Measure----------
Probability:  tensor([[0.7529, 0.2471]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5442-0.3342j, 0.7454+0.1910j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.5442-0.3342j, 0.7454+0.1910j]])
New state:  tensor([[0.3857-0.5090j, 0.6251+0.4488j]])
----------Measure----------
Probability:  tensor([[0.4079, 0.5921]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3770-0.7031j, 0.4777+0.3677j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.3770-0.7031j, 0.4777+0.3677j]])
New state:  tensor([[0.0958-0.7921j, 0.3115+0.5161j]])
----------Measure----------
Probability:  tensor([[0.6366, 0.3634]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6104-0.6208j, 0.4691+0.1483j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.6104-0.6208j, 0.4691+0.1483j]])
New state:  tensor([[0.3431-0.8001j, 0.3832+0.3085j]])
----------Measure----------
Probability:  tensor([[0.7580, 0.2420]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3306-0.4002j, 0.7710+0.3690j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.3306-0.4002j, 0.7710+0.3690j]])
New state:  tensor([[0.1626-0.4929j, 0.5843+0.6239j]])
----------Measure----------
Probability:  tensor([[0.2694, 0.7306]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4313-0.4786j, 0.6933+0.3229j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.4313-0.4786j, 0.6933+0.3229j]])
New state:  tensor([[0.2279-0.6026j, 0.5287+0.5527j]])
----------Measure----------
Probability:  tensor([[0.4151, 0.5849]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4711-0.6962j, 0.4717+0.2662j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.4711-0.6962j, 0.4717+0.2662j]])
New state:  tensor([[0.1860-0.8198j, 0.3428+0.4193j]])
----------Measure----------
Probability:  tensor([[0.7067, 0.2933]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3696-0.3874j, 0.7773+0.3304j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.3696-0.3874j, 0.7773+0.3304j]])
New state:  tensor([[0.2036-0.4952j, 0.6042+0.5902j]])
----------Measure----------
Probability:  tensor([[0.2867, 0.7133]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4431-0.4512j, 0.7123+0.3044j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.4431-0.4512j, 0.7123+0.3044j]])
New state:  tensor([[0.2489-0.5814j, 0.5531+0.5424j]])
----------Measure----------
Probability:  tensor([[0.3999, 0.6001]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5441-0.7634j, 0.3338+0.0993j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.5441-0.7634j, 0.3338+0.0993j]])
New state:  tensor([[0.2296-0.9089j, 0.2749+0.2138j]])
----------Measure----------
Probability:  tensor([[0.8787, 0.1213]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4903-0.6726j, 0.4910+0.2571j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.4903-0.6726j, 0.4910+0.2571j]])
New state:  tensor([[0.2125-0.8048j, 0.3640+0.4179j]])
----------Measure----------
Probability:  tensor([[0.6928, 0.3072]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4438-0.5168j, 0.6578+0.3214j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.4438-0.5168j, 0.6578+0.3214j]])
New state:  tensor([[0.2257-0.6427j, 0.4961+0.5384j]])
----------Measure----------
Probability:  tensor([[0.4640, 0.5360]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6291-0.5919j, 0.4835+0.1414j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.6291-0.5919j, 0.4835+0.1414j]])
New state:  tensor([[0.3711-0.7800j, 0.3992+0.3074j]])
----------Measure----------
Probability:  tensor([[0.7462, 0.2538]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3454-0.5233j, 0.6605+0.4130j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.3454-0.5233j, 0.6605+0.4130j]])
New state:  tensor([[0.1317-0.6131j, 0.4653+0.6247j]])
----------Measure----------
Probability:  tensor([[0.3932, 0.6068]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2537-0.7837j, 0.3476+0.4480j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.2537-0.7837j, 0.3476+0.4480j]])
New state:  tensor([[-0.0483-0.8223j,  0.1611+0.5436j]])
----------Measure----------
Probability:  tensor([[0.6785, 0.3215]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.1024-0.3182j, 0.7869+0.5187j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.1024-0.3182j, 0.7869+0.5187j]])
New state:  tensor([[-0.0202-0.3337j,  0.5447+0.7691j]])
----------Measure----------
Probability:  tensor([[0.1118, 0.8882]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4209+0.j]])
ry_matrix:  tensor([[ 0.9779-0.j, -0.2089-0.j],
        [ 0.2089+0.j,  0.9779-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5559-0.2894j, 0.7615+0.1654j]])
Inside  rz
rz_matrix theta:  tensor([[0.7435+0.j]])
rz_matrix:  tensor([[0.9317-0.3633j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9317+0.3633j]])
Performing matrix multiplication

Current state:  tensor([[0.5559-0.2894j, 0.7615+0.1654j]])
New state:  tensor([[0.4128-0.4716j, 0.6493+0.4307j]])
----------Measure----------
Probability:  tensor([[0.3928, 0.6072]])
valid set accuracy: 1.0
valid set loss: 0.3731391727924347
------------------------------Epoch36------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3281-0.4013j, 0.7720+0.3677j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.3281-0.4013j, 0.7720+0.3677j]])
New state:  tensor([[0.1644-0.4916j, 0.5914+0.6177j]])
----------Measure----------
Probability:  tensor([[0.2687, 0.7313]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4888-0.7074j, 0.4534+0.2349j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.4888-0.7074j, 0.4534+0.2349j]])
New state:  tensor([[0.2060-0.8348j, 0.3406+0.3805j]])
----------Measure----------
Probability:  tensor([[0.7393, 0.2607]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5535-0.2899j, 0.7632+0.1645j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.5535-0.2899j, 0.7632+0.1645j]])
New state:  tensor([[0.4147-0.4674j, 0.6552+0.4246j]])
----------Measure----------
Probability:  tensor([[0.3904, 0.6096]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4067-0.7636j, 0.4098+0.2891j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.4067-0.7636j, 0.4098+0.2891j]])
New state:  tensor([[0.1094-0.8582j, 0.2806+0.4157j]])
----------Measure----------
Probability:  tensor([[0.7485, 0.2515]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6089-0.6213j, 0.4711+0.1463j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.6089-0.6213j, 0.4711+0.1463j]])
New state:  tensor([[0.3488-0.7969j, 0.3885+0.3039j]])
----------Measure----------
Probability:  tensor([[0.7567, 0.2433]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5430-0.7637j, 0.3355+0.0969j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.5430-0.7637j, 0.3355+0.0969j]])
New state:  tensor([[0.2368-0.9066j, 0.2793+0.2096j]])
----------Measure----------
Probability:  tensor([[0.8780, 0.1220]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5178-0.4100j, 0.7139+0.2326j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.5178-0.4100j, 0.7139+0.2326j]])
New state:  tensor([[0.3386-0.5670j, 0.5850+0.4708j]])
----------Measure----------
Probability:  tensor([[0.4362, 0.5638]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4290-0.4796j, 0.6947+0.3214j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.4290-0.4796j, 0.6947+0.3214j]])
New state:  tensor([[0.2310-0.6007j, 0.5355+0.5469j]])
----------Measure----------
Probability:  tensor([[0.4141, 0.5859]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.5024-0.3661j, 0.7499+0.2261j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.5024-0.3661j, 0.7499+0.2261j]])
New state:  tensor([[0.3399-0.5206j, 0.6209+0.4775j]])
----------Measure----------
Probability:  tensor([[0.3865, 0.6135]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4888-0.6734j, 0.4925+0.2550j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.4888-0.6734j, 0.4925+0.2550j]])
New state:  tensor([[0.2181-0.8030j, 0.3700+0.4131j]])
----------Measure----------
Probability:  tensor([[0.6924, 0.3076]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3755-0.7043j, 0.4789+0.3655j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.3755-0.7043j, 0.4789+0.3655j]])
New state:  tensor([[0.1012-0.7917j, 0.3181+0.5116j]])
----------Measure----------
Probability:  tensor([[0.6371, 0.3629]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4680-0.7306j, 0.4341+0.2426j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.4680-0.7306j, 0.4341+0.2426j]])
New state:  tensor([[0.1784-0.8491j, 0.3198+0.3808j]])
----------Measure----------
Probability:  tensor([[0.7527, 0.2473]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6276-0.5924j, 0.4855+0.1395j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.6276-0.5924j, 0.4855+0.1395j]])
New state:  tensor([[0.3766-0.7765j, 0.4045+0.3027j]])
----------Measure----------
Probability:  tensor([[0.7448, 0.2552]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5419-0.3348j, 0.7472+0.1899j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.5419-0.3348j, 0.7472+0.1899j]])
New state:  tensor([[0.3879-0.5052j, 0.6312+0.4427j]])
----------Measure----------
Probability:  tensor([[0.4057, 0.5943]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0999-0.3199j, 0.7872+0.5177j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.0999-0.3199j, 0.7872+0.5177j]])
New state:  tensor([[-0.0201-0.3345j,  0.5523+0.7633j]])
----------Measure----------
Probability:  tensor([[0.1123, 0.8877]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5087-0.6834j, 0.4719+0.2269j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.5087-0.6834j, 0.4719+0.2269j]])
New state:  tensor([[0.2332-0.8194j, 0.3607+0.3796j]])
----------Measure----------
Probability:  tensor([[0.7258, 0.2742]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3671-0.3885j, 0.7784+0.3292j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.3671-0.3885j, 0.7784+0.3292j]])
New state:  tensor([[0.2054-0.4934j, 0.6110+0.5839j]])
----------Measure----------
Probability:  tensor([[0.2857, 0.7143]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6276-0.5924j, 0.4855+0.1395j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.6276-0.5924j, 0.4855+0.1395j]])
New state:  tensor([[0.3766-0.7765j, 0.4045+0.3027j]])
----------Measure----------
Probability:  tensor([[0.7448, 0.2552]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3433-0.5246j, 0.6616+0.4113j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.3433-0.5246j, 0.6616+0.4113j]])
New state:  tensor([[0.1348-0.6123j, 0.4726+0.6193j]])
----------Measure----------
Probability:  tensor([[0.3931, 0.6069]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2526-0.7851j, 0.3484+0.4455j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.2526-0.7851j, 0.3484+0.4455j]])
New state:  tensor([[-0.0423-0.8237j,  0.1677+0.5401j]])
----------Measure----------
Probability:  tensor([[0.6802, 0.3198]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4281-0.6392j, 0.5461+0.3317j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.4281-0.6392j, 0.5461+0.3317j]])
New state:  tensor([[0.1735-0.7495j, 0.3929+0.5038j]])
----------Measure----------
Probability:  tensor([[0.5918, 0.4082]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4696-0.6971j, 0.4732+0.2639j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.4696-0.6971j, 0.4732+0.2639j]])
New state:  tensor([[0.1918-0.8183j, 0.3488+0.4146j]])
----------Measure----------
Probability:  tensor([[0.7064, 0.2936]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6844-0.6665j, 0.2952-0.0133j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.6844-0.6665j, 0.2952-0.0133j]])
New state:  tensor([[0.4034-0.8660j, 0.2808+0.0923j]])
----------Measure----------
Probability:  tensor([[0.9127, 0.0873]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4408-0.4522j, 0.7137+0.3030j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.4408-0.4522j, 0.7137+0.3030j]])
New state:  tensor([[0.2517-0.5792j, 0.5598+0.5365j]])
----------Measure----------
Probability:  tensor([[0.3988, 0.6012]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1752-0.7833j, 0.2836+0.5248j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.1752-0.7833j, 0.2836+0.5248j]])
New state:  tensor([[-0.1141-0.7945j,  0.0790+0.5913j]])
----------Measure----------
Probability:  tensor([[0.6442, 0.3558]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5865-0.6139j, 0.4986+0.1747j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.5865-0.6139j, 0.4986+0.1747j]])
New state:  tensor([[0.3306-0.7821j, 0.4042+0.3402j]])
----------Measure----------
Probability:  tensor([[0.7209, 0.2791]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4417-0.5178j, 0.6592+0.3198j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.4417-0.5178j, 0.6592+0.3198j]])
New state:  tensor([[0.2293-0.6408j, 0.5029+0.5328j]])
----------Measure----------
Probability:  tensor([[0.4632, 0.5368]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3034-0.6783j, 0.4912+0.4545j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.3034-0.6783j, 0.4912+0.4545j]])
New state:  tensor([[0.0430-0.7418j, 0.2980+0.5992j]])
----------Measure----------
Probability:  tensor([[0.5522, 0.4478]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4272+0.j]])
ry_matrix:  tensor([[ 0.9773-0.j, -0.2120-0.j],
        [ 0.2120+0.j,  0.9773-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0520-0.2558j, 0.8373+0.4805j]])
Inside  rz
rz_matrix theta:  tensor([[0.7253+0.j]])
rz_matrix:  tensor([[0.9350-0.3548j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9350+0.3548j]])
Performing matrix multiplication

Current state:  tensor([[0.0520-0.2558j, 0.8373+0.4805j]])
New state:  tensor([[-0.0421-0.2576j,  0.6124+0.7462j]])
----------Measure----------
Probability:  tensor([[0.0681, 0.9319]])
valid set accuracy: 1.0
valid set loss: 0.3725440800189972
------------------------------Epoch37------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6259-0.5929j, 0.4877+0.1375j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.6259-0.5929j, 0.4877+0.1375j]])
New state:  tensor([[0.3818-0.7730j, 0.4099+0.2979j]])
----------Measure----------
Probability:  tensor([[0.7433, 0.2567]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4394-0.5189j, 0.6607+0.3180j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.4394-0.5189j, 0.6607+0.3180j]])
New state:  tensor([[0.2324-0.6390j, 0.5096+0.5272j]])
----------Measure----------
Probability:  tensor([[0.4623, 0.5377]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5071-0.6842j, 0.4736+0.2246j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.5071-0.6842j, 0.4736+0.2246j]])
New state:  tensor([[0.2387-0.8175j, 0.3665+0.3748j]])
----------Measure----------
Probability:  tensor([[0.7252, 0.2748]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4267-0.4807j, 0.6962+0.3197j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.4267-0.4807j, 0.6962+0.3197j]])
New state:  tensor([[0.2337-0.5988j, 0.5423+0.5411j]])
----------Measure----------
Probability:  tensor([[0.4132, 0.5868]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3738-0.7056j, 0.4802+0.3631j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.3738-0.7056j, 0.4802+0.3631j]])
New state:  tensor([[0.1063-0.7914j, 0.3247+0.5069j]])
----------Measure----------
Probability:  tensor([[0.6376, 0.3624]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3017-0.6799j, 0.4923+0.4522j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.3017-0.6799j, 0.4923+0.4522j]])
New state:  tensor([[0.0475-0.7423j, 0.3051+0.5947j]])
----------Measure----------
Probability:  tensor([[0.5532, 0.4468]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6834-0.6665j, 0.2976-0.0156j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.6834-0.6665j, 0.2976-0.0156j]])
New state:  tensor([[0.4102-0.8620j, 0.2846+0.0885j]])
----------Measure----------
Probability:  tensor([[0.9112, 0.0888]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4053-0.7646j, 0.4112+0.2865j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.4053-0.7646j, 0.4112+0.2865j]])
New state:  tensor([[0.1153-0.8576j, 0.2865+0.4112j]])
----------Measure----------
Probability:  tensor([[0.7488, 0.2512]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4263-0.6403j, 0.5475+0.3295j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.4263-0.6403j, 0.5475+0.3295j]])
New state:  tensor([[0.1780-0.7483j, 0.3995+0.4988j]])
----------Measure----------
Probability:  tensor([[0.5917, 0.4083]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4872-0.7082j, 0.4550+0.2325j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.4872-0.7082j, 0.4550+0.2325j]])
New state:  tensor([[0.2117-0.8331j, 0.3463+0.3757j]])
----------Measure----------
Probability:  tensor([[0.7389, 0.2611]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1742-0.7850j, 0.2842+0.5221j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.1742-0.7850j, 0.2842+0.5221j]])
New state:  tensor([[-0.1086-0.7968j,  0.0857+0.5882j]])
----------Measure----------
Probability:  tensor([[0.6466, 0.3534]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3410-0.5261j, 0.6628+0.4095j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.3410-0.5261j, 0.6628+0.4095j]])
New state:  tensor([[0.1377-0.6116j, 0.4798+0.6138j]])
----------Measure----------
Probability:  tensor([[0.3930, 0.6070]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4665-0.7314j, 0.4357+0.2401j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.4665-0.7314j, 0.4357+0.2401j]])
New state:  tensor([[0.1842-0.8477j, 0.3255+0.3762j]])
----------Measure----------
Probability:  tensor([[0.7525, 0.2475]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5393-0.3354j, 0.7490+0.1888j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.5393-0.3354j, 0.7490+0.1888j]])
New state:  tensor([[0.3897-0.5015j, 0.6372+0.4366j]])
----------Measure----------
Probability:  tensor([[0.4033, 0.5967]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3644-0.3896j, 0.7797+0.3278j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.3644-0.3896j, 0.7797+0.3278j]])
New state:  tensor([[0.2069-0.4917j, 0.6178+0.5776j]])
----------Measure----------
Probability:  tensor([[0.2846, 0.7154]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0491-0.2575j, 0.8374+0.4796j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.0491-0.2575j, 0.8374+0.4796j]])
New state:  tensor([[-0.0431-0.2585j,  0.6194+0.7400j]])
----------Measure----------
Probability:  tensor([[0.0687, 0.9313]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5848-0.6145j, 0.5006+0.1726j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.5848-0.6145j, 0.5006+0.1726j]])
New state:  tensor([[0.3357-0.7791j, 0.4098+0.3353j]])
----------Measure----------
Probability:  tensor([[0.7196, 0.2804]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3255-0.4026j, 0.7732+0.3663j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.3255-0.4026j, 0.7732+0.3663j]])
New state:  tensor([[0.1658-0.4904j, 0.5984+0.6115j]])
----------Measure----------
Probability:  tensor([[0.2680, 0.7320]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6259-0.5929j, 0.4877+0.1375j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.6259-0.5929j, 0.4877+0.1375j]])
New state:  tensor([[0.3818-0.7730j, 0.4099+0.2979j]])
----------Measure----------
Probability:  tensor([[0.7433, 0.2567]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2514-0.7866j, 0.3492+0.4428j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.2514-0.7866j, 0.3492+0.4428j]])
New state:  tensor([[-0.0366-0.8250j,  0.1742+0.5363j]])
----------Measure----------
Probability:  tensor([[0.6820, 0.3180]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5509-0.2905j, 0.7651+0.1635j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.5509-0.2905j, 0.7651+0.1635j]])
New state:  tensor([[0.4161-0.4633j, 0.6611+0.4184j]])
----------Measure----------
Probability:  tensor([[0.3879, 0.6121]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0972-0.3217j, 0.7875+0.5166j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.0972-0.3217j, 0.7875+0.5166j]])
New state:  tensor([[-0.0203-0.3354j,  0.5598+0.7575j]])
----------Measure----------
Probability:  tensor([[0.1129, 0.8871]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5418-0.7640j, 0.3374+0.0943j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.5418-0.7640j, 0.3374+0.0943j]])
New state:  tensor([[0.2436-0.9044j, 0.2838+0.2053j]])
----------Measure----------
Probability:  tensor([[0.8773, 0.1227]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4999-0.3669j, 0.7516+0.2249j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.4999-0.3669j, 0.7516+0.2249j]])
New state:  tensor([[0.3418-0.5174j, 0.6272+0.4713j]])
----------Measure----------
Probability:  tensor([[0.3845, 0.6155]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5153-0.4108j, 0.7157+0.2312j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.5153-0.4108j, 0.7157+0.2312j]])
New state:  tensor([[0.3411-0.5639j, 0.5913+0.4649j]])
----------Measure----------
Probability:  tensor([[0.4343, 0.5657]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4680-0.6980j, 0.4748+0.2616j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.4680-0.6980j, 0.4748+0.2616j]])
New state:  tensor([[0.1972-0.8169j, 0.3548+0.4099j]])
----------Measure----------
Probability:  tensor([[0.7062, 0.2938]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4871-0.6743j, 0.4942+0.2527j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.4871-0.6743j, 0.4942+0.2527j]])
New state:  tensor([[0.2233-0.8013j, 0.3760+0.4082j]])
----------Measure----------
Probability:  tensor([[0.6919, 0.3081]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6072-0.6218j, 0.4731+0.1442j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.6072-0.6218j, 0.4731+0.1442j]])
New state:  tensor([[0.3542-0.7937j, 0.3939+0.2991j]])
----------Measure----------
Probability:  tensor([[0.7554, 0.2446]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4341+0.j]])
ry_matrix:  tensor([[ 0.9765-0.j, -0.2153-0.j],
        [ 0.2153+0.j,  0.9765-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4384-0.4532j, 0.7152+0.3014j]])
Inside  rz
rz_matrix theta:  tensor([[0.7075+0.j]])
rz_matrix:  tensor([[0.9381-0.3464j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9381+0.3464j]])
Performing matrix multiplication

Current state:  tensor([[0.4384-0.4532j, 0.7152+0.3014j]])
New state:  tensor([[0.2542-0.5770j, 0.5665+0.5305j]])
----------Measure----------
Probability:  tensor([[0.3976, 0.6024]])
valid set accuracy: 1.0
valid set loss: 0.3719214200973511
------------------------------Epoch38------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6827-0.6664j, 0.2992-0.0172j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.6827-0.6664j, 0.2992-0.0172j]])
New state:  tensor([[0.4169-0.8581j, 0.2874+0.0851j]])
----------Measure----------
Probability:  tensor([[0.9102, 0.0898]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6248-0.5932j, 0.4892+0.1360j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.6248-0.5932j, 0.4892+0.1360j]])
New state:  tensor([[0.3872-0.7696j, 0.4143+0.2935j]])
----------Measure----------
Probability:  tensor([[0.7422, 0.2578]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5375-0.3359j, 0.7503+0.1880j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.5375-0.3359j, 0.7503+0.1880j]])
New state:  tensor([[0.3922-0.4979j, 0.6425+0.4307j]])
----------Measure----------
Probability:  tensor([[0.4017, 0.5983]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0471-0.2586j, 0.8375+0.4790j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.0471-0.2586j, 0.8375+0.4790j]])
New state:  tensor([[-0.0431-0.2593j,  0.6261+0.7341j]])
----------Measure----------
Probability:  tensor([[0.0691, 0.9309]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4654-0.7320j, 0.4368+0.2383j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.4654-0.7320j, 0.4368+0.2383j]])
New state:  tensor([[0.1903-0.8463j, 0.3304+0.3721j]])
----------Measure----------
Probability:  tensor([[0.7524, 0.2476]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5410-0.7642j, 0.3387+0.0925j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.5410-0.7642j, 0.3387+0.0925j]])
New state:  tensor([[0.2506-0.9022j, 0.2874+0.2016j]])
----------Measure----------
Probability:  tensor([[0.8768, 0.1232]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4043-0.7653j, 0.4122+0.2847j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.4043-0.7653j, 0.4122+0.2847j]])
New state:  tensor([[0.1216-0.8569j, 0.2915+0.4073j]])
----------Measure----------
Probability:  tensor([[0.7491, 0.2509]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0953-0.3229j, 0.7877+0.5159j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.0953-0.3229j, 0.7877+0.5159j]])
New state:  tensor([[-0.0196-0.3361j,  0.5668+0.7519j]])
----------Measure----------
Probability:  tensor([[0.1133, 0.8867]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4668-0.6986j, 0.4759+0.2599j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.4668-0.6986j, 0.4759+0.2599j]])
New state:  tensor([[0.2030-0.8153j, 0.3599+0.4056j]])
----------Measure----------
Probability:  tensor([[0.7060, 0.2940]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5836-0.6149j, 0.5020+0.1711j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.5836-0.6149j, 0.5020+0.1711j]])
New state:  tensor([[0.3412-0.7761j, 0.4145+0.3309j]])
----------Measure----------
Probability:  tensor([[0.7187, 0.2813]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5136-0.4113j, 0.7169+0.2302j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.5136-0.4113j, 0.7169+0.2302j]])
New state:  tensor([[0.3441-0.5608j, 0.5968+0.4592j]])
----------Measure----------
Probability:  tensor([[0.4330, 0.5670]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2506-0.7877j, 0.3498+0.4409j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.2506-0.7877j, 0.3498+0.4409j]])
New state:  tensor([[-0.0306-0.8260j,  0.1800+0.5332j]])
----------Measure----------
Probability:  tensor([[0.6832, 0.3168]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4249-0.6411j, 0.5486+0.3279j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.4249-0.6411j, 0.5486+0.3279j]])
New state:  tensor([[0.1830-0.7470j, 0.4053+0.4942j]])
----------Measure----------
Probability:  tensor([[0.5916, 0.4084]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3236-0.4035j, 0.7739+0.3654j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.3236-0.4035j, 0.7739+0.3654j]])
New state:  tensor([[0.1680-0.4892j, 0.6047+0.6057j]])
----------Measure----------
Probability:  tensor([[0.2675, 0.7325]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.3005-0.6810j, 0.4930+0.4505j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.3005-0.6810j, 0.4930+0.4505j]])
New state:  tensor([[0.0524-0.7425j, 0.3115+0.5907j]])
----------Measure----------
Probability:  tensor([[0.5540, 0.4460]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5491-0.2909j, 0.7664+0.1628j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.5491-0.2909j, 0.7664+0.1628j]])
New state:  tensor([[0.4183-0.4595j, 0.6662+0.4125j]])
----------Measure----------
Probability:  tensor([[0.3861, 0.6139]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6248-0.5932j, 0.4892+0.1360j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.6248-0.5932j, 0.4892+0.1360j]])
New state:  tensor([[0.3872-0.7696j, 0.4143+0.2935j]])
----------Measure----------
Probability:  tensor([[0.7422, 0.2578]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5060-0.6847j, 0.4748+0.2229j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.5060-0.6847j, 0.4748+0.2229j]])
New state:  tensor([[0.2445-0.8155j, 0.3714+0.3704j]])
----------Measure----------
Probability:  tensor([[0.7248, 0.2752]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4981-0.3674j, 0.7528+0.2240j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.4981-0.3674j, 0.7528+0.2240j]])
New state:  tensor([[0.3444-0.5143j, 0.6327+0.4655j]])
----------Measure----------
Probability:  tensor([[0.3831, 0.6169]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4861-0.7087j, 0.4562+0.2308j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.4861-0.7087j, 0.4562+0.2308j]])
New state:  tensor([[0.2177-0.8314j, 0.3512+0.3715j]])
----------Measure----------
Probability:  tensor([[0.7386, 0.2614]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4366-0.4540j, 0.7163+0.3003j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.4366-0.4540j, 0.7163+0.3003j]])
New state:  tensor([[0.2573-0.5749j, 0.5724+0.5250j]])
----------Measure----------
Probability:  tensor([[0.3967, 0.6033]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4859-0.6749j, 0.4954+0.2511j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.4859-0.6749j, 0.4954+0.2511j]])
New state:  tensor([[0.2289-0.7995j, 0.3812+0.4039j]])
----------Measure----------
Probability:  tensor([[0.6916, 0.3084]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4378-0.5196j, 0.6618+0.3168j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.4378-0.5196j, 0.6618+0.3168j]])
New state:  tensor([[0.2362-0.6371j, 0.5156+0.5220j]])
----------Measure----------
Probability:  tensor([[0.4617, 0.5383]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3727-0.7064j, 0.4811+0.3614j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.3727-0.7064j, 0.4811+0.3614j]])
New state:  tensor([[0.1117-0.7909j, 0.3305+0.5028j]])
----------Measure----------
Probability:  tensor([[0.6379, 0.3621]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6061-0.6221j, 0.4746+0.1427j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.6061-0.6221j, 0.4746+0.1427j]])
New state:  tensor([[0.3599-0.7905j, 0.3983+0.2948j]])
----------Measure----------
Probability:  tensor([[0.7544, 0.2456]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3394-0.5270j, 0.6636+0.4083j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.3394-0.5270j, 0.6636+0.4083j]])
New state:  tensor([[0.1411-0.6108j, 0.4863+0.6087j]])
----------Measure----------
Probability:  tensor([[0.3930, 0.6070]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3626-0.3904j, 0.7806+0.3269j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.3626-0.3904j, 0.7806+0.3269j]])
New state:  tensor([[0.2091-0.4900j, 0.6240+0.5717j]])
----------Measure----------
Probability:  tensor([[0.2839, 0.7161]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1735-0.7863j, 0.2846+0.5202j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.1735-0.7863j, 0.2846+0.5202j]])
New state:  tensor([[-0.1027-0.7986j,  0.0918+0.5858j]])
----------Measure----------
Probability:  tensor([[0.6484, 0.3516]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4389+0.j]])
ry_matrix:  tensor([[ 0.9760-0.j, -0.2177-0.j],
        [ 0.2177+0.j,  0.9760-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4250-0.4815j, 0.6972+0.3186j]])
Inside  rz
rz_matrix theta:  tensor([[0.6902+0.j]])
rz_matrix:  tensor([[0.9410-0.3383j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9410+0.3383j]])
Performing matrix multiplication

Current state:  tensor([[0.4250-0.4815j, 0.6972+0.3186j]])
New state:  tensor([[0.2370-0.5969j, 0.5483+0.5356j]])
----------Measure----------
Probability:  tensor([[0.4125, 0.5875]])
valid set accuracy: 1.0
valid set loss: 0.37149330973625183
------------------------------Epoch39------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4358-0.5206j, 0.6631+0.3151j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.4358-0.5206j, 0.6631+0.3151j]])
New state:  tensor([[0.2393-0.6354j, 0.5218+0.5165j]])
----------Measure----------
Probability:  tensor([[0.4609, 0.5391]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4957-0.3681j, 0.7544+0.2228j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.4957-0.3681j, 0.7544+0.2228j]])
New state:  tensor([[0.3462-0.5112j, 0.6384+0.4596j]])
----------Measure----------
Probability:  tensor([[0.3813, 0.6187]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5045-0.6854j, 0.4764+0.2208j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.5045-0.6854j, 0.4764+0.2208j]])
New state:  tensor([[0.2497-0.8136j, 0.3767+0.3658j]])
----------Measure----------
Probability:  tensor([[0.7243, 0.2757]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4232-0.6421j, 0.5499+0.3259j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.4232-0.6421j, 0.5499+0.3259j]])
New state:  tensor([[0.1873-0.7459j, 0.4113+0.4893j]])
----------Measure----------
Probability:  tensor([[0.5914, 0.4086]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3712-0.7076j, 0.4823+0.3592j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.3712-0.7076j, 0.4823+0.3592j]])
New state:  tensor([[0.1166-0.7905j, 0.3365+0.4983j]])
----------Measure----------
Probability:  tensor([[0.6384, 0.3616]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2990-0.6824j, 0.4939+0.4484j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.2990-0.6824j, 0.4939+0.4484j]])
New state:  tensor([[0.0567-0.7428j, 0.3180+0.5864j]])
----------Measure----------
Probability:  tensor([[0.5550, 0.4450]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4030-0.7661j, 0.4134+0.2823j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.4030-0.7661j, 0.4134+0.2823j]])
New state:  tensor([[0.1273-0.8563j, 0.2969+0.4030j]])
----------Measure----------
Probability:  tensor([[0.7494, 0.2506]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2495-0.7890j, 0.3506+0.4384j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.2495-0.7890j, 0.3506+0.4384j]])
New state:  tensor([[-0.0252-0.8272j,  0.1861+0.5296j]])
----------Measure----------
Probability:  tensor([[0.6849, 0.3151]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0445-0.2601j, 0.8377+0.4782j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.0445-0.2601j, 0.8377+0.4782j]])
New state:  tensor([[-0.0439-0.2602j,  0.6327+0.7281j]])
----------Measure----------
Probability:  tensor([[0.0696, 0.9304]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3374-0.5283j, 0.6646+0.4066j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.3374-0.5283j, 0.6646+0.4066j]])
New state:  tensor([[0.1439-0.6101j, 0.4930+0.6034j]])
----------Measure----------
Probability:  tensor([[0.3929, 0.6071]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4847-0.7094j, 0.4577+0.2286j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.4847-0.7094j, 0.4577+0.2286j]])
New state:  tensor([[0.2231-0.8297j, 0.3565+0.3669j]])
----------Measure----------
Probability:  tensor([[0.7382, 0.2618]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3601-0.3914j, 0.7817+0.3257j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.3601-0.3914j, 0.7817+0.3257j]])
New state:  tensor([[0.2106-0.4884j, 0.6302+0.5656j]])
----------Measure----------
Probability:  tensor([[0.2829, 0.7171]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0928-0.3245j, 0.7880+0.5148j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.0928-0.3245j, 0.7880+0.5148j]])
New state:  tensor([[-0.0196-0.3370j,  0.5737+0.7463j]])
----------Measure----------
Probability:  tensor([[0.1139, 0.8861]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4228-0.4825j, 0.6985+0.3171j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.4228-0.4825j, 0.6985+0.3171j]])
New state:  tensor([[0.2397-0.5951j, 0.5545+0.5300j]])
----------Measure----------
Probability:  tensor([[0.4116, 0.5884]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4654-0.6994j, 0.4774+0.2577j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.4654-0.6994j, 0.4774+0.2577j]])
New state:  tensor([[0.2082-0.8139j, 0.3654+0.4009j]])
----------Measure----------
Probability:  tensor([[0.7057, 0.2943]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1726-0.7879j, 0.2852+0.5178j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.1726-0.7879j, 0.2852+0.5178j]])
New state:  tensor([[-0.0974-0.8007j,  0.0981+0.5829j]])
----------Measure----------
Probability:  tensor([[0.6506, 0.3494]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6817-0.6664j, 0.3014-0.0193j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.6817-0.6664j, 0.3014-0.0193j]])
New state:  tensor([[0.4233-0.8542j, 0.2908+0.0814j]])
----------Measure----------
Probability:  tensor([[0.9088, 0.0912]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5467-0.2914j, 0.7681+0.1619j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.5467-0.2914j, 0.7681+0.1619j]])
New state:  tensor([[0.4197-0.4556j, 0.6715+0.4066j]])
----------Measure----------
Probability:  tensor([[0.3837, 0.6163]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6232-0.5936j, 0.4911+0.1342j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.6232-0.5936j, 0.4911+0.1342j]])
New state:  tensor([[0.3921-0.7662j, 0.4192+0.2889j]])
----------Measure----------
Probability:  tensor([[0.7408, 0.2592]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4641-0.7327j, 0.4382+0.2361j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.4641-0.7327j, 0.4382+0.2361j]])
New state:  tensor([[0.1959-0.8449j, 0.3356+0.3676j]])
----------Measure----------
Probability:  tensor([[0.7522, 0.2478]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5400-0.7645j, 0.3403+0.0901j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.5400-0.7645j, 0.3403+0.0901j]])
New state:  tensor([[0.2571-0.9000j, 0.2915+0.1975j]])
----------Measure----------
Probability:  tensor([[0.8761, 0.1239]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5821-0.6154j, 0.5038+0.1692j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6154j, 0.5038+0.1692j]])
New state:  tensor([[0.3460-0.7732j, 0.4196+0.3262j]])
----------Measure----------
Probability:  tensor([[0.7176, 0.2824]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6046-0.6226j, 0.4765+0.1407j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.6046-0.6226j, 0.4765+0.1407j]])
New state:  tensor([[0.3650-0.7874j, 0.4032+0.2902j]])
----------Measure----------
Probability:  tensor([[0.7532, 0.2468]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3212-0.4046j, 0.7749+0.3641j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.3212-0.4046j, 0.7749+0.3641j]])
New state:  tensor([[0.1695-0.4880j, 0.6111+0.5997j]])
----------Measure----------
Probability:  tensor([[0.2669, 0.7331]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5114-0.4121j, 0.7185+0.2290j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.5114-0.4121j, 0.7185+0.2290j]])
New state:  tensor([[0.3465-0.5579j, 0.6025+0.4535j]])
----------Measure----------
Probability:  tensor([[0.4313, 0.5687]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4844-0.6757j, 0.4969+0.2490j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.4844-0.6757j, 0.4969+0.2490j]])
New state:  tensor([[0.2339-0.7978j, 0.3867+0.3991j]])
----------Measure----------
Probability:  tensor([[0.6911, 0.3089]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5351-0.3365j, 0.7520+0.1869j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.5351-0.3365j, 0.7520+0.1869j]])
New state:  tensor([[0.3939-0.4944j, 0.6480+0.4249j]])
----------Measure----------
Probability:  tensor([[0.3996, 0.6004]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6232-0.5936j, 0.4911+0.1342j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.6232-0.5936j, 0.4911+0.1342j]])
New state:  tensor([[0.3921-0.7662j, 0.4192+0.2889j]])
----------Measure----------
Probability:  tensor([[0.7408, 0.2592]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4451+0.j]])
ry_matrix:  tensor([[ 0.9753-0.j, -0.2207-0.j],
        [ 0.2207+0.j,  0.9753-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4344-0.4549j, 0.7176+0.2989j]])
Inside  rz
rz_matrix theta:  tensor([[0.6734+0.j]])
rz_matrix:  tensor([[0.9438-0.3304j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9438+0.3304j]])
Performing matrix multiplication

Current state:  tensor([[0.4344-0.4549j, 0.7176+0.2989j]])
New state:  tensor([[0.2597-0.5729j, 0.5786+0.5192j]])
----------Measure----------
Probability:  tensor([[0.3956, 0.6044]])
valid set accuracy: 1.0
valid set loss: 0.37094971537590027
------------------------------Epoch40------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4629-0.7334j, 0.4395+0.2340j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.4629-0.7334j, 0.4395+0.2340j]])
New state:  tensor([[0.2015-0.8435j, 0.3405+0.3633j]])
----------Measure----------
Probability:  tensor([[0.7521, 0.2479]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0907-0.3259j, 0.7883+0.5140j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.0907-0.3259j, 0.7883+0.5140j]])
New state:  tensor([[-0.0193-0.3377j,  0.5803+0.7408j]])
----------Measure----------
Probability:  tensor([[0.1144, 0.8856]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2485-0.7902j, 0.3513+0.4363j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.2485-0.7902j, 0.3513+0.4363j]])
New state:  tensor([[-0.0197-0.8282j,  0.1918+0.5263j]])
----------Measure----------
Probability:  tensor([[0.6863, 0.3137]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6033-0.6230j, 0.4781+0.1390j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.6033-0.6230j, 0.4781+0.1390j]])
New state:  tensor([[0.3700-0.7843j, 0.4077+0.2858j]])
----------Measure----------
Probability:  tensor([[0.7521, 0.2479]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1718-0.7893j, 0.2856+0.5156j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.1718-0.7893j, 0.2856+0.5156j]])
New state:  tensor([[-0.0920-0.8026j,  0.1040+0.5802j]])
----------Measure----------
Probability:  tensor([[0.6526, 0.3474]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5445-0.2918j, 0.7697+0.1611j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.5445-0.2918j, 0.7697+0.1611j]])
New state:  tensor([[0.4213-0.4519j, 0.6765+0.4008j]])
----------Measure----------
Probability:  tensor([[0.3817, 0.6183]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4324-0.4557j, 0.7188+0.2977j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.4324-0.4557j, 0.7188+0.2977j]])
New state:  tensor([[0.2623-0.5709j, 0.5843+0.5137j]])
----------Measure----------
Probability:  tensor([[0.3947, 0.6053]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4217-0.6430j, 0.5510+0.3242j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.4217-0.6430j, 0.5510+0.3242j]])
New state:  tensor([[0.1917-0.7447j, 0.4170+0.4846j]])
----------Measure----------
Probability:  tensor([[0.5913, 0.4087]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0422-0.2614j, 0.8378+0.4774j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.0422-0.2614j, 0.8378+0.4774j]])
New state:  tensor([[-0.0444-0.2611j,  0.6390+0.7222j]])
----------Measure----------
Probability:  tensor([[0.0701, 0.9299]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3355-0.5294j, 0.6656+0.4052j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.3355-0.5294j, 0.6656+0.4052j]])
New state:  tensor([[0.1468-0.6094j, 0.4992+0.5982j]])
----------Measure----------
Probability:  tensor([[0.3929, 0.6071]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5390-0.7648j, 0.3418+0.0880j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.5390-0.7648j, 0.3418+0.0880j]])
New state:  tensor([[0.2635-0.8978j, 0.2952+0.1936j]])
----------Measure----------
Probability:  tensor([[0.8754, 0.1246]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4936-0.3688j, 0.7557+0.2218j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.4936-0.3688j, 0.7557+0.2218j]])
New state:  tensor([[0.3483-0.5083j, 0.6437+0.4538j]])
----------Measure----------
Probability:  tensor([[0.3797, 0.6203]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2976-0.6836j, 0.4947+0.4465j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.2976-0.6836j, 0.4947+0.4465j]])
New state:  tensor([[0.0611-0.7431j, 0.3242+0.5823j]])
----------Measure----------
Probability:  tensor([[0.5559, 0.4441]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3580-0.3923j, 0.7827+0.3246j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.3580-0.3923j, 0.7827+0.3246j]])
New state:  tensor([[0.2122-0.4868j, 0.6361+0.5598j]])
----------Measure----------
Probability:  tensor([[0.2820, 0.7180]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5094-0.4127j, 0.7199+0.2278j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.5094-0.4127j, 0.7199+0.2278j]])
New state:  tensor([[0.3490-0.5550j, 0.6079+0.4479j]])
----------Measure----------
Probability:  tensor([[0.4298, 0.5702]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4209-0.4834j, 0.6997+0.3157j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.4209-0.4834j, 0.6997+0.3157j]])
New state:  tensor([[0.2424-0.5933j, 0.5604+0.5246j]])
----------Measure----------
Probability:  tensor([[0.4108, 0.5892]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3699-0.7085j, 0.4833+0.3572j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.3699-0.7085j, 0.4833+0.3572j]])
New state:  tensor([[0.1215-0.7900j, 0.3422+0.4940j]])
----------Measure----------
Probability:  tensor([[0.6388, 0.3612]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4019-0.7669j, 0.4145+0.2802j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.4019-0.7669j, 0.4145+0.2802j]])
New state:  tensor([[0.1329-0.8556j, 0.3020+0.3990j]])
----------Measure----------
Probability:  tensor([[0.7497, 0.2503]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5032-0.6860j, 0.4778+0.2189j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.5032-0.6860j, 0.4778+0.2189j]])
New state:  tensor([[0.2549-0.8117j, 0.3816+0.3614j]])
----------Measure----------
Probability:  tensor([[0.7238, 0.2762]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5807-0.6159j, 0.5054+0.1675j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.5807-0.6159j, 0.5054+0.1675j]])
New state:  tensor([[0.3509-0.7703j, 0.4243+0.3216j]])
----------Measure----------
Probability:  tensor([[0.7165, 0.2835]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3191-0.4056j, 0.7758+0.3630j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.3191-0.4056j, 0.7758+0.3630j]])
New state:  tensor([[0.1711-0.4869j, 0.6172+0.5939j]])
----------Measure----------
Probability:  tensor([[0.2663, 0.7337]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6219-0.5940j, 0.4929+0.1325j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.6219-0.5940j, 0.4929+0.1325j]])
New state:  tensor([[0.3970-0.7629j, 0.4237+0.2845j]])
----------Measure----------
Probability:  tensor([[0.7395, 0.2605]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4640-0.7001j, 0.4787+0.2558j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.4640-0.7001j, 0.4787+0.2558j]])
New state:  tensor([[0.2133-0.8124j, 0.3705+0.3965j]])
----------Measure----------
Probability:  tensor([[0.7055, 0.2945]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5331-0.3370j, 0.7534+0.1860j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.5331-0.3370j, 0.7534+0.1860j]])
New state:  tensor([[0.3958-0.4909j, 0.6531+0.4192j]])
----------Measure----------
Probability:  tensor([[0.3977, 0.6023]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6219-0.5940j, 0.4929+0.1325j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.6219-0.5940j, 0.4929+0.1325j]])
New state:  tensor([[0.3970-0.7629j, 0.4237+0.2845j]])
----------Measure----------
Probability:  tensor([[0.7395, 0.2605]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6809-0.6663j, 0.3032-0.0211j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.6809-0.6663j, 0.3032-0.0211j]])
New state:  tensor([[0.4295-0.8504j, 0.2938+0.0779j]])
----------Measure----------
Probability:  tensor([[0.9076, 0.0924]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4830-0.6764j, 0.4982+0.2471j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.4830-0.6764j, 0.4982+0.2471j]])
New state:  tensor([[0.2389-0.7960j, 0.3918+0.3946j]])
----------Measure----------
Probability:  tensor([[0.6907, 0.3093]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4834-0.7101j, 0.4591+0.2266j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.4834-0.7101j, 0.4591+0.2266j]])
New state:  tensor([[0.2285-0.8281j, 0.3614+0.3626j]])
----------Measure----------
Probability:  tensor([[0.7379, 0.2621]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4506+0.j]])
ry_matrix:  tensor([[ 0.9747-0.j, -0.2234-0.j],
        [ 0.2234+0.j,  0.9747-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4339-0.5215j, 0.6643+0.3137j]])
Inside  rz
rz_matrix theta:  tensor([[0.6571+0.j]])
rz_matrix:  tensor([[0.9465-0.3226j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9465+0.3226j]])
Performing matrix multiplication

Current state:  tensor([[0.4339-0.5215j, 0.6643+0.3137j]])
New state:  tensor([[0.2425-0.6336j, 0.5276+0.5113j]])
----------Measure----------
Probability:  tensor([[0.4603, 0.5397]])
valid set accuracy: 1.0
valid set loss: 0.37048184871673584
------------------------------Epoch41------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6208-0.5943j, 0.4942+0.1313j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.6208-0.5943j, 0.4942+0.1313j]])
New state:  tensor([[0.4019-0.7596j, 0.4277+0.2803j]])
----------Measure----------
Probability:  tensor([[0.7385, 0.2615]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4619-0.7339j, 0.4405+0.2324j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.4619-0.7339j, 0.4405+0.2324j]])
New state:  tensor([[0.2071-0.8420j, 0.3448+0.3594j]])
----------Measure----------
Probability:  tensor([[0.7519, 0.2481]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5383-0.7649j, 0.3430+0.0863j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.5383-0.7649j, 0.3430+0.0863j]])
New state:  tensor([[0.2698-0.8956j, 0.2983+0.1900j]])
----------Measure----------
Probability:  tensor([[0.8749, 0.1251]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2965-0.6846j, 0.4954+0.4450j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.2965-0.6846j, 0.4954+0.4450j]])
New state:  tensor([[0.0657-0.7431j, 0.3299+0.5785j]])
----------Measure----------
Probability:  tensor([[0.5566, 0.4434]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4205-0.6437j, 0.5520+0.3228j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.4205-0.6437j, 0.5520+0.3228j]])
New state:  tensor([[0.1963-0.7434j, 0.4221+0.4802j]])
----------Measure----------
Probability:  tensor([[0.5912, 0.4088]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6208-0.5943j, 0.4942+0.1313j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.6208-0.5943j, 0.4942+0.1313j]])
New state:  tensor([[0.4019-0.7596j, 0.4277+0.2803j]])
----------Measure----------
Probability:  tensor([[0.7385, 0.2615]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4010-0.7675j, 0.4154+0.2785j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.4010-0.7675j, 0.4154+0.2785j]])
New state:  tensor([[0.1387-0.8548j, 0.3065+0.3952j]])
----------Measure----------
Probability:  tensor([[0.7499, 0.2501]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5796-0.6163j, 0.5066+0.1662j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.5796-0.6163j, 0.5066+0.1662j]])
New state:  tensor([[0.3559-0.7675j, 0.4285+0.3174j]])
----------Measure----------
Probability:  tensor([[0.7157, 0.2843]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3688-0.7093j, 0.4841+0.3557j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.3688-0.7093j, 0.4841+0.3557j]])
New state:  tensor([[0.1265-0.7894j, 0.3474+0.4901j]])
----------Measure----------
Probability:  tensor([[0.6392, 0.3608]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1712-0.7905j, 0.2860+0.5139j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.1712-0.7905j, 0.2860+0.5139j]])
New state:  tensor([[-0.0866-0.8041j,  0.1095+0.5778j]])
----------Measure----------
Probability:  tensor([[0.6541, 0.3459]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5021-0.6865j, 0.4789+0.2174j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.5021-0.6865j, 0.4789+0.2174j]])
New state:  tensor([[0.2602-0.8097j, 0.3860+0.3573j]])
----------Measure----------
Probability:  tensor([[0.7234, 0.2766]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4630-0.7006j, 0.4797+0.2543j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.4630-0.7006j, 0.4797+0.2543j]])
New state:  tensor([[0.2186-0.8109j, 0.3751+0.3925j]])
----------Measure----------
Probability:  tensor([[0.7053, 0.2947]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6802-0.6663j, 0.3047-0.0225j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.6802-0.6663j, 0.3047-0.0225j]])
New state:  tensor([[0.4356-0.8467j, 0.2963+0.0746j]])
----------Measure----------
Probability:  tensor([[0.9067, 0.0934]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4824-0.7106j, 0.4601+0.2251j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.4824-0.7106j, 0.4601+0.2251j]])
New state:  tensor([[0.2340-0.8264j, 0.3657+0.3586j]])
----------Measure----------
Probability:  tensor([[0.7376, 0.2624]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4325-0.5222j, 0.6653+0.3126j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.4325-0.5222j, 0.6653+0.3126j]])
New state:  tensor([[0.2459-0.6319j, 0.5329+0.5063j]])
----------Measure----------
Probability:  tensor([[0.4597, 0.5403]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3174-0.4064j, 0.7765+0.3621j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.3174-0.4064j, 0.7765+0.3621j]])
New state:  tensor([[0.1731-0.4857j, 0.6228+0.5884j]])
----------Measure----------
Probability:  tensor([[0.2659, 0.7341]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5429-0.2922j, 0.7708+0.1605j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.5429-0.2922j, 0.7708+0.1605j]])
New state:  tensor([[0.4232-0.4483j, 0.6810+0.3952j]])
----------Measure----------
Probability:  tensor([[0.3801, 0.6199]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3563-0.3930j, 0.7835+0.3237j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.3563-0.3930j, 0.7835+0.3237j]])
New state:  tensor([[0.2143-0.4853j, 0.6415+0.5541j]])
----------Measure----------
Probability:  tensor([[0.2814, 0.7186]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3341-0.5303j, 0.6663+0.4040j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.3341-0.5303j, 0.6663+0.4040j]])
New state:  tensor([[0.1500-0.6086j, 0.5050+0.5934j]])
----------Measure----------
Probability:  tensor([[0.3928, 0.6072]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4920-0.3692j, 0.7568+0.2210j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.4920-0.3692j, 0.7568+0.2210j]])
New state:  tensor([[0.3506-0.5055j, 0.6486+0.4482j]])
----------Measure----------
Probability:  tensor([[0.3784, 0.6216]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4309-0.4564j, 0.7198+0.2967j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.4309-0.4564j, 0.7198+0.2967j]])
New state:  tensor([[0.2651-0.5689j, 0.5896+0.5084j]])
----------Measure----------
Probability:  tensor([[0.3939, 0.6061]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4819-0.6769j, 0.4992+0.2456j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.4819-0.6769j, 0.4992+0.2456j]])
New state:  tensor([[0.2441-0.7943j, 0.3964+0.3904j]])
----------Measure----------
Probability:  tensor([[0.6904, 0.3096]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5314-0.3374j, 0.7546+0.1853j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.5314-0.3374j, 0.7546+0.1853j]])
New state:  tensor([[0.3981-0.4876j, 0.6578+0.4136j]])
----------Measure----------
Probability:  tensor([[0.3963, 0.6037]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6023-0.6233j, 0.4794+0.1377j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.6023-0.6233j, 0.4794+0.1377j]])
New state:  tensor([[0.3752-0.7813j, 0.4116+0.2817j]])
----------Measure----------
Probability:  tensor([[0.7512, 0.2488]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5078-0.4132j, 0.7210+0.2269j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.5078-0.4132j, 0.7210+0.2269j]])
New state:  tensor([[0.3517-0.5522j, 0.6128+0.4426j]])
----------Measure----------
Probability:  tensor([[0.4286, 0.5714]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4194-0.4841j, 0.7006+0.3147j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.4194-0.4841j, 0.7006+0.3147j]])
New state:  tensor([[0.2455-0.5915j, 0.5657+0.5194j]])
----------Measure----------
Probability:  tensor([[0.4102, 0.5898]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2478-0.7912j, 0.3518+0.4345j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.2478-0.7912j, 0.3518+0.4345j]])
New state:  tensor([[-0.0141-0.8290j,  0.1970+0.5233j]])
----------Measure----------
Probability:  tensor([[0.6874, 0.3126]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0404-0.2625j, 0.8379+0.4769j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.0404-0.2625j, 0.8379+0.4769j]])
New state:  tensor([[-0.0444-0.2618j,  0.6449+0.7166j]])
----------Measure----------
Probability:  tensor([[0.0705, 0.9295]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4550+0.j]])
ry_matrix:  tensor([[ 0.9742-0.j, -0.2255-0.j],
        [ 0.2255+0.j,  0.9742-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0890-0.3270j, 0.7885+0.5132j]])
Inside  rz
rz_matrix theta:  tensor([[0.6411+0.j]])
rz_matrix:  tensor([[0.9491-0.3151j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9491+0.3151j]])
Performing matrix multiplication

Current state:  tensor([[0.0890-0.3270j, 0.7885+0.5132j]])
New state:  tensor([[-0.0186-0.3384j,  0.5866+0.7356j]])
----------Measure----------
Probability:  tensor([[0.1149, 0.8851]])
valid set accuracy: 1.0
valid set loss: 0.3701212406158447
------------------------------Epoch42------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5297-0.3378j, 0.7558+0.1845j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.5297-0.3378j, 0.7558+0.1845j]])
New state:  tensor([[0.4000-0.4844j, 0.6624+0.4082j]])
----------Measure----------
Probability:  tensor([[0.3947, 0.6053]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.4000-0.7682j, 0.4163+0.2767j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.4000-0.7682j, 0.4163+0.2767j]])
New state:  tensor([[0.1442-0.8540j, 0.3110+0.3914j]])
----------Measure----------
Probability:  tensor([[0.7501, 0.2499]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3156-0.4073j, 0.7773+0.3612j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.3156-0.4073j, 0.7773+0.3612j]])
New state:  tensor([[0.1749-0.4846j, 0.6284+0.5829j]])
----------Measure----------
Probability:  tensor([[0.2654, 0.7346]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5010-0.6870j, 0.4801+0.2158j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.5010-0.6870j, 0.4801+0.2158j]])
New state:  tensor([[0.2653-0.8078j, 0.3903+0.3531j]])
----------Measure----------
Probability:  tensor([[0.7230, 0.2770]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6011-0.6236j, 0.4809+0.1362j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.6011-0.6236j, 0.4809+0.1362j]])
New state:  tensor([[0.3800-0.7783j, 0.4156+0.2776j]])
----------Measure----------
Probability:  tensor([[0.7502, 0.2498]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4609-0.7344j, 0.4416+0.2307j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.4609-0.7344j, 0.4416+0.2307j]])
New state:  tensor([[0.2125-0.8406j, 0.3491+0.3554j]])
----------Measure----------
Probability:  tensor([[0.7518, 0.2482]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4177-0.4848j, 0.7015+0.3135j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.4177-0.4848j, 0.7015+0.3135j]])
New state:  tensor([[0.2482-0.5898j, 0.5710+0.5142j]])
----------Measure----------
Probability:  tensor([[0.4095, 0.5905]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3544-0.3938j, 0.7843+0.3228j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.3544-0.3938j, 0.7843+0.3228j]])
New state:  tensor([[0.2160-0.4837j, 0.6469+0.5485j]])
----------Measure----------
Probability:  tensor([[0.2807, 0.7193]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4902-0.3697j, 0.7580+0.2202j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.4902-0.3697j, 0.7580+0.2202j]])
New state:  tensor([[0.3526-0.5027j, 0.6534+0.4428j]])
----------Measure----------
Probability:  tensor([[0.3770, 0.6230]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0384-0.2636j, 0.8380+0.4763j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.0384-0.2636j, 0.8380+0.4763j]])
New state:  tensor([[-0.0446-0.2626j,  0.6507+0.7111j]])
----------Measure----------
Probability:  tensor([[0.0709, 0.9291]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4807-0.6775j, 0.5004+0.2441j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.4807-0.6775j, 0.5004+0.2441j]])
New state:  tensor([[0.2489-0.7925j, 0.4010+0.3862j]])
----------Measure----------
Probability:  tensor([[0.6901, 0.3099]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6795-0.6662j, 0.3063-0.0241j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.6795-0.6662j, 0.3063-0.0241j]])
New state:  tensor([[0.4415-0.8430j, 0.2988+0.0713j]])
----------Measure----------
Probability:  tensor([[0.9056, 0.0944]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4192-0.6444j, 0.5529+0.3213j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.4192-0.6444j, 0.5529+0.3213j]])
New state:  tensor([[0.2005-0.7422j, 0.4272+0.4758j]])
----------Measure----------
Probability:  tensor([[0.5911, 0.4089]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4814-0.7111j, 0.4612+0.2234j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.4814-0.7111j, 0.4612+0.2234j]])
New state:  tensor([[0.2391-0.8247j, 0.3701+0.3545j]])
----------Measure----------
Probability:  tensor([[0.7374, 0.2626]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2470-0.7922j, 0.3524+0.4327j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.2470-0.7922j, 0.3524+0.4327j]])
New state:  tensor([[-0.0088-0.8298j,  0.2021+0.5202j]])
----------Measure----------
Probability:  tensor([[0.6886, 0.3114]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5375-0.7651j, 0.3443+0.0845j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.5375-0.7651j, 0.3443+0.0845j]])
New state:  tensor([[0.2759-0.8934j, 0.3015+0.1864j]])
----------Measure----------
Probability:  tensor([[0.8743, 0.1257]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3325-0.5312j, 0.6671+0.4028j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.3325-0.5312j, 0.6671+0.4028j]])
New state:  tensor([[0.1529-0.6078j, 0.5107+0.5885j]])
----------Measure----------
Probability:  tensor([[0.3928, 0.6072]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6196-0.5946j, 0.4957+0.1299j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.6196-0.5946j, 0.4957+0.1299j]])
New state:  tensor([[0.4066-0.7564j, 0.4316+0.2761j]])
----------Measure----------
Probability:  tensor([[0.7375, 0.2625]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4619-0.7012j, 0.4807+0.2526j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.4619-0.7012j, 0.4807+0.2526j]])
New state:  tensor([[0.2236-0.8094j, 0.3797+0.3883j]])
----------Measure----------
Probability:  tensor([[0.7051, 0.2949]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5411-0.2925j, 0.7721+0.1598j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.5411-0.2925j, 0.7721+0.1598j]])
New state:  tensor([[0.4248-0.4449j, 0.6854+0.3897j]])
----------Measure----------
Probability:  tensor([[0.3783, 0.6217]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2954-0.6856j, 0.4961+0.4434j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.2954-0.6856j, 0.4961+0.4434j]])
New state:  tensor([[0.0700-0.7432j, 0.3355+0.5746j]])
----------Measure----------
Probability:  tensor([[0.5573, 0.4427]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4292-0.4571j, 0.7208+0.2956j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.4292-0.4571j, 0.7208+0.2956j]])
New state:  tensor([[0.2677-0.5670j, 0.5948+0.5031j]])
----------Measure----------
Probability:  tensor([[0.3931, 0.6069]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5061-0.4137j, 0.7222+0.2260j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.5061-0.4137j, 0.7222+0.2260j]])
New state:  tensor([[0.3542-0.5494j, 0.6176+0.4373j]])
----------Measure----------
Probability:  tensor([[0.4273, 0.5727]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4309-0.5229j, 0.6663+0.3114j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.4309-0.5229j, 0.6663+0.3114j]])
New state:  tensor([[0.2491-0.6301j, 0.5381+0.5013j]])
----------Measure----------
Probability:  tensor([[0.4591, 0.5409]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3677-0.7101j, 0.4850+0.3540j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.3677-0.7101j, 0.4850+0.3540j]])
New state:  tensor([[0.1313-0.7888j, 0.3525+0.4861j]])
----------Measure----------
Probability:  tensor([[0.6395, 0.3605]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0871-0.3282j, 0.7887+0.5125j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.0871-0.3282j, 0.7887+0.5125j]])
New state:  tensor([[-0.0181-0.3391j,  0.5927+0.7303j]])
----------Measure----------
Probability:  tensor([[0.1153, 0.8847]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6196-0.5946j, 0.4957+0.1299j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.6196-0.5946j, 0.4957+0.1299j]])
New state:  tensor([[0.4066-0.7564j, 0.4316+0.2761j]])
----------Measure----------
Probability:  tensor([[0.7375, 0.2625]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1705-0.7917j, 0.2864+0.5120j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.1705-0.7917j, 0.2864+0.5120j]])
New state:  tensor([[-0.0814-0.8057j,  0.1149+0.5753j]])
----------Measure----------
Probability:  tensor([[0.6558, 0.3442]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4596+0.j]])
ry_matrix:  tensor([[ 0.9737-0.j, -0.2278-0.j],
        [ 0.2278+0.j,  0.9737-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5784-0.6167j, 0.5080+0.1647j]])
Inside  rz
rz_matrix theta:  tensor([[0.6257+0.j]])
rz_matrix:  tensor([[0.9515-0.3078j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9515+0.3078j]])
Performing matrix multiplication

Current state:  tensor([[0.5784-0.6167j, 0.5080+0.1647j]])
New state:  tensor([[0.3605-0.7647j, 0.4326+0.3131j]])
----------Measure----------
Probability:  tensor([[0.7148, 0.2852]])
valid set accuracy: 1.0
valid set loss: 0.36973896622657776
------------------------------Epoch43------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6788-0.6662j, 0.3078-0.0256j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.6788-0.6662j, 0.3078-0.0256j]])
New state:  tensor([[0.4472-0.8394j, 0.3012+0.0682j]])
----------Measure----------
Probability:  tensor([[0.9046, 0.0954]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.5000-0.6874j, 0.4812+0.2143j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.5000-0.6874j, 0.4812+0.2143j]])
New state:  tensor([[0.2702-0.8059j, 0.3945+0.3491j]])
----------Measure----------
Probability:  tensor([[0.7226, 0.2774]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5367-0.7653j, 0.3454+0.0829j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.5367-0.7653j, 0.3454+0.0829j]])
New state:  tensor([[0.2818-0.8913j, 0.3045+0.1829j]])
----------Measure----------
Probability:  tensor([[0.8738, 0.1262]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6186-0.5948j, 0.4970+0.1286j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.6186-0.5948j, 0.4970+0.1286j]])
New state:  tensor([[0.4111-0.7533j, 0.4354+0.2720j]])
----------Measure----------
Probability:  tensor([[0.7365, 0.2635]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1699-0.7928j, 0.2868+0.5103j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.1699-0.7928j, 0.2868+0.5103j]])
New state:  tensor([[-0.0763-0.8072j,  0.1201+0.5729j]])
----------Measure----------
Probability:  tensor([[0.6574, 0.3426]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5280-0.3382j, 0.7570+0.1838j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.5280-0.3382j, 0.7570+0.1838j]])
New state:  tensor([[0.4019-0.4813j, 0.6667+0.4028j]])
----------Measure----------
Probability:  tensor([[0.3932, 0.6068]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3666-0.7109j, 0.4858+0.3525j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.3666-0.7109j, 0.4858+0.3525j]])
New state:  tensor([[0.1359-0.7882j, 0.3573+0.4822j]])
----------Measure----------
Probability:  tensor([[0.6398, 0.3602]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4796-0.6780j, 0.5014+0.2426j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.4796-0.6780j, 0.5014+0.2426j]])
New state:  tensor([[0.2536-0.7908j, 0.4053+0.3821j]])
----------Measure----------
Probability:  tensor([[0.6897, 0.3103]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4608-0.7018j, 0.4817+0.2511j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.4608-0.7018j, 0.4817+0.2511j]])
New state:  tensor([[0.2285-0.8079j, 0.3840+0.3843j]])
----------Measure----------
Probability:  tensor([[0.7049, 0.2951]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0854-0.3293j, 0.7889+0.5118j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.0854-0.3293j, 0.7889+0.5118j]])
New state:  tensor([[-0.0176-0.3398j,  0.5985+0.7252j]])
----------Measure----------
Probability:  tensor([[0.1158, 0.8842]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3139-0.4080j, 0.7779+0.3603j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.3139-0.4080j, 0.7779+0.3603j]])
New state:  tensor([[0.1767-0.4835j, 0.6336+0.5775j]])
----------Measure----------
Probability:  tensor([[0.2650, 0.7350]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.6001-0.6239j, 0.4822+0.1348j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.6001-0.6239j, 0.4822+0.1348j]])
New state:  tensor([[0.3848-0.7754j, 0.4193+0.2736j]])
----------Measure----------
Probability:  tensor([[0.7493, 0.2507]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3527-0.3945j, 0.7851+0.3220j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.3527-0.3945j, 0.7851+0.3220j]])
New state:  tensor([[0.2178-0.4823j, 0.6520+0.5431j]])
----------Measure----------
Probability:  tensor([[0.2800, 0.7200]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4886-0.3702j, 0.7590+0.2194j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.4886-0.3702j, 0.7590+0.2194j]])
New state:  tensor([[0.3547-0.5000j, 0.6580+0.4374j]])
----------Measure----------
Probability:  tensor([[0.3758, 0.6242]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4599-0.7349j, 0.4426+0.2291j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.4599-0.7349j, 0.4426+0.2291j]])
New state:  tensor([[0.2177-0.8392j, 0.3532+0.3516j]])
----------Measure----------
Probability:  tensor([[0.7516, 0.2484]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0366-0.2646j, 0.8381+0.4757j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.0366-0.2646j, 0.8381+0.4757j]])
New state:  tensor([[-0.0446-0.2634j,  0.6563+0.7056j]])
----------Measure----------
Probability:  tensor([[0.0714, 0.9286]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5046-0.4142j, 0.7233+0.2251j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.5046-0.4142j, 0.7233+0.2251j]])
New state:  tensor([[0.3567-0.5467j, 0.6222+0.4321j]])
----------Measure----------
Probability:  tensor([[0.4261, 0.5739]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4180-0.6451j, 0.5538+0.3199j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.4180-0.6451j, 0.5538+0.3199j]])
New state:  tensor([[0.2047-0.7410j, 0.4321+0.4716j]])
----------Measure----------
Probability:  tensor([[0.5909, 0.4091]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6186-0.5948j, 0.4970+0.1286j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.6186-0.5948j, 0.4970+0.1286j]])
New state:  tensor([[0.4111-0.7533j, 0.4354+0.2720j]])
----------Measure----------
Probability:  tensor([[0.7365, 0.2635]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3991-0.7688j, 0.4172+0.2751j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.3991-0.7688j, 0.4172+0.2751j]])
New state:  tensor([[0.1495-0.8532j, 0.3152+0.3878j]])
----------Measure----------
Probability:  tensor([[0.7503, 0.2497]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5394-0.2929j, 0.7733+0.1591j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.5394-0.2929j, 0.7733+0.1591j]])
New state:  tensor([[0.4264-0.4415j, 0.6897+0.3842j]])
----------Measure----------
Probability:  tensor([[0.3767, 0.6233]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3311-0.5321j, 0.6678+0.4016j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.3311-0.5321j, 0.6678+0.4016j]])
New state:  tensor([[0.1558-0.6070j, 0.5162+0.5838j]])
----------Measure----------
Probability:  tensor([[0.3928, 0.6072]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4276-0.4577j, 0.7217+0.2946j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.4276-0.4577j, 0.7217+0.2946j]])
New state:  tensor([[0.2702-0.5651j, 0.5997+0.4980j]])
----------Measure----------
Probability:  tensor([[0.3923, 0.6077]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4804-0.7116j, 0.4623+0.2219j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.4804-0.7116j, 0.4623+0.2219j]])
New state:  tensor([[0.2442-0.8231j, 0.3742+0.3506j]])
----------Measure----------
Probability:  tensor([[0.7371, 0.2629]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4295-0.5236j, 0.6672+0.3102j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.4295-0.5236j, 0.6672+0.3102j]])
New state:  tensor([[0.2522-0.6285j, 0.5431+0.4964j]])
----------Measure----------
Probability:  tensor([[0.4586, 0.5414]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4162-0.4855j, 0.7025+0.3125j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.4162-0.4855j, 0.7025+0.3125j]])
New state:  tensor([[0.2510-0.5881j, 0.5760+0.5092j]])
----------Measure----------
Probability:  tensor([[0.4089, 0.5911]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2462-0.7931j, 0.3529+0.4310j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.2462-0.7931j, 0.3529+0.4310j]])
New state:  tensor([[-0.0036-0.8305j,  0.2071+0.5171j]])
----------Measure----------
Probability:  tensor([[0.6897, 0.3103]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2943-0.6866j, 0.4967+0.4419j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.2943-0.6866j, 0.4967+0.4419j]])
New state:  tensor([[0.0743-0.7433j, 0.3409+0.5708j]])
----------Measure----------
Probability:  tensor([[0.5580, 0.4420]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4640+0.j]])
ry_matrix:  tensor([[ 0.9732-0.j, -0.2299-0.j],
        [ 0.2299+0.j,  0.9732-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5773-0.6170j, 0.5093+0.1634j]])
Inside  rz
rz_matrix theta:  tensor([[0.6107+0.j]])
rz_matrix:  tensor([[0.9537-0.3006j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9537+0.3006j]])
Performing matrix multiplication

Current state:  tensor([[0.5773-0.6170j, 0.5093+0.1634j]])
New state:  tensor([[0.3651-0.7620j, 0.4366+0.3089j]])
----------Measure----------
Probability:  tensor([[0.7140, 0.2860]])
valid set accuracy: 1.0
valid set loss: 0.3693902790546417
------------------------------Epoch44------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5261-0.3387j, 0.7583+0.1829j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.5261-0.3387j, 0.7583+0.1829j]])
New state:  tensor([[0.4035-0.4782j, 0.6712+0.3975j]])
----------Measure----------
Probability:  tensor([[0.3915, 0.6085]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4166-0.6459j, 0.5549+0.3182j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.4166-0.6459j, 0.5549+0.3182j]])
New state:  tensor([[0.2086-0.7398j, 0.4370+0.4672j]])
----------Measure----------
Probability:  tensor([[0.5908, 0.4092]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3508-0.3953j, 0.7859+0.3210j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.3508-0.3953j, 0.7859+0.3210j]])
New state:  tensor([[0.2192-0.4809j, 0.6570+0.5376j]])
----------Measure----------
Probability:  tensor([[0.2793, 0.7207]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4867-0.3708j, 0.7602+0.2184j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.4867-0.3708j, 0.7602+0.2184j]])
New state:  tensor([[0.3563-0.4973j, 0.6626+0.4321j]])
----------Measure----------
Probability:  tensor([[0.3743, 0.6257]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4144-0.4863j, 0.7035+0.3113j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.4144-0.4863j, 0.7035+0.3113j]])
New state:  tensor([[0.2534-0.5865j, 0.5811+0.5041j]])
----------Measure----------
Probability:  tensor([[0.4082, 0.5918]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6173-0.5952j, 0.4986+0.1271j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.6173-0.5952j, 0.4986+0.1271j]])
New state:  tensor([[0.4153-0.7502j, 0.4393+0.2679j]])
----------Measure----------
Probability:  tensor([[0.7353, 0.2647]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0834-0.3306j, 0.7891+0.5109j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.0834-0.3306j, 0.7891+0.5109j]])
New state:  tensor([[-0.0174-0.3406j,  0.6043+0.7201j]])
----------Measure----------
Probability:  tensor([[0.1163, 0.8837]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4792-0.7121j, 0.4635+0.2201j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.4792-0.7121j, 0.4635+0.2201j]])
New state:  tensor([[0.2489-0.8215j, 0.3784+0.3465j]])
----------Measure----------
Probability:  tensor([[0.7368, 0.2632]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5027-0.4148j, 0.7246+0.2240j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.5027-0.4148j, 0.7246+0.2240j]])
New state:  tensor([[0.3588-0.5441j, 0.6269+0.4269j]])
----------Measure----------
Probability:  tensor([[0.4248, 0.5752]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4784-0.6786j, 0.5026+0.2409j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.4784-0.6786j, 0.5026+0.2409j]])
New state:  tensor([[0.2580-0.7892j, 0.4097+0.3779j]])
----------Measure----------
Probability:  tensor([[0.6894, 0.3106]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3654-0.7118j, 0.4867+0.3507j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.3654-0.7118j, 0.4867+0.3507j]])
New state:  tensor([[0.1403-0.7877j, 0.3622+0.4781j]])
----------Measure----------
Probability:  tensor([[0.6402, 0.3598]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2453-0.7942j, 0.3536+0.4290j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.2453-0.7942j, 0.3536+0.4290j]])
New state:  tensor([[0.0012-0.8312j, 0.2120+0.5139j]])
----------Measure----------
Probability:  tensor([[0.6910, 0.3090]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5374-0.2933j, 0.7746+0.1584j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.5374-0.2933j, 0.7746+0.1584j]])
New state:  tensor([[0.4276-0.4382j, 0.6939+0.3789j]])
----------Measure----------
Probability:  tensor([[0.3749, 0.6251]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1692-0.7941j, 0.2872+0.5083j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.1692-0.7941j, 0.2872+0.5083j]])
New state:  tensor([[-0.0715-0.8087j,  0.1253+0.5702j]])
----------Measure----------
Probability:  tensor([[0.6591, 0.3409]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3294-0.5331j, 0.6686+0.4003j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.3294-0.5331j, 0.6686+0.4003j]])
New state:  tensor([[0.1583-0.6064j, 0.5216+0.5790j]])
----------Measure----------
Probability:  tensor([[0.3927, 0.6073]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3980-0.7695j, 0.4182+0.2731j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.3980-0.7695j, 0.4182+0.2731j]])
New state:  tensor([[0.1545-0.8524j, 0.3196+0.3839j]])
----------Measure----------
Probability:  tensor([[0.7505, 0.2495]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5760-0.6174j, 0.5107+0.1619j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.5760-0.6174j, 0.5107+0.1619j]])
New state:  tensor([[0.3693-0.7594j, 0.4407+0.3047j]])
----------Measure----------
Probability:  tensor([[0.7130, 0.2870]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4988-0.6880j, 0.4824+0.2126j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.4988-0.6880j, 0.4824+0.2126j]])
New state:  tensor([[0.2747-0.8041j, 0.3987+0.3449j]])
----------Measure----------
Probability:  tensor([[0.7221, 0.2779]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4596-0.7024j, 0.4829+0.2493j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.4596-0.7024j, 0.4829+0.2493j]])
New state:  tensor([[0.2331-0.8064j, 0.3884+0.3801j]])
----------Measure----------
Probability:  tensor([[0.7046, 0.2954]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5359-0.7655j, 0.3468+0.0809j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.5359-0.7655j, 0.3468+0.0809j]])
New state:  tensor([[0.2874-0.8891j, 0.3077+0.1792j]])
----------Measure----------
Probability:  tensor([[0.8732, 0.1268]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4258-0.4584j, 0.7228+0.2935j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.4258-0.4584j, 0.7228+0.2935j]])
New state:  tensor([[0.2724-0.5633j, 0.6047+0.4928j]])
----------Measure----------
Probability:  tensor([[0.3915, 0.6085]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6173-0.5952j, 0.4986+0.1271j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.6173-0.5952j, 0.4986+0.1271j]])
New state:  tensor([[0.4153-0.7502j, 0.4393+0.2679j]])
----------Measure----------
Probability:  tensor([[0.7353, 0.2647]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6781-0.6661j, 0.3095-0.0272j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.6781-0.6661j, 0.3095-0.0272j]])
New state:  tensor([[0.4526-0.8359j, 0.3038+0.0649j]])
----------Measure----------
Probability:  tensor([[0.9035, 0.0965]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4278-0.5244j, 0.6683+0.3089j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.4278-0.5244j, 0.6683+0.3089j]])
New state:  tensor([[0.2549-0.6269j, 0.5481+0.4915j]])
----------Measure----------
Probability:  tensor([[0.4580, 0.5420]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0345-0.2658j, 0.8382+0.4750j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.0345-0.2658j, 0.8382+0.4750j]])
New state:  tensor([[-0.0451-0.2642j,  0.6617+0.7002j]])
----------Measure----------
Probability:  tensor([[0.0718, 0.9282]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2930-0.6877j, 0.4975+0.4402j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.2930-0.6877j, 0.4975+0.4402j]])
New state:  tensor([[0.0782-0.7434j, 0.3462+0.5669j]])
----------Measure----------
Probability:  tensor([[0.5588, 0.4412]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4588-0.7355j, 0.4438+0.2273j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.4588-0.7355j, 0.4438+0.2273j]])
New state:  tensor([[0.2226-0.8378j, 0.3574+0.3476j]])
----------Measure----------
Probability:  tensor([[0.7514, 0.2486]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5989-0.6242j, 0.4837+0.1333j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.5989-0.6242j, 0.4837+0.1333j]])
New state:  tensor([[0.3892-0.7726j, 0.4232+0.2694j]])
----------Measure----------
Probability:  tensor([[0.7483, 0.2517]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4690+0.j]])
ry_matrix:  tensor([[ 0.9726-0.j, -0.2324-0.j],
        [ 0.2324+0.j,  0.9726-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3119-0.4089j, 0.7787+0.3593j]])
Inside  rz
rz_matrix theta:  tensor([[0.5961+0.j]])
rz_matrix:  tensor([[0.9559-0.2937j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9559+0.2937j]])
Performing matrix multiplication

Current state:  tensor([[0.3119-0.4089j, 0.7787+0.3593j]])
New state:  tensor([[0.1781-0.4825j, 0.6389+0.5721j]])
----------Measure----------
Probability:  tensor([[0.2645, 0.7355]])
valid set accuracy: 1.0
valid set loss: 0.3689951002597809
------------------------------Epoch45------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4586-0.7029j, 0.4839+0.2478j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.4586-0.7029j, 0.4839+0.2478j]])
New state:  tensor([[0.2376-0.8050j, 0.3924+0.3763j]])
----------Measure----------
Probability:  tensor([[0.7044, 0.2956]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0818-0.3317j, 0.7893+0.5102j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.0818-0.3317j, 0.7893+0.5102j]])
New state:  tensor([[-0.0169-0.3412j,  0.6097+0.7152j]])
----------Measure----------
Probability:  tensor([[0.1167, 0.8833]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4851-0.3712j, 0.7613+0.2176j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.4851-0.3712j, 0.7613+0.2176j]])
New state:  tensor([[0.3581-0.4948j, 0.6668+0.4269j]])
----------Measure----------
Probability:  tensor([[0.3731, 0.6269]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4782-0.7126j, 0.4645+0.2186j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.4782-0.7126j, 0.4645+0.2186j]])
New state:  tensor([[0.2537-0.8198j, 0.3823+0.3426j]])
----------Measure----------
Probability:  tensor([[0.7365, 0.2635]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6163-0.5954j, 0.4999+0.1258j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.6163-0.5954j, 0.4999+0.1258j]])
New state:  tensor([[0.4195-0.7472j, 0.4427+0.2639j]])
----------Measure----------
Probability:  tensor([[0.7343, 0.2657]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4264-0.5250j, 0.6692+0.3078j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.4264-0.5250j, 0.6692+0.3078j]])
New state:  tensor([[0.2578-0.6253j, 0.5527+0.4869j]])
----------Measure----------
Probability:  tensor([[0.4574, 0.5426]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2920-0.6886j, 0.4981+0.4388j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.2920-0.6886j, 0.4981+0.4388j]])
New state:  tensor([[0.0821-0.7434j, 0.3512+0.5632j]])
----------Measure----------
Probability:  tensor([[0.5594, 0.4406]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3644-0.7125j, 0.4874+0.3492j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.3644-0.7125j, 0.4874+0.3492j]])
New state:  tensor([[0.1446-0.7871j, 0.3668+0.4743j]])
----------Measure----------
Probability:  tensor([[0.6405, 0.3595]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4129-0.4869j, 0.7044+0.3102j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.4129-0.4869j, 0.7044+0.3102j]])
New state:  tensor([[0.2559-0.5849j, 0.5857+0.4993j]])
----------Measure----------
Probability:  tensor([[0.4076, 0.5924]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5351-0.7657j, 0.3479+0.0793j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.5351-0.7657j, 0.3479+0.0793j]])
New state:  tensor([[0.2929-0.8871j, 0.3105+0.1758j]])
----------Measure----------
Probability:  tensor([[0.8727, 0.1273]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5358-0.2936j, 0.7758+0.1578j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.5358-0.2936j, 0.7758+0.1578j]])
New state:  tensor([[0.4290-0.4350j, 0.6979+0.3737j]])
----------Measure----------
Probability:  tensor([[0.3733, 0.6267]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2446-0.7951j, 0.3541+0.4273j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.2446-0.7951j, 0.3541+0.4273j]])
New state:  tensor([[0.0061-0.8319j, 0.2166+0.5109j]])
----------Measure----------
Probability:  tensor([[0.6920, 0.3080]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3972-0.7700j, 0.4190+0.2715j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.3972-0.7700j, 0.4190+0.2715j]])
New state:  tensor([[0.1595-0.8516j, 0.3235+0.3803j]])
----------Measure----------
Probability:  tensor([[0.7507, 0.2493]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6163-0.5954j, 0.4999+0.1258j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.6163-0.5954j, 0.4999+0.1258j]])
New state:  tensor([[0.4195-0.7472j, 0.4427+0.2639j]])
----------Measure----------
Probability:  tensor([[0.7343, 0.2657]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4154-0.6466j, 0.5558+0.3169j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.4154-0.6466j, 0.5558+0.3169j]])
New state:  tensor([[0.2125-0.7386j, 0.4415+0.4630j]])
----------Measure----------
Probability:  tensor([[0.5907, 0.4093]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5749-0.6178j, 0.5119+0.1605j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.5749-0.6178j, 0.5119+0.1605j]])
New state:  tensor([[0.3735-0.7567j, 0.4443+0.3007j]])
----------Measure----------
Probability:  tensor([[0.7122, 0.2878]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.5012-0.4152j, 0.7257+0.2231j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.5012-0.4152j, 0.7257+0.2231j]])
New state:  tensor([[0.3610-0.5416j, 0.6311+0.4220j]])
----------Measure----------
Probability:  tensor([[0.4236, 0.5764]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4773-0.6791j, 0.5036+0.2394j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.4773-0.6791j, 0.5036+0.2394j]])
New state:  tensor([[0.2624-0.7875j, 0.4138+0.3739j]])
----------Measure----------
Probability:  tensor([[0.6890, 0.3110]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4243-0.4591j, 0.7237+0.2925j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.4243-0.4591j, 0.7237+0.2925j]])
New state:  tensor([[0.2747-0.5615j, 0.6093+0.4878j]])
----------Measure----------
Probability:  tensor([[0.3907, 0.6093]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3491-0.3960j, 0.7867+0.3201j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.3491-0.3960j, 0.7867+0.3201j]])
New state:  tensor([[0.2208-0.4795j, 0.6618+0.5324j]])
----------Measure----------
Probability:  tensor([[0.2786, 0.7214]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1686-0.7951j, 0.2876+0.5066j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.1686-0.7951j, 0.2876+0.5066j]])
New state:  tensor([[-0.0666-0.8101j,  0.1301+0.5678j]])
----------Measure----------
Probability:  tensor([[0.6606, 0.3394]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5245-0.3390j, 0.7594+0.1822j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.5245-0.3390j, 0.7594+0.1822j]])
New state:  tensor([[0.4052-0.4753j, 0.6752+0.3924j]])
----------Measure----------
Probability:  tensor([[0.3901, 0.6099]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6774-0.6661j, 0.3109-0.0286j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.6774-0.6661j, 0.3109-0.0286j]])
New state:  tensor([[0.4578-0.8324j, 0.3060+0.0618j]])
----------Measure----------
Probability:  tensor([[0.9025, 0.0975]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0327-0.2668j, 0.8382+0.4745j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.0327-0.2668j, 0.8382+0.4745j]])
New state:  tensor([[-0.0452-0.2650j,  0.6669+0.6950j]])
----------Measure----------
Probability:  tensor([[0.0723, 0.9277]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3280-0.5340j, 0.6693+0.3991j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.3280-0.5340j, 0.6693+0.3991j]])
New state:  tensor([[0.1610-0.6056j, 0.5266+0.5744j]])
----------Measure----------
Probability:  tensor([[0.3927, 0.6073]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4579-0.7360j, 0.4447+0.2257j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.4579-0.7360j, 0.4447+0.2257j]])
New state:  tensor([[0.2274-0.8364j, 0.3613+0.3438j]])
----------Measure----------
Probability:  tensor([[0.7513, 0.2487]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4977-0.6884j, 0.4835+0.2112j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.4977-0.6884j, 0.4835+0.2112j]])
New state:  tensor([[0.2793-0.8023j, 0.4026+0.3410j]])
----------Measure----------
Probability:  tensor([[0.7217, 0.2783]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3103-0.4097j, 0.7794+0.3584j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.3103-0.4097j, 0.7794+0.3584j]])
New state:  tensor([[0.1797-0.4815j, 0.6438+0.5669j]])
----------Measure----------
Probability:  tensor([[0.2641, 0.7359]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4732+0.j]])
ry_matrix:  tensor([[ 0.9721-0.j, -0.2344-0.j],
        [ 0.2344+0.j,  0.9721-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5979-0.6245j, 0.4849+0.1320j]])
Inside  rz
rz_matrix theta:  tensor([[0.5820+0.j]])
rz_matrix:  tensor([[0.9580-0.2869j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9580+0.2869j]])
Performing matrix multiplication

Current state:  tensor([[0.5979-0.6245j, 0.4849+0.1320j]])
New state:  tensor([[0.3935-0.7698j, 0.4267+0.2655j]])
----------Measure----------
Probability:  tensor([[0.7474, 0.2526]])
valid set accuracy: 1.0
valid set loss: 0.36867088079452515
------------------------------Epoch46------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4968-0.6889j, 0.4845+0.2098j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.4968-0.6889j, 0.4845+0.2098j]])
New state:  tensor([[0.2837-0.8005j, 0.4062+0.3372j]])
----------Measure----------
Probability:  tensor([[0.7213, 0.2787]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0310-0.2678j, 0.8383+0.4739j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.0310-0.2678j, 0.8383+0.4739j]])
New state:  tensor([[-0.0453-0.2657j,  0.6718+0.6899j]])
----------Measure----------
Probability:  tensor([[0.0727, 0.9273]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3475-0.3966j, 0.7874+0.3193j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.3475-0.3966j, 0.7874+0.3193j]])
New state:  tensor([[0.2224-0.4781j, 0.6663+0.5273j]])
----------Measure----------
Probability:  tensor([[0.2781, 0.7219]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4250-0.5256j, 0.6701+0.3067j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.4250-0.5256j, 0.6701+0.3067j]])
New state:  tensor([[0.2606-0.6237j, 0.5572+0.4823j]])
----------Measure----------
Probability:  tensor([[0.4569, 0.5431]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3963-0.7706j, 0.4198+0.2699j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.3963-0.7706j, 0.4198+0.2699j]])
New state:  tensor([[0.1644-0.8508j, 0.3273+0.3768j]])
----------Measure----------
Probability:  tensor([[0.7509, 0.2491]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5342-0.2939j, 0.7768+0.1572j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.2939j, 0.7768+0.1572j]])
New state:  tensor([[0.4304-0.4319j, 0.7016+0.3687j]])
----------Measure----------
Probability:  tensor([[0.3718, 0.6282]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6152-0.5957j, 0.5011+0.1246j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.6152-0.5957j, 0.5011+0.1246j]])
New state:  tensor([[0.4236-0.7443j, 0.4461+0.2601j]])
----------Measure----------
Probability:  tensor([[0.7334, 0.2666]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1680-0.7961j, 0.2879+0.5050j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.1680-0.7961j, 0.2879+0.5050j]])
New state:  tensor([[-0.0619-0.8113j,  0.1348+0.5655j]])
----------Measure----------
Probability:  tensor([[0.6621, 0.3379]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4835-0.3717j, 0.7622+0.2169j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.4835-0.3717j, 0.7622+0.2169j]])
New state:  tensor([[0.3599-0.4923j, 0.6709+0.4219j]])
----------Measure----------
Probability:  tensor([[0.3719, 0.6281]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4570-0.7364j, 0.4456+0.2242j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.4570-0.7364j, 0.4456+0.2242j]])
New state:  tensor([[0.2322-0.8350j, 0.3649+0.3402j]])
----------Measure----------
Probability:  tensor([[0.7511, 0.2489]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5969-0.6248j, 0.4861+0.1307j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.5969-0.6248j, 0.4861+0.1307j]])
New state:  tensor([[0.3978-0.7670j, 0.4300+0.2617j]])
----------Measure----------
Probability:  tensor([[0.7466, 0.2534]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5739-0.6181j, 0.5131+0.1593j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.5739-0.6181j, 0.5131+0.1593j]])
New state:  tensor([[0.3776-0.7542j, 0.4478+0.2968j]])
----------Measure----------
Probability:  tensor([[0.7114, 0.2886]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5230-0.3394j, 0.7605+0.1815j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.5230-0.3394j, 0.7605+0.1815j]])
New state:  tensor([[0.4069-0.4724j, 0.6791+0.3874j]])
----------Measure----------
Probability:  tensor([[0.3887, 0.6113]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4773-0.7130j, 0.4655+0.2171j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.4773-0.7130j, 0.4655+0.2171j]])
New state:  tensor([[0.2582-0.8182j, 0.3859+0.3389j]])
----------Measure----------
Probability:  tensor([[0.7362, 0.2638]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3634-0.7132j, 0.4882+0.3477j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.3634-0.7132j, 0.4882+0.3477j]])
New state:  tensor([[0.1489-0.7865j, 0.3711+0.4707j]])
----------Measure----------
Probability:  tensor([[0.6408, 0.3592]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3087-0.4104j, 0.7800+0.3576j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.3087-0.4104j, 0.7800+0.3576j]])
New state:  tensor([[0.1812-0.4805j, 0.6485+0.5619j]])
----------Measure----------
Probability:  tensor([[0.2637, 0.7363]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3266-0.5348j, 0.6700+0.3981j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.3266-0.5348j, 0.6700+0.3981j]])
New state:  tensor([[0.1636-0.6049j, 0.5315+0.5699j]])
----------Measure----------
Probability:  tensor([[0.3927, 0.6073]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4115-0.4875j, 0.7052+0.3093j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.4115-0.4875j, 0.7052+0.3093j]])
New state:  tensor([[0.2583-0.5834j, 0.5902+0.4946j]])
----------Measure----------
Probability:  tensor([[0.4070, 0.5930]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4576-0.7034j, 0.4848+0.2464j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.4576-0.7034j, 0.4848+0.2464j]])
New state:  tensor([[0.2421-0.8035j, 0.3963+0.3725j]])
----------Measure----------
Probability:  tensor([[0.7042, 0.2958]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4143-0.6473j, 0.5566+0.3156j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.4143-0.6473j, 0.5566+0.3156j]])
New state:  tensor([[0.2162-0.7375j, 0.4458+0.4590j]])
----------Measure----------
Probability:  tensor([[0.5906, 0.4094]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6768-0.6660j, 0.3123-0.0300j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.6768-0.6660j, 0.3123-0.0300j]])
New state:  tensor([[0.4629-0.8290j, 0.3082+0.0588j]])
----------Measure----------
Probability:  tensor([[0.9016, 0.0984]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2910-0.6895j, 0.4987+0.4374j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.2910-0.6895j, 0.4987+0.4374j]])
New state:  tensor([[0.0860-0.7434j, 0.3560+0.5596j]])
----------Measure----------
Probability:  tensor([[0.5601, 0.4399]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4228-0.4597j, 0.7245+0.2916j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.4228-0.4597j, 0.7245+0.2916j]])
New state:  tensor([[0.2770-0.5598j, 0.6137+0.4830j]])
----------Measure----------
Probability:  tensor([[0.3900, 0.6100]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5344-0.7659j, 0.3490+0.0778j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.5344-0.7659j, 0.3490+0.0778j]])
New state:  tensor([[0.2983-0.8850j, 0.3132+0.1725j]])
----------Measure----------
Probability:  tensor([[0.8722, 0.1278]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0802-0.3327j, 0.7894+0.5096j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.0802-0.3327j, 0.7894+0.5096j]])
New state:  tensor([[-0.0163-0.3419j,  0.6149+0.7105j]])
----------Measure----------
Probability:  tensor([[0.1171, 0.8829]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4997-0.4157j, 0.7267+0.2223j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.4997-0.4157j, 0.7267+0.2223j]])
New state:  tensor([[0.3632-0.5391j, 0.6352+0.4171j]])
----------Measure----------
Probability:  tensor([[0.4225, 0.5775]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2438-0.7960j, 0.3546+0.4257j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.2438-0.7960j, 0.3546+0.4257j]])
New state:  tensor([[0.0109-0.8324j, 0.2210+0.5080j]])
----------Measure----------
Probability:  tensor([[0.6931, 0.3069]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4763-0.6796j, 0.5046+0.2381j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.4763-0.6796j, 0.5046+0.2381j]])
New state:  tensor([[0.2667-0.7859j, 0.4176+0.3700j]])
----------Measure----------
Probability:  tensor([[0.6887, 0.3113]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4773+0.j]])
ry_matrix:  tensor([[ 0.9717-0.j, -0.2364-0.j],
        [ 0.2364+0.j,  0.9717-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6152-0.5957j, 0.5011+0.1246j]])
Inside  rz
rz_matrix theta:  tensor([[0.5683+0.j]])
rz_matrix:  tensor([[0.9599-0.2804j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9599+0.2804j]])
Performing matrix multiplication

Current state:  tensor([[0.6152-0.5957j, 0.5011+0.1246j]])
New state:  tensor([[0.4236-0.7443j, 0.4461+0.2601j]])
----------Measure----------
Probability:  tensor([[0.7334, 0.2666]])
valid set accuracy: 1.0
valid set loss: 0.3683667480945587
------------------------------Epoch47------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2901-0.6903j, 0.4992+0.4361j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.2901-0.6903j, 0.4992+0.4361j]])
New state:  tensor([[0.0898-0.7433j, 0.3606+0.5562j]])
----------Measure----------
Probability:  tensor([[0.5606, 0.4394]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5960-0.6250j, 0.4872+0.1295j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.5960-0.6250j, 0.4872+0.1295j]])
New state:  tensor([[0.4019-0.7644j, 0.4331+0.2581j]])
----------Measure----------
Probability:  tensor([[0.7458, 0.2542]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4984-0.4161j, 0.7276+0.2215j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.4984-0.4161j, 0.7276+0.2215j]])
New state:  tensor([[0.3653-0.5367j, 0.6390+0.4124j]])
----------Measure----------
Probability:  tensor([[0.4215, 0.5785]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3072-0.4111j, 0.7806+0.3568j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.3072-0.4111j, 0.7806+0.3568j]])
New state:  tensor([[0.1829-0.4795j, 0.6530+0.5570j]])
----------Measure----------
Probability:  tensor([[0.2634, 0.7366]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5338-0.7660j, 0.3500+0.0763j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.5338-0.7660j, 0.3500+0.0763j]])
New state:  tensor([[0.3035-0.8829j, 0.3157+0.1693j]])
----------Measure----------
Probability:  tensor([[0.8717, 0.1283]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6762-0.6659j, 0.3135-0.0312j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.6762-0.6659j, 0.3135-0.0312j]])
New state:  tensor([[0.4679-0.8257j, 0.3101+0.0559j]])
----------Measure----------
Probability:  tensor([[0.9007, 0.0993]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3955-0.7711j, 0.4206+0.2685j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.3955-0.7711j, 0.4206+0.2685j]])
New state:  tensor([[0.1691-0.8499j, 0.3309+0.3735j]])
----------Measure----------
Probability:  tensor([[0.7510, 0.2490]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3460-0.3972j, 0.7880+0.3186j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.3460-0.3972j, 0.7880+0.3186j]])
New state:  tensor([[0.2240-0.4768j, 0.6706+0.5223j]])
----------Measure----------
Probability:  tensor([[0.2775, 0.7225]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0787-0.3337j, 0.7896+0.5089j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.0787-0.3337j, 0.7896+0.5089j]])
New state:  tensor([[-0.0157-0.3425j,  0.6199+0.7058j]])
----------Measure----------
Probability:  tensor([[0.1175, 0.8825]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6143-0.5959j, 0.5022+0.1235j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.6143-0.5959j, 0.5022+0.1235j]])
New state:  tensor([[0.4275-0.7414j, 0.4492+0.2564j]])
----------Measure----------
Probability:  tensor([[0.7325, 0.2675]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4567-0.7039j, 0.4856+0.2451j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.4567-0.7039j, 0.4856+0.2451j]])
New state:  tensor([[0.2464-0.8021j, 0.3999+0.3688j]])
----------Measure----------
Probability:  tensor([[0.7041, 0.2959]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4238-0.5262j, 0.6708+0.3058j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.4238-0.5262j, 0.6708+0.3058j]])
New state:  tensor([[0.2634-0.6222j, 0.5614+0.4779j]])
----------Measure----------
Probability:  tensor([[0.4565, 0.5435]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6143-0.5959j, 0.5022+0.1235j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.6143-0.5959j, 0.5022+0.1235j]])
New state:  tensor([[0.4275-0.7414j, 0.4492+0.2564j]])
----------Measure----------
Probability:  tensor([[0.7325, 0.2675]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4561-0.7368j, 0.4465+0.2229j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.4561-0.7368j, 0.4465+0.2229j]])
New state:  tensor([[0.2368-0.8336j, 0.3683+0.3367j]])
----------Measure----------
Probability:  tensor([[0.7510, 0.2490]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4959-0.6892j, 0.4854+0.2085j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.4959-0.6892j, 0.4854+0.2085j]])
New state:  tensor([[0.2880-0.7987j, 0.4097+0.3335j]])
----------Measure----------
Probability:  tensor([[0.7209, 0.2791]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4102-0.4881j, 0.7060+0.3084j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.4102-0.4881j, 0.7060+0.3084j]])
New state:  tensor([[0.2608-0.5818j, 0.5945+0.4900j]])
----------Measure----------
Probability:  tensor([[0.4065, 0.5935]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4215-0.4602j, 0.7253+0.2907j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.4215-0.4602j, 0.7253+0.2907j]])
New state:  tensor([[0.2792-0.5581j, 0.6179+0.4783j]])
----------Measure----------
Probability:  tensor([[0.3894, 0.6106]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5328-0.2942j, 0.7778+0.1567j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.5328-0.2942j, 0.7778+0.1567j]])
New state:  tensor([[0.4318-0.4290j, 0.7051+0.3638j]])
----------Measure----------
Probability:  tensor([[0.3704, 0.6296]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5216-0.3397j, 0.7614+0.1809j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.5216-0.3397j, 0.7614+0.1809j]])
New state:  tensor([[0.4085-0.4697j, 0.6828+0.3826j]])
----------Measure----------
Probability:  tensor([[0.3875, 0.6125]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4133-0.6478j, 0.5574+0.3144j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.4133-0.6478j, 0.5574+0.3144j]])
New state:  tensor([[0.2200-0.7363j, 0.4499+0.4550j]])
----------Measure----------
Probability:  tensor([[0.5905, 0.4095]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5729-0.6184j, 0.5141+0.1582j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.5729-0.6184j, 0.5141+0.1582j]])
New state:  tensor([[0.3816-0.7517j, 0.4511+0.2930j]])
----------Measure----------
Probability:  tensor([[0.7106, 0.2894]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1675-0.7971j, 0.2882+0.5035j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.1675-0.7971j, 0.2882+0.5035j]])
New state:  tensor([[-0.0573-0.8125j,  0.1392+0.5632j]])
----------Measure----------
Probability:  tensor([[0.6634, 0.3366]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2432-0.7968j, 0.3550+0.4242j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.2432-0.7968j, 0.3550+0.4242j]])
New state:  tensor([[0.0156-0.8329j, 0.2252+0.5053j]])
----------Measure----------
Probability:  tensor([[0.6940, 0.3060]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0295-0.2686j, 0.8384+0.4734j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.0295-0.2686j, 0.8384+0.4734j]])
New state:  tensor([[-0.0453-0.2664j,  0.6766+0.6850j]])
----------Measure----------
Probability:  tensor([[0.0730, 0.9270]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4821-0.3721j, 0.7631+0.2162j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.4821-0.3721j, 0.7631+0.2162j]])
New state:  tensor([[0.3617-0.4899j, 0.6747+0.4170j]])
----------Measure----------
Probability:  tensor([[0.3709, 0.6291]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3254-0.5355j, 0.6706+0.3971j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.3254-0.5355j, 0.6706+0.3971j]])
New state:  tensor([[0.1662-0.6042j, 0.5361+0.5656j]])
----------Measure----------
Probability:  tensor([[0.3927, 0.6073]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4764-0.7134j, 0.4663+0.2158j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.4764-0.7134j, 0.4663+0.2158j]])
New state:  tensor([[0.2627-0.8167j, 0.3894+0.3353j]])
----------Measure----------
Probability:  tensor([[0.7360, 0.2640]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4754-0.6800j, 0.5055+0.2368j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.4754-0.6800j, 0.5055+0.2368j]])
New state:  tensor([[0.2709-0.7843j, 0.4213+0.3662j]])
----------Measure----------
Probability:  tensor([[0.6884, 0.3116]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4810+0.j]])
ry_matrix:  tensor([[ 0.9712-0.j, -0.2382-0.j],
        [ 0.2382+0.j,  0.9712-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3625-0.7139j, 0.4889+0.3464j]])
Inside  rz
rz_matrix theta:  tensor([[0.5551+0.j]])
rz_matrix:  tensor([[0.9617-0.2740j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9617+0.2740j]])
Performing matrix multiplication

Current state:  tensor([[0.3625-0.7139j, 0.4889+0.3464j]])
New state:  tensor([[0.1530-0.7859j, 0.3752+0.4671j]])
----------Measure----------
Probability:  tensor([[0.6410, 0.3590]])
valid set accuracy: 1.0
valid set loss: 0.36809203028678894
------------------------------Epoch48------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5331-0.7662j, 0.3511+0.0747j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.5331-0.7662j, 0.3511+0.0747j]])
New state:  tensor([[0.3084-0.8809j, 0.3182+0.1660j]])
----------Measure----------
Probability:  tensor([[0.8712, 0.1288]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2890-0.6912j, 0.4998+0.4346j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.2890-0.6912j, 0.4998+0.4346j]])
New state:  tensor([[0.0934-0.7434j, 0.3651+0.5526j]])
----------Measure----------
Probability:  tensor([[0.5613, 0.4387]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3615-0.7146j, 0.4896+0.3449j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.3615-0.7146j, 0.4896+0.3449j]])
New state:  tensor([[0.1569-0.7853j, 0.3794+0.4634j]])
----------Measure----------
Probability:  tensor([[0.6413, 0.3587]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4754-0.7139j, 0.4673+0.2143j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.4754-0.7139j, 0.4673+0.2143j]])
New state:  tensor([[0.2669-0.8151j, 0.3929+0.3316j]])
----------Measure----------
Probability:  tensor([[0.7357, 0.2643]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4199-0.4608j, 0.7262+0.2898j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.4199-0.4608j, 0.7262+0.2898j]])
New state:  tensor([[0.2812-0.5564j, 0.6221+0.4737j]])
----------Measure----------
Probability:  tensor([[0.3887, 0.6113]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5950-0.6253j, 0.4885+0.1282j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.5950-0.6253j, 0.4885+0.1282j]])
New state:  tensor([[0.4058-0.7618j, 0.4363+0.2544j]])
----------Measure----------
Probability:  tensor([[0.7449, 0.2551]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3240-0.5363j, 0.6713+0.3960j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.3240-0.5363j, 0.6713+0.3960j]])
New state:  tensor([[0.1685-0.6035j, 0.5407+0.5613j]])
----------Measure----------
Probability:  tensor([[0.3926, 0.6074]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4087-0.4888j, 0.7068+0.3073j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.4087-0.4888j, 0.7068+0.3073j]])
New state:  tensor([[0.2629-0.5804j, 0.5987+0.4854j]])
----------Measure----------
Probability:  tensor([[0.4059, 0.5941]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5200-0.3401j, 0.7625+0.1802j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.5200-0.3401j, 0.7625+0.1802j]])
New state:  tensor([[0.4099-0.4670j, 0.6864+0.3778j]])
----------Measure----------
Probability:  tensor([[0.3861, 0.6139]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3056-0.4118j, 0.7812+0.3559j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.3056-0.4118j, 0.7812+0.3559j]])
New state:  tensor([[0.1842-0.4786j, 0.6574+0.5522j]])
----------Measure----------
Probability:  tensor([[0.2630, 0.7370]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0770-0.3347j, 0.7897+0.5082j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.0770-0.3347j, 0.7897+0.5082j]])
New state:  tensor([[-0.0154-0.3432j,  0.6248+0.7012j]])
----------Measure----------
Probability:  tensor([[0.1180, 0.8820]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2424-0.7977j, 0.3555+0.4225j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.2424-0.7977j, 0.3555+0.4225j]])
New state:  tensor([[0.0200-0.8335j, 0.2294+0.5023j]])
----------Measure----------
Probability:  tensor([[0.6951, 0.3049]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0277-0.2696j, 0.8384+0.4729j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.0277-0.2696j, 0.8384+0.4729j]])
New state:  tensor([[-0.0455-0.2672j,  0.6812+0.6801j]])
----------Measure----------
Probability:  tensor([[0.0735, 0.9265]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4121-0.6485j, 0.5582+0.3130j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.4121-0.6485j, 0.5582+0.3130j]])
New state:  tensor([[0.2234-0.7352j, 0.4540+0.4511j]])
----------Measure----------
Probability:  tensor([[0.5904, 0.4096]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1669-0.7981j, 0.2886+0.5019j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.1669-0.7981j, 0.2886+0.5019j]])
New state:  tensor([[-0.0530-0.8137j,  0.1436+0.5608j]])
----------Measure----------
Probability:  tensor([[0.6649, 0.3351]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4743-0.6805j, 0.5065+0.2354j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.4743-0.6805j, 0.5065+0.2354j]])
New state:  tensor([[0.2747-0.7827j, 0.4249+0.3624j]])
----------Measure----------
Probability:  tensor([[0.6881, 0.3119]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6133-0.5962j, 0.5035+0.1223j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.6133-0.5962j, 0.5035+0.1223j]])
New state:  tensor([[0.4312-0.7386j, 0.4524+0.2526j]])
----------Measure----------
Probability:  tensor([[0.7315, 0.2685]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4805-0.3725j, 0.7642+0.2154j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.4805-0.3725j, 0.7642+0.2154j]])
New state:  tensor([[0.3632-0.4876j, 0.6785+0.4122j]])
----------Measure----------
Probability:  tensor([[0.3697, 0.6303]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3946-0.7716j, 0.4214+0.2669j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.3946-0.7716j, 0.4214+0.2669j]])
New state:  tensor([[0.1736-0.8491j, 0.3345+0.3700j]])
----------Measure----------
Probability:  tensor([[0.7512, 0.2488]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5312-0.2946j, 0.7789+0.1560j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.5312-0.2946j, 0.7789+0.1560j]])
New state:  tensor([[0.4329-0.4261j, 0.7087+0.3589j]])
----------Measure----------
Probability:  tensor([[0.3689, 0.6311]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3444-0.3979j, 0.7888+0.3178j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.3444-0.3979j, 0.7888+0.3178j]])
New state:  tensor([[0.2253-0.4756j, 0.6748+0.5174j]])
----------Measure----------
Probability:  tensor([[0.2769, 0.7231]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4969-0.4166j, 0.7286+0.2207j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.4969-0.4166j, 0.7286+0.2207j]])
New state:  tensor([[0.3672-0.5344j, 0.6429+0.4077j]])
----------Measure----------
Probability:  tensor([[0.4204, 0.5796]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4557-0.7044j, 0.4866+0.2436j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.4557-0.7044j, 0.4866+0.2436j]])
New state:  tensor([[0.2504-0.8007j, 0.4036+0.3651j]])
----------Measure----------
Probability:  tensor([[0.7039, 0.2961]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6755-0.6659j, 0.3149-0.0326j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.6755-0.6659j, 0.3149-0.0326j]])
New state:  tensor([[0.4725-0.8225j, 0.3122+0.0529j]])
----------Measure----------
Probability:  tensor([[0.8997, 0.1003]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4552-0.7373j, 0.4474+0.2213j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.4552-0.7373j, 0.4474+0.2213j]])
New state:  tensor([[0.2411-0.8323j, 0.3718+0.3331j]])
----------Measure----------
Probability:  tensor([[0.7508, 0.2492]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4224-0.5268j, 0.6717+0.3047j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.4224-0.5268j, 0.6717+0.3047j]])
New state:  tensor([[0.2659-0.6207j, 0.5656+0.4734j]])
----------Measure----------
Probability:  tensor([[0.4560, 0.5440]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4948-0.6897j, 0.4864+0.2070j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.4948-0.6897j, 0.4864+0.2070j]])
New state:  tensor([[0.2921-0.7970j, 0.4132+0.3297j]])
----------Measure----------
Probability:  tensor([[0.7205, 0.2795]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6133-0.5962j, 0.5035+0.1223j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.6133-0.5962j, 0.5035+0.1223j]])
New state:  tensor([[0.4312-0.7386j, 0.4524+0.2526j]])
----------Measure----------
Probability:  tensor([[0.7315, 0.2685]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4852+0.j]])
ry_matrix:  tensor([[ 0.9707-0.j, -0.2402-0.j],
        [ 0.2402+0.j,  0.9707-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5719-0.6187j, 0.5153+0.1569j]])
Inside  rz
rz_matrix theta:  tensor([[0.5422+0.j]])
rz_matrix:  tensor([[0.9635-0.2678j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9635+0.2678j]])
Performing matrix multiplication

Current state:  tensor([[0.5719-0.6187j, 0.5153+0.1569j]])
New state:  tensor([[0.3853-0.7493j, 0.4545+0.2891j]])
----------Measure----------
Probability:  tensor([[0.7098, 0.2902]])
valid set accuracy: 1.0
valid set loss: 0.3677879869937897
------------------------------Epoch49------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4187-0.4613j, 0.7269+0.2890j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.4187-0.4613j, 0.7269+0.2890j]])
New state:  tensor([[0.2833-0.5548j, 0.6259+0.4692j]])
----------Measure----------
Probability:  tensor([[0.3881, 0.6119]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4549-0.7048j, 0.4874+0.2425j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.4549-0.7048j, 0.4874+0.2425j]])
New state:  tensor([[0.2545-0.7993j, 0.4069+0.3616j]])
----------Measure----------
Probability:  tensor([[0.7037, 0.2963]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4940-0.6900j, 0.4872+0.2059j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.4940-0.6900j, 0.4872+0.2059j]])
New state:  tensor([[0.2961-0.7953j, 0.4163+0.3263j]])
----------Measure----------
Probability:  tensor([[0.7202, 0.2798]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4747-0.7142j, 0.4681+0.2131j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.4747-0.7142j, 0.4681+0.2131j]])
New state:  tensor([[0.2711-0.8136j, 0.3960+0.3283j]])
----------Measure----------
Probability:  tensor([[0.7354, 0.2646]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1664-0.7990j, 0.2888+0.5005j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.1664-0.7990j, 0.2888+0.5005j]])
New state:  tensor([[-0.0486-0.8147j,  0.1477+0.5587j]])
----------Measure----------
Probability:  tensor([[0.6660, 0.3340]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6124-0.5964j, 0.5045+0.1213j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.6124-0.5964j, 0.5045+0.1213j]])
New state:  tensor([[0.4349-0.7359j, 0.4552+0.2491j]])
----------Measure----------
Probability:  tensor([[0.7307, 0.2693]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4544-0.7377j, 0.4482+0.2201j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.4544-0.7377j, 0.4482+0.2201j]])
New state:  tensor([[0.2455-0.8309j, 0.3749+0.3298j]])
----------Measure----------
Probability:  tensor([[0.7507, 0.2493]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2419-0.7984j, 0.3559+0.4212j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.2419-0.7984j, 0.3559+0.4212j]])
New state:  tensor([[0.0244-0.8338j, 0.2332+0.4997j]])
----------Measure----------
Probability:  tensor([[0.6959, 0.3041]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4735-0.6809j, 0.5073+0.2343j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.4735-0.6809j, 0.5073+0.2343j]])
New state:  tensor([[0.2787-0.7811j, 0.4282+0.3589j]])
----------Measure----------
Probability:  tensor([[0.6878, 0.3122]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5299-0.2948j, 0.7798+0.1555j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.5299-0.2948j, 0.7798+0.1555j]])
New state:  tensor([[0.4342-0.4233j, 0.7119+0.3543j]])
----------Measure----------
Probability:  tensor([[0.3677, 0.6323]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5187-0.3404j, 0.7634+0.1796j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.5187-0.3404j, 0.7634+0.1796j]])
New state:  tensor([[0.4115-0.4644j, 0.6897+0.3732j]])
----------Measure----------
Probability:  tensor([[0.3850, 0.6150]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3606-0.7152j, 0.4902+0.3437j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.3606-0.7152j, 0.4902+0.3437j]])
New state:  tensor([[0.1608-0.7847j, 0.3831+0.4601j]])
----------Measure----------
Probability:  tensor([[0.6415, 0.3585]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3939-0.7721j, 0.4221+0.2656j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.3939-0.7721j, 0.4221+0.2656j]])
New state:  tensor([[0.1781-0.8483j, 0.3378+0.3669j]])
----------Measure----------
Probability:  tensor([[0.7513, 0.2487]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5325-0.7663j, 0.3520+0.0735j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.5325-0.7663j, 0.3520+0.0735j]])
New state:  tensor([[0.3133-0.8790j, 0.3205+0.1631j]])
----------Measure----------
Probability:  tensor([[0.8707, 0.1293]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5941-0.6255j, 0.4895+0.1272j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.5941-0.6255j, 0.4895+0.1272j]])
New state:  tensor([[0.4097-0.7592j, 0.4391+0.2509j]])
----------Measure----------
Probability:  tensor([[0.7442, 0.2558]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0757-0.3356j, 0.7899+0.5077j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.0757-0.3356j, 0.7899+0.5077j]])
New state:  tensor([[-0.0148-0.3437j,  0.6294+0.6968j]])
----------Measure----------
Probability:  tensor([[0.1184, 0.8816]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4076-0.4893j, 0.7075+0.3065j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.4076-0.4893j, 0.7075+0.3065j]])
New state:  tensor([[0.2652-0.5789j, 0.6026+0.4811j]])
----------Measure----------
Probability:  tensor([[0.4055, 0.5945]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4112-0.6490j, 0.5589+0.3119j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.4112-0.6490j, 0.5589+0.3119j]])
New state:  tensor([[0.2269-0.7340j, 0.4578+0.4474j]])
----------Measure----------
Probability:  tensor([[0.5903, 0.4097]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2882-0.6919j, 0.5003+0.4335j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.2882-0.6919j, 0.5003+0.4335j]])
New state:  tensor([[0.0970-0.7432j, 0.3693+0.5493j]])
----------Measure----------
Probability:  tensor([[0.5618, 0.4382]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3043-0.4124j, 0.7817+0.3553j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.3043-0.4124j, 0.7817+0.3553j]])
New state:  tensor([[0.1857-0.4777j, 0.6614+0.5475j]])
----------Measure----------
Probability:  tensor([[0.2627, 0.7373]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3229-0.5370j, 0.6718+0.3951j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.3229-0.5370j, 0.6718+0.3951j]])
New state:  tensor([[0.1710-0.6028j, 0.5449+0.5572j]])
----------Measure----------
Probability:  tensor([[0.3926, 0.6074]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4213-0.5273j, 0.6724+0.3038j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.4213-0.5273j, 0.6724+0.3038j]])
New state:  tensor([[0.2685-0.6192j, 0.5694+0.4692j]])
----------Measure----------
Probability:  tensor([[0.4556, 0.5444]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0263-0.2704j, 0.8385+0.4724j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.0263-0.2704j, 0.8385+0.4724j]])
New state:  tensor([[-0.0454-0.2679j,  0.6855+0.6755j]])
----------Measure----------
Probability:  tensor([[0.0738, 0.9262]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4792-0.3729j, 0.7650+0.2148j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.4792-0.3729j, 0.7650+0.2148j]])
New state:  tensor([[0.3649-0.4854j, 0.6820+0.4076j]])
----------Measure----------
Probability:  tensor([[0.3687, 0.6313]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5710-0.6190j, 0.5163+0.1558j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.5710-0.6190j, 0.5163+0.1558j]])
New state:  tensor([[0.3890-0.7469j, 0.4575+0.2856j]])
----------Measure----------
Probability:  tensor([[0.7092, 0.2908]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4956-0.4169j, 0.7295+0.2200j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.4956-0.4169j, 0.7295+0.2200j]])
New state:  tensor([[0.3692-0.5322j, 0.6464+0.4033j]])
----------Measure----------
Probability:  tensor([[0.4195, 0.5805]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3431-0.3984j, 0.7893+0.3171j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.3431-0.3984j, 0.7893+0.3171j]])
New state:  tensor([[0.2268-0.4743j, 0.6788+0.5127j]])
----------Measure----------
Probability:  tensor([[0.2764, 0.7236]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6124-0.5964j, 0.5045+0.1213j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.6124-0.5964j, 0.5045+0.1213j]])
New state:  tensor([[0.4349-0.7359j, 0.4552+0.2491j]])
----------Measure----------
Probability:  tensor([[0.7307, 0.2693]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4885+0.j]])
ry_matrix:  tensor([[ 0.9703-0.j, -0.2418-0.j],
        [ 0.2418+0.j,  0.9703-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6750-0.6658j, 0.3161-0.0337j]])
Inside  rz
rz_matrix theta:  tensor([[0.5298+0.j]])
rz_matrix:  tensor([[0.9651-0.2618j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9651+0.2618j]])
Performing matrix multiplication

Current state:  tensor([[0.6750-0.6658j, 0.3161-0.0337j]])
New state:  tensor([[0.4772-0.8193j, 0.3139+0.0502j]])
----------Measure----------
Probability:  tensor([[0.8990, 0.1010]])
valid set accuracy: 1.0
valid set loss: 0.3675505220890045
------------------------------Epoch50------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5701-0.6192j, 0.5172+0.1548j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.5701-0.6192j, 0.5172+0.1548j]])
New state:  tensor([[0.3926-0.7446j, 0.4604+0.2821j]])
----------Measure----------
Probability:  tensor([[0.7085, 0.2915]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2874-0.6926j, 0.5008+0.4323j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.2874-0.6926j, 0.5008+0.4323j]])
New state:  tensor([[0.1004-0.7431j, 0.3734+0.5461j]])
----------Measure----------
Probability:  tensor([[0.5623, 0.4377]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1659-0.7998j, 0.2891+0.4992j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.1659-0.7998j, 0.2891+0.4992j]])
New state:  tensor([[-0.0444-0.8156j,  0.1517+0.5566j]])
----------Measure----------
Probability:  tensor([[0.6672, 0.3328]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4739-0.7146j, 0.4689+0.2119j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.4739-0.7146j, 0.4689+0.2119j]])
New state:  tensor([[0.2751-0.8121j, 0.3990+0.3249j]])
----------Measure----------
Probability:  tensor([[0.7352, 0.2648]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4780-0.3732j, 0.7657+0.2142j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.4780-0.3732j, 0.7657+0.2142j]])
New state:  tensor([[0.3665-0.4832j, 0.6854+0.4031j]])
----------Measure----------
Probability:  tensor([[0.3678, 0.6322]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4932-0.6904j, 0.4881+0.2047j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.4932-0.6904j, 0.4881+0.2047j]])
New state:  tensor([[0.3000-0.7936j, 0.4194+0.3229j]])
----------Measure----------
Probability:  tensor([[0.7199, 0.2801]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6116-0.5966j, 0.5056+0.1203j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.6116-0.5966j, 0.5056+0.1203j]])
New state:  tensor([[0.4385-0.7333j, 0.4579+0.2457j]])
----------Measure----------
Probability:  tensor([[0.7299, 0.2701]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4103-0.6495j, 0.5596+0.3108j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.4103-0.6495j, 0.5596+0.3108j]])
New state:  tensor([[0.2303-0.7329j, 0.4614+0.4438j]])
----------Measure----------
Probability:  tensor([[0.5902, 0.4098]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5933-0.6257j, 0.4905+0.1261j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.5933-0.6257j, 0.4905+0.1261j]])
New state:  tensor([[0.4134-0.7567j, 0.4418+0.2475j]])
----------Measure----------
Probability:  tensor([[0.7435, 0.2565]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3418-0.3989j, 0.7899+0.3164j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.3418-0.3989j, 0.7899+0.3164j]])
New state:  tensor([[0.2283-0.4731j, 0.6826+0.5081j]])
----------Measure----------
Probability:  tensor([[0.2759, 0.7241]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0744-0.3364j, 0.7900+0.5071j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.0744-0.3364j, 0.7900+0.5071j]])
New state:  tensor([[-0.0142-0.3443j,  0.6338+0.6925j]])
----------Measure----------
Probability:  tensor([[0.1187, 0.8813]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4202-0.5278j, 0.6731+0.3029j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.4202-0.5278j, 0.6731+0.3029j]])
New state:  tensor([[0.2710-0.6178j, 0.5731+0.4651j]])
----------Measure----------
Probability:  tensor([[0.4551, 0.5449]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4175-0.4618j, 0.7276+0.2882j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.4175-0.4618j, 0.7276+0.2882j]])
New state:  tensor([[0.2854-0.5533j, 0.6295+0.4649j]])
----------Measure----------
Probability:  tensor([[0.3875, 0.6125]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3932-0.7725j, 0.4227+0.2643j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.3932-0.7725j, 0.4227+0.2643j]])
New state:  tensor([[0.1824-0.8475j, 0.3410+0.3637j]])
----------Measure----------
Probability:  tensor([[0.7514, 0.2486]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5319-0.7664j, 0.3529+0.0722j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.5319-0.7664j, 0.3529+0.0722j]])
New state:  tensor([[0.3179-0.8770j, 0.3226+0.1601j]])
----------Measure----------
Probability:  tensor([[0.8703, 0.1297]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5286-0.2951j, 0.7807+0.1551j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.5286-0.2951j, 0.7807+0.1551j]])
New state:  tensor([[0.4354-0.4206j, 0.7150+0.3498j]])
----------Measure----------
Probability:  tensor([[0.3665, 0.6335]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4537-0.7380j, 0.4490+0.2189j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.4537-0.7380j, 0.4490+0.2189j]])
New state:  tensor([[0.2496-0.8296j, 0.3780+0.3265j]])
----------Measure----------
Probability:  tensor([[0.7505, 0.2495]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6745-0.6658j, 0.3172-0.0348j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.6745-0.6658j, 0.3172-0.0348j]])
New state:  tensor([[0.4816-0.8163j, 0.3155+0.0475j]])
----------Measure----------
Probability:  tensor([[0.8982, 0.1018]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3030-0.4130j, 0.7822+0.3546j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.3030-0.4130j, 0.7822+0.3546j]])
New state:  tensor([[0.1872-0.4768j, 0.6654+0.5430j]])
----------Measure----------
Probability:  tensor([[0.2624, 0.7376]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3218-0.5377j, 0.6723+0.3942j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.3218-0.5377j, 0.6723+0.3942j]])
New state:  tensor([[0.1734-0.6021j, 0.5490+0.5532j]])
----------Measure----------
Probability:  tensor([[0.3926, 0.6074]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4064-0.4898j, 0.7082+0.3057j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.4064-0.4898j, 0.7082+0.3057j]])
New state:  tensor([[0.2674-0.5775j, 0.6063+0.4768j]])
----------Measure----------
Probability:  tensor([[0.4050, 0.5950]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3598-0.7158j, 0.4908+0.3425j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.3598-0.7158j, 0.4908+0.3425j]])
New state:  tensor([[0.1646-0.7840j, 0.3868+0.4568j]])
----------Measure----------
Probability:  tensor([[0.6418, 0.3582]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4726-0.6813j, 0.5080+0.2331j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.4726-0.6813j, 0.5080+0.2331j]])
New state:  tensor([[0.2824-0.7796j, 0.4314+0.3554j]])
----------Measure----------
Probability:  tensor([[0.6875, 0.3125]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4541-0.7052j, 0.4881+0.2413j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.4541-0.7052j, 0.4881+0.2413j]])
New state:  tensor([[0.2584-0.7980j, 0.4101+0.3582j]])
----------Measure----------
Probability:  tensor([[0.7035, 0.2965]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4944-0.4173j, 0.7303+0.2193j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.4944-0.4173j, 0.7303+0.2193j]])
New state:  tensor([[0.3711-0.5300j, 0.6498+0.3989j]])
----------Measure----------
Probability:  tensor([[0.4186, 0.5814]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2413-0.7991j, 0.3563+0.4199j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.2413-0.7991j, 0.3563+0.4199j]])
New state:  tensor([[0.0286-0.8342j, 0.2370+0.4971j]])
----------Measure----------
Probability:  tensor([[0.6967, 0.3033]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6116-0.5966j, 0.5056+0.1203j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.6116-0.5966j, 0.5056+0.1203j]])
New state:  tensor([[0.4385-0.7333j, 0.4579+0.2457j]])
----------Measure----------
Probability:  tensor([[0.7299, 0.2701]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0249-0.2712j, 0.8385+0.4720j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.0249-0.2712j, 0.8385+0.4720j]])
New state:  tensor([[-0.0453-0.2685j,  0.6897+0.6709j]])
----------Measure----------
Probability:  tensor([[0.0742, 0.9258]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4918+0.j]])
ry_matrix:  tensor([[ 0.9699-0.j, -0.2434-0.j],
        [ 0.2434+0.j,  0.9699-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5174-0.3407j, 0.7643+0.1790j]])
Inside  rz
rz_matrix theta:  tensor([[0.5178+0.j]])
rz_matrix:  tensor([[0.9667-0.2560j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9667+0.2560j]])
Performing matrix multiplication

Current state:  tensor([[0.5174-0.3407j, 0.7643+0.1790j]])
New state:  tensor([[0.4130-0.4618j, 0.6930+0.3687j]])
----------Measure----------
Probability:  tensor([[0.3838, 0.6162]])
valid set accuracy: 1.0
valid set loss: 0.3673171103000641
------------------------------Epoch51------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1655-0.8005j, 0.2893+0.4981j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.1655-0.8005j, 0.2893+0.4981j]])
New state:  tensor([[-0.0402-0.8164j,  0.1554+0.5547j]])
----------Measure----------
Probability:  tensor([[0.6681, 0.3319]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4165-0.4621j, 0.7281+0.2876j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.4165-0.4621j, 0.7281+0.2876j]])
New state:  tensor([[0.2876-0.5517j, 0.6329+0.4608j]])
----------Measure----------
Probability:  tensor([[0.3871, 0.6129]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5927-0.6259j, 0.4913+0.1253j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.5927-0.6259j, 0.4913+0.1253j]])
New state:  tensor([[0.4171-0.7543j, 0.4442+0.2443j]])
----------Measure----------
Probability:  tensor([[0.7430, 0.2570]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4193-0.5282j, 0.6737+0.3022j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.4193-0.5282j, 0.6737+0.3022j]])
New state:  tensor([[0.2736-0.6164j, 0.5766+0.4613j]])
----------Measure----------
Probability:  tensor([[0.4548, 0.5452]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3927-0.7729j, 0.4232+0.2633j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.3927-0.7729j, 0.4232+0.2633j]])
New state:  tensor([[0.1866-0.8466j, 0.3438+0.3609j]])
----------Measure----------
Probability:  tensor([[0.7515, 0.2485]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4719-0.6816j, 0.5087+0.2322j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.4719-0.6816j, 0.5087+0.2322j]])
New state:  tensor([[0.2862-0.7781j, 0.4343+0.3522j]])
----------Measure----------
Probability:  tensor([[0.6873, 0.3127]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3020-0.4135j, 0.7826+0.3540j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.3020-0.4135j, 0.7826+0.3540j]])
New state:  tensor([[0.1888-0.4759j, 0.6691+0.5387j]])
----------Measure----------
Probability:  tensor([[0.2622, 0.7378]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5314-0.7665j, 0.3536+0.0712j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.5314-0.7665j, 0.3536+0.0712j]])
New state:  tensor([[0.3225-0.8752j, 0.3245+0.1574j]])
----------Measure----------
Probability:  tensor([[0.8699, 0.1301]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3209-0.5382j, 0.6728+0.3935j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.3209-0.5382j, 0.6728+0.3935j]])
New state:  tensor([[0.1759-0.6014j, 0.5528+0.5494j]])
----------Measure----------
Probability:  tensor([[0.3926, 0.6074]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6741-0.6657j, 0.3181-0.0357j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.6741-0.6657j, 0.3181-0.0357j]])
New state:  tensor([[0.4859-0.8133j, 0.3169+0.0451j]])
----------Measure----------
Probability:  tensor([[0.8975, 0.1025]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4534-0.7055j, 0.4887+0.2404j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.4534-0.7055j, 0.4887+0.2404j]])
New state:  tensor([[0.2623-0.7966j, 0.4130+0.3551j]])
----------Measure----------
Probability:  tensor([[0.7034, 0.2966]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4733-0.7149j, 0.4695+0.2110j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.4733-0.7149j, 0.4695+0.2110j]])
New state:  tensor([[0.2792-0.8106j, 0.4018+0.3218j]])
----------Measure----------
Probability:  tensor([[0.7350, 0.2650]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5164-0.3410j, 0.7650+0.1786j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.5164-0.3410j, 0.7650+0.1786j]])
New state:  tensor([[0.4146-0.4594j, 0.6959+0.3644j]])
----------Measure----------
Probability:  tensor([[0.3830, 0.6170]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2408-0.7996j, 0.3567+0.4188j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.2408-0.7996j, 0.3567+0.4188j]])
New state:  tensor([[0.0329-0.8344j, 0.2404+0.4948j]])
----------Measure----------
Probability:  tensor([[0.6974, 0.3026]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4095-0.6499j, 0.5602+0.3100j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.4095-0.6499j, 0.5602+0.3100j]])
New state:  tensor([[0.2337-0.7318j, 0.4647+0.4404j]])
----------Measure----------
Probability:  tensor([[0.5901, 0.4099]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4054-0.4902j, 0.7087+0.3051j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.4054-0.4902j, 0.7087+0.3051j]])
New state:  tensor([[0.2698-0.5761j, 0.6098+0.4728j]])
----------Measure----------
Probability:  tensor([[0.4047, 0.5953]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4926-0.6906j, 0.4887+0.2038j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.4926-0.6906j, 0.4887+0.2038j]])
New state:  tensor([[0.3039-0.7920j, 0.4221+0.3197j]])
----------Measure----------
Probability:  tensor([[0.7196, 0.2804]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6109-0.5967j, 0.5064+0.1195j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.6109-0.5967j, 0.5064+0.1195j]])
New state:  tensor([[0.4420-0.7307j, 0.4603+0.2425j]])
----------Measure----------
Probability:  tensor([[0.7293, 0.2707]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0238-0.2718j, 0.8385+0.4716j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.0238-0.2718j, 0.8385+0.4716j]])
New state:  tensor([[-0.0450-0.2691j,  0.6937+0.6665j]])
----------Measure----------
Probability:  tensor([[0.0745, 0.9255]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6109-0.5967j, 0.5064+0.1195j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.6109-0.5967j, 0.5064+0.1195j]])
New state:  tensor([[0.4420-0.7307j, 0.4603+0.2425j]])
----------Measure----------
Probability:  tensor([[0.7293, 0.2707]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0734-0.3371j, 0.7901+0.5067j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.0734-0.3371j, 0.7901+0.5067j]])
New state:  tensor([[-0.0134-0.3447j,  0.6380+0.6884j]])
----------Measure----------
Probability:  tensor([[0.1190, 0.8810]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4531-0.7383j, 0.4496+0.2179j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.4531-0.7383j, 0.4496+0.2179j]])
New state:  tensor([[0.2538-0.8283j, 0.3807+0.3235j]])
----------Measure----------
Probability:  tensor([[0.7504, 0.2496]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3407-0.3993j, 0.7903+0.3159j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.3407-0.3993j, 0.7903+0.3159j]])
New state:  tensor([[0.2299-0.4719j, 0.6861+0.5037j]])
----------Measure----------
Probability:  tensor([[0.2756, 0.7244]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5694-0.6194j, 0.5180+0.1540j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.5694-0.6194j, 0.5180+0.1540j]])
New state:  tensor([[0.3962-0.7423j, 0.4629+0.2788j]])
----------Measure----------
Probability:  tensor([[0.7080, 0.2920]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2867-0.6932j, 0.5011+0.4314j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.2867-0.6932j, 0.5011+0.4314j]])
New state:  tensor([[0.1040-0.7429j, 0.3771+0.5432j]])
----------Measure----------
Probability:  tensor([[0.5627, 0.4373]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4769-0.3735j, 0.7664+0.2137j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.4769-0.3735j, 0.7664+0.2137j]])
New state:  tensor([[0.3682-0.4811j, 0.6885+0.3988j]])
----------Measure----------
Probability:  tensor([[0.3670, 0.6330]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4935-0.4176j, 0.7309+0.2187j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.4935-0.4176j, 0.7309+0.2187j]])
New state:  tensor([[0.3732-0.5279j, 0.6529+0.3948j]])
----------Measure----------
Probability:  tensor([[0.4179, 0.5821]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5275-0.2953j, 0.7814+0.1547j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.5275-0.2953j, 0.7814+0.1547j]])
New state:  tensor([[0.4368-0.4180j, 0.7178+0.3454j]])
----------Measure----------
Probability:  tensor([[0.3655, 0.6345]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4945+0.j]])
ry_matrix:  tensor([[ 0.9696-0.j, -0.2447-0.j],
        [ 0.2447+0.j,  0.9696-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3592-0.7162j, 0.4913+0.3416j]])
Inside  rz
rz_matrix theta:  tensor([[0.5062+0.j]])
rz_matrix:  tensor([[0.9681-0.2504j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9681+0.2504j]])
Performing matrix multiplication

Current state:  tensor([[0.3592-0.7162j, 0.4913+0.3416j]])
New state:  tensor([[0.1684-0.7833j, 0.3901+0.4537j]])
----------Measure----------
Probability:  tensor([[0.6420, 0.3580]])
valid set accuracy: 1.0
valid set loss: 0.3671330511569977
------------------------------Epoch52------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6100-0.5969j, 0.5075+0.1184j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.6100-0.5969j, 0.5075+0.1184j]])
New state:  tensor([[0.4452-0.7282j, 0.4630+0.2391j]])
----------Measure----------
Probability:  tensor([[0.7285, 0.2715]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4180-0.5288j, 0.6744+0.3013j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.4180-0.5288j, 0.6744+0.3013j]])
New state:  tensor([[0.2758-0.6151j, 0.5801+0.4573j]])
----------Measure----------
Probability:  tensor([[0.4544, 0.5456]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5308-0.7666j, 0.3545+0.0698j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.5308-0.7666j, 0.3545+0.0698j]])
New state:  tensor([[0.3268-0.8733j, 0.3266+0.1545j]])
----------Measure----------
Probability:  tensor([[0.8694, 0.1306]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5151-0.3413j, 0.7659+0.1780j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.5151-0.3413j, 0.7659+0.1780j]])
New state:  tensor([[0.4158-0.4571j, 0.6989+0.3602j]])
----------Measure----------
Probability:  tensor([[0.3818, 0.6182]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3919-0.7733j, 0.4239+0.2619j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.3919-0.7733j, 0.4239+0.2619j]])
New state:  tensor([[0.1905-0.8458j, 0.3469+0.3578j]])
----------Measure----------
Probability:  tensor([[0.7517, 0.2483]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4526-0.7060j, 0.4895+0.2391j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.4526-0.7060j, 0.4895+0.2391j]])
New state:  tensor([[0.2658-0.7953j, 0.4160+0.3517j]])
----------Measure----------
Probability:  tensor([[0.7032, 0.2968]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0720-0.3380j, 0.7902+0.5061j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.0720-0.3380j, 0.7902+0.5061j]])
New state:  tensor([[-0.0130-0.3453j,  0.6422+0.6842j]])
----------Measure----------
Probability:  tensor([[0.1194, 0.8806]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4085-0.6505j, 0.5609+0.3088j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.4085-0.6505j, 0.5609+0.3088j]])
New state:  tensor([[0.2367-0.7308j, 0.4681+0.4368j]])
----------Measure----------
Probability:  tensor([[0.5900, 0.4100]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1650-0.8014j, 0.2896+0.4967j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.1650-0.8014j, 0.2896+0.4967j]])
New state:  tensor([[-0.0363-0.8174j,  0.1591+0.5525j]])
----------Measure----------
Probability:  tensor([[0.6694, 0.3306]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5685-0.6197j, 0.5190+0.1529j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.5685-0.6197j, 0.5190+0.1529j]])
New state:  tensor([[0.3994-0.7401j, 0.4658+0.2754j]])
----------Measure----------
Probability:  tensor([[0.7072, 0.2928]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0223-0.2727j, 0.8386+0.4711j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.0223-0.2727j, 0.8386+0.4711j]])
New state:  tensor([[-0.0452-0.2698j,  0.6976+0.6622j]])
----------Measure----------
Probability:  tensor([[0.0748, 0.9252]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4710-0.6820j, 0.5095+0.2310j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.4710-0.6820j, 0.5095+0.2310j]])
New state:  tensor([[0.2896-0.7766j, 0.4374+0.3488j]])
----------Measure----------
Probability:  tensor([[0.6870, 0.3130]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5261-0.2956j, 0.7823+0.1541j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.5261-0.2956j, 0.7823+0.1541j]])
New state:  tensor([[0.4377-0.4154j, 0.7208+0.3411j]])
----------Measure----------
Probability:  tensor([[0.3642, 0.6358]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.3006-0.4141j, 0.7832+0.3533j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.3006-0.4141j, 0.7832+0.3533j]])
New state:  tensor([[0.1900-0.4751j, 0.6728+0.5344j]])
----------Measure----------
Probability:  tensor([[0.2618, 0.7382]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3583-0.7168j, 0.4919+0.3403j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.3583-0.7168j, 0.4919+0.3403j]])
New state:  tensor([[0.1718-0.7827j, 0.3936+0.4504j]])
----------Measure----------
Probability:  tensor([[0.6422, 0.3578]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5918-0.6261j, 0.4923+0.1242j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.5918-0.6261j, 0.4923+0.1242j]])
New state:  tensor([[0.4204-0.7520j, 0.4469+0.2410j]])
----------Measure----------
Probability:  tensor([[0.7422, 0.2578]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2401-0.8004j, 0.3571+0.4174j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.2401-0.8004j, 0.3571+0.4174j]])
New state:  tensor([[0.0368-0.8348j, 0.2440+0.4922j]])
----------Measure----------
Probability:  tensor([[0.6983, 0.3017]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3393-0.3999j, 0.7910+0.3152j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.3393-0.3999j, 0.7910+0.3152j]])
New state:  tensor([[0.2310-0.4708j, 0.6896+0.4993j]])
----------Measure----------
Probability:  tensor([[0.2750, 0.7250]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2858-0.6940j, 0.5017+0.4302j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.2858-0.6940j, 0.5017+0.4302j]])
New state:  tensor([[0.1071-0.7429j, 0.3810+0.5400j]])
----------Measure----------
Probability:  tensor([[0.5633, 0.4367]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4917-0.6910j, 0.4896+0.2026j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.4917-0.6910j, 0.4896+0.2026j]])
New state:  tensor([[0.3074-0.7904j, 0.4251+0.3164j]])
----------Measure----------
Probability:  tensor([[0.7192, 0.2808]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6735-0.6656j, 0.3193-0.0369j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.6735-0.6656j, 0.3193-0.0369j]])
New state:  tensor([[0.4899-0.8104j, 0.3186+0.0424j]])
----------Measure----------
Probability:  tensor([[0.8967, 0.1033]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6100-0.5969j, 0.5075+0.1184j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.6100-0.5969j, 0.5075+0.1184j]])
New state:  tensor([[0.4452-0.7282j, 0.4630+0.2391j]])
----------Measure----------
Probability:  tensor([[0.7285, 0.2715]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4042-0.4907j, 0.7094+0.3042j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.4042-0.4907j, 0.7094+0.3042j]])
New state:  tensor([[0.2716-0.5748j, 0.6133+0.4687j]])
----------Measure----------
Probability:  tensor([[0.4042, 0.5958]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4724-0.7152j, 0.4704+0.2097j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.4724-0.7152j, 0.4704+0.2097j]])
New state:  tensor([[0.2828-0.8092j, 0.4047+0.3185j]])
----------Measure----------
Probability:  tensor([[0.7348, 0.2652]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4922-0.4180j, 0.7318+0.2180j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.4922-0.4180j, 0.7318+0.2180j]])
New state:  tensor([[0.3748-0.5258j, 0.6561+0.3906j]])
----------Measure----------
Probability:  tensor([[0.4169, 0.5831]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4756-0.3739j, 0.7672+0.2130j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.4756-0.3739j, 0.7672+0.2130j]])
New state:  tensor([[0.3695-0.4790j, 0.6917+0.3945j]])
----------Measure----------
Probability:  tensor([[0.3660, 0.6340]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4523-0.7387j, 0.4504+0.2166j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.4523-0.7387j, 0.4504+0.2166j]])
New state:  tensor([[0.2576-0.8270j, 0.3836+0.3203j]])
----------Measure----------
Probability:  tensor([[0.7503, 0.2497]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4152-0.4627j, 0.7289+0.2868j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.4152-0.4627j, 0.7289+0.2868j]])
New state:  tensor([[0.2893-0.5503j, 0.6364+0.4566j]])
----------Measure----------
Probability:  tensor([[0.3865, 0.6135]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.4981+0.j]])
ry_matrix:  tensor([[ 0.9692-0.j, -0.2465-0.j],
        [ 0.2465+0.j,  0.9692-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3197-0.5389j, 0.6733+0.3925j]])
Inside  rz
rz_matrix theta:  tensor([[0.4950+0.j]])
rz_matrix:  tensor([[0.9695-0.2450j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9695+0.2450j]])
Performing matrix multiplication

Current state:  tensor([[0.3197-0.5389j, 0.6733+0.3925j]])
New state:  tensor([[0.1779-0.6008j, 0.5567+0.5455j]])
----------Measure----------
Probability:  tensor([[0.3926, 0.6074]])
valid set accuracy: 1.0
valid set loss: 0.36688974499702454
------------------------------Epoch53------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6092-0.5971j, 0.5084+0.1175j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.6092-0.5971j, 0.5084+0.1175j]])
New state:  tensor([[0.4483-0.7258j, 0.4654+0.2360j]])
----------Measure----------
Probability:  tensor([[0.7277, 0.2723]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5250-0.2958j, 0.7831+0.1537j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.5250-0.2958j, 0.7831+0.1537j]])
New state:  tensor([[0.4387-0.4130j, 0.7235+0.3369j]])
----------Measure----------
Probability:  tensor([[0.3631, 0.6369]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5677-0.6199j, 0.5199+0.1519j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.5677-0.6199j, 0.5199+0.1519j]])
New state:  tensor([[0.4026-0.7380j, 0.4683+0.2721j]])
----------Measure----------
Probability:  tensor([[0.7066, 0.2934]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0708-0.3388j, 0.7903+0.5056j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.0708-0.3388j, 0.7903+0.5056j]])
New state:  tensor([[-0.0125-0.3459j,  0.6461+0.6803j]])
----------Measure----------
Probability:  tensor([[0.1198, 0.8802]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4911-0.4183j, 0.7326+0.2173j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.4911-0.4183j, 0.7326+0.2173j]])
New state:  tensor([[0.3765-0.5238j, 0.6591+0.3866j]])
----------Measure----------
Probability:  tensor([[0.4161, 0.5839]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4910-0.6913j, 0.4903+0.2016j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.4910-0.6913j, 0.4903+0.2016j]])
New state:  tensor([[0.3109-0.7888j, 0.4277+0.3132j]])
----------Measure----------
Probability:  tensor([[0.7189, 0.2811]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2850-0.6946j, 0.5021+0.4291j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.2850-0.6946j, 0.5021+0.4291j]])
New state:  tensor([[0.1102-0.7427j, 0.3846+0.5370j]])
----------Measure----------
Probability:  tensor([[0.5638, 0.4362]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6730-0.6656j, 0.3203-0.0379j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.6730-0.6656j, 0.3203-0.0379j]])
New state:  tensor([[0.4938-0.8075j, 0.3200+0.0400j]])
----------Measure----------
Probability:  tensor([[0.8960, 0.1040]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4717-0.7156j, 0.4711+0.2086j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.4717-0.7156j, 0.4711+0.2086j]])
New state:  tensor([[0.2864-0.8078j, 0.4074+0.3155j]])
----------Measure----------
Probability:  tensor([[0.7345, 0.2655]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5911-0.6263j, 0.4932+0.1233j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.5911-0.6263j, 0.4932+0.1233j]])
New state:  tensor([[0.4237-0.7497j, 0.4493+0.2379j]])
----------Measure----------
Probability:  tensor([[0.7416, 0.2584]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4031-0.4912j, 0.7101+0.3034j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.4031-0.4912j, 0.7101+0.3034j]])
New state:  tensor([[0.2736-0.5735j, 0.6166+0.4648j]])
----------Measure----------
Probability:  tensor([[0.4038, 0.5962]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6092-0.5971j, 0.5084+0.1175j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.6092-0.5971j, 0.5084+0.1175j]])
New state:  tensor([[0.4483-0.7258j, 0.4654+0.2360j]])
----------Measure----------
Probability:  tensor([[0.7277, 0.2723]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4141-0.4631j, 0.7295+0.2861j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.4141-0.4631j, 0.7295+0.2861j]])
New state:  tensor([[0.2911-0.5489j, 0.6397+0.4526j]])
----------Measure----------
Probability:  tensor([[0.3860, 0.6140]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3576-0.7173j, 0.4925+0.3392j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.3576-0.7173j, 0.4925+0.3392j]])
New state:  tensor([[0.1752-0.7821j, 0.3968+0.4474j]])
----------Measure----------
Probability:  tensor([[0.6424, 0.3576]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4170-0.5292j, 0.6751+0.3005j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.4170-0.5292j, 0.6751+0.3005j]])
New state:  tensor([[0.2780-0.6138j, 0.5834+0.4535j]])
----------Measure----------
Probability:  tensor([[0.4540, 0.5460]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5139-0.3415j, 0.7667+0.1775j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.5139-0.3415j, 0.7667+0.1775j]])
New state:  tensor([[0.4170-0.4548j, 0.7018+0.3561j]])
----------Measure----------
Probability:  tensor([[0.3808, 0.6192]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2396-0.8010j, 0.3575+0.4162j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.2396-0.8010j, 0.3575+0.4162j]])
New state:  tensor([[0.0406-0.8351j, 0.2473+0.4897j]])
----------Measure----------
Probability:  tensor([[0.6990, 0.3010]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4516-0.7390j, 0.4510+0.2155j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.4516-0.7390j, 0.4510+0.2155j]])
New state:  tensor([[0.2613-0.8257j, 0.3862+0.3173j]])
----------Measure----------
Probability:  tensor([[0.7501, 0.2499]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4077-0.6510j, 0.5615+0.3078j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.4077-0.6510j, 0.5615+0.3078j]])
New state:  tensor([[0.2397-0.7297j, 0.4713+0.4335j]])
----------Measure----------
Probability:  tensor([[0.5900, 0.4100]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0211-0.2734j, 0.8386+0.4707j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.0211-0.2734j, 0.8386+0.4707j]])
New state:  tensor([[-0.0451-0.2705j,  0.7013+0.6580j]])
----------Measure----------
Probability:  tensor([[0.0752, 0.9248]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4518-0.7063j, 0.4902+0.2380j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.4518-0.7063j, 0.4902+0.2380j]])
New state:  tensor([[0.2693-0.7940j, 0.4189+0.3486j]])
----------Measure----------
Probability:  tensor([[0.7030, 0.2970]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4744-0.3742j, 0.7679+0.2125j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.4744-0.3742j, 0.7679+0.2125j]])
New state:  tensor([[0.3709-0.4770j, 0.6946+0.3904j]])
----------Measure----------
Probability:  tensor([[0.3651, 0.6349]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2994-0.4146j, 0.7836+0.3527j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.2994-0.4146j, 0.7836+0.3527j]])
New state:  tensor([[0.1913-0.4743j, 0.6762+0.5302j]])
----------Measure----------
Probability:  tensor([[0.2616, 0.7384]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4703-0.6824j, 0.5102+0.2300j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.4703-0.6824j, 0.5102+0.2300j]])
New state:  tensor([[0.2930-0.7752j, 0.4402+0.3456j]])
----------Measure----------
Probability:  tensor([[0.6868, 0.3132]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5302-0.7667j, 0.3553+0.0687j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.5302-0.7667j, 0.3553+0.0687j]])
New state:  tensor([[0.3310-0.8715j, 0.3285+0.1518j]])
----------Measure----------
Probability:  tensor([[0.8690, 0.1310]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3381-0.4004j, 0.7915+0.3146j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.3381-0.4004j, 0.7915+0.3146j]])
New state:  tensor([[0.2323-0.4697j, 0.6930+0.4952j]])
----------Measure----------
Probability:  tensor([[0.2746, 0.7254]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3913-0.7737j, 0.4245+0.2608j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.3913-0.7737j, 0.4245+0.2608j]])
New state:  tensor([[0.1944-0.8450j, 0.3496+0.3549j]])
----------Measure----------
Probability:  tensor([[0.7518, 0.2482]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1646-0.8021j, 0.2899+0.4955j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.1646-0.8021j, 0.2899+0.4955j]])
New state:  tensor([[-0.0325-0.8182j,  0.1626+0.5506j]])
----------Measure----------
Probability:  tensor([[0.6704, 0.3296]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5011+0.j]])
ry_matrix:  tensor([[ 0.9688-0.j, -0.2479-0.j],
        [ 0.2479+0.j,  0.9688-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3186-0.5395j, 0.6738+0.3917j]])
Inside  rz
rz_matrix theta:  tensor([[0.4842+0.j]])
rz_matrix:  tensor([[0.9708-0.2397j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9708+0.2397j]])
Performing matrix multiplication

Current state:  tensor([[0.3186-0.5395j, 0.6738+0.3917j]])
New state:  tensor([[0.1800-0.6001j, 0.5603+0.5418j]])
----------Measure----------
Probability:  tensor([[0.3926, 0.6074]])
valid set accuracy: 1.0
valid set loss: 0.3666888475418091
------------------------------Epoch54------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4902-0.6916j, 0.4911+0.2005j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.4902-0.6916j, 0.4911+0.2005j]])
New state:  tensor([[0.3142-0.7873j, 0.4304+0.3101j]])
----------Measure----------
Probability:  tensor([[0.7186, 0.2814]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4695-0.6827j, 0.5110+0.2289j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.4695-0.6827j, 0.5110+0.2289j]])
New state:  tensor([[0.2962-0.7738j, 0.4430+0.3424j]])
----------Measure----------
Probability:  tensor([[0.6865, 0.3135]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2982-0.4152j, 0.7841+0.3520j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.2982-0.4152j, 0.7841+0.3520j]])
New state:  tensor([[0.1924-0.4736j, 0.6796+0.5262j]])
----------Measure----------
Probability:  tensor([[0.2613, 0.7387]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2843-0.6953j, 0.5025+0.4280j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.2843-0.6953j, 0.5025+0.4280j]])
New state:  tensor([[0.1132-0.7426j, 0.3880+0.5340j]])
----------Measure----------
Probability:  tensor([[0.5642, 0.4358]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4899-0.4186j, 0.7333+0.2167j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.4899-0.4186j, 0.7333+0.2167j]])
New state:  tensor([[0.3780-0.5219j, 0.6620+0.3827j]])
----------Measure----------
Probability:  tensor([[0.4153, 0.5847]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4710-0.7159j, 0.4718+0.2075j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.4710-0.7159j, 0.4718+0.2075j]])
New state:  tensor([[0.2898-0.8064j, 0.4100+0.3124j]])
----------Measure----------
Probability:  tensor([[0.7343, 0.2657]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3176-0.5401j, 0.6743+0.3908j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.3176-0.5401j, 0.6743+0.3908j]])
New state:  tensor([[0.1820-0.5995j, 0.5638+0.5382j]])
----------Measure----------
Probability:  tensor([[0.3926, 0.6074]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6084-0.5973j, 0.5093+0.1166j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.6084-0.5973j, 0.5093+0.1166j]])
New state:  tensor([[0.4513-0.7234j, 0.4678+0.2329j]])
----------Measure----------
Probability:  tensor([[0.7270, 0.2730]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4130-0.4635j, 0.7302+0.2854j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.4130-0.4635j, 0.7302+0.2854j]])
New state:  tensor([[0.2927-0.5475j, 0.6428+0.4487j]])
----------Measure----------
Probability:  tensor([[0.3854, 0.6146]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2391-0.8016j, 0.3578+0.4149j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.2391-0.8016j, 0.3578+0.4149j]])
New state:  tensor([[0.0443-0.8354j, 0.2505+0.4873j]])
----------Measure----------
Probability:  tensor([[0.6998, 0.3002]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4509-0.7394j, 0.4518+0.2143j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.4509-0.7394j, 0.4518+0.2143j]])
New state:  tensor([[0.2648-0.8245j, 0.3888+0.3143j]])
----------Measure----------
Probability:  tensor([[0.7500, 0.2500]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3568-0.7179j, 0.4930+0.3381j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.3568-0.7179j, 0.4930+0.3381j]])
New state:  tensor([[0.1784-0.7815j, 0.3999+0.4444j]])
----------Measure----------
Probability:  tensor([[0.6426, 0.3574]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1641-0.8029j, 0.2901+0.4943j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.1641-0.8029j, 0.2901+0.4943j]])
New state:  tensor([[-0.0289-0.8190j,  0.1660+0.5485j]])
----------Measure----------
Probability:  tensor([[0.6715, 0.3285]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5237-0.2960j, 0.7840+0.1532j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.5237-0.2960j, 0.7840+0.1532j]])
New state:  tensor([[0.4396-0.4107j, 0.7261+0.3329j]])
----------Measure----------
Probability:  tensor([[0.3619, 0.6381]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3906-0.7741j, 0.4251+0.2596j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.3906-0.7741j, 0.4251+0.2596j]])
New state:  tensor([[0.1981-0.8442j, 0.3524+0.3521j]])
----------Measure----------
Probability:  tensor([[0.7519, 0.2481]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4020-0.4917j, 0.7107+0.3027j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.4020-0.4917j, 0.7107+0.3027j]])
New state:  tensor([[0.2754-0.5723j, 0.6198+0.4610j]])
----------Measure----------
Probability:  tensor([[0.4033, 0.5967]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4511-0.7067j, 0.4909+0.2369j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.4511-0.7067j, 0.4909+0.2369j]])
New state:  tensor([[0.2726-0.7928j, 0.4216+0.3455j]])
----------Measure----------
Probability:  tensor([[0.7029, 0.2971]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0198-0.2741j, 0.8386+0.4703j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.0198-0.2741j, 0.8386+0.4703j]])
New state:  tensor([[-0.0451-0.2711j,  0.7049+0.6539j]])
----------Measure----------
Probability:  tensor([[0.0755, 0.9245]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4732-0.3746j, 0.7687+0.2119j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.4732-0.3746j, 0.7687+0.2119j]])
New state:  tensor([[0.3721-0.4751j, 0.6975+0.3863j]])
----------Measure----------
Probability:  tensor([[0.3642, 0.6358]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5903-0.6265j, 0.4941+0.1223j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.5903-0.6265j, 0.4941+0.1223j]])
New state:  tensor([[0.4268-0.7475j, 0.4516+0.2348j]])
----------Measure----------
Probability:  tensor([[0.7409, 0.2591]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5297-0.7668j, 0.3561+0.0675j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.5297-0.7668j, 0.3561+0.0675j]])
New state:  tensor([[0.3350-0.8697j, 0.3304+0.1491j]])
----------Measure----------
Probability:  tensor([[0.8686, 0.1314]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5127-0.3418j, 0.7675+0.1769j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.5127-0.3418j, 0.7675+0.1769j]])
New state:  tensor([[0.4182-0.4526j, 0.7045+0.3521j]])
----------Measure----------
Probability:  tensor([[0.3797, 0.6203]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6725-0.6655j, 0.3214-0.0389j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.6725-0.6655j, 0.3214-0.0389j]])
New state:  tensor([[0.4976-0.8048j, 0.3215+0.0376j]])
----------Measure----------
Probability:  tensor([[0.8952, 0.1048]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4068-0.6514j, 0.5621+0.3068j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.4068-0.6514j, 0.5621+0.3068j]])
New state:  tensor([[0.2426-0.7287j, 0.4744+0.4302j]])
----------Measure----------
Probability:  tensor([[0.5899, 0.4101]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5669-0.6202j, 0.5208+0.1510j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.5669-0.6202j, 0.5208+0.1510j]])
New state:  tensor([[0.4056-0.7359j, 0.4708+0.2690j]])
----------Measure----------
Probability:  tensor([[0.7060, 0.2940]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3369-0.4009j, 0.7920+0.3140j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.3369-0.4009j, 0.7920+0.3140j]])
New state:  tensor([[0.2334-0.4687j, 0.6962+0.4910j]])
----------Measure----------
Probability:  tensor([[0.2742, 0.7258]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0695-0.3396j, 0.7904+0.5050j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.0695-0.3396j, 0.7904+0.5050j]])
New state:  tensor([[-0.0121-0.3464j,  0.6499+0.6764j]])
----------Measure----------
Probability:  tensor([[0.1201, 0.8799]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6084-0.5973j, 0.5093+0.1166j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.6084-0.5973j, 0.5093+0.1166j]])
New state:  tensor([[0.4513-0.7234j, 0.4678+0.2329j]])
----------Measure----------
Probability:  tensor([[0.7270, 0.2730]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5042+0.j]])
ry_matrix:  tensor([[ 0.9684-0.j, -0.2494-0.j],
        [ 0.2494+0.j,  0.9684-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4160-0.5297j, 0.6757+0.2996j]])
Inside  rz
rz_matrix theta:  tensor([[0.4737+0.j]])
rz_matrix:  tensor([[0.9721-0.2347j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9721+0.2347j]])
Performing matrix multiplication

Current state:  tensor([[0.4160-0.5297j, 0.6757+0.2996j]])
New state:  tensor([[0.2801-0.6125j, 0.5865+0.4498j]])
----------Measure----------
Probability:  tensor([[0.4536, 0.5464]])
valid set accuracy: 1.0
valid set loss: 0.36648380756378174
------------------------------Epoch55------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6722-0.6655j, 0.3220-0.0396j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.6722-0.6655j, 0.3220-0.0396j]])
New state:  tensor([[0.5013-0.8021j, 0.3225+0.0355j]])
----------Measure----------
Probability:  tensor([[0.8948, 0.1052]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4690-0.6829j, 0.5114+0.2282j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.4690-0.6829j, 0.5114+0.2282j]])
New state:  tensor([[0.2995-0.7724j, 0.4453+0.3396j]])
----------Measure----------
Probability:  tensor([[0.6864, 0.3136]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5293-0.7669j, 0.3566+0.0667j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.5293-0.7669j, 0.3566+0.0667j]])
New state:  tensor([[0.3390-0.8680j, 0.3318+0.1469j]])
----------Measure----------
Probability:  tensor([[0.8684, 0.1316]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3902-0.7744j, 0.4255+0.2588j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.3902-0.7744j, 0.4255+0.2588j]])
New state:  tensor([[0.2018-0.8433j, 0.3547+0.3497j]])
----------Measure----------
Probability:  tensor([[0.7520, 0.2480]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1638-0.8033j, 0.2903+0.4935j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.1638-0.8033j, 0.2903+0.4935j]])
New state:  tensor([[-0.0251-0.8195j,  0.1691+0.5470j]])
----------Measure----------
Probability:  tensor([[0.6722, 0.3278]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4153-0.5300j, 0.6761+0.2991j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.4153-0.5300j, 0.6761+0.2991j]])
New state:  tensor([[0.2824-0.6112j, 0.5893+0.4465j]])
----------Measure----------
Probability:  tensor([[0.4534, 0.5466]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2974-0.4155j, 0.7844+0.3516j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.2974-0.4155j, 0.7844+0.3516j]])
New state:  tensor([[0.1940-0.4728j, 0.6826+0.5224j]])
----------Measure----------
Probability:  tensor([[0.2611, 0.7389]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4505-0.7396j, 0.4522+0.2136j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.4505-0.7396j, 0.4522+0.2136j]])
New state:  tensor([[0.2685-0.8233j, 0.3910+0.3118j]])
----------Measure----------
Probability:  tensor([[0.7499, 0.2501]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5230-0.2962j, 0.7845+0.1529j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.5230-0.2962j, 0.7845+0.1529j]])
New state:  tensor([[0.4409-0.4084j, 0.7283+0.3291j]])
----------Measure----------
Probability:  tensor([[0.3612, 0.6388]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6080-0.5974j, 0.5099+0.1160j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.6080-0.5974j, 0.5099+0.1160j]])
New state:  tensor([[0.4544-0.7211j, 0.4696+0.2301j]])
----------Measure----------
Probability:  tensor([[0.7265, 0.2735]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4705-0.7161j, 0.4723+0.2068j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.4705-0.7161j, 0.4723+0.2068j]])
New state:  tensor([[0.2934-0.8050j, 0.4121+0.3098j]])
----------Measure----------
Probability:  tensor([[0.7342, 0.2658]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4013-0.4919j, 0.7111+0.3022j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.4013-0.4919j, 0.7111+0.3022j]])
New state:  tensor([[0.2775-0.5710j, 0.6226+0.4575j]])
----------Measure----------
Probability:  tensor([[0.4031, 0.5969]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3563-0.7182j, 0.4934+0.3374j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.3563-0.7182j, 0.4934+0.3374j]])
New state:  tensor([[0.1818-0.7808j, 0.4026+0.4418j]])
----------Measure----------
Probability:  tensor([[0.6427, 0.3573]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3361-0.4012j, 0.7923+0.3136j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.3361-0.4012j, 0.7923+0.3136j]])
New state:  tensor([[0.2350-0.4677j, 0.6991+0.4872j]])
----------Measure----------
Probability:  tensor([[0.2739, 0.7261]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2387-0.8020j, 0.3581+0.4142j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.2387-0.8020j, 0.3581+0.4142j]])
New state:  tensor([[0.0480-0.8354j, 0.2533+0.4854j]])
----------Measure----------
Probability:  tensor([[0.7003, 0.2997]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4725-0.3748j, 0.7691+0.2115j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.4725-0.3748j, 0.7691+0.2115j]])
New state:  tensor([[0.3737-0.4733j, 0.7000+0.3826j]])
----------Measure----------
Probability:  tensor([[0.3637, 0.6363]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4506-0.7069j, 0.4913+0.2363j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.4506-0.7069j, 0.4913+0.2363j]])
New state:  tensor([[0.2761-0.7915j, 0.4239+0.3428j]])
----------Measure----------
Probability:  tensor([[0.7028, 0.2972]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0190-0.2746j, 0.8387+0.4700j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.0190-0.2746j, 0.8387+0.4700j]])
New state:  tensor([[-0.0446-0.2716j,  0.7082+0.6501j]])
----------Measure----------
Probability:  tensor([[0.0757, 0.9243]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4892-0.4189j, 0.7338+0.2163j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.4892-0.4189j, 0.7338+0.2163j]])
New state:  tensor([[0.3799-0.5201j, 0.6645+0.3791j]])
----------Measure----------
Probability:  tensor([[0.4148, 0.5852]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5898-0.6266j, 0.4947+0.1217j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.5898-0.6266j, 0.4947+0.1217j]])
New state:  tensor([[0.4301-0.7453j, 0.4535+0.2321j]])
----------Measure----------
Probability:  tensor([[0.7405, 0.2595]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4897-0.6918j, 0.4916+0.1998j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.4897-0.6918j, 0.4916+0.1998j]])
New state:  tensor([[0.3177-0.7858j, 0.4325+0.3074j]])
----------Measure----------
Probability:  tensor([[0.7184, 0.2816]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2838-0.6957j, 0.5028+0.4274j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.2838-0.6957j, 0.5028+0.4274j]])
New state:  tensor([[0.1163-0.7423j, 0.3911+0.5315j]])
----------Measure----------
Probability:  tensor([[0.5645, 0.4355]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5120-0.3420j, 0.7679+0.1766j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.5120-0.3420j, 0.7679+0.1766j]])
New state:  tensor([[0.4197-0.4505j, 0.7068+0.3483j]])
----------Measure----------
Probability:  tensor([[0.3791, 0.6209]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6080-0.5974j, 0.5099+0.1160j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.6080-0.5974j, 0.5099+0.1160j]])
New state:  tensor([[0.4544-0.7211j, 0.4696+0.2301j]])
----------Measure----------
Probability:  tensor([[0.7265, 0.2735]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4123-0.4638j, 0.7305+0.2849j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.4123-0.4638j, 0.7305+0.2849j]])
New state:  tensor([[0.2947-0.5461j, 0.6455+0.4452j]])
----------Measure----------
Probability:  tensor([[0.3851, 0.6149]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3169-0.5405j, 0.6746+0.3903j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.3169-0.5405j, 0.6746+0.3903j]])
New state:  tensor([[0.1843-0.5988j, 0.5669+0.5349j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0688-0.3400j, 0.7905+0.5047j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.0688-0.3400j, 0.7905+0.5047j]])
New state:  tensor([[-0.0112-0.3468j,  0.6534+0.6728j]])
----------Measure----------
Probability:  tensor([[0.1204, 0.8796]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4063-0.6517j, 0.5625+0.3062j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.4063-0.6517j, 0.5625+0.3062j]])
New state:  tensor([[0.2456-0.7276j, 0.4771+0.4273j]])
----------Measure----------
Probability:  tensor([[0.5898, 0.4102]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5061+0.j]])
ry_matrix:  tensor([[ 0.9682-0.j, -0.2504-0.j],
        [ 0.2504+0.j,  0.9682-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5664-0.6203j, 0.5213+0.1504j]])
Inside  rz
rz_matrix theta:  tensor([[0.4637+0.j]])
rz_matrix:  tensor([[0.9732-0.2298j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9732+0.2298j]])
Performing matrix multiplication

Current state:  tensor([[0.5664-0.6203j, 0.5213+0.1504j]])
New state:  tensor([[0.4087-0.7339j, 0.4728+0.2661j]])
----------Measure----------
Probability:  tensor([[0.7056, 0.2944]])
valid set accuracy: 1.0
valid set loss: 0.3663598895072937
------------------------------Epoch56------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4112-0.4643j, 0.7312+0.2842j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.4112-0.4643j, 0.7312+0.2842j]])
New state:  tensor([[0.2961-0.5449j, 0.6485+0.4415j]])
----------Measure----------
Probability:  tensor([[0.3846, 0.6154]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.4002-0.4924j, 0.7117+0.3014j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.4002-0.4924j, 0.7117+0.3014j]])
New state:  tensor([[0.2791-0.5699j, 0.6256+0.4539j]])
----------Measure----------
Probability:  tensor([[0.4026, 0.5974]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4698-0.7164j, 0.4730+0.2057j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.4698-0.7164j, 0.4730+0.2057j]])
New state:  tensor([[0.2965-0.8038j, 0.4146+0.3069j]])
----------Measure----------
Probability:  tensor([[0.7339, 0.2661]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3349-0.4017j, 0.7928+0.3129j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.3349-0.4017j, 0.7928+0.3129j]])
New state:  tensor([[0.2359-0.4667j, 0.7021+0.4834j]])
----------Measure----------
Probability:  tensor([[0.2735, 0.7265]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6072-0.5976j, 0.5109+0.1151j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.6072-0.5976j, 0.5109+0.1151j]])
New state:  tensor([[0.4571-0.7189j, 0.4719+0.2271j]])
----------Measure----------
Probability:  tensor([[0.7258, 0.2742]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2962-0.4161j, 0.7848+0.3510j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.2962-0.4161j, 0.7848+0.3510j]])
New state:  tensor([[0.1949-0.4721j, 0.6857+0.5186j]])
----------Measure----------
Probability:  tensor([[0.2609, 0.7391]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4054-0.6522j, 0.5632+0.3052j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.4054-0.6522j, 0.5632+0.3052j]])
New state:  tensor([[0.2482-0.7267j, 0.4800+0.4241j]])
----------Measure----------
Probability:  tensor([[0.5897, 0.4103]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5288-0.7670j, 0.3575+0.0655j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.5288-0.7670j, 0.3575+0.0655j]])
New state:  tensor([[0.3426-0.8663j, 0.3336+0.1443j]])
----------Measure----------
Probability:  tensor([[0.8679, 0.1321]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4890-0.6921j, 0.4923+0.1987j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.4890-0.6921j, 0.4923+0.1987j]])
New state:  tensor([[0.3206-0.7844j, 0.4350+0.3044j]])
----------Measure----------
Probability:  tensor([[0.7181, 0.2819]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5656-0.6206j, 0.5222+0.1494j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.5656-0.6206j, 0.5222+0.1494j]])
New state:  tensor([[0.4114-0.7319j, 0.4752+0.2631j]])
----------Measure----------
Probability:  tensor([[0.7050, 0.2950]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0675-0.3408j, 0.7906+0.5042j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.0675-0.3408j, 0.7906+0.5042j]])
New state:  tensor([[-0.0109-0.3473j,  0.6569+0.6692j]])
----------Measure----------
Probability:  tensor([[0.1207, 0.8793]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4498-0.7073j, 0.4921+0.2351j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.4498-0.7073j, 0.4921+0.2351j]])
New state:  tensor([[0.2791-0.7904j, 0.4265+0.3399j]])
----------Measure----------
Probability:  tensor([[0.7026, 0.2974]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5108-0.3423j, 0.7687+0.1761j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.5108-0.3423j, 0.7687+0.1761j]])
New state:  tensor([[0.4206-0.4484j, 0.7094+0.3446j]])
----------Measure----------
Probability:  tensor([[0.3780, 0.6220]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3895-0.7748j, 0.4261+0.2576j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.3895-0.7748j, 0.4261+0.2576j]])
New state:  tensor([[0.2052-0.8426j, 0.3572+0.3469j]])
----------Measure----------
Probability:  tensor([[0.7521, 0.2479]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1634-0.8041j, 0.2905+0.4922j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.1634-0.8041j, 0.2905+0.4922j]])
New state:  tensor([[-0.0218-0.8203j,  0.1723+0.5450j]])
----------Measure----------
Probability:  tensor([[0.6733, 0.3267]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5890-0.6268j, 0.4956+0.1207j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.5890-0.6268j, 0.4956+0.1207j]])
New state:  tensor([[0.4329-0.7433j, 0.4557+0.2291j]])
----------Measure----------
Probability:  tensor([[0.7398, 0.2602]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2830-0.6964j, 0.5032+0.4263j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.2830-0.6964j, 0.5032+0.4263j]])
New state:  tensor([[0.1190-0.7422j, 0.3944+0.5286j]])
----------Measure----------
Probability:  tensor([[0.5650, 0.4350]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4143-0.5305j, 0.6768+0.2983j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.4143-0.5305j, 0.6768+0.2983j]])
New state:  tensor([[0.2843-0.6101j, 0.5923+0.4429j]])
----------Measure----------
Probability:  tensor([[0.4530, 0.5470]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3555-0.7187j, 0.4939+0.3363j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.3555-0.7187j, 0.4939+0.3363j]])
New state:  tensor([[0.1847-0.7803j, 0.4056+0.4388j]])
----------Measure----------
Probability:  tensor([[0.6429, 0.3571]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6717-0.6654j, 0.3231-0.0406j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.6717-0.6654j, 0.3231-0.0406j]])
New state:  tensor([[0.5047-0.7995j, 0.3239+0.0331j]])
----------Measure----------
Probability:  tensor([[0.8940, 0.1060]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4881-0.4192j, 0.7346+0.2156j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.4881-0.4192j, 0.7346+0.2156j]])
New state:  tensor([[0.3812-0.5183j, 0.6672+0.3754j]])
----------Measure----------
Probability:  tensor([[0.4139, 0.5861]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6072-0.5976j, 0.5109+0.1151j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.6072-0.5976j, 0.5109+0.1151j]])
New state:  tensor([[0.4571-0.7189j, 0.4719+0.2271j]])
----------Measure----------
Probability:  tensor([[0.7258, 0.2742]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4682-0.6833j, 0.5121+0.2272j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.4682-0.6833j, 0.5121+0.2272j]])
New state:  tensor([[0.3024-0.7711j, 0.4479+0.3366j]])
----------Measure----------
Probability:  tensor([[0.6861, 0.3139]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5218-0.2964j, 0.7853+0.1525j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.5218-0.2964j, 0.7853+0.1525j]])
New state:  tensor([[0.4417-0.4062j, 0.7308+0.3253j]])
----------Measure----------
Probability:  tensor([[0.3601, 0.6399]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2381-0.8027j, 0.3584+0.4129j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.2381-0.8027j, 0.3584+0.4129j]])
New state:  tensor([[0.0514-0.8357j, 0.2563+0.4830j]])
----------Measure----------
Probability:  tensor([[0.7010, 0.2990]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4713-0.3751j, 0.7699+0.2109j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.4713-0.3751j, 0.7699+0.2109j]])
New state:  tensor([[0.3748-0.4715j, 0.7027+0.3788j]])
----------Measure----------
Probability:  tensor([[0.3628, 0.6372]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0176-0.2753j, 0.8387+0.4696j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.0176-0.2753j, 0.8387+0.4696j]])
New state:  tensor([[-0.0448-0.2722j,  0.7115+0.6463j]])
----------Measure----------
Probability:  tensor([[0.0761, 0.9239]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3159-0.5411j, 0.6751+0.3895j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.3159-0.5411j, 0.6751+0.3895j]])
New state:  tensor([[0.1860-0.5983j, 0.5701+0.5314j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5093+0.j]])
ry_matrix:  tensor([[ 0.9678-0.j, -0.2519-0.j],
        [ 0.2519+0.j,  0.9678-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4498-0.7399j, 0.4529+0.2124j]])
Inside  rz
rz_matrix theta:  tensor([[0.4540+0.j]])
rz_matrix:  tensor([[0.9743-0.2251j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9743+0.2251j]])
Performing matrix multiplication

Current state:  tensor([[0.4498-0.7399j, 0.4529+0.2124j]])
New state:  tensor([[0.2717-0.8221j, 0.3935+0.3089j]])
----------Measure----------
Probability:  tensor([[0.7498, 0.2502]])
valid set accuracy: 1.0
valid set loss: 0.36615797877311707
------------------------------Epoch57------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4494-0.7401j, 0.4532+0.2119j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.4494-0.7401j, 0.4532+0.2119j]])
New state:  tensor([[0.2752-0.8210j, 0.3953+0.3066j]])
----------Measure----------
Probability:  tensor([[0.7497, 0.2503]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3154-0.5414j, 0.6753+0.3891j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.3154-0.5414j, 0.6753+0.3891j]])
New state:  tensor([[0.1883-0.5976j, 0.5729+0.5284j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4707-0.3752j, 0.7702+0.2106j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.4707-0.3752j, 0.7702+0.2106j]])
New state:  tensor([[0.3764-0.4698j, 0.7048+0.3753j]])
----------Measure----------
Probability:  tensor([[0.3624, 0.6376]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4678-0.6835j, 0.5125+0.2267j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.4678-0.6835j, 0.5125+0.2267j]])
New state:  tensor([[0.3056-0.7698j, 0.4499+0.3341j]])
----------Measure----------
Probability:  tensor([[0.6860, 0.3140]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4050-0.6524j, 0.5635+0.3047j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.4050-0.6524j, 0.5635+0.3047j]])
New state:  tensor([[0.2511-0.7257j, 0.4824+0.4215j]])
----------Measure----------
Probability:  tensor([[0.5897, 0.4103]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6068-0.5977j, 0.5113+0.1146j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.6068-0.5977j, 0.5113+0.1146j]])
New state:  tensor([[0.4600-0.7168j, 0.4734+0.2246j]])
----------Measure----------
Probability:  tensor([[0.7254, 0.2746]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3343-0.4019j, 0.7931+0.3127j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.3343-0.4019j, 0.7931+0.3127j]])
New state:  tensor([[0.2374-0.4657j, 0.7046+0.4798j]])
----------Measure----------
Probability:  tensor([[0.2733, 0.7267]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1632-0.8045j, 0.2907+0.4916j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.1632-0.8045j, 0.2907+0.4916j]])
New state:  tensor([[-0.0182-0.8207j,  0.1751+0.5436j]])
----------Measure----------
Probability:  tensor([[0.6738, 0.3262]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2826-0.6967j, 0.5034+0.4258j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.2826-0.6967j, 0.5034+0.4258j]])
New state:  tensor([[0.1220-0.7419j, 0.3972+0.5263j]])
----------Measure----------
Probability:  tensor([[0.5653, 0.4347]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4106-0.4645j, 0.7315+0.2839j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.4106-0.4645j, 0.7315+0.2839j]])
New state:  tensor([[0.2981-0.5436j, 0.6509+0.4382j]])
----------Measure----------
Probability:  tensor([[0.3843, 0.6157]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2956-0.4163j, 0.7851+0.3507j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.2956-0.4163j, 0.7851+0.3507j]])
New state:  tensor([[0.1965-0.4713j, 0.6884+0.5151j]])
----------Measure----------
Probability:  tensor([[0.2607, 0.7393]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5652-0.6207j, 0.5226+0.1489j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.5652-0.6207j, 0.5226+0.1489j]])
New state:  tensor([[0.4144-0.7300j, 0.4769+0.2605j]])
----------Measure----------
Probability:  tensor([[0.7047, 0.2953]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4495-0.7075j, 0.4924+0.2346j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.4495-0.7075j, 0.4924+0.2346j]])
New state:  tensor([[0.2824-0.7892j, 0.4285+0.3374j]])
----------Measure----------
Probability:  tensor([[0.7025, 0.2975]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0670-0.3412j, 0.7907+0.5039j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.0670-0.3412j, 0.7907+0.5039j]])
New state:  tensor([[-0.0099-0.3476j,  0.6601+0.6659j]])
----------Measure----------
Probability:  tensor([[0.1209, 0.8791]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5212-0.2965j, 0.7857+0.1523j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.5212-0.2965j, 0.7857+0.1523j]])
New state:  tensor([[0.4430-0.4042j, 0.7327+0.3218j]])
----------Measure----------
Probability:  tensor([[0.3596, 0.6404]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5102-0.3424j, 0.7691+0.1758j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.5102-0.3424j, 0.7691+0.1758j]])
New state:  tensor([[0.4221-0.4465j, 0.7114+0.3411j]])
----------Measure----------
Probability:  tensor([[0.3775, 0.6225]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3892-0.7750j, 0.4264+0.2570j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.3892-0.7750j, 0.4264+0.2570j]])
New state:  tensor([[0.2088-0.8417j, 0.3592+0.3447j]])
----------Measure----------
Probability:  tensor([[0.7521, 0.2479]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4886-0.6923j, 0.4927+0.1982j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.4886-0.6923j, 0.4927+0.1982j]])
New state:  tensor([[0.3239-0.7830j, 0.4369+0.3020j]])
----------Measure----------
Probability:  tensor([[0.7180, 0.2820]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6068-0.5977j, 0.5113+0.1146j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.6068-0.5977j, 0.5113+0.1146j]])
New state:  tensor([[0.4600-0.7168j, 0.4734+0.2246j]])
----------Measure----------
Probability:  tensor([[0.7254, 0.2746]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2379-0.8030j, 0.3586+0.4123j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.2379-0.8030j, 0.3586+0.4123j]])
New state:  tensor([[0.0550-0.8357j, 0.2588+0.4813j]])
----------Measure----------
Probability:  tensor([[0.7014, 0.2986]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4694-0.7166j, 0.4734+0.2052j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.4694-0.7166j, 0.4734+0.2052j]])
New state:  tensor([[0.2999-0.8024j, 0.4165+0.3045j]])
----------Measure----------
Probability:  tensor([[0.7338, 0.2662]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3552-0.7190j, 0.4942+0.3358j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.3552-0.7190j, 0.4942+0.3358j]])
New state:  tensor([[0.1879-0.7796j, 0.4080+0.4365j]])
----------Measure----------
Probability:  tensor([[0.6430, 0.3570]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5285-0.7671j, 0.3579+0.0650j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.5285-0.7671j, 0.3579+0.0650j]])
New state:  tensor([[0.3464-0.8647j, 0.3347+0.1423j]])
----------Measure----------
Probability:  tensor([[0.8677, 0.1323]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3997-0.4926j, 0.7120+0.3011j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.3997-0.4926j, 0.7120+0.3011j]])
New state:  tensor([[0.2812-0.5686j, 0.6281+0.4507j]])
----------Measure----------
Probability:  tensor([[0.4024, 0.5976]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4138-0.5307j, 0.6771+0.2979j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.4138-0.5307j, 0.6771+0.2979j]])
New state:  tensor([[0.2866-0.6089j, 0.5947+0.4399j]])
----------Measure----------
Probability:  tensor([[0.4528, 0.5472]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4875-0.4194j, 0.7349+0.2153j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.4875-0.4194j, 0.7349+0.2153j]])
New state:  tensor([[0.3830-0.5165j, 0.6693+0.3721j]])
----------Measure----------
Probability:  tensor([[0.4135, 0.5865]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6715-0.6654j, 0.3235-0.0411j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.6715-0.6654j, 0.3235-0.0411j]])
New state:  tensor([[0.5082-0.7971j, 0.3246+0.0313j]])
----------Measure----------
Probability:  tensor([[0.8936, 0.1064]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5887-0.6269j, 0.4960+0.1202j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.5887-0.6269j, 0.4960+0.1202j]])
New state:  tensor([[0.4359-0.7412j, 0.4573+0.2267j]])
----------Measure----------
Probability:  tensor([[0.7395, 0.2605]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5107+0.j]])
ry_matrix:  tensor([[ 0.9676-0.j, -0.2526-0.j],
        [ 0.2526+0.j,  0.9676-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0170-0.2756j, 0.8387+0.4694j]])
Inside  rz
rz_matrix theta:  tensor([[0.4447+0.j]])
rz_matrix:  tensor([[0.9754-0.2205j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9754+0.2205j]])
Performing matrix multiplication

Current state:  tensor([[0.0170-0.2756j, 0.8387+0.4694j]])
New state:  tensor([[-0.0442-0.2726j,  0.7145+0.6428j]])
----------Measure----------
Probability:  tensor([[0.0763, 0.9237]])
valid set accuracy: 1.0
valid set loss: 0.36606642603874207
------------------------------Epoch58------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6060-0.5979j, 0.5122+0.1137j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.6060-0.5979j, 0.5122+0.1137j]])
New state:  tensor([[0.4625-0.7147j, 0.4755+0.2218j]])
----------Measure----------
Probability:  tensor([[0.7247, 0.2753]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2944-0.4169j, 0.7855+0.3500j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.2944-0.4169j, 0.7855+0.3500j]])
New state:  tensor([[0.1973-0.4707j, 0.6913+0.5115j]])
----------Measure----------
Probability:  tensor([[0.2605, 0.7395]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2373-0.8036j, 0.3590+0.4111j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.2373-0.8036j, 0.3590+0.4111j]])
New state:  tensor([[0.0580-0.8359j, 0.2616+0.4790j]])
----------Measure----------
Probability:  tensor([[0.7021, 0.2979]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4695-0.3756j, 0.7709+0.2101j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.4695-0.3756j, 0.7709+0.2101j]])
New state:  tensor([[0.3773-0.4682j, 0.7073+0.3717j]])
----------Measure----------
Probability:  tensor([[0.3615, 0.6385]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4487-0.7078j, 0.4931+0.2336j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.4487-0.7078j, 0.4931+0.2336j]])
New state:  tensor([[0.2851-0.7881j, 0.4309+0.3346j]])
----------Measure----------
Probability:  tensor([[0.7023, 0.2977]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4864-0.4197j, 0.7357+0.2147j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.4864-0.4197j, 0.7357+0.2147j]])
New state:  tensor([[0.3842-0.5149j, 0.6719+0.3686j]])
----------Measure----------
Probability:  tensor([[0.4127, 0.5873]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5879-0.6270j, 0.4969+0.1193j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.5879-0.6270j, 0.4969+0.1193j]])
New state:  tensor([[0.4385-0.7393j, 0.4594+0.2239j]])
----------Measure----------
Probability:  tensor([[0.7388, 0.2612]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2818-0.6973j, 0.5039+0.4247j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.2818-0.6973j, 0.5039+0.4247j]])
New state:  tensor([[0.1245-0.7418j, 0.4002+0.5236j]])
----------Measure----------
Probability:  tensor([[0.5657, 0.4343]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4878-0.6926j, 0.4934+0.1972j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.4878-0.6926j, 0.4934+0.1972j]])
New state:  tensor([[0.3266-0.7816j, 0.4392+0.2992j]])
----------Measure----------
Probability:  tensor([[0.7176, 0.2824]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4670-0.6838j, 0.5132+0.2256j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.4670-0.6838j, 0.5132+0.2256j]])
New state:  tensor([[0.3082-0.7686j, 0.4523+0.3312j]])
----------Measure----------
Probability:  tensor([[0.6857, 0.3143]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3144-0.5419j, 0.6758+0.3882j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.3144-0.5419j, 0.6758+0.3882j]])
New state:  tensor([[0.1898-0.5971j, 0.5759+0.5251j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4488-0.7404j, 0.4539+0.2108j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.4488-0.7404j, 0.4539+0.2108j]])
New state:  tensor([[0.2781-0.8199j, 0.3976+0.3039j]])
----------Measure----------
Probability:  tensor([[0.7495, 0.2505]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5090-0.3427j, 0.7699+0.1753j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.5090-0.3427j, 0.7699+0.1753j]])
New state:  tensor([[0.4229-0.4446j, 0.7138+0.3376j]])
----------Measure----------
Probability:  tensor([[0.3765, 0.6235]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4041-0.6529j, 0.5641+0.3037j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.4041-0.6529j, 0.5641+0.3037j]])
New state:  tensor([[0.2534-0.7248j, 0.4851+0.4184j]])
----------Measure----------
Probability:  tensor([[0.5896, 0.4104]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0157-0.2764j, 0.8387+0.4690j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.0157-0.2764j, 0.8387+0.4690j]])
New state:  tensor([[-0.0444-0.2732j,  0.7175+0.6392j]])
----------Measure----------
Probability:  tensor([[0.0766, 0.9234]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6060-0.5979j, 0.5122+0.1137j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.6060-0.5979j, 0.5122+0.1137j]])
New state:  tensor([[0.4625-0.7147j, 0.4755+0.2218j]])
----------Measure----------
Probability:  tensor([[0.7247, 0.2753]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3544-0.7195j, 0.4947+0.3347j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.3544-0.7195j, 0.4947+0.3347j]])
New state:  tensor([[0.1905-0.7791j, 0.4107+0.4337j]])
----------Measure----------
Probability:  tensor([[0.6432, 0.3568]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5644-0.6209j, 0.5235+0.1480j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.5644-0.6209j, 0.5235+0.1480j]])
New state:  tensor([[0.4169-0.7282j, 0.4791+0.2576j]])
----------Measure----------
Probability:  tensor([[0.7041, 0.2959]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4127-0.5311j, 0.6777+0.2971j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.4127-0.5311j, 0.6777+0.2971j]])
New state:  tensor([[0.2882-0.6078j, 0.5975+0.4366j]])
----------Measure----------
Probability:  tensor([[0.4525, 0.5475]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5280-0.7672j, 0.3587+0.0638j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.5280-0.7672j, 0.3587+0.0638j]])
New state:  tensor([[0.3497-0.8631j, 0.3364+0.1398j]])
----------Measure----------
Probability:  tensor([[0.8673, 0.1327]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4687-0.7169j, 0.4741+0.2041j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.4687-0.7169j, 0.4741+0.2041j]])
New state:  tensor([[0.3027-0.8012j, 0.4188+0.3017j]])
----------Measure----------
Probability:  tensor([[0.7336, 0.2664]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6710-0.6653j, 0.3246-0.0421j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.6710-0.6653j, 0.3246-0.0421j]])
New state:  tensor([[0.5113-0.7946j, 0.3260+0.0290j]])
----------Measure----------
Probability:  tensor([[0.8929, 0.1071]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3331-0.4024j, 0.7936+0.3120j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.3331-0.4024j, 0.7936+0.3120j]])
New state:  tensor([[0.2382-0.4648j, 0.7074+0.4762j]])
----------Measure----------
Probability:  tensor([[0.2728, 0.7272]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3886-0.7754j, 0.4270+0.2558j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.3886-0.7754j, 0.4270+0.2558j]])
New state:  tensor([[0.2118-0.8410j, 0.3616+0.3421j]])
----------Measure----------
Probability:  tensor([[0.7522, 0.2478]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3986-0.4931j, 0.7126+0.3003j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.3986-0.4931j, 0.7126+0.3003j]])
New state:  tensor([[0.2826-0.5676j, 0.6308+0.4472j]])
----------Measure----------
Probability:  tensor([[0.4020, 0.5980]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0657-0.3420j, 0.7908+0.5034j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.0657-0.3420j, 0.7908+0.5034j]])
New state:  tensor([[-0.0097-0.3481j,  0.6633+0.6624j]])
----------Measure----------
Probability:  tensor([[0.1213, 0.8787]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1627-0.8052j, 0.2909+0.4904j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.1627-0.8052j, 0.2909+0.4904j]])
New state:  tensor([[-0.0152-0.8214j,  0.1780+0.5417j]])
----------Measure----------
Probability:  tensor([[0.6749, 0.3251]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5200-0.2968j, 0.7865+0.1518j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.5200-0.2968j, 0.7865+0.1518j]])
New state:  tensor([[0.4435-0.4021j, 0.7350+0.3182j]])
----------Measure----------
Probability:  tensor([[0.3584, 0.6416]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5138+0.j]])
ry_matrix:  tensor([[ 0.9672-0.j, -0.2541-0.j],
        [ 0.2541+0.j,  0.9672-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4095-0.4649j, 0.7321+0.2831j]])
Inside  rz
rz_matrix theta:  tensor([[0.4357+0.j]])
rz_matrix:  tensor([[0.9764-0.2161j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9764+0.2161j]])
Performing matrix multiplication

Current state:  tensor([[0.4095-0.4649j, 0.7321+0.2831j]])
New state:  tensor([[0.2993-0.5424j, 0.6536+0.4347j]])
----------Measure----------
Probability:  tensor([[0.3838, 0.6162]])
valid set accuracy: 1.0
valid set loss: 0.36587557196617126
------------------------------Epoch59------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2937-0.4172j, 0.7858+0.3496j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.2937-0.4172j, 0.7858+0.3496j]])
New state:  tensor([[0.1986-0.4700j, 0.6938+0.5082j]])
----------Measure----------
Probability:  tensor([[0.2603, 0.7397]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4121-0.5314j, 0.6781+0.2966j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.4121-0.5314j, 0.6781+0.2966j]])
New state:  tensor([[0.2901-0.6067j, 0.5998+0.4336j]])
----------Measure----------
Probability:  tensor([[0.4522, 0.5478]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4036-0.6532j, 0.5645+0.3031j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.4036-0.6532j, 0.5645+0.3031j]])
New state:  tensor([[0.2560-0.7239j, 0.4874+0.4158j]])
----------Measure----------
Probability:  tensor([[0.5895, 0.4105]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4683-0.7171j, 0.4745+0.2034j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.4683-0.7171j, 0.4745+0.2034j]])
New state:  tensor([[0.3056-0.8000j, 0.4206+0.2994j]])
----------Measure----------
Probability:  tensor([[0.7334, 0.2666]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5192-0.2969j, 0.7869+0.1515j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.5192-0.2969j, 0.7869+0.1515j]])
New state:  tensor([[0.4445-0.4002j, 0.7369+0.3149j]])
----------Measure----------
Probability:  tensor([[0.3578, 0.6422]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6707-0.6653j, 0.3252-0.0427j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.6707-0.6653j, 0.3252-0.0427j]])
New state:  tensor([[0.5144-0.7923j, 0.3269+0.0271j]])
----------Measure----------
Probability:  tensor([[0.8924, 0.1076]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4482-0.7080j, 0.4935+0.2329j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.4482-0.7080j, 0.4935+0.2329j]])
New state:  tensor([[0.2880-0.7870j, 0.4329+0.3322j]])
----------Measure----------
Probability:  tensor([[0.7022, 0.2978]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5276-0.7672j, 0.3592+0.0631j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.5276-0.7672j, 0.3592+0.0631j]])
New state:  tensor([[0.3530-0.8616j, 0.3376+0.1378j]])
----------Measure----------
Probability:  tensor([[0.8670, 0.1330]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4483-0.7406j, 0.4543+0.2101j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.4483-0.7406j, 0.4543+0.2101j]])
New state:  tensor([[0.2812-0.8188j, 0.3995+0.3016j]])
----------Measure----------
Probability:  tensor([[0.7495, 0.2505]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1624-0.8057j, 0.2911+0.4897j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.1624-0.8057j, 0.2911+0.4897j]])
New state:  tensor([[-0.0120-0.8218j,  0.1807+0.5402j]])
----------Measure----------
Probability:  tensor([[0.6755, 0.3245]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4088-0.4652j, 0.7325+0.2827j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.4088-0.4652j, 0.7325+0.2827j]])
New state:  tensor([[0.3009-0.5412j, 0.6559+0.4315j]])
----------Measure----------
Probability:  tensor([[0.3835, 0.6165]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3979-0.4934j, 0.7130+0.2999j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.3979-0.4934j, 0.7130+0.2999j]])
New state:  tensor([[0.2843-0.5665j, 0.6332+0.4442j]])
----------Measure----------
Probability:  tensor([[0.4018, 0.5982]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4857-0.4199j, 0.7361+0.2143j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.4857-0.4199j, 0.7361+0.2143j]])
New state:  tensor([[0.3857-0.5133j, 0.6740+0.3654j]])
----------Measure----------
Probability:  tensor([[0.4122, 0.5878]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5083-0.3428j, 0.7704+0.1750j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.5083-0.3428j, 0.7704+0.1750j]])
New state:  tensor([[0.4241-0.4428j, 0.7158+0.3343j]])
----------Measure----------
Probability:  tensor([[0.3759, 0.6241]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4874-0.6928j, 0.4939+0.1965j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.4874-0.6928j, 0.4939+0.1965j]])
New state:  tensor([[0.3295-0.7803j, 0.4410+0.2967j]])
----------Measure----------
Probability:  tensor([[0.7174, 0.2826]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2370-0.8040j, 0.3592+0.4103j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.2370-0.8040j, 0.3592+0.4103j]])
New state:  tensor([[0.0612-0.8360j, 0.2641+0.4771j]])
----------Measure----------
Probability:  tensor([[0.7026, 0.2974]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6055-0.5980j, 0.5128+0.1132j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.6055-0.5980j, 0.5128+0.1132j]])
New state:  tensor([[0.4650-0.7127j, 0.4772+0.2193j]])
----------Measure----------
Probability:  tensor([[0.7242, 0.2758]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3137-0.5423j, 0.6761+0.3877j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.3137-0.5423j, 0.6761+0.3877j]])
New state:  tensor([[0.1917-0.5965j, 0.5786+0.5222j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5874-0.6272j, 0.4975+0.1187j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.5874-0.6272j, 0.4975+0.1187j]])
New state:  tensor([[0.4412-0.7374j, 0.4610+0.2214j]])
----------Measure----------
Probability:  tensor([[0.7384, 0.2616]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2814-0.6977j, 0.5041+0.4241j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.2814-0.6977j, 0.5041+0.4241j]])
New state:  tensor([[0.1271-0.7415j, 0.4028+0.5213j]])
----------Measure----------
Probability:  tensor([[0.5660, 0.4340]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4665-0.6840j, 0.5136+0.2250j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.4665-0.6840j, 0.5136+0.2250j]])
New state:  tensor([[0.3110-0.7674j, 0.4543+0.3287j]])
----------Measure----------
Probability:  tensor([[0.6856, 0.3144]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4688-0.3758j, 0.7714+0.2097j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.4688-0.3758j, 0.7714+0.2097j]])
New state:  tensor([[0.3785-0.4666j, 0.7094+0.3685j]])
----------Measure----------
Probability:  tensor([[0.3610, 0.6390]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5639-0.6210j, 0.5240+0.1474j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.5639-0.6210j, 0.5240+0.1474j]])
New state:  tensor([[0.4195-0.7264j, 0.4808+0.2551j]])
----------Measure----------
Probability:  tensor([[0.7037, 0.2963]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0149-0.2768j, 0.8387+0.4687j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.0149-0.2768j, 0.8387+0.4687j]])
New state:  tensor([[-0.0441-0.2737j,  0.7203+0.6358j]])
----------Measure----------
Probability:  tensor([[0.0768, 0.9232]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3540-0.7198j, 0.4951+0.3340j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.3540-0.7198j, 0.4951+0.3340j]])
New state:  tensor([[0.1934-0.7784j, 0.4130+0.4313j]])
----------Measure----------
Probability:  tensor([[0.6434, 0.3566]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6055-0.5980j, 0.5128+0.1132j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.6055-0.5980j, 0.5128+0.1132j]])
New state:  tensor([[0.4650-0.7127j, 0.4772+0.2193j]])
----------Measure----------
Probability:  tensor([[0.7242, 0.2758]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3882-0.7756j, 0.4274+0.2551j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.3882-0.7756j, 0.4274+0.2551j]])
New state:  tensor([[0.2150-0.8403j, 0.3636+0.3399j]])
----------Measure----------
Probability:  tensor([[0.7523, 0.2477]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0650-0.3425j, 0.7908+0.5031j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.0650-0.3425j, 0.7908+0.5031j]])
New state:  tensor([[-0.0091-0.3485j,  0.6662+0.6593j]])
----------Measure----------
Probability:  tensor([[0.1215, 0.8785]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5156+0.j]])
ry_matrix:  tensor([[ 0.9669-0.j, -0.2550-0.j],
        [ 0.2550+0.j,  0.9669-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3323-0.4026j, 0.7939+0.3117j]])
Inside  rz
rz_matrix theta:  tensor([[0.4271+0.j]])
rz_matrix:  tensor([[0.9773-0.2119j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9773+0.2119j]])
Performing matrix multiplication

Current state:  tensor([[0.3323-0.4026j, 0.7939+0.3117j]])
New state:  tensor([[0.2394-0.4639j, 0.7098+0.4728j]])
----------Measure----------
Probability:  tensor([[0.2726, 0.7274]])
valid set accuracy: 1.0
valid set loss: 0.36575964093208313
------------------------------Epoch60------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2809-0.6982j, 0.5044+0.4233j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.2809-0.6982j, 0.5044+0.4233j]])
New state:  tensor([[0.1296-0.7413j, 0.4054+0.5190j]])
----------Measure----------
Probability:  tensor([[0.5663, 0.4337]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6703-0.6653j, 0.3259-0.0434j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.6703-0.6653j, 0.3259-0.0434j]])
New state:  tensor([[0.5174-0.7901j, 0.3278+0.0253j]])
----------Measure----------
Probability:  tensor([[0.8919, 0.1081]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4850-0.4201j, 0.7366+0.2139j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.4850-0.4201j, 0.7366+0.2139j]])
New state:  tensor([[0.3870-0.5117j, 0.6760+0.3623j]])
----------Measure----------
Probability:  tensor([[0.4117, 0.5883]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4030-0.6535j, 0.5649+0.3024j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.4030-0.6535j, 0.5649+0.3024j]])
New state:  tensor([[0.2583-0.7230j, 0.4896+0.4133j]])
----------Measure----------
Probability:  tensor([[0.5895, 0.4105]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3972-0.4937j, 0.7134+0.2994j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.3972-0.4937j, 0.7134+0.2994j]])
New state:  tensor([[0.2859-0.5655j, 0.6355+0.4411j]])
----------Measure----------
Probability:  tensor([[0.4015, 0.5985]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3878-0.7759j, 0.4278+0.2543j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.3878-0.7759j, 0.4278+0.2543j]])
New state:  tensor([[0.2180-0.8395j, 0.3655+0.3377j]])
----------Measure----------
Probability:  tensor([[0.7523, 0.2477]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5184-0.2971j, 0.7875+0.1512j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.5184-0.2971j, 0.7875+0.1512j]])
New state:  tensor([[0.4454-0.3984j, 0.7388+0.3116j]])
----------Measure----------
Probability:  tensor([[0.3570, 0.6430]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2366-0.8044j, 0.3594+0.4095j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.2366-0.8044j, 0.3594+0.4095j]])
New state:  tensor([[0.0642-0.8360j, 0.2664+0.4753j]])
----------Measure----------
Probability:  tensor([[0.7031, 0.2969]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5075-0.3430j, 0.7709+0.1746j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.5075-0.3430j, 0.7709+0.1746j]])
New state:  tensor([[0.4251-0.4410j, 0.7177+0.3311j]])
----------Measure----------
Probability:  tensor([[0.3752, 0.6248]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3535-0.7201j, 0.4954+0.3333j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.3535-0.7201j, 0.4954+0.3333j]])
New state:  tensor([[0.1960-0.7779j, 0.4153+0.4290j]])
----------Measure----------
Probability:  tensor([[0.6435, 0.3565]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5273-0.7673j, 0.3597+0.0623j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.5273-0.7673j, 0.3597+0.0623j]])
New state:  tensor([[0.3562-0.8601j, 0.3389+0.1357j]])
----------Measure----------
Probability:  tensor([[0.8667, 0.1333]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2929-0.4176j, 0.7861+0.3492j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.2929-0.4176j, 0.7861+0.3492j]])
New state:  tensor([[0.1997-0.4693j, 0.6963+0.5050j]])
----------Measure----------
Probability:  tensor([[0.2601, 0.7399]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3130-0.5427j, 0.6764+0.3872j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.3130-0.5427j, 0.6764+0.3872j]])
New state:  tensor([[0.1934-0.5959j, 0.5811+0.5194j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4114-0.5317j, 0.6785+0.2961j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.4114-0.5317j, 0.6785+0.2961j]])
New state:  tensor([[0.2919-0.6056j, 0.6021+0.4307j]])
----------Measure----------
Probability:  tensor([[0.4520, 0.5480]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1622-0.8062j, 0.2912+0.4888j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.1622-0.8062j, 0.2912+0.4888j]])
New state:  tensor([[-0.0090-0.8223j,  0.1832+0.5387j]])
----------Measure----------
Probability:  tensor([[0.6762, 0.3238]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4678-0.7173j, 0.4750+0.2027j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.4678-0.7173j, 0.4750+0.2027j]])
New state:  tensor([[0.3084-0.7989j, 0.4225+0.2970j]])
----------Measure----------
Probability:  tensor([[0.7333, 0.2667]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5634-0.6212j, 0.5246+0.1468j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.5634-0.6212j, 0.5246+0.1468j]])
New state:  tensor([[0.4219-0.7247j, 0.4826+0.2526j]])
----------Measure----------
Probability:  tensor([[0.7033, 0.2967]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5869-0.6273j, 0.4981+0.1181j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.5869-0.6273j, 0.4981+0.1181j]])
New state:  tensor([[0.4437-0.7356j, 0.4627+0.2190j]])
----------Measure----------
Probability:  tensor([[0.7380, 0.2620]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4477-0.7083j, 0.4939+0.2322j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.4477-0.7083j, 0.4939+0.2322j]])
New state:  tensor([[0.2907-0.7859j, 0.4349+0.3298j]])
----------Measure----------
Probability:  tensor([[0.7021, 0.2979]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4479-0.7408j, 0.4548+0.2093j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.4479-0.7408j, 0.4548+0.2093j]])
New state:  tensor([[0.2841-0.8177j, 0.4013+0.2993j]])
----------Measure----------
Probability:  tensor([[0.7494, 0.2506]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0141-0.2773j, 0.8388+0.4684j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.0141-0.2773j, 0.8388+0.4684j]])
New state:  tensor([[-0.0439-0.2741j,  0.7230+0.6326j]])
----------Measure----------
Probability:  tensor([[0.0771, 0.9229]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4081-0.4654j, 0.7329+0.2822j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.4081-0.4654j, 0.7329+0.2822j]])
New state:  tensor([[0.3024-0.5401j, 0.6582+0.4284j]])
----------Measure----------
Probability:  tensor([[0.3832, 0.6168]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6050-0.5981j, 0.5134+0.1126j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.6050-0.5981j, 0.5134+0.1126j]])
New state:  tensor([[0.4674-0.7108j, 0.4788+0.2168j]])
----------Measure----------
Probability:  tensor([[0.7237, 0.2763]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4660-0.6843j, 0.5141+0.2243j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.4660-0.6843j, 0.5141+0.2243j]])
New state:  tensor([[0.3136-0.7662j, 0.4562+0.3263j]])
----------Measure----------
Probability:  tensor([[0.6854, 0.3146]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0642-0.3430j, 0.7909+0.5027j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.0642-0.3430j, 0.7909+0.5027j]])
New state:  tensor([[-0.0085-0.3488j,  0.6691+0.6562j]])
----------Measure----------
Probability:  tensor([[0.1217, 0.8783]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6050-0.5981j, 0.5134+0.1126j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.6050-0.5981j, 0.5134+0.1126j]])
New state:  tensor([[0.4674-0.7108j, 0.4788+0.2168j]])
----------Measure----------
Probability:  tensor([[0.7237, 0.2763]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4869-0.6929j, 0.4944+0.1958j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.4869-0.6929j, 0.4944+0.1958j]])
New state:  tensor([[0.3322-0.7790j, 0.4429+0.2943j]])
----------Measure----------
Probability:  tensor([[0.7172, 0.2828]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4680-0.3760j, 0.7719+0.2093j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.4680-0.3760j, 0.7719+0.2093j]])
New state:  tensor([[0.3796-0.4651j, 0.7115+0.3652j]])
----------Measure----------
Probability:  tensor([[0.3604, 0.6396]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5177+0.j]])
ry_matrix:  tensor([[ 0.9667-0.j, -0.2560-0.j],
        [ 0.2560+0.j,  0.9667-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3315-0.4030j, 0.7942+0.3113j]])
Inside  rz
rz_matrix theta:  tensor([[0.4189+0.j]])
rz_matrix:  tensor([[0.9781-0.2079j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9781+0.2079j]])
Performing matrix multiplication

Current state:  tensor([[0.3315-0.4030j, 0.7942+0.3113j]])
New state:  tensor([[0.2405-0.4631j, 0.7122+0.4696j]])
----------Measure----------
Probability:  tensor([[0.2723, 0.7277]])
valid set accuracy: 1.0
valid set loss: 0.3656368851661682
------------------------------Epoch61------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1619-0.8066j, 0.2914+0.4881j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.1619-0.8066j, 0.2914+0.4881j]])
New state:  tensor([[-0.0061-0.8227j,  0.1857+0.5373j]])
----------Measure----------
Probability:  tensor([[0.6768, 0.3232]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4674-0.7175j, 0.4754+0.2020j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.4674-0.7175j, 0.4754+0.2020j]])
New state:  tensor([[0.3111-0.7977j, 0.4242+0.2948j]])
----------Measure----------
Probability:  tensor([[0.7332, 0.2668]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5068-0.3432j, 0.7713+0.1743j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.5068-0.3432j, 0.7713+0.1743j]])
New state:  tensor([[0.4262-0.4394j, 0.7195+0.3280j]])
----------Measure----------
Probability:  tensor([[0.3746, 0.6254]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4473-0.7085j, 0.4943+0.2315j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.4473-0.7085j, 0.4943+0.2315j]])
New state:  tensor([[0.2933-0.7848j, 0.4367+0.3275j]])
----------Measure----------
Probability:  tensor([[0.7020, 0.2980]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2922-0.4179j, 0.7863+0.3488j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.2922-0.4179j, 0.7863+0.3488j]])
New state:  tensor([[0.2008-0.4687j, 0.6986+0.5019j]])
----------Measure----------
Probability:  tensor([[0.2600, 0.7400]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0635-0.3434j, 0.7909+0.5024j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.0635-0.3434j, 0.7909+0.5024j]])
New state:  tensor([[-0.0079-0.3491j,  0.6718+0.6533j]])
----------Measure----------
Probability:  tensor([[0.1220, 0.8780]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3966-0.4939j, 0.7137+0.2989j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.3966-0.4939j, 0.7137+0.2989j]])
New state:  tensor([[0.2874-0.5645j, 0.6377+0.4383j]])
----------Measure----------
Probability:  tensor([[0.4012, 0.5988]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4025-0.6538j, 0.5652+0.3018j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.4025-0.6538j, 0.5652+0.3018j]])
New state:  tensor([[0.2606-0.7221j, 0.4917+0.4108j]])
----------Measure----------
Probability:  tensor([[0.5894, 0.4106]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5270-0.7673j, 0.3602+0.0616j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.5270-0.7673j, 0.3602+0.0616j]])
New state:  tensor([[0.3593-0.8587j, 0.3400+0.1338j]])
----------Measure----------
Probability:  tensor([[0.8665, 0.1335]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3874-0.7761j, 0.4281+0.2536j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.3874-0.7761j, 0.4281+0.2536j]])
New state:  tensor([[0.2209-0.8388j, 0.3674+0.3357j]])
----------Measure----------
Probability:  tensor([[0.7524, 0.2476]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2804-0.6985j, 0.5047+0.4227j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.2804-0.6985j, 0.5047+0.4227j]])
New state:  tensor([[0.1320-0.7411j, 0.4078+0.5168j]])
----------Measure----------
Probability:  tensor([[0.5666, 0.4334]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3124-0.5430j, 0.6767+0.3867j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.3124-0.5430j, 0.6767+0.3867j]])
New state:  tensor([[0.1951-0.5954j, 0.5836+0.5166j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4673-0.3762j, 0.7723+0.2090j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.4673-0.3762j, 0.7723+0.2090j]])
New state:  tensor([[0.3808-0.4636j, 0.7134+0.3622j]])
----------Measure----------
Probability:  tensor([[0.3599, 0.6401]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5177-0.2972j, 0.7879+0.1510j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.5177-0.2972j, 0.7879+0.1510j]])
New state:  tensor([[0.4462-0.3966j, 0.7406+0.3086j]])
----------Measure----------
Probability:  tensor([[0.3564, 0.6436]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4843-0.4203j, 0.7370+0.2135j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.4203j, 0.7370+0.2135j]])
New state:  tensor([[0.3884-0.5103j, 0.6780+0.3594j]])
----------Measure----------
Probability:  tensor([[0.4112, 0.5888]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3308-0.4032j, 0.7945+0.3109j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.3308-0.4032j, 0.7945+0.3109j]])
New state:  tensor([[0.2416-0.4623j, 0.7144+0.4665j]])
----------Measure----------
Probability:  tensor([[0.2721, 0.7279]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3530-0.7204j, 0.4957+0.3326j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.3530-0.7204j, 0.4957+0.3326j]])
New state:  tensor([[0.1986-0.7773j, 0.4174+0.4268j]])
----------Measure----------
Probability:  tensor([[0.6436, 0.3564]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4864-0.6931j, 0.4948+0.1952j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.4864-0.6931j, 0.4948+0.1952j]])
New state:  tensor([[0.3348-0.7778j, 0.4446+0.2920j]])
----------Measure----------
Probability:  tensor([[0.7170, 0.2830]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4074-0.4657j, 0.7333+0.2818j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.4074-0.4657j, 0.7333+0.2818j]])
New state:  tensor([[0.3038-0.5390j, 0.6604+0.4255j]])
----------Measure----------
Probability:  tensor([[0.3829, 0.6171]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4656-0.6845j, 0.5145+0.2237j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.4656-0.6845j, 0.5145+0.2237j]])
New state:  tensor([[0.3161-0.7651j, 0.4581+0.3240j]])
----------Measure----------
Probability:  tensor([[0.6852, 0.3148]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0134-0.2777j, 0.8388+0.4682j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.0134-0.2777j, 0.8388+0.4682j]])
New state:  tensor([[-0.0436-0.2746j,  0.7256+0.6295j]])
----------Measure----------
Probability:  tensor([[0.0773, 0.9227]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4108-0.5320j, 0.6789+0.2956j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.4108-0.5320j, 0.6789+0.2956j]])
New state:  tensor([[0.2936-0.6046j, 0.6043+0.4279j]])
----------Measure----------
Probability:  tensor([[0.4518, 0.5482]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2363-0.8048j, 0.3596+0.4088j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.2363-0.8048j, 0.3596+0.4088j]])
New state:  tensor([[0.0671-0.8361j, 0.2687+0.4736j]])
----------Measure----------
Probability:  tensor([[0.7035, 0.2965]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6701-0.6652j, 0.3265-0.0440j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.6701-0.6652j, 0.3265-0.0440j]])
New state:  tensor([[0.5202-0.7879j, 0.3286+0.0235j]])
----------Measure----------
Probability:  tensor([[0.8915, 0.1085]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5865-0.6274j, 0.4986+0.1175j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.5865-0.6274j, 0.4986+0.1175j]])
New state:  tensor([[0.4461-0.7338j, 0.4642+0.2168j]])
----------Measure----------
Probability:  tensor([[0.7376, 0.2624]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4475-0.7410j, 0.4552+0.2087j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.4475-0.7410j, 0.4552+0.2087j]])
New state:  tensor([[0.2869-0.8167j, 0.4030+0.2972j]])
----------Measure----------
Probability:  tensor([[0.7493, 0.2507]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6045-0.5982j, 0.5140+0.1120j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.6045-0.5982j, 0.5140+0.1120j]])
New state:  tensor([[0.4698-0.7089j, 0.4803+0.2145j]])
----------Measure----------
Probability:  tensor([[0.7233, 0.2767]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5629-0.6213j, 0.5251+0.1462j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.5629-0.6213j, 0.5251+0.1462j]])
New state:  tensor([[0.4243-0.7231j, 0.4842+0.2503j]])
----------Measure----------
Probability:  tensor([[0.7029, 0.2971]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5195+0.j]])
ry_matrix:  tensor([[ 0.9665-0.j, -0.2568-0.j],
        [ 0.2568+0.j,  0.9665-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6045-0.5982j, 0.5140+0.1120j]])
Inside  rz
rz_matrix theta:  tensor([[0.4110+0.j]])
rz_matrix:  tensor([[0.9790-0.2040j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9790+0.2040j]])
Performing matrix multiplication

Current state:  tensor([[0.6045-0.5982j, 0.5140+0.1120j]])
New state:  tensor([[0.4698-0.7089j, 0.4803+0.2145j]])
----------Measure----------
Probability:  tensor([[0.7233, 0.2767]])
valid set accuracy: 1.0
valid set loss: 0.365529328584671
------------------------------Epoch62------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6041-0.5983j, 0.5144+0.1116j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.6041-0.5983j, 0.5144+0.1116j]])
New state:  tensor([[0.4720-0.7072j, 0.4817+0.2124j]])
----------Measure----------
Probability:  tensor([[0.7229, 0.2771]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3302-0.4035j, 0.7948+0.3106j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.3302-0.4035j, 0.7948+0.3106j]])
New state:  tensor([[0.2427-0.4615j, 0.7165+0.4635j]])
----------Measure----------
Probability:  tensor([[0.2718, 0.7282]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3526-0.7207j, 0.4960+0.3321j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.3526-0.7207j, 0.4960+0.3321j]])
New state:  tensor([[0.2011-0.7767j, 0.4194+0.4247j]])
----------Measure----------
Probability:  tensor([[0.6437, 0.3563]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4837-0.4205j, 0.7374+0.2132j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.4837-0.4205j, 0.7374+0.2132j]])
New state:  tensor([[0.3897-0.5088j, 0.6798+0.3566j]])
----------Measure----------
Probability:  tensor([[0.4108, 0.5892]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3960-0.4942j, 0.7140+0.2985j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.3960-0.4942j, 0.7140+0.2985j]])
New state:  tensor([[0.2890-0.5635j, 0.6398+0.4355j]])
----------Measure----------
Probability:  tensor([[0.4010, 0.5990]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4103-0.5322j, 0.6792+0.2952j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.4103-0.5322j, 0.6792+0.2952j]])
New state:  tensor([[0.2953-0.6036j, 0.6063+0.4252j]])
----------Measure----------
Probability:  tensor([[0.4516, 0.5484]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2360-0.8051j, 0.3598+0.4082j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.2360-0.8051j, 0.3598+0.4082j]])
New state:  tensor([[0.0700-0.8361j, 0.2708+0.4720j]])
----------Measure----------
Probability:  tensor([[0.7039, 0.2961]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4021-0.6540j, 0.5655+0.3013j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.4021-0.6540j, 0.5655+0.3013j]])
New state:  tensor([[0.2629-0.7213j, 0.4937+0.4085j]])
----------Measure----------
Probability:  tensor([[0.5894, 0.4106]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4469-0.7087j, 0.4947+0.2310j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.4469-0.7087j, 0.4947+0.2310j]])
New state:  tensor([[0.2959-0.7838j, 0.4384+0.3254j]])
----------Measure----------
Probability:  tensor([[0.7019, 0.2981]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4670-0.7176j, 0.4758+0.2015j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.4670-0.7176j, 0.4758+0.2015j]])
New state:  tensor([[0.3138-0.7966j, 0.4258+0.2927j]])
----------Measure----------
Probability:  tensor([[0.7330, 0.2670]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4667-0.3763j, 0.7726+0.2087j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.4667-0.3763j, 0.7726+0.2087j]])
New state:  tensor([[0.3819-0.4622j, 0.7152+0.3593j]])
----------Measure----------
Probability:  tensor([[0.3595, 0.6405]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1617-0.8070j, 0.2915+0.4875j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.1617-0.8070j, 0.2915+0.4875j]])
New state:  tensor([[-0.0033-0.8230j,  0.1879+0.5360j]])
----------Measure----------
Probability:  tensor([[0.6774, 0.3226]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5062-0.3433j, 0.7717+0.1740j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.5062-0.3433j, 0.7717+0.1740j]])
New state:  tensor([[0.4272-0.4378j, 0.7212+0.3251j]])
----------Measure----------
Probability:  tensor([[0.3741, 0.6259]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3870-0.7763j, 0.4284+0.2530j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.3870-0.7763j, 0.4284+0.2530j]])
New state:  tensor([[0.2237-0.8381j, 0.3690+0.3337j]])
----------Measure----------
Probability:  tensor([[0.7524, 0.2476]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4069-0.4659j, 0.7336+0.2815j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.4069-0.4659j, 0.7336+0.2815j]])
New state:  tensor([[0.3053-0.5380j, 0.6623+0.4227j]])
----------Measure----------
Probability:  tensor([[0.3826, 0.6174]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6041-0.5983j, 0.5144+0.1116j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.6041-0.5983j, 0.5144+0.1116j]])
New state:  tensor([[0.4720-0.7072j, 0.4817+0.2124j]])
----------Measure----------
Probability:  tensor([[0.7229, 0.2771]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5861-0.6275j, 0.4991+0.1170j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.5861-0.6275j, 0.4991+0.1170j]])
New state:  tensor([[0.4485-0.7322j, 0.4655+0.2146j]])
----------Measure----------
Probability:  tensor([[0.7372, 0.2628]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3119-0.5434j, 0.6770+0.3863j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.3119-0.5434j, 0.6770+0.3863j]])
New state:  tensor([[0.1967-0.5948j, 0.5858+0.5141j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5267-0.7674j, 0.3606+0.0610j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.5267-0.7674j, 0.3606+0.0610j]])
New state:  tensor([[0.3623-0.8573j, 0.3411+0.1320j]])
----------Measure----------
Probability:  tensor([[0.8663, 0.1337]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6698-0.6652j, 0.3270-0.0445j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.6698-0.6652j, 0.3270-0.0445j]])
New state:  tensor([[0.5230-0.7859j, 0.3293+0.0219j]])
----------Measure----------
Probability:  tensor([[0.8911, 0.1089]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2800-0.6989j, 0.5049+0.4222j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.2800-0.6989j, 0.5049+0.4222j]])
New state:  tensor([[0.1343-0.7408j, 0.4101+0.5148j]])
----------Measure----------
Probability:  tensor([[0.5668, 0.4332]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5625-0.6214j, 0.5255+0.1457j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.5625-0.6214j, 0.5255+0.1457j]])
New state:  tensor([[0.4266-0.7215j, 0.4857+0.2481j]])
----------Measure----------
Probability:  tensor([[0.7026, 0.2974]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4652-0.6846j, 0.5149+0.2232j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.4652-0.6846j, 0.5149+0.2232j]])
New state:  tensor([[0.3186-0.7639j, 0.4597+0.3218j]])
----------Measure----------
Probability:  tensor([[0.6851, 0.3149]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4471-0.7411j, 0.4555+0.2081j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.4471-0.7411j, 0.4555+0.2081j]])
New state:  tensor([[0.2896-0.8157j, 0.4046+0.2951j]])
----------Measure----------
Probability:  tensor([[0.7492, 0.2508]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5171-0.2973j, 0.7883+0.1507j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.5171-0.2973j, 0.7883+0.1507j]])
New state:  tensor([[0.4471-0.3949j, 0.7422+0.3056j]])
----------Measure----------
Probability:  tensor([[0.3558, 0.6442]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2916-0.4181j, 0.7866+0.3485j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.2916-0.4181j, 0.7866+0.3485j]])
New state:  tensor([[0.2019-0.4681j, 0.7008+0.4990j]])
----------Measure----------
Probability:  tensor([[0.2599, 0.7401]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4861-0.6933j, 0.4952+0.1946j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.4861-0.6933j, 0.4952+0.1946j]])
New state:  tensor([[0.3373-0.7766j, 0.4462+0.2899j]])
----------Measure----------
Probability:  tensor([[0.7169, 0.2831]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0629-0.3438j, 0.7910+0.5022j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.0629-0.3438j, 0.7910+0.5022j]])
New state:  tensor([[-0.0073-0.3494j,  0.6744+0.6504j]])
----------Measure----------
Probability:  tensor([[0.1222, 0.8778]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5210+0.j]])
ry_matrix:  tensor([[ 0.9663-0.j, -0.2576-0.j],
        [ 0.2576+0.j,  0.9663-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0127-0.2781j, 0.8388+0.4680j]])
Inside  rz
rz_matrix theta:  tensor([[0.4034+0.j]])
rz_matrix:  tensor([[0.9797-0.2003j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9797+0.2003j]])
Performing matrix multiplication

Current state:  tensor([[0.0127-0.2781j, 0.8388+0.4680j]])
New state:  tensor([[-0.0433-0.2750j,  0.7280+0.6265j]])
----------Measure----------
Probability:  tensor([[0.0775, 0.9225]])
valid set accuracy: 1.0
valid set loss: 0.36543628573417664
------------------------------Epoch63------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0621-0.3443j, 0.7911+0.5018j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.0621-0.3443j, 0.7911+0.5018j]])
New state:  tensor([[-0.0068-0.3498j,  0.6768+0.6477j]])
----------Measure----------
Probability:  tensor([[0.1224, 0.8776]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3866-0.7765j, 0.4288+0.2523j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.3866-0.7765j, 0.4288+0.2523j]])
New state:  tensor([[0.2263-0.8374j, 0.3708+0.3317j]])
----------Measure----------
Probability:  tensor([[0.7525, 0.2475]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4096-0.5325j, 0.6796+0.2947j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.4096-0.5325j, 0.6796+0.2947j]])
New state:  tensor([[0.2968-0.6027j, 0.6083+0.4226j]])
----------Measure----------
Probability:  tensor([[0.4513, 0.5487]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6695-0.6651j, 0.3276-0.0452j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.6695-0.6651j, 0.3276-0.0452j]])
New state:  tensor([[0.5255-0.7839j, 0.3301+0.0202j]])
----------Measure----------
Probability:  tensor([[0.8906, 0.1094]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2795-0.6993j, 0.5052+0.4215j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.2795-0.6993j, 0.5052+0.4215j]])
New state:  tensor([[0.1365-0.7406j, 0.4123+0.5127j]])
----------Measure----------
Probability:  tensor([[0.5671, 0.4329]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5620-0.6216j, 0.5260+0.1452j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.5620-0.6216j, 0.5260+0.1452j]])
New state:  tensor([[0.4287-0.7200j, 0.4872+0.2458j]])
----------Measure----------
Probability:  tensor([[0.7022, 0.2978]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5263-0.7674j, 0.3611+0.0603j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.5263-0.7674j, 0.3611+0.0603j]])
New state:  tensor([[0.3650-0.8560j, 0.3422+0.1301j]])
----------Measure----------
Probability:  tensor([[0.8660, 0.1340]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5856-0.6276j, 0.4996+0.1164j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.5856-0.6276j, 0.4996+0.1164j]])
New state:  tensor([[0.4507-0.7305j, 0.4670+0.2124j]])
----------Measure----------
Probability:  tensor([[0.7368, 0.2632]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4015-0.6543j, 0.5659+0.3007j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.4015-0.6543j, 0.5659+0.3007j]])
New state:  tensor([[0.2649-0.7205j, 0.4957+0.4062j]])
----------Measure----------
Probability:  tensor([[0.5893, 0.4107]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1614-0.8075j, 0.2917+0.4867j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.1614-0.8075j, 0.2917+0.4867j]])
New state:  tensor([[-0.0007-0.8234j,  0.1902+0.5346j]])
----------Measure----------
Probability:  tensor([[0.6780, 0.3220]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3953-0.4945j, 0.7144+0.2981j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.3953-0.4945j, 0.7144+0.2981j]])
New state:  tensor([[0.2903-0.5626j, 0.6418+0.4328j]])
----------Measure----------
Probability:  tensor([[0.4008, 0.5992]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4467-0.7413j, 0.4560+0.2074j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.4467-0.7413j, 0.4560+0.2074j]])
New state:  tensor([[0.2921-0.8147j, 0.4062+0.2930j]])
----------Measure----------
Probability:  tensor([[0.7491, 0.2509]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4464-0.7089j, 0.4951+0.2303j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.4464-0.7089j, 0.4951+0.2303j]])
New state:  tensor([[0.2982-0.7829j, 0.4401+0.3232j]])
----------Measure----------
Probability:  tensor([[0.7018, 0.2982]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5055-0.3435j, 0.7722+0.1737j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.5055-0.3435j, 0.7722+0.1737j]])
New state:  tensor([[0.4280-0.4362j, 0.7229+0.3223j]])
----------Measure----------
Probability:  tensor([[0.3735, 0.6265]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3113-0.5437j, 0.6773+0.3858j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.3113-0.5437j, 0.6773+0.3858j]])
New state:  tensor([[0.1982-0.5943j, 0.5881+0.5115j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6037-0.5984j, 0.5150+0.1110j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.6037-0.5984j, 0.5150+0.1110j]])
New state:  tensor([[0.4741-0.7055j, 0.4831+0.2102j]])
----------Measure----------
Probability:  tensor([[0.7224, 0.2776]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3522-0.7210j, 0.4963+0.3314j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.3522-0.7210j, 0.4963+0.3314j]])
New state:  tensor([[0.2034-0.7762j, 0.4214+0.4226j]])
----------Measure----------
Probability:  tensor([[0.6438, 0.3562]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4062-0.4662j, 0.7340+0.2810j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.4062-0.4662j, 0.7340+0.2810j]])
New state:  tensor([[0.3065-0.5370j, 0.6643+0.4199j]])
----------Measure----------
Probability:  tensor([[0.3823, 0.6177]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4665-0.7178j, 0.4762+0.2008j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.4665-0.7178j, 0.4762+0.2008j]])
New state:  tensor([[0.3162-0.7956j, 0.4274+0.2906j]])
----------Measure----------
Probability:  tensor([[0.7329, 0.2671]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2357-0.8055j, 0.3600+0.4074j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.2357-0.8055j, 0.3600+0.4074j]])
New state:  tensor([[0.0726-0.8361j, 0.2728+0.4703j]])
----------Measure----------
Probability:  tensor([[0.7044, 0.2956]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4830-0.4207j, 0.7379+0.2128j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.4830-0.4207j, 0.7379+0.2128j]])
New state:  tensor([[0.3908-0.5075j, 0.6816+0.3538j]])
----------Measure----------
Probability:  tensor([[0.4103, 0.5897]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4647-0.6848j, 0.5153+0.2225j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.4647-0.6848j, 0.5153+0.2225j]])
New state:  tensor([[0.3208-0.7629j, 0.4615+0.3196j]])
----------Measure----------
Probability:  tensor([[0.6849, 0.3151]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4660-0.3765j, 0.7731+0.2084j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.4660-0.3765j, 0.7731+0.2084j]])
New state:  tensor([[0.3828-0.4609j, 0.7170+0.3564j]])
----------Measure----------
Probability:  tensor([[0.3589, 0.6411]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4856-0.6935j, 0.4957+0.1940j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.4856-0.6935j, 0.4957+0.1940j]])
New state:  tensor([[0.3396-0.7755j, 0.4478+0.2877j]])
----------Measure----------
Probability:  tensor([[0.7167, 0.2833]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2908-0.4185j, 0.7868+0.3481j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.2908-0.4185j, 0.7868+0.3481j]])
New state:  tensor([[0.2028-0.4675j, 0.7030+0.4961j]])
----------Measure----------
Probability:  tensor([[0.2597, 0.7403]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3294-0.4038j, 0.7951+0.3102j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.3294-0.4038j, 0.7951+0.3102j]])
New state:  tensor([[0.2436-0.4607j, 0.7185+0.4606j]])
----------Measure----------
Probability:  tensor([[0.2716, 0.7284]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6037-0.5984j, 0.5150+0.1110j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.6037-0.5984j, 0.5150+0.1110j]])
New state:  tensor([[0.4741-0.7055j, 0.4831+0.2102j]])
----------Measure----------
Probability:  tensor([[0.7224, 0.2776]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0119-0.2785j, 0.8388+0.4677j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.0119-0.2785j, 0.8388+0.4677j]])
New state:  tensor([[-0.0431-0.2754j,  0.7304+0.6236j]])
----------Measure----------
Probability:  tensor([[0.0777, 0.9223]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5229+0.j]])
ry_matrix:  tensor([[ 0.9660-0.j, -0.2585-0.j],
        [ 0.2585+0.j,  0.9660-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5164-0.2975j, 0.7888+0.1504j]])
Inside  rz
rz_matrix theta:  tensor([[0.3961+0.j]])
rz_matrix:  tensor([[0.9804-0.1968j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9804+0.1968j]])
Performing matrix multiplication

Current state:  tensor([[0.5164-0.2975j, 0.7888+0.1504j]])
New state:  tensor([[0.4477-0.3932j, 0.7438+0.3027j]])
----------Measure----------
Probability:  tensor([[0.3551, 0.6449]])
valid set accuracy: 1.0
valid set loss: 0.36532390117645264
------------------------------Epoch64------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3863-0.7767j, 0.4291+0.2517j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.3863-0.7767j, 0.4291+0.2517j]])
New state:  tensor([[0.2288-0.8368j, 0.3723+0.3299j]])
----------Measure----------
Probability:  tensor([[0.7525, 0.2475]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5616-0.6217j, 0.5265+0.1447j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.5616-0.6217j, 0.5265+0.1447j]])
New state:  tensor([[0.4308-0.7185j, 0.4885+0.2438j]])
----------Measure----------
Probability:  tensor([[0.7019, 0.2981]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3108-0.5440j, 0.6775+0.3854j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.3108-0.5440j, 0.6775+0.3854j]])
New state:  tensor([[0.1997-0.5938j, 0.5902+0.5091j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5158-0.2976j, 0.7892+0.1502j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.5158-0.2976j, 0.7892+0.1502j]])
New state:  tensor([[0.4485-0.3917j, 0.7453+0.3000j]])
----------Measure----------
Probability:  tensor([[0.3546, 0.6454]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4852-0.6936j, 0.4960+0.1935j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.4852-0.6936j, 0.4960+0.1935j]])
New state:  tensor([[0.3419-0.7743j, 0.4493+0.2857j]])
----------Measure----------
Probability:  tensor([[0.7165, 0.2835]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4461-0.7091j, 0.4955+0.2298j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.4461-0.7091j, 0.4955+0.2298j]])
New state:  tensor([[0.3005-0.7819j, 0.4417+0.3212j]])
----------Measure----------
Probability:  tensor([[0.7017, 0.2983]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2792-0.6996j, 0.5054+0.4210j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.2792-0.6996j, 0.5054+0.4210j]])
New state:  tensor([[0.1386-0.7404j, 0.4144+0.5108j]])
----------Measure----------
Probability:  tensor([[0.5674, 0.4326]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0113-0.2789j, 0.8388+0.4675j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.0113-0.2789j, 0.8388+0.4675j]])
New state:  tensor([[-0.0429-0.2758j,  0.7326+0.6209j]])
----------Measure----------
Probability:  tensor([[0.0779, 0.9221]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6033-0.5985j, 0.5155+0.1105j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.6033-0.5985j, 0.5155+0.1105j]])
New state:  tensor([[0.4761-0.7038j, 0.4844+0.2081j]])
----------Measure----------
Probability:  tensor([[0.7221, 0.2779]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2902-0.4187j, 0.7871+0.3478j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.2902-0.4187j, 0.7871+0.3478j]])
New state:  tensor([[0.2038-0.4670j, 0.7050+0.4934j]])
----------Measure----------
Probability:  tensor([[0.2596, 0.7404]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2354-0.8058j, 0.3602+0.4068j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.2354-0.8058j, 0.3602+0.4068j]])
New state:  tensor([[0.0751-0.8361j, 0.2748+0.4688j]])
----------Measure----------
Probability:  tensor([[0.7047, 0.2953]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4056-0.4664j, 0.7343+0.2807j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.4056-0.4664j, 0.7343+0.2807j]])
New state:  tensor([[0.3078-0.5360j, 0.6662+0.4174j]])
----------Measure----------
Probability:  tensor([[0.3820, 0.6180]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4091-0.5327j, 0.6799+0.2943j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.4091-0.5327j, 0.6799+0.2943j]])
New state:  tensor([[0.2984-0.6018j, 0.6101+0.4202j]])
----------Measure----------
Probability:  tensor([[0.4512, 0.5488]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4643-0.6850j, 0.5157+0.2220j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.4643-0.6850j, 0.5157+0.2220j]])
New state:  tensor([[0.3230-0.7619j, 0.4630+0.3175j]])
----------Measure----------
Probability:  tensor([[0.6848, 0.3152]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4662-0.7180j, 0.4766+0.2003j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.4662-0.7180j, 0.4766+0.2003j]])
New state:  tensor([[0.3185-0.7945j, 0.4289+0.2886j]])
----------Measure----------
Probability:  tensor([[0.7328, 0.2672]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5261-0.7675j, 0.3615+0.0597j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.5261-0.7675j, 0.3615+0.0597j]])
New state:  tensor([[0.3677-0.8547j, 0.3431+0.1285j]])
----------Measure----------
Probability:  tensor([[0.8658, 0.1342]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3948-0.4947j, 0.7147+0.2977j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.3948-0.4947j, 0.7147+0.2977j]])
New state:  tensor([[0.2917-0.5617j, 0.6437+0.4303j]])
----------Measure----------
Probability:  tensor([[0.4006, 0.5994]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3289-0.4040j, 0.7954+0.3099j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.3289-0.4040j, 0.7954+0.3099j]])
New state:  tensor([[0.2445-0.4600j, 0.7204+0.4579j]])
----------Measure----------
Probability:  tensor([[0.2714, 0.7286]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1612-0.8078j, 0.2918+0.4861j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.1612-0.8078j, 0.2918+0.4861j]])
New state:  tensor([[0.0019-0.8237j, 0.1923+0.5334j]])
----------Measure----------
Probability:  tensor([[0.6786, 0.3214]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6033-0.5985j, 0.5155+0.1105j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.6033-0.5985j, 0.5155+0.1105j]])
New state:  tensor([[0.4761-0.7038j, 0.4844+0.2081j]])
----------Measure----------
Probability:  tensor([[0.7221, 0.2779]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3518-0.7212j, 0.4966+0.3308j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.3518-0.7212j, 0.4966+0.3308j]])
New state:  tensor([[0.2057-0.7757j, 0.4233+0.4206j]])
----------Measure----------
Probability:  tensor([[0.6439, 0.3561]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4463-0.7415j, 0.4563+0.2068j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.4463-0.7415j, 0.4563+0.2068j]])
New state:  tensor([[0.2945-0.8138j, 0.4077+0.2912j]])
----------Measure----------
Probability:  tensor([[0.7490, 0.2510]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4825-0.4208j, 0.7382+0.2124j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.4825-0.4208j, 0.7382+0.2124j]])
New state:  tensor([[0.3920-0.5062j, 0.6832+0.3512j]])
----------Measure----------
Probability:  tensor([[0.4099, 0.5901]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5049-0.3436j, 0.7726+0.1735j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.5049-0.3436j, 0.7726+0.1735j]])
New state:  tensor([[0.4289-0.4348j, 0.7245+0.3196j]])
----------Measure----------
Probability:  tensor([[0.3730, 0.6270]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4011-0.6545j, 0.5662+0.3002j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.4011-0.6545j, 0.5662+0.3002j]])
New state:  tensor([[0.2669-0.7197j, 0.4975+0.4040j]])
----------Measure----------
Probability:  tensor([[0.5893, 0.4107]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6692-0.6651j, 0.3281-0.0457j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.6692-0.6651j, 0.3281-0.0457j]])
New state:  tensor([[0.5280-0.7820j, 0.3308+0.0187j]])
----------Measure----------
Probability:  tensor([[0.8902, 0.1098]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4654-0.3767j, 0.7734+0.2081j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.4654-0.3767j, 0.7734+0.2081j]])
New state:  tensor([[0.3838-0.4596j, 0.7186+0.3537j]])
----------Measure----------
Probability:  tensor([[0.3585, 0.6415]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5853-0.6277j, 0.5001+0.1159j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.5853-0.6277j, 0.5001+0.1159j]])
New state:  tensor([[0.4528-0.7290j, 0.4682+0.2105j]])
----------Measure----------
Probability:  tensor([[0.7365, 0.2635]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5244+0.j]])
ry_matrix:  tensor([[ 0.9658-0.j, -0.2592-0.j],
        [ 0.2592+0.j,  0.9658-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0615-0.3447j, 0.7911+0.5016j]])
Inside  rz
rz_matrix theta:  tensor([[0.3892+0.j]])
rz_matrix:  tensor([[0.9811-0.1934j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9811+0.1934j]])
Performing matrix multiplication

Current state:  tensor([[0.0615-0.3447j, 0.7911+0.5016j]])
New state:  tensor([[-0.0063-0.3501j,  0.6792+0.6451j]])
----------Measure----------
Probability:  tensor([[0.1226, 0.8774]])
valid set accuracy: 1.0
valid set loss: 0.3652362525463104
------------------------------Epoch65------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0609-0.3451j, 0.7912+0.5013j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.0609-0.3451j, 0.7912+0.5013j]])
New state:  tensor([[-0.0058-0.3504j,  0.6814+0.6426j]])
----------Measure----------
Probability:  tensor([[0.1228, 0.8772]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3942-0.4949j, 0.7150+0.2973j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.3942-0.4949j, 0.7150+0.2973j]])
New state:  tensor([[0.2929-0.5609j, 0.6455+0.4278j]])
----------Measure----------
Probability:  tensor([[0.4004, 0.5996]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4006-0.6548j, 0.5666+0.2997j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.6548j, 0.5666+0.2997j]])
New state:  tensor([[0.2688-0.7190j, 0.4992+0.4019j]])
----------Measure----------
Probability:  tensor([[0.5892, 0.4108]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2787-0.6999j, 0.5056+0.4204j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.2787-0.6999j, 0.5056+0.4204j]])
New state:  tensor([[0.1406-0.7402j, 0.4164+0.5089j]])
----------Measure----------
Probability:  tensor([[0.5676, 0.4324]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6028-0.5985j, 0.5160+0.1100j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.6028-0.5985j, 0.5160+0.1100j]])
New state:  tensor([[0.4780-0.7023j, 0.4856+0.2061j]])
----------Measure----------
Probability:  tensor([[0.7217, 0.2783]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4658-0.7181j, 0.4770+0.1997j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.4658-0.7181j, 0.4770+0.1997j]])
New state:  tensor([[0.3207-0.7936j, 0.4303+0.2867j]])
----------Measure----------
Probability:  tensor([[0.7326, 0.2674]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2896-0.4190j, 0.7873+0.3474j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.2896-0.4190j, 0.7873+0.3474j]])
New state:  tensor([[0.2046-0.4664j, 0.7069+0.4908j]])
----------Measure----------
Probability:  tensor([[0.2594, 0.7406]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4639-0.6852j, 0.5161+0.2214j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.4639-0.6852j, 0.5161+0.2214j]])
New state:  tensor([[0.3251-0.7609j, 0.4645+0.3155j]])
----------Measure----------
Probability:  tensor([[0.6847, 0.3153]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3282-0.4043j, 0.7956+0.3096j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.3282-0.4043j, 0.7956+0.3096j]])
New state:  tensor([[0.2453-0.4593j, 0.7223+0.4552j]])
----------Measure----------
Probability:  tensor([[0.2711, 0.7289]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4457-0.7092j, 0.4958+0.2292j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.4457-0.7092j, 0.4958+0.2292j]])
New state:  tensor([[0.3027-0.7810j, 0.4432+0.3193j]])
----------Measure----------
Probability:  tensor([[0.7016, 0.2984]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3514-0.7215j, 0.4969+0.3302j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.3514-0.7215j, 0.4969+0.3302j]])
New state:  tensor([[0.2078-0.7752j, 0.4250+0.4187j]])
----------Measure----------
Probability:  tensor([[0.6440, 0.3560]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4819-0.4210j, 0.7386+0.2121j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.4819-0.4210j, 0.7386+0.2121j]])
New state:  tensor([[0.3930-0.5049j, 0.6848+0.3487j]])
----------Measure----------
Probability:  tensor([[0.4094, 0.5906]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4648-0.3769j, 0.7738+0.2078j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.4648-0.3769j, 0.7738+0.2078j]])
New state:  tensor([[0.3846-0.4584j, 0.7202+0.3511j]])
----------Measure----------
Probability:  tensor([[0.3580, 0.6420]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4848-0.6938j, 0.4964+0.1929j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.4848-0.6938j, 0.4964+0.1929j]])
New state:  tensor([[0.3440-0.7733j, 0.4507+0.2838j]])
----------Measure----------
Probability:  tensor([[0.7163, 0.2837]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5612-0.6218j, 0.5269+0.1442j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.5612-0.6218j, 0.5269+0.1442j]])
New state:  tensor([[0.4327-0.7171j, 0.4899+0.2417j]])
----------Measure----------
Probability:  tensor([[0.7016, 0.2984]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4050-0.4666j, 0.7346+0.2803j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.4050-0.4666j, 0.7346+0.2803j]])
New state:  tensor([[0.3089-0.5351j, 0.6679+0.4148j]])
----------Measure----------
Probability:  tensor([[0.3818, 0.6182]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4460-0.7417j, 0.4567+0.2062j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.4460-0.7417j, 0.4567+0.2062j]])
New state:  tensor([[0.2968-0.8129j, 0.4091+0.2893j]])
----------Measure----------
Probability:  tensor([[0.7489, 0.2511]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5151-0.2977j, 0.7896+0.1500j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.5151-0.2977j, 0.7896+0.1500j]])
New state:  tensor([[0.4491-0.3902j, 0.7467+0.2974j]])
----------Measure----------
Probability:  tensor([[0.3540, 0.6460]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6690-0.6651j, 0.3287-0.0462j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.6690-0.6651j, 0.3287-0.0462j]])
New state:  tensor([[0.5303-0.7801j, 0.3315+0.0171j]])
----------Measure----------
Probability:  tensor([[0.8898, 0.1102]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5848-0.6278j, 0.5006+0.1154j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.5848-0.6278j, 0.5006+0.1154j]])
New state:  tensor([[0.4548-0.7275j, 0.4695+0.2085j]])
----------Measure----------
Probability:  tensor([[0.7361, 0.2639]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5258-0.7675j, 0.3619+0.0591j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.5258-0.7675j, 0.3619+0.0591j]])
New state:  tensor([[0.3702-0.8535j, 0.3441+0.1268j]])
----------Measure----------
Probability:  tensor([[0.8655, 0.1345]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6028-0.5985j, 0.5160+0.1100j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.6028-0.5985j, 0.5160+0.1100j]])
New state:  tensor([[0.4780-0.7023j, 0.4856+0.2061j]])
----------Measure----------
Probability:  tensor([[0.7217, 0.2783]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3860-0.7769j, 0.4294+0.2511j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.3860-0.7769j, 0.4294+0.2511j]])
New state:  tensor([[0.2312-0.8361j, 0.3738+0.3281j]])
----------Measure----------
Probability:  tensor([[0.7526, 0.2474]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5043-0.3437j, 0.7730+0.1732j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.5043-0.3437j, 0.7730+0.1732j]])
New state:  tensor([[0.4297-0.4334j, 0.7260+0.3170j]])
----------Measure----------
Probability:  tensor([[0.3725, 0.6275]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2351-0.8061j, 0.3604+0.4061j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.2351-0.8061j, 0.3604+0.4061j]])
New state:  tensor([[0.0776-0.8361j, 0.2766+0.4673j]])
----------Measure----------
Probability:  tensor([[0.7051, 0.2949]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0106-0.2792j, 0.8388+0.4672j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.0106-0.2792j, 0.8388+0.4672j]])
New state:  tensor([[-0.0427-0.2762j,  0.7347+0.6182j]])
----------Measure----------
Probability:  tensor([[0.0781, 0.9219]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4086-0.5330j, 0.6802+0.2938j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.4086-0.5330j, 0.6802+0.2938j]])
New state:  tensor([[0.2998-0.6009j, 0.6119+0.4178j]])
----------Measure----------
Probability:  tensor([[0.4510, 0.5490]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1609-0.8082j, 0.2919+0.4854j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.1609-0.8082j, 0.2919+0.4854j]])
New state:  tensor([[0.0043-0.8241j, 0.1943+0.5321j]])
----------Measure----------
Probability:  tensor([[0.6791, 0.3209]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5261+0.j]])
ry_matrix:  tensor([[ 0.9656-0.j, -0.2600-0.j],
        [ 0.2600+0.j,  0.9656-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3102-0.5443j, 0.6777+0.3849j]])
Inside  rz
rz_matrix theta:  tensor([[0.3826+0.j]])
rz_matrix:  tensor([[0.9818-0.1901j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9818+0.1901j]])
Performing matrix multiplication

Current state:  tensor([[0.3102-0.5443j, 0.6777+0.3849j]])
New state:  tensor([[0.2010-0.5934j, 0.5922+0.5068j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
valid set accuracy: 1.0
valid set loss: 0.3651413023471832
------------------------------Epoch66------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3938-0.4951j, 0.7152+0.2970j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.3938-0.4951j, 0.7152+0.2970j]])
New state:  tensor([[0.2943-0.5600j, 0.6470+0.4256j]])
----------Measure----------
Probability:  tensor([[0.4002, 0.5998]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4815-0.4211j, 0.7389+0.2119j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.4815-0.4211j, 0.7389+0.2119j]])
New state:  tensor([[0.3942-0.5037j, 0.6862+0.3464j]])
----------Measure----------
Probability:  tensor([[0.4092, 0.5908]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4046-0.4668j, 0.7348+0.2800j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.4046-0.4668j, 0.7348+0.2800j]])
New state:  tensor([[0.3102-0.5342j, 0.6695+0.4125j]])
----------Measure----------
Probability:  tensor([[0.3816, 0.6184]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3099-0.5445j, 0.6779+0.3846j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.3099-0.5445j, 0.6779+0.3846j]])
New state:  tensor([[0.2026-0.5929j, 0.5940+0.5046j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3511-0.7217j, 0.4971+0.3299j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.3511-0.7217j, 0.4971+0.3299j]])
New state:  tensor([[0.2099-0.7746j, 0.4266+0.4170j]])
----------Measure----------
Probability:  tensor([[0.6441, 0.3559]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4082-0.5331j, 0.6804+0.2936j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.4082-0.5331j, 0.6804+0.2936j]])
New state:  tensor([[0.3013-0.6000j, 0.6135+0.4156j]])
----------Measure----------
Probability:  tensor([[0.4508, 0.5492]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3857-0.7771j, 0.4296+0.2507j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.3857-0.7771j, 0.4296+0.2507j]])
New state:  tensor([[0.2336-0.8355j, 0.3751+0.3266j]])
----------Measure----------
Probability:  tensor([[0.7526, 0.2474]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5039-0.3438j, 0.7733+0.1730j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.5039-0.3438j, 0.7733+0.1730j]])
New state:  tensor([[0.4307-0.4320j, 0.7273+0.3146j]])
----------Measure----------
Probability:  tensor([[0.3721, 0.6279]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4636-0.6853j, 0.5163+0.2211j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.4636-0.6853j, 0.5163+0.2211j]])
New state:  tensor([[0.3272-0.7599j, 0.4658+0.3138j]])
----------Measure----------
Probability:  tensor([[0.6846, 0.3154]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4655-0.7182j, 0.4772+0.1993j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.4655-0.7182j, 0.4772+0.1993j]])
New state:  tensor([[0.3230-0.7926j, 0.4315+0.2851j]])
----------Measure----------
Probability:  tensor([[0.7326, 0.2674]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5609-0.6219j, 0.5272+0.1439j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.5609-0.6219j, 0.5272+0.1439j]])
New state:  tensor([[0.4347-0.7158j, 0.4910+0.2399j]])
----------Measure----------
Probability:  tensor([[0.7014, 0.2986]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4846-0.6939j, 0.4967+0.1926j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.4846-0.6939j, 0.4967+0.1926j]])
New state:  tensor([[0.3462-0.7722j, 0.4519+0.2821j]])
----------Measure----------
Probability:  tensor([[0.7162, 0.2838]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2892-0.4192j, 0.7874+0.3472j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.2892-0.4192j, 0.7874+0.3472j]])
New state:  tensor([[0.2057-0.4659j, 0.7086+0.4884j]])
----------Measure----------
Probability:  tensor([[0.2594, 0.7406]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5846-0.6278j, 0.5008+0.1151j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.5846-0.6278j, 0.5008+0.1151j]])
New state:  tensor([[0.4569-0.7261j, 0.4705+0.2068j]])
----------Measure----------
Probability:  tensor([[0.7359, 0.2641]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0102-0.2795j, 0.8388+0.4671j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.0102-0.2795j, 0.8388+0.4671j]])
New state:  tensor([[-0.0423-0.2764j,  0.7366+0.6158j]])
----------Measure----------
Probability:  tensor([[0.0782, 0.9218]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2785-0.7001j, 0.5057+0.4201j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.2785-0.7001j, 0.5057+0.4201j]])
New state:  tensor([[0.1426-0.7399j, 0.4182+0.5073j]])
----------Measure----------
Probability:  tensor([[0.5678, 0.4322]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4454-0.7094j, 0.4960+0.2288j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.4454-0.7094j, 0.4960+0.2288j]])
New state:  tensor([[0.3049-0.7801j, 0.4445+0.3176j]])
----------Measure----------
Probability:  tensor([[0.7016, 0.2984]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6026-0.5986j, 0.5163+0.1098j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.6026-0.5986j, 0.5163+0.1098j]])
New state:  tensor([[0.4800-0.7007j, 0.4866+0.2044j]])
----------Measure----------
Probability:  tensor([[0.7214, 0.2786]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.4003-0.6549j, 0.5667+0.2994j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.4003-0.6549j, 0.5667+0.2994j]])
New state:  tensor([[0.2708-0.7182j, 0.5008+0.4001j]])
----------Measure----------
Probability:  tensor([[0.5892, 0.4108]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3278-0.4044j, 0.7958+0.3094j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.3278-0.4044j, 0.7958+0.3094j]])
New state:  tensor([[0.2464-0.4586j, 0.7239+0.4527j]])
----------Measure----------
Probability:  tensor([[0.2710, 0.7290]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5147-0.2978j, 0.7899+0.1498j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.5147-0.2978j, 0.7899+0.1498j]])
New state:  tensor([[0.4500-0.3888j, 0.7479+0.2949j]])
----------Measure----------
Probability:  tensor([[0.3536, 0.6464]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1608-0.8085j, 0.2920+0.4851j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.1608-0.8085j, 0.2920+0.4851j]])
New state:  tensor([[0.0067-0.8243j, 0.1961+0.5311j]])
----------Measure----------
Probability:  tensor([[0.6795, 0.3205]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4644-0.3770j, 0.7740+0.2076j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.4644-0.3770j, 0.7740+0.2076j]])
New state:  tensor([[0.3857-0.4572j, 0.7216+0.3487j]])
----------Measure----------
Probability:  tensor([[0.3578, 0.6422]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0605-0.3453j, 0.7912+0.5011j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.0605-0.3453j, 0.7912+0.5011j]])
New state:  tensor([[-0.0052-0.3505j,  0.6835+0.6403j]])
----------Measure----------
Probability:  tensor([[0.1229, 0.8771]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6026-0.5986j, 0.5163+0.1098j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.6026-0.5986j, 0.5163+0.1098j]])
New state:  tensor([[0.4800-0.7007j, 0.4866+0.2044j]])
----------Measure----------
Probability:  tensor([[0.7214, 0.2786]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6688-0.6650j, 0.3290-0.0465j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.6688-0.6650j, 0.3290-0.0465j]])
New state:  tensor([[0.5326-0.7784j, 0.3319+0.0158j]])
----------Measure----------
Probability:  tensor([[0.8896, 0.1104]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2349-0.8063j, 0.3605+0.4058j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.2349-0.8063j, 0.3605+0.4058j]])
New state:  tensor([[0.0800-0.8361j, 0.2783+0.4660j]])
----------Measure----------
Probability:  tensor([[0.7054, 0.2946]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4457-0.7418j, 0.4569+0.2059j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.4457-0.7418j, 0.4569+0.2059j]])
New state:  tensor([[0.2991-0.8120j, 0.4103+0.2877j]])
----------Measure----------
Probability:  tensor([[0.7489, 0.2511]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5270+0.j]])
ry_matrix:  tensor([[ 0.9655-0.j, -0.2605-0.j],
        [ 0.2605+0.j,  0.9655-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5256-0.7676j, 0.3622+0.0587j]])
Inside  rz
rz_matrix theta:  tensor([[0.3763+0.j]])
rz_matrix:  tensor([[0.9824-0.1870j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9824+0.1870j]])
Performing matrix multiplication

Current state:  tensor([[0.5256-0.7676j, 0.3622+0.0587j]])
New state:  tensor([[0.3727-0.8523j, 0.3448+0.1254j]])
----------Measure----------
Probability:  tensor([[0.8654, 0.1346]])
valid set accuracy: 1.0
valid set loss: 0.3650851547718048
------------------------------Epoch67------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6020-0.5987j, 0.5169+0.1091j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.6020-0.5987j, 0.5169+0.1091j]])
New state:  tensor([[0.4815-0.6993j, 0.4880+0.2024j]])
----------Measure----------
Probability:  tensor([[0.7209, 0.2791]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4038-0.4671j, 0.7353+0.2795j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.4038-0.4671j, 0.7353+0.2795j]])
New state:  tensor([[0.3109-0.5334j, 0.6713+0.4101j]])
----------Measure----------
Probability:  tensor([[0.3812, 0.6188]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4635-0.3772j, 0.7746+0.2072j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.4635-0.3772j, 0.7746+0.2072j]])
New state:  tensor([[0.3862-0.4561j, 0.7232+0.3462j]])
----------Measure----------
Probability:  tensor([[0.3571, 0.6429]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2883-0.4196j, 0.7878+0.3468j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.2883-0.4196j, 0.7878+0.3468j]])
New state:  tensor([[0.2061-0.4655j, 0.7105+0.4859j]])
----------Measure----------
Probability:  tensor([[0.2592, 0.7408]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5139-0.2979j, 0.7905+0.1495j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.5139-0.2979j, 0.7905+0.1495j]])
New state:  tensor([[0.4502-0.3874j, 0.7494+0.2925j]])
----------Measure----------
Probability:  tensor([[0.3528, 0.6472]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4449-0.7096j, 0.4965+0.2281j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.4449-0.7096j, 0.4965+0.2281j]])
New state:  tensor([[0.3066-0.7794j, 0.4461+0.3156j]])
----------Measure----------
Probability:  tensor([[0.7014, 0.2986]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0596-0.3459j, 0.7912+0.5007j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.0596-0.3459j, 0.7912+0.5007j]])
New state:  tensor([[-0.0051-0.3509j,  0.6855+0.6378j]])
----------Measure----------
Probability:  tensor([[0.1232, 0.8768]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6020-0.5987j, 0.5169+0.1091j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.6020-0.5987j, 0.5169+0.1091j]])
New state:  tensor([[0.4815-0.6993j, 0.4880+0.2024j]])
----------Measure----------
Probability:  tensor([[0.7209, 0.2791]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5603-0.6220j, 0.5278+0.1432j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.5603-0.6220j, 0.5278+0.1432j]])
New state:  tensor([[0.4363-0.7145j, 0.4924+0.2379j]])
----------Measure----------
Probability:  tensor([[0.7009, 0.2991]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3091-0.5449j, 0.6782+0.3840j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.3091-0.5449j, 0.6782+0.3840j]])
New state:  tensor([[0.2035-0.5925j, 0.5959+0.5023j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1605-0.8090j, 0.2922+0.4842j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.1605-0.8090j, 0.2922+0.4842j]])
New state:  tensor([[0.0088-0.8247j, 0.1980+0.5297j]])
----------Measure----------
Probability:  tensor([[0.6802, 0.3198]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5840-0.6279j, 0.5015+0.1144j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.5840-0.6279j, 0.5015+0.1144j]])
New state:  tensor([[0.4585-0.7247j, 0.4719+0.2048j]])
----------Measure----------
Probability:  tensor([[0.7354, 0.2646]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4630-0.6855j, 0.5168+0.2203j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.4630-0.6855j, 0.5168+0.2203j]])
New state:  tensor([[0.3289-0.7591j, 0.4674+0.3117j]])
----------Measure----------
Probability:  tensor([[0.6844, 0.3156]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2779-0.7006j, 0.5061+0.4193j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.2779-0.7006j, 0.5061+0.4193j]])
New state:  tensor([[0.1442-0.7398j, 0.4202+0.5053j]])
----------Measure----------
Probability:  tensor([[0.5681, 0.4319]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4840-0.6941j, 0.4972+0.1918j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.4840-0.6941j, 0.4972+0.1918j]])
New state:  tensor([[0.3480-0.7713j, 0.4534+0.2800j]])
----------Measure----------
Probability:  tensor([[0.7160, 0.2840]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2345-0.8068j, 0.3608+0.4048j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.2345-0.8068j, 0.3608+0.4048j]])
New state:  tensor([[0.0820-0.8362j, 0.2801+0.4644j]])
----------Measure----------
Probability:  tensor([[0.7059, 0.2941]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3269-0.4048j, 0.7962+0.3089j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.3269-0.4048j, 0.7962+0.3089j]])
New state:  tensor([[0.2468-0.4580j, 0.7257+0.4502j]])
----------Measure----------
Probability:  tensor([[0.2707, 0.7293]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3506-0.7220j, 0.4975+0.3291j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.3506-0.7220j, 0.4975+0.3291j]])
New state:  tensor([[0.2117-0.7742j, 0.4284+0.4150j]])
----------Measure----------
Probability:  tensor([[0.6442, 0.3558]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0092-0.2800j, 0.8388+0.4668j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.0092-0.2800j, 0.8388+0.4668j]])
New state:  tensor([[-0.0425-0.2769j,  0.7385+0.6132j]])
----------Measure----------
Probability:  tensor([[0.0785, 0.9215]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6684-0.6650j, 0.3298-0.0473j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.6684-0.6650j, 0.3298-0.0473j]])
New state:  tensor([[0.5346-0.7767j, 0.3328+0.0142j]])
----------Measure----------
Probability:  tensor([[0.8890, 0.1110]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5030-0.3440j, 0.7738+0.1726j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.5030-0.3440j, 0.7738+0.1726j]])
New state:  tensor([[0.4311-0.4307j, 0.7288+0.3121j]])
----------Measure----------
Probability:  tensor([[0.3714, 0.6286]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5252-0.7676j, 0.3628+0.0578j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.5252-0.7676j, 0.3628+0.0578j]])
New state:  tensor([[0.3749-0.8512j, 0.3459+0.1236j]])
----------Measure----------
Probability:  tensor([[0.8651, 0.1349]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4807-0.4213j, 0.7394+0.2114j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.4807-0.4213j, 0.7394+0.2114j]])
New state:  tensor([[0.3949-0.5026j, 0.6879+0.3439j]])
----------Measure----------
Probability:  tensor([[0.4086, 0.5914]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3997-0.6552j, 0.5672+0.2986j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.3997-0.6552j, 0.5672+0.2986j]])
New state:  tensor([[0.2723-0.7176j, 0.5025+0.3979j]])
----------Measure----------
Probability:  tensor([[0.5891, 0.4109]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4452-0.7420j, 0.4574+0.2050j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.4452-0.7420j, 0.4574+0.2050j]])
New state:  tensor([[0.3010-0.8113j, 0.4118+0.2857j]])
----------Measure----------
Probability:  tensor([[0.7488, 0.2512]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3930-0.4954j, 0.7157+0.2965j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.3930-0.4954j, 0.7157+0.2965j]])
New state:  tensor([[0.2951-0.5593j, 0.6489+0.4232j]])
----------Measure----------
Probability:  tensor([[0.3999, 0.6001]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4650-0.7184j, 0.4777+0.1985j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.4650-0.7184j, 0.4777+0.1985j]])
New state:  tensor([[0.3248-0.7918j, 0.4330+0.2831j]])
----------Measure----------
Probability:  tensor([[0.7324, 0.2676]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3853-0.7773j, 0.4300+0.2498j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.3853-0.7773j, 0.4300+0.2498j]])
New state:  tensor([[0.2356-0.8350j, 0.3767+0.3247j]])
----------Measure----------
Probability:  tensor([[0.7527, 0.2473]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5293+0.j]])
ry_matrix:  tensor([[ 0.9652-0.j, -0.2616-0.j],
        [ 0.2616+0.j,  0.9652-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4075-0.5334j, 0.6809+0.2930j]])
Inside  rz
rz_matrix theta:  tensor([[0.3703+0.j]])
rz_matrix:  tensor([[0.9829-0.1841j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9829+0.1841j]])
Performing matrix multiplication

Current state:  tensor([[0.4075-0.5334j, 0.6809+0.2930j]])
New state:  tensor([[0.3023-0.5993j, 0.6153+0.4133j]])
----------Measure----------
Probability:  tensor([[0.4506, 0.5494]])
valid set accuracy: 1.0
valid set loss: 0.3649582266807556
------------------------------Epoch68------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4648-0.7185j, 0.4779+0.1982j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.4648-0.7185j, 0.4779+0.1982j]])
New state:  tensor([[0.3268-0.7909j, 0.4341+0.2815j]])
----------Measure----------
Probability:  tensor([[0.7323, 0.2677]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3265-0.4049j, 0.7963+0.3087j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.3265-0.4049j, 0.7963+0.3087j]])
New state:  tensor([[0.2477-0.4574j, 0.7271+0.4480j]])
----------Measure----------
Probability:  tensor([[0.2706, 0.7294]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6018-0.5988j, 0.5172+0.1088j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.5988j, 0.5172+0.1088j]])
New state:  tensor([[0.4832-0.6979j, 0.4889+0.2008j]])
----------Measure----------
Probability:  tensor([[0.7207, 0.2793]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4446-0.7097j, 0.4967+0.2277j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.4446-0.7097j, 0.4967+0.2277j]])
New state:  tensor([[0.3086-0.7786j, 0.4472+0.3140j]])
----------Measure----------
Probability:  tensor([[0.7014, 0.2986]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2777-0.7008j, 0.5062+0.4189j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.2777-0.7008j, 0.5062+0.4189j]])
New state:  tensor([[0.1460-0.7395j, 0.4218+0.5038j]])
----------Measure----------
Probability:  tensor([[0.5683, 0.4317]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3088-0.5451j, 0.6784+0.3838j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.3088-0.5451j, 0.6784+0.3838j]])
New state:  tensor([[0.2048-0.5921j, 0.5976+0.5004j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5250-0.7677j, 0.3630+0.0575j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.5250-0.7677j, 0.3630+0.0575j]])
New state:  tensor([[0.3771-0.8501j, 0.3466+0.1223j]])
----------Measure----------
Probability:  tensor([[0.8649, 0.1351]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6683-0.6650j, 0.3301-0.0476j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.6683-0.6650j, 0.3301-0.0476j]])
New state:  tensor([[0.5367-0.7751j, 0.3332+0.0130j]])
----------Measure----------
Probability:  tensor([[0.8888, 0.1112]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0088-0.2802j, 0.8388+0.4667j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.0088-0.2802j, 0.8388+0.4667j]])
New state:  tensor([[-0.0421-0.2772j,  0.7403+0.6110j]])
----------Measure----------
Probability:  tensor([[0.0786, 0.9214]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1603-0.8092j, 0.2922+0.4838j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.1603-0.8092j, 0.2922+0.4838j]])
New state:  tensor([[0.0110-0.8249j, 0.1997+0.5287j]])
----------Measure----------
Probability:  tensor([[0.6806, 0.3194]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2879-0.4197j, 0.7879+0.3466j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.2879-0.4197j, 0.7879+0.3466j]])
New state:  tensor([[0.2071-0.4650j, 0.7120+0.4837j]])
----------Measure----------
Probability:  tensor([[0.2591, 0.7409]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0592-0.3461j, 0.7913+0.5006j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.0592-0.3461j, 0.7913+0.5006j]])
New state:  tensor([[-0.0045-0.3511j,  0.6874+0.6357j]])
----------Measure----------
Probability:  tensor([[0.1233, 0.8767]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4838-0.6942j, 0.4974+0.1914j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.4838-0.6942j, 0.4974+0.1914j]])
New state:  tensor([[0.3499-0.7704j, 0.4545+0.2785j]])
----------Measure----------
Probability:  tensor([[0.7159, 0.2841]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5135-0.2980j, 0.7907+0.1494j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.5135-0.2980j, 0.7907+0.1494j]])
New state:  tensor([[0.4509-0.3862j, 0.7505+0.2902j]])
----------Measure----------
Probability:  tensor([[0.3525, 0.6475]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5601-0.6221j, 0.5281+0.1429j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.5601-0.6221j, 0.5281+0.1429j]])
New state:  tensor([[0.4380-0.7133j, 0.4934+0.2363j]])
----------Measure----------
Probability:  tensor([[0.7007, 0.2993]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4803-0.4214j, 0.7396+0.2112j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.4803-0.4214j, 0.7396+0.2112j]])
New state:  tensor([[0.3960-0.5015j, 0.6891+0.3418j]])
----------Measure----------
Probability:  tensor([[0.4083, 0.5917]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4071-0.5336j, 0.6811+0.2927j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.4071-0.5336j, 0.6811+0.2927j]])
New state:  tensor([[0.3037-0.5985j, 0.6167+0.4113j]])
----------Measure----------
Probability:  tensor([[0.4505, 0.5495]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3503-0.7222j, 0.4976+0.3287j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.3503-0.7222j, 0.4976+0.3287j]])
New state:  tensor([[0.2136-0.7737j, 0.4298+0.4135j]])
----------Measure----------
Probability:  tensor([[0.6443, 0.3557]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3927-0.4956j, 0.7159+0.2962j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.3927-0.4956j, 0.7159+0.2962j]])
New state:  tensor([[0.2964-0.5585j, 0.6503+0.4211j]])
----------Measure----------
Probability:  tensor([[0.3998, 0.6002]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3994-0.6554j, 0.5674+0.2983j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.3994-0.6554j, 0.5674+0.2983j]])
New state:  tensor([[0.2740-0.7169j, 0.5039+0.3962j]])
----------Measure----------
Probability:  tensor([[0.5891, 0.4109]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4628-0.6857j, 0.5170+0.2200j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.4628-0.6857j, 0.5170+0.2200j]])
New state:  tensor([[0.3308-0.7582j, 0.4686+0.3101j]])
----------Measure----------
Probability:  tensor([[0.6843, 0.3157]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2344-0.8070j, 0.3609+0.4045j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.2344-0.8070j, 0.3609+0.4045j]])
New state:  tensor([[0.0842-0.8361j, 0.2816+0.4632j]])
----------Measure----------
Probability:  tensor([[0.7062, 0.2938]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5838-0.6280j, 0.5018+0.1141j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.5838-0.6280j, 0.5018+0.1141j]])
New state:  tensor([[0.4603-0.7234j, 0.4728+0.2032j]])
----------Measure----------
Probability:  tensor([[0.7352, 0.2648]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6018-0.5988j, 0.5172+0.1088j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.5988j, 0.5172+0.1088j]])
New state:  tensor([[0.4832-0.6979j, 0.4889+0.2008j]])
----------Measure----------
Probability:  tensor([[0.7207, 0.2793]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4632-0.3773j, 0.7748+0.2070j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.4632-0.3773j, 0.7748+0.2070j]])
New state:  tensor([[0.3871-0.4550j, 0.7244+0.3440j]])
----------Measure----------
Probability:  tensor([[0.3569, 0.6431]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4035-0.4672j, 0.7355+0.2793j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.4035-0.4672j, 0.7355+0.2793j]])
New state:  tensor([[0.3121-0.5326j, 0.6726+0.4080j]])
----------Measure----------
Probability:  tensor([[0.3811, 0.6189]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4450-0.7421j, 0.4576+0.2047j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.4450-0.7421j, 0.4576+0.2047j]])
New state:  tensor([[0.3031-0.8105j, 0.4129+0.2842j]])
----------Measure----------
Probability:  tensor([[0.7487, 0.2513]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3851-0.7775j, 0.4302+0.2494j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.3851-0.7775j, 0.4302+0.2494j]])
New state:  tensor([[0.2377-0.8344j, 0.3778+0.3233j]])
----------Measure----------
Probability:  tensor([[0.7527, 0.2473]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5302+0.j]])
ry_matrix:  tensor([[ 0.9651-0.j, -0.2620-0.j],
        [ 0.2620+0.j,  0.9651-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5027-0.3441j, 0.7741+0.1725j]])
Inside  rz
rz_matrix theta:  tensor([[0.3646+0.j]])
rz_matrix:  tensor([[0.9834-0.1813j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9834+0.1813j]])
Performing matrix multiplication

Current state:  tensor([[0.5027-0.3441j, 0.7741+0.1725j]])
New state:  tensor([[0.4320-0.4295j, 0.7300+0.3099j]])
----------Measure----------
Probability:  tensor([[0.3711, 0.6289]])
valid set accuracy: 1.0
valid set loss: 0.3649042248725891
------------------------------Epoch69------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5023-0.3442j, 0.7743+0.1723j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.5023-0.3442j, 0.7743+0.1723j]])
New state:  tensor([[0.4328-0.4284j, 0.7311+0.3078j]])
----------Measure----------
Probability:  tensor([[0.3708, 0.6292]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3501-0.7223j, 0.4978+0.3284j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.3501-0.7223j, 0.4978+0.3284j]])
New state:  tensor([[0.2154-0.7733j, 0.4311+0.4120j]])
----------Measure----------
Probability:  tensor([[0.6444, 0.3556]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6015-0.5988j, 0.5175+0.1085j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.6015-0.5988j, 0.5175+0.1085j]])
New state:  tensor([[0.4849-0.6966j, 0.4898+0.1992j]])
----------Measure----------
Probability:  tensor([[0.7204, 0.2796]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4835-0.6943j, 0.4977+0.1911j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.4835-0.6943j, 0.4977+0.1911j]])
New state:  tensor([[0.3517-0.7695j, 0.4555+0.2770j]])
----------Measure----------
Probability:  tensor([[0.7158, 0.2842]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4448-0.7422j, 0.4578+0.2043j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.4448-0.7422j, 0.4578+0.2043j]])
New state:  tensor([[0.3051-0.8097j, 0.4139+0.2828j]])
----------Measure----------
Probability:  tensor([[0.7487, 0.2513]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3924-0.4957j, 0.7160+0.2960j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.3924-0.4957j, 0.7160+0.2960j]])
New state:  tensor([[0.2975-0.5578j, 0.6516+0.4192j]])
----------Measure----------
Probability:  tensor([[0.3997, 0.6003]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5599-0.6222j, 0.5284+0.1426j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.5599-0.6222j, 0.5284+0.1426j]])
New state:  tensor([[0.4397-0.7122j, 0.4944+0.2347j]])
----------Measure----------
Probability:  tensor([[0.7005, 0.2995]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6015-0.5988j, 0.5175+0.1085j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.6015-0.5988j, 0.5175+0.1085j]])
New state:  tensor([[0.4849-0.6966j, 0.4898+0.1992j]])
----------Measure----------
Probability:  tensor([[0.7204, 0.2796]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5836-0.6281j, 0.5020+0.1138j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.5836-0.6281j, 0.5020+0.1138j]])
New state:  tensor([[0.4620-0.7222j, 0.4736+0.2017j]])
----------Measure----------
Probability:  tensor([[0.7350, 0.2650]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3085-0.5453j, 0.6785+0.3835j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.3085-0.5453j, 0.6785+0.3835j]])
New state:  tensor([[0.2061-0.5916j, 0.5991+0.4986j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4625-0.6858j, 0.5172+0.2197j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.4625-0.6858j, 0.5172+0.2197j]])
New state:  tensor([[0.3326-0.7573j, 0.4697+0.3085j]])
----------Measure----------
Probability:  tensor([[0.6842, 0.3158]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2876-0.4199j, 0.7880+0.3464j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.2876-0.4199j, 0.7880+0.3464j]])
New state:  tensor([[0.2079-0.4645j, 0.7135+0.4816j]])
----------Measure----------
Probability:  tensor([[0.2590, 0.7410]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5248-0.7677j, 0.3632+0.0571j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.5248-0.7677j, 0.3632+0.0571j]])
New state:  tensor([[0.3793-0.8491j, 0.3472+0.1211j]])
----------Measure----------
Probability:  tensor([[0.8648, 0.1352]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4031-0.4673j, 0.7357+0.2791j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.4031-0.4673j, 0.7357+0.2791j]])
New state:  tensor([[0.3132-0.5318j, 0.6740+0.4060j]])
----------Measure----------
Probability:  tensor([[0.3809, 0.6191]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4444-0.7098j, 0.4969+0.2274j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.4444-0.7098j, 0.4969+0.2274j]])
New state:  tensor([[0.3105-0.7778j, 0.4483+0.3125j]])
----------Measure----------
Probability:  tensor([[0.7013, 0.2987]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1602-0.8095j, 0.2923+0.4834j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.1602-0.8095j, 0.2923+0.4834j]])
New state:  tensor([[0.0130-0.8251j, 0.2013+0.5278j]])
----------Measure----------
Probability:  tensor([[0.6809, 0.3191]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6681-0.6649j, 0.3304-0.0479j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.6681-0.6649j, 0.3304-0.0479j]])
New state:  tensor([[0.5386-0.7736j, 0.3336+0.0119j]])
----------Measure----------
Probability:  tensor([[0.8886, 0.1114]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4068-0.5337j, 0.6813+0.2925j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.4068-0.5337j, 0.6813+0.2925j]])
New state:  tensor([[0.3050-0.5978j, 0.6181+0.4095j]])
----------Measure----------
Probability:  tensor([[0.4504, 0.5496]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3849-0.7776j, 0.4304+0.2491j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.3849-0.7776j, 0.4304+0.2491j]])
New state:  tensor([[0.2398-0.8338j, 0.3789+0.3220j]])
----------Measure----------
Probability:  tensor([[0.7527, 0.2473]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2775-0.7010j, 0.5063+0.4186j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.2775-0.7010j, 0.5063+0.4186j]])
New state:  tensor([[0.1478-0.7393j, 0.4234+0.5023j]])
----------Measure----------
Probability:  tensor([[0.5684, 0.4316]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3992-0.6555j, 0.5676+0.2980j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.3992-0.6555j, 0.5676+0.2980j]])
New state:  tensor([[0.2757-0.7163j, 0.5052+0.3946j]])
----------Measure----------
Probability:  tensor([[0.5891, 0.4109]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4800-0.4215j, 0.7399+0.2110j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.4800-0.4215j, 0.7399+0.2110j]])
New state:  tensor([[0.3970-0.5005j, 0.6903+0.3398j]])
----------Measure----------
Probability:  tensor([[0.4081, 0.5919]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4628-0.3774j, 0.7750+0.2068j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.4628-0.3774j, 0.7750+0.2068j]])
New state:  tensor([[0.3880-0.4540j, 0.7256+0.3419j]])
----------Measure----------
Probability:  tensor([[0.3566, 0.6434]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3262-0.4051j, 0.7965+0.3085j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.3262-0.4051j, 0.7965+0.3085j]])
New state:  tensor([[0.2486-0.4568j, 0.7285+0.4458j]])
----------Measure----------
Probability:  tensor([[0.2705, 0.7295]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2342-0.8072j, 0.3610+0.4041j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.2342-0.8072j, 0.3610+0.4041j]])
New state:  tensor([[0.0863-0.8360j, 0.2830+0.4621j]])
----------Measure----------
Probability:  tensor([[0.7064, 0.2936]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5131-0.2981j, 0.7909+0.1492j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.5131-0.2981j, 0.7909+0.1492j]])
New state:  tensor([[0.4516-0.3849j, 0.7516+0.2881j]])
----------Measure----------
Probability:  tensor([[0.3521, 0.6479]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4646-0.7186j, 0.4781+0.1978j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.4646-0.7186j, 0.4781+0.1978j]])
New state:  tensor([[0.3287-0.7900j, 0.4351+0.2801j]])
----------Measure----------
Probability:  tensor([[0.7322, 0.2678]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0084-0.2804j, 0.8388+0.4665j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.0084-0.2804j, 0.8388+0.4665j]])
New state:  tensor([[-0.0418-0.2774j,  0.7420+0.6089j]])
----------Measure----------
Probability:  tensor([[0.0787, 0.9213]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5311+0.j]])
ry_matrix:  tensor([[ 0.9649-0.j, -0.2625-0.j],
        [ 0.2625+0.j,  0.9649-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0589-0.3463j, 0.7913+0.5004j]])
Inside  rz
rz_matrix theta:  tensor([[0.3592+0.j]])
rz_matrix:  tensor([[0.9839-0.1786j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9839+0.1786j]])
Performing matrix multiplication

Current state:  tensor([[0.0589-0.3463j, 0.7913+0.5004j]])
New state:  tensor([[-0.0039-0.3513j,  0.6892+0.6337j]])
----------Measure----------
Probability:  tensor([[0.1234, 0.8766]])
valid set accuracy: 1.0
valid set loss: 0.36485373973846436
------------------------------Epoch70------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4026-0.4675j, 0.7359+0.2788j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.4026-0.4675j, 0.7359+0.2788j]])
New state:  tensor([[0.3140-0.5311j, 0.6753+0.4040j]])
----------Measure----------
Probability:  tensor([[0.3807, 0.6193]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6012-0.5989j, 0.5179+0.1081j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.6012-0.5989j, 0.5179+0.1081j]])
New state:  tensor([[0.4863-0.6954j, 0.4907+0.1976j]])
----------Measure----------
Probability:  tensor([[0.7201, 0.2799]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2340-0.8074j, 0.3612+0.4036j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.2340-0.8074j, 0.3612+0.4036j]])
New state:  tensor([[0.0881-0.8360j, 0.2845+0.4609j]])
----------Measure----------
Probability:  tensor([[0.7067, 0.2933]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4832-0.6944j, 0.4980+0.1907j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.4832-0.6944j, 0.4980+0.1907j]])
New state:  tensor([[0.3534-0.7686j, 0.4566+0.2754j]])
----------Measure----------
Probability:  tensor([[0.7157, 0.2843]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3846-0.7777j, 0.4306+0.2486j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.3846-0.7777j, 0.4306+0.2486j]])
New state:  tensor([[0.2416-0.8333j, 0.3801+0.3205j]])
----------Measure----------
Probability:  tensor([[0.7528, 0.2472]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0583-0.3467j, 0.7913+0.5002j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.0583-0.3467j, 0.7913+0.5002j]])
New state:  tensor([[-0.0036-0.3515j,  0.6909+0.6317j]])
----------Measure----------
Probability:  tensor([[0.1236, 0.8764]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4623-0.3775j, 0.7753+0.2066j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.4623-0.3775j, 0.7753+0.2066j]])
New state:  tensor([[0.3886-0.4530j, 0.7268+0.3399j]])
----------Measure----------
Probability:  tensor([[0.3562, 0.6438]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4441-0.7100j, 0.4972+0.2269j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.4441-0.7100j, 0.4972+0.2269j]])
New state:  tensor([[0.3121-0.7771j, 0.4495+0.3109j]])
----------Measure----------
Probability:  tensor([[0.7013, 0.2987]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3080-0.5456j, 0.6787+0.3832j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.3080-0.5456j, 0.6787+0.3832j]])
New state:  tensor([[0.2071-0.5913j, 0.6006+0.4967j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4642-0.7188j, 0.4785+0.1974j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.4642-0.7188j, 0.4785+0.1974j]])
New state:  tensor([[0.3304-0.7893j, 0.4362+0.2785j]])
----------Measure----------
Probability:  tensor([[0.7321, 0.2679]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4795-0.4217j, 0.7402+0.2108j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.4795-0.4217j, 0.7402+0.2108j]])
New state:  tensor([[0.3977-0.4995j, 0.6915+0.3378j]])
----------Measure----------
Probability:  tensor([[0.4077, 0.5923]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4064-0.5339j, 0.6815+0.2921j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.4064-0.5339j, 0.6815+0.2921j]])
New state:  tensor([[0.3060-0.5971j, 0.6194+0.4076j]])
----------Measure----------
Probability:  tensor([[0.4502, 0.5498]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3498-0.7226j, 0.4980+0.3279j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.3498-0.7226j, 0.4980+0.3279j]])
New state:  tensor([[0.2171-0.7729j, 0.4325+0.4105j]])
----------Measure----------
Probability:  tensor([[0.6444, 0.3556]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0079-0.2807j, 0.8388+0.4664j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.0079-0.2807j, 0.8388+0.4664j]])
New state:  tensor([[-0.0417-0.2777j,  0.7436+0.6068j]])
----------Measure----------
Probability:  tensor([[0.0789, 0.9211]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5832-0.6281j, 0.5024+0.1134j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.5832-0.6281j, 0.5024+0.1134j]])
New state:  tensor([[0.4635-0.7210j, 0.4746+0.2001j]])
----------Measure----------
Probability:  tensor([[0.7347, 0.2653]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2771-0.7013j, 0.5065+0.4182j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.2771-0.7013j, 0.5065+0.4182j]])
New state:  tensor([[0.1493-0.7391j, 0.4249+0.5008j]])
----------Measure----------
Probability:  tensor([[0.5686, 0.4314]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3988-0.6557j, 0.5678+0.2976j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.3988-0.6557j, 0.5678+0.2976j]])
New state:  tensor([[0.2771-0.7157j, 0.5066+0.3929j]])
----------Measure----------
Probability:  tensor([[0.5890, 0.4110]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1600-0.8098j, 0.2924+0.4829j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.1600-0.8098j, 0.2924+0.4829j]])
New state:  tensor([[0.0149-0.8253j, 0.2028+0.5268j]])
----------Measure----------
Probability:  tensor([[0.6813, 0.3187]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4445-0.7423j, 0.4581+0.2038j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.4445-0.7423j, 0.4581+0.2038j]])
New state:  tensor([[0.3068-0.8090j, 0.4150+0.2813j]])
----------Measure----------
Probability:  tensor([[0.7486, 0.2514]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3256-0.4053j, 0.7967+0.3083j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.3256-0.4053j, 0.7967+0.3083j]])
New state:  tensor([[0.2492-0.4563j, 0.7299+0.4437j]])
----------Measure----------
Probability:  tensor([[0.2703, 0.7297]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6012-0.5989j, 0.5179+0.1081j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.6012-0.5989j, 0.5179+0.1081j]])
New state:  tensor([[0.4863-0.6954j, 0.4907+0.1976j]])
----------Measure----------
Probability:  tensor([[0.7201, 0.2799]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5018-0.3443j, 0.7746+0.1721j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.5018-0.3443j, 0.7746+0.1721j]])
New state:  tensor([[0.4333-0.4273j, 0.7322+0.3058j]])
----------Measure----------
Probability:  tensor([[0.3703, 0.6297]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4622-0.6859j, 0.5175+0.2192j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.4622-0.6859j, 0.5175+0.2192j]])
New state:  tensor([[0.3342-0.7566j, 0.4708+0.3069j]])
----------Measure----------
Probability:  tensor([[0.6841, 0.3159]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5126-0.2982j, 0.7913+0.1490j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.5126-0.2982j, 0.7913+0.1490j]])
New state:  tensor([[0.4521-0.3838j, 0.7527+0.2860j]])
----------Measure----------
Probability:  tensor([[0.3517, 0.6483]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3919-0.4959j, 0.7163+0.2957j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.3919-0.4959j, 0.7163+0.2957j]])
New state:  tensor([[0.2985-0.5572j, 0.6530+0.4172j]])
----------Measure----------
Probability:  tensor([[0.3995, 0.6005]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5595-0.6222j, 0.5287+0.1422j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.5595-0.6222j, 0.5287+0.1422j]])
New state:  tensor([[0.4412-0.7111j, 0.4954+0.2331j]])
----------Measure----------
Probability:  tensor([[0.7002, 0.2998]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5246-0.7677j, 0.3636+0.0566j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.5246-0.7677j, 0.3636+0.0566j]])
New state:  tensor([[0.3812-0.8481j, 0.3479+0.1198j]])
----------Measure----------
Probability:  tensor([[0.8646, 0.1354]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2871-0.4201j, 0.7882+0.3461j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.2871-0.4201j, 0.7882+0.3461j]])
New state:  tensor([[0.2086-0.4641j, 0.7150+0.4795j]])
----------Measure----------
Probability:  tensor([[0.2589, 0.7411]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5325+0.j]])
ry_matrix:  tensor([[ 0.9648-0.j, -0.2631-0.j],
        [ 0.2631+0.j,  0.9648-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6679-0.6649j, 0.3308-0.0483j]])
Inside  rz
rz_matrix theta:  tensor([[0.3541+0.j]])
rz_matrix:  tensor([[0.9844-0.1761j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9844+0.1761j]])
Performing matrix multiplication

Current state:  tensor([[0.6679-0.6649j, 0.3308-0.0483j]])
New state:  tensor([[0.5404-0.7721j, 0.3342+0.0107j]])
----------Measure----------
Probability:  tensor([[0.8882, 0.1118]])
valid set accuracy: 1.0
valid set loss: 0.3647799789905548
------------------------------Epoch71------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1599-0.8100j, 0.2925+0.4825j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.1599-0.8100j, 0.2925+0.4825j]])
New state:  tensor([[0.0167-0.8255j, 0.2042+0.5260j]])
----------Measure----------
Probability:  tensor([[0.6816, 0.3184]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0580-0.3469j, 0.7914+0.5000j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.0580-0.3469j, 0.7914+0.5000j]])
New state:  tensor([[-0.0032-0.3517j,  0.6925+0.6299j]])
----------Measure----------
Probability:  tensor([[0.1237, 0.8763]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3916-0.4960j, 0.7165+0.2955j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.3916-0.4960j, 0.7165+0.2955j]])
New state:  tensor([[0.2995-0.5565j, 0.6542+0.4154j]])
----------Measure----------
Probability:  tensor([[0.3994, 0.6006]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4792-0.4218j, 0.7404+0.2106j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.4792-0.4218j, 0.7404+0.2106j]])
New state:  tensor([[0.3986-0.4986j, 0.6926+0.3360j]])
----------Measure----------
Probability:  tensor([[0.4075, 0.5925]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4443-0.7424j, 0.4583+0.2035j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.4443-0.7424j, 0.4583+0.2035j]])
New state:  tensor([[0.3085-0.8083j, 0.4160+0.2800j]])
----------Measure----------
Probability:  tensor([[0.7486, 0.2514]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3077-0.5457j, 0.6789+0.3829j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.3077-0.5457j, 0.6789+0.3829j]])
New state:  tensor([[0.2082-0.5909j, 0.6020+0.4950j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6010-0.5989j, 0.5182+0.1079j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.6010-0.5989j, 0.5182+0.1079j]])
New state:  tensor([[0.4878-0.6942j, 0.4915+0.1962j]])
----------Measure----------
Probability:  tensor([[0.7199, 0.2801]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5244-0.7677j, 0.3638+0.0563j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.5244-0.7677j, 0.3638+0.0563j]])
New state:  tensor([[0.3831-0.8472j, 0.3485+0.1186j]])
----------Measure----------
Probability:  tensor([[0.8645, 0.1355]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2338-0.8076j, 0.3613+0.4032j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.2338-0.8076j, 0.3613+0.4032j]])
New state:  tensor([[0.0899-0.8360j, 0.2857+0.4598j]])
----------Measure----------
Probability:  tensor([[0.7069, 0.2931]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3496-0.7227j, 0.4982+0.3276j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.3496-0.7227j, 0.4982+0.3276j]])
New state:  tensor([[0.2187-0.7724j, 0.4337+0.4092j]])
----------Measure----------
Probability:  tensor([[0.6445, 0.3555]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5015-0.3444j, 0.7749+0.1719j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.5015-0.3444j, 0.7749+0.1719j]])
New state:  tensor([[0.4340-0.4262j, 0.7332+0.3039j]])
----------Measure----------
Probability:  tensor([[0.3700, 0.6300]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2867-0.4203j, 0.7884+0.3459j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.2867-0.4203j, 0.7884+0.3459j]])
New state:  tensor([[0.2093-0.4637j, 0.7163+0.4776j]])
----------Measure----------
Probability:  tensor([[0.2588, 0.7412]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2769-0.7015j, 0.5066+0.4178j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.2769-0.7015j, 0.5066+0.4178j]])
New state:  tensor([[0.1508-0.7389j, 0.4263+0.4995j]])
----------Measure----------
Probability:  tensor([[0.5687, 0.4313]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4023-0.4677j, 0.7361+0.2786j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.4023-0.4677j, 0.7361+0.2786j]])
New state:  tensor([[0.3150-0.5304j, 0.6765+0.4022j]])
----------Measure----------
Probability:  tensor([[0.3806, 0.6194]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6678-0.6649j, 0.3311-0.0486j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.6678-0.6649j, 0.3311-0.0486j]])
New state:  tensor([[0.5421-0.7708j, 0.3345+0.0096j]])
----------Measure----------
Probability:  tensor([[0.8880, 0.1120]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4438-0.7101j, 0.4974+0.2266j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.4438-0.7101j, 0.4974+0.2266j]])
New state:  tensor([[0.3137-0.7764j, 0.4505+0.3096j]])
----------Measure----------
Probability:  tensor([[0.7012, 0.2988]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3844-0.7779j, 0.4308+0.2482j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.3844-0.7779j, 0.4308+0.2482j]])
New state:  tensor([[0.2434-0.8328j, 0.3811+0.3193j]])
----------Measure----------
Probability:  tensor([[0.7528, 0.2472]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4830-0.6945j, 0.4982+0.1904j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.4830-0.6945j, 0.4982+0.1904j]])
New state:  tensor([[0.3550-0.7678j, 0.4576+0.2740j]])
----------Measure----------
Probability:  tensor([[0.7156, 0.2844]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5593-0.6223j, 0.5290+0.1419j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.5593-0.6223j, 0.5290+0.1419j]])
New state:  tensor([[0.4427-0.7100j, 0.4963+0.2316j]])
----------Measure----------
Probability:  tensor([[0.7000, 0.3000]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5830-0.6282j, 0.5027+0.1131j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.5830-0.6282j, 0.5027+0.1131j]])
New state:  tensor([[0.4650-0.7199j, 0.4754+0.1987j]])
----------Measure----------
Probability:  tensor([[0.7345, 0.2655]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3985-0.6559j, 0.5680+0.2973j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.3985-0.6559j, 0.5680+0.2973j]])
New state:  tensor([[0.2786-0.7151j, 0.5077+0.3914j]])
----------Measure----------
Probability:  tensor([[0.5890, 0.4110]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4640-0.7188j, 0.4787+0.1970j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.4640-0.7188j, 0.4787+0.1970j]])
New state:  tensor([[0.3321-0.7885j, 0.4372+0.2772j]])
----------Measure----------
Probability:  tensor([[0.7321, 0.2679]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4061-0.5340j, 0.6817+0.2919j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.4061-0.5340j, 0.6817+0.2919j]])
New state:  tensor([[0.3071-0.5965j, 0.6206+0.4059j]])
----------Measure----------
Probability:  tensor([[0.4501, 0.5499]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4619-0.3776j, 0.7755+0.2064j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.4619-0.3776j, 0.7755+0.2064j]])
New state:  tensor([[0.3893-0.4521j, 0.7279+0.3380j]])
----------Measure----------
Probability:  tensor([[0.3560, 0.6440]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4620-0.6860j, 0.5178+0.2189j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.4620-0.6860j, 0.5178+0.2189j]])
New state:  tensor([[0.3358-0.7558j, 0.4719+0.3055j]])
----------Measure----------
Probability:  tensor([[0.6840, 0.3160]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6010-0.5989j, 0.5182+0.1079j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.6010-0.5989j, 0.5182+0.1079j]])
New state:  tensor([[0.4878-0.6942j, 0.4915+0.1962j]])
----------Measure----------
Probability:  tensor([[0.7199, 0.2801]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0075-0.2809j, 0.8388+0.4662j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.0075-0.2809j, 0.8388+0.4662j]])
New state:  tensor([[-0.0414-0.2780j,  0.7451+0.6049j]])
----------Measure----------
Probability:  tensor([[0.0790, 0.9210]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3253-0.4054j, 0.7968+0.3081j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.3253-0.4054j, 0.7968+0.3081j]])
New state:  tensor([[0.2499-0.4557j, 0.7312+0.4418j]])
----------Measure----------
Probability:  tensor([[0.2702, 0.7298]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5334+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2635-0.j],
        [ 0.2635+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5122-0.2982j, 0.7915+0.1489j]])
Inside  rz
rz_matrix theta:  tensor([[0.3492+0.j]])
rz_matrix:  tensor([[0.9848-0.1737j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9848+0.1737j]])
Performing matrix multiplication

Current state:  tensor([[0.5122-0.2982j, 0.7915+0.1489j]])
New state:  tensor([[0.4526-0.3827j, 0.7536+0.2841j]])
----------Measure----------
Probability:  tensor([[0.3513, 0.6487]])
valid set accuracy: 1.0
valid set loss: 0.36472976207733154
------------------------------Epoch72------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3250-0.4055j, 0.7969+0.3080j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.3250-0.4055j, 0.7969+0.3080j]])
New state:  tensor([[0.2507-0.4552j, 0.7323+0.4400j]])
----------Measure----------
Probability:  tensor([[0.2701, 0.7299]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4437-0.7101j, 0.4976+0.2264j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.4437-0.7101j, 0.4976+0.2264j]])
New state:  tensor([[0.3154-0.7757j, 0.4514+0.3084j]])
----------Measure----------
Probability:  tensor([[0.7012, 0.2988]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4441-0.7425j, 0.4584+0.2033j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.4441-0.7425j, 0.4584+0.2033j]])
New state:  tensor([[0.3103-0.8076j, 0.4168+0.2789j]])
----------Measure----------
Probability:  tensor([[0.7485, 0.2515]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0578-0.3471j, 0.7914+0.4999j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.0578-0.3471j, 0.7914+0.4999j]])
New state:  tensor([[-0.0026-0.3518j,  0.6939+0.6282j]])
----------Measure----------
Probability:  tensor([[0.1238, 0.8762]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0073-0.2811j, 0.8388+0.4661j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.0073-0.2811j, 0.8388+0.4661j]])
New state:  tensor([[-0.0410-0.2782j,  0.7465+0.6031j]])
----------Measure----------
Probability:  tensor([[0.0791, 0.9209]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3075-0.5458j, 0.6790+0.3828j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.3075-0.5458j, 0.6790+0.3828j]])
New state:  tensor([[0.2094-0.5905j, 0.6033+0.4935j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3914-0.4961j, 0.7166+0.2953j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.3914-0.4961j, 0.7166+0.2953j]])
New state:  tensor([[0.3005-0.5559j, 0.6553+0.4138j]])
----------Measure----------
Probability:  tensor([[0.3993, 0.6007]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4828-0.6945j, 0.4984+0.1902j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.4828-0.6945j, 0.4984+0.1902j]])
New state:  tensor([[0.3566-0.7670j, 0.4584+0.2728j]])
----------Measure----------
Probability:  tensor([[0.7155, 0.2845]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5243-0.7678j, 0.3640+0.0560j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.5243-0.7678j, 0.3640+0.0560j]])
New state:  tensor([[0.3849-0.8463j, 0.3490+0.1176j]])
----------Measure----------
Probability:  tensor([[0.8644, 0.1356]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5120-0.2983j, 0.7917+0.1488j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.5120-0.2983j, 0.7917+0.1488j]])
New state:  tensor([[0.4533-0.3817j, 0.7544+0.2823j]])
----------Measure----------
Probability:  tensor([[0.3511, 0.6489]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2865-0.4204j, 0.7884+0.3458j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.2865-0.4204j, 0.7884+0.3458j]])
New state:  tensor([[0.2101-0.4633j, 0.7175+0.4759j]])
----------Measure----------
Probability:  tensor([[0.2588, 0.7412]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5829-0.6282j, 0.5029+0.1129j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.5829-0.6282j, 0.5029+0.1129j]])
New state:  tensor([[0.4665-0.7189j, 0.4760+0.1975j]])
----------Measure----------
Probability:  tensor([[0.7344, 0.2656]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3984-0.6559j, 0.5681+0.2971j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.3984-0.6559j, 0.5681+0.2971j]])
New state:  tensor([[0.2800-0.7145j, 0.5088+0.3901j]])
----------Measure----------
Probability:  tensor([[0.5890, 0.4110]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4639-0.7189j, 0.4788+0.1968j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.4639-0.7189j, 0.4788+0.1968j]])
New state:  tensor([[0.3338-0.7878j, 0.4380+0.2760j]])
----------Measure----------
Probability:  tensor([[0.7320, 0.2680]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5012-0.3444j, 0.7750+0.1718j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.5012-0.3444j, 0.7750+0.1718j]])
New state:  tensor([[0.4347-0.4253j, 0.7341+0.3022j]])
----------Measure----------
Probability:  tensor([[0.3699, 0.6301]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1598-0.8101j, 0.2925+0.4822j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.1598-0.8101j, 0.2925+0.4822j]])
New state:  tensor([[0.0185-0.8255j, 0.2055+0.5253j]])
----------Measure----------
Probability:  tensor([[0.6819, 0.3181]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4059-0.5341j, 0.6818+0.2917j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.4059-0.5341j, 0.6818+0.2917j]])
New state:  tensor([[0.3083-0.5958j, 0.6217+0.4043j]])
----------Measure----------
Probability:  tensor([[0.4500, 0.5500]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3842-0.7779j, 0.4309+0.2480j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.3842-0.7779j, 0.4309+0.2480j]])
New state:  tensor([[0.2452-0.8323j, 0.3820+0.3182j]])
----------Measure----------
Probability:  tensor([[0.7528, 0.2472]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4618-0.6861j, 0.5179+0.2187j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.4618-0.6861j, 0.5179+0.2187j]])
New state:  tensor([[0.3373-0.7551j, 0.4727+0.3043j]])
----------Measure----------
Probability:  tensor([[0.6840, 0.3160]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4789-0.4218j, 0.7405+0.2104j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.4789-0.4218j, 0.7405+0.2104j]])
New state:  tensor([[0.3995-0.4977j, 0.6935+0.3343j]])
----------Measure----------
Probability:  tensor([[0.4073, 0.5927]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3494-0.7228j, 0.4983+0.3274j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.3494-0.7228j, 0.4983+0.3274j]])
New state:  tensor([[0.2203-0.7720j, 0.4348+0.4080j]])
----------Measure----------
Probability:  tensor([[0.6445, 0.3555]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2767-0.7016j, 0.5067+0.4176j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.2767-0.7016j, 0.5067+0.4176j]])
New state:  tensor([[0.1523-0.7387j, 0.4276+0.4983j]])
----------Measure----------
Probability:  tensor([[0.5688, 0.4312]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2337-0.8077j, 0.3613+0.4030j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.2337-0.8077j, 0.3613+0.4030j]])
New state:  tensor([[0.0917-0.8358j, 0.2869+0.4589j]])
----------Measure----------
Probability:  tensor([[0.7071, 0.2929]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6677-0.6649j, 0.3313-0.0488j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.6677-0.6649j, 0.3313-0.0488j]])
New state:  tensor([[0.5438-0.7695j, 0.3348+0.0087j]])
----------Measure----------
Probability:  tensor([[0.8878, 0.1122]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4021-0.4677j, 0.7362+0.2784j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.4021-0.4677j, 0.7362+0.2784j]])
New state:  tensor([[0.3159-0.5298j, 0.6776+0.4005j]])
----------Measure----------
Probability:  tensor([[0.3805, 0.6195]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6008-0.5990j, 0.5183+0.1077j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.6008-0.5990j, 0.5183+0.1077j]])
New state:  tensor([[0.4892-0.6931j, 0.4922+0.1950j]])
----------Measure----------
Probability:  tensor([[0.7197, 0.2803]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6008-0.5990j, 0.5183+0.1077j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.6008-0.5990j, 0.5183+0.1077j]])
New state:  tensor([[0.4892-0.6931j, 0.4922+0.1950j]])
----------Measure----------
Probability:  tensor([[0.7197, 0.2803]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4617-0.3777j, 0.7756+0.2063j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.4617-0.3777j, 0.7756+0.2063j]])
New state:  tensor([[0.3901-0.4513j, 0.7288+0.3362j]])
----------Measure----------
Probability:  tensor([[0.3558, 0.6442]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5340+0.j]])
ry_matrix:  tensor([[ 0.9646-0.j, -0.2638-0.j],
        [ 0.2638+0.j,  0.9646-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5591-0.6224j, 0.5291+0.1417j]])
Inside  rz
rz_matrix theta:  tensor([[0.3446+0.j]])
rz_matrix:  tensor([[0.9852-0.1715j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9852+0.1715j]])
Performing matrix multiplication

Current state:  tensor([[0.5591-0.6224j, 0.5291+0.1417j]])
New state:  tensor([[0.4441-0.7090j, 0.4970+0.2303j]])
----------Measure----------
Probability:  tensor([[0.6999, 0.3001]])
valid set accuracy: 1.0
valid set loss: 0.3646972179412842
------------------------------Epoch73------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4612-0.3778j, 0.7760+0.2060j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.4612-0.3778j, 0.7760+0.2060j]])
New state:  tensor([[0.3905-0.4505j, 0.7299+0.3344j]])
----------Measure----------
Probability:  tensor([[0.3554, 0.6446]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3245-0.4057j, 0.7972+0.3077j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.3245-0.4057j, 0.7972+0.3077j]])
New state:  tensor([[0.2511-0.4548j, 0.7335+0.4382j]])
----------Measure----------
Probability:  tensor([[0.2699, 0.7301]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2859-0.4206j, 0.7887+0.3455j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.2859-0.4206j, 0.7887+0.3455j]])
New state:  tensor([[0.2105-0.4630j, 0.7188+0.4740j]])
----------Measure----------
Probability:  tensor([[0.2587, 0.7413]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4016-0.4679j, 0.7365+0.2781j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.4016-0.4679j, 0.7365+0.2781j]])
New state:  tensor([[0.3165-0.5292j, 0.6788+0.3988j]])
----------Measure----------
Probability:  tensor([[0.3802, 0.6198]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5825-0.6283j, 0.5033+0.1125j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.5825-0.6283j, 0.5033+0.1125j]])
New state:  tensor([[0.4677-0.7179j, 0.4770+0.1961j]])
----------Measure----------
Probability:  tensor([[0.7341, 0.2659]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3908-0.4963j, 0.7169+0.2950j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.3908-0.4963j, 0.7169+0.2950j]])
New state:  tensor([[0.3011-0.5553j, 0.6566+0.4121j]])
----------Measure----------
Probability:  tensor([[0.3991, 0.6009]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0572-0.3474j, 0.7914+0.4997j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.0572-0.3474j, 0.7914+0.4997j]])
New state:  tensor([[-0.0025-0.3521j,  0.6954+0.6265j]])
----------Measure----------
Probability:  tensor([[0.1240, 0.8760]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2334-0.8080j, 0.3615+0.4024j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.2334-0.8080j, 0.3615+0.4024j]])
New state:  tensor([[0.0932-0.8359j, 0.2882+0.4578j]])
----------Measure----------
Probability:  tensor([[0.7074, 0.2926]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3490-0.7230j, 0.4985+0.3268j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.3490-0.7230j, 0.4985+0.3268j]])
New state:  tensor([[0.2216-0.7717j, 0.4360+0.4066j]])
----------Measure----------
Probability:  tensor([[0.6446, 0.3554]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3980-0.6562j, 0.5684+0.2966j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.3980-0.6562j, 0.5684+0.2966j]])
New state:  tensor([[0.2811-0.7141j, 0.5100+0.3886j]])
----------Measure----------
Probability:  tensor([[0.5889, 0.4111]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4054-0.5343j, 0.6821+0.2913j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.4054-0.5343j, 0.6821+0.2913j]])
New state:  tensor([[0.3090-0.5953j, 0.6229+0.4026j]])
----------Measure----------
Probability:  tensor([[0.4498, 0.5502]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5114-0.2984j, 0.7920+0.1486j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.5114-0.2984j, 0.7920+0.1486j]])
New state:  tensor([[0.4535-0.3807j, 0.7554+0.2806j]])
----------Measure----------
Probability:  tensor([[0.3506, 0.6494]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3839-0.7781j, 0.4312+0.2474j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.3839-0.7781j, 0.4312+0.2474j]])
New state:  tensor([[0.2466-0.8319j, 0.3831+0.3169j]])
----------Measure----------
Probability:  tensor([[0.7529, 0.2471]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5007-0.3445j, 0.7754+0.1716j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.5007-0.3445j, 0.7754+0.1716j]])
New state:  tensor([[0.4351-0.4244j, 0.7351+0.3004j]])
----------Measure----------
Probability:  tensor([[0.3694, 0.6306]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3070-0.5461j, 0.6792+0.3824j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.3070-0.5461j, 0.6792+0.3824j]])
New state:  tensor([[0.2101-0.5902j, 0.6046+0.4918j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6004-0.5991j, 0.5188+0.1072j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.6004-0.5991j, 0.5188+0.1072j]])
New state:  tensor([[0.4903-0.6921j, 0.4931+0.1935j]])
----------Measure----------
Probability:  tensor([[0.7194, 0.2806]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5241-0.7678j, 0.3644+0.0555j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.5241-0.7678j, 0.3644+0.0555j]])
New state:  tensor([[0.3865-0.8455j, 0.3497+0.1164j]])
----------Measure----------
Probability:  tensor([[0.8642, 0.1358]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4614-0.6862j, 0.5182+0.2182j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.4614-0.6862j, 0.5182+0.2182j]])
New state:  tensor([[0.3386-0.7545j, 0.4738+0.3028j]])
----------Measure----------
Probability:  tensor([[0.6838, 0.3162]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6674-0.6648j, 0.3318-0.0493j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.6674-0.6648j, 0.3318-0.0493j]])
New state:  tensor([[0.5452-0.7683j, 0.3354+0.0076j]])
----------Measure----------
Probability:  tensor([[0.8875, 0.1125]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4635-0.7190j, 0.4791+0.1963j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.4635-0.7190j, 0.4791+0.1963j]])
New state:  tensor([[0.3351-0.7872j, 0.4390+0.2746j]])
----------Measure----------
Probability:  tensor([[0.7319, 0.2681]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1596-0.8105j, 0.2927+0.4817j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.1596-0.8105j, 0.2927+0.4817j]])
New state:  tensor([[0.0200-0.8258j, 0.2069+0.5243j]])
----------Measure----------
Probability:  tensor([[0.6824, 0.3176]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0066-0.2814j, 0.8388+0.4659j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.0066-0.2814j, 0.8388+0.4659j]])
New state:  tensor([[-0.0411-0.2785j,  0.7478+0.6013j]])
----------Measure----------
Probability:  tensor([[0.0792, 0.9208]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4438-0.7426j, 0.4587+0.2027j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.4438-0.7426j, 0.4587+0.2027j]])
New state:  tensor([[0.3116-0.8071j, 0.4178+0.2775j]])
----------Measure----------
Probability:  tensor([[0.7485, 0.2515]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4433-0.7103j, 0.4979+0.2259j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.4433-0.7103j, 0.4979+0.2259j]])
New state:  tensor([[0.3166-0.7751j, 0.4525+0.3069j]])
----------Measure----------
Probability:  tensor([[0.7011, 0.2989]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2764-0.7019j, 0.5069+0.4171j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.2764-0.7019j, 0.5069+0.4171j]])
New state:  tensor([[0.1535-0.7386j, 0.4289+0.4969j]])
----------Measure----------
Probability:  tensor([[0.5691, 0.4309]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4825-0.6947j, 0.4987+0.1896j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.4825-0.6947j, 0.4987+0.1896j]])
New state:  tensor([[0.3579-0.7663j, 0.4594+0.2714j]])
----------Measure----------
Probability:  tensor([[0.7153, 0.2847]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6004-0.5991j, 0.5188+0.1072j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.6004-0.5991j, 0.5188+0.1072j]])
New state:  tensor([[0.4903-0.6921j, 0.4931+0.1935j]])
----------Measure----------
Probability:  tensor([[0.7194, 0.2806]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4784-0.4220j, 0.7409+0.2101j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.4784-0.4220j, 0.7409+0.2101j]])
New state:  tensor([[0.4000-0.4969j, 0.6946+0.3326j]])
----------Measure----------
Probability:  tensor([[0.4069, 0.5931]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5354+0.j]])
ry_matrix:  tensor([[ 0.9644-0.j, -0.2645-0.j],
        [ 0.2645+0.j,  0.9644-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5587-0.6225j, 0.5296+0.1413j]])
Inside  rz
rz_matrix theta:  tensor([[0.3403+0.j]])
rz_matrix:  tensor([[0.9856-0.1693j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9856+0.1693j]])
Performing matrix multiplication

Current state:  tensor([[0.5587-0.6225j, 0.5296+0.1413j]])
New state:  tensor([[0.4452-0.7081j, 0.4980+0.2289j]])
----------Measure----------
Probability:  tensor([[0.6996, 0.3004]])
valid set accuracy: 1.0
valid set loss: 0.3646177649497986
------------------------------Epoch74------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4013-0.4680j, 0.7367+0.2779j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.4013-0.4680j, 0.7367+0.2779j]])
New state:  tensor([[0.3173-0.5286j, 0.6798+0.3973j]])
----------Measure----------
Probability:  tensor([[0.3801, 0.6199]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6002-0.5991j, 0.5190+0.1070j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.6002-0.5991j, 0.5190+0.1070j]])
New state:  tensor([[0.4915-0.6911j, 0.4937+0.1924j]])
----------Measure----------
Probability:  tensor([[0.7192, 0.2808]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3242-0.4058j, 0.7973+0.3075j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.3242-0.4058j, 0.7973+0.3075j]])
New state:  tensor([[0.2517-0.4543j, 0.7346+0.4366j]])
----------Measure----------
Probability:  tensor([[0.2698, 0.7302]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5004-0.3446j, 0.7755+0.1715j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.5004-0.3446j, 0.7755+0.1715j]])
New state:  tensor([[0.4357-0.4235j, 0.7359+0.2988j]])
----------Measure----------
Probability:  tensor([[0.3692, 0.6308]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0064-0.2816j, 0.8388+0.4658j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.0064-0.2816j, 0.8388+0.4658j]])
New state:  tensor([[-0.0408-0.2787j,  0.7491+0.5997j]])
----------Measure----------
Probability:  tensor([[0.0793, 0.9207]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3838-0.7782j, 0.4313+0.2472j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.3838-0.7782j, 0.4313+0.2472j]])
New state:  tensor([[0.2481-0.8314j, 0.3839+0.3159j]])
----------Measure----------
Probability:  tensor([[0.7529, 0.2471]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4634-0.7191j, 0.4793+0.1961j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.4634-0.7191j, 0.4793+0.1961j]])
New state:  tensor([[0.3365-0.7865j, 0.4397+0.2735j]])
----------Measure----------
Probability:  tensor([[0.7318, 0.2682]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3978-0.6563j, 0.5686+0.2964j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.3978-0.6563j, 0.5686+0.2964j]])
New state:  tensor([[0.2823-0.7136j, 0.5109+0.3874j]])
----------Measure----------
Probability:  tensor([[0.5889, 0.4111]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2856-0.4208j, 0.7887+0.3453j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.2856-0.4208j, 0.7887+0.3453j]])
New state:  tensor([[0.2112-0.4626j, 0.7198+0.4725j]])
----------Measure----------
Probability:  tensor([[0.2586, 0.7414]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3489-0.7232j, 0.4987+0.3266j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.3489-0.7232j, 0.4987+0.3266j]])
New state:  tensor([[0.2229-0.7713j, 0.4370+0.4055j]])
----------Measure----------
Probability:  tensor([[0.6447, 0.3553]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6673-0.6648j, 0.3320-0.0496j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.6673-0.6648j, 0.3320-0.0496j]])
New state:  tensor([[0.5466-0.7671j, 0.3357+0.0067j]])
----------Measure----------
Probability:  tensor([[0.8873, 0.1127]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6002-0.5991j, 0.5190+0.1070j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.6002-0.5991j, 0.5190+0.1070j]])
New state:  tensor([[0.4915-0.6911j, 0.4937+0.1924j]])
----------Measure----------
Probability:  tensor([[0.7192, 0.2808]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4613-0.6863j, 0.5184+0.2180j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.4613-0.6863j, 0.5184+0.2180j]])
New state:  tensor([[0.3399-0.7538j, 0.4746+0.3017j]])
----------Measure----------
Probability:  tensor([[0.6838, 0.3162]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5112-0.2984j, 0.7922+0.1485j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.5112-0.2984j, 0.7922+0.1485j]])
New state:  tensor([[0.4540-0.3798j, 0.7562+0.2790j]])
----------Measure----------
Probability:  tensor([[0.3504, 0.6496]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4781-0.4221j, 0.7410+0.2100j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.4781-0.4221j, 0.7410+0.2100j]])
New state:  tensor([[0.4008-0.4961j, 0.6955+0.3310j]])
----------Measure----------
Probability:  tensor([[0.4068, 0.5932]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2333-0.8082j, 0.3616+0.4021j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.2333-0.8082j, 0.3616+0.4021j]])
New state:  tensor([[0.0948-0.8358j, 0.2892+0.4569j]])
----------Measure----------
Probability:  tensor([[0.7076, 0.2924]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4609-0.3779j, 0.7761+0.2059j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.4609-0.3779j, 0.7761+0.2059j]])
New state:  tensor([[0.3912-0.4497j, 0.7307+0.3329j]])
----------Measure----------
Probability:  tensor([[0.3552, 0.6448]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5585-0.6225j, 0.5297+0.1411j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.5585-0.6225j, 0.5297+0.1411j]])
New state:  tensor([[0.4465-0.7072j, 0.4987+0.2277j]])
----------Measure----------
Probability:  tensor([[0.6995, 0.3005]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4823-0.6947j, 0.4989+0.1894j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.4823-0.6947j, 0.4989+0.1894j]])
New state:  tensor([[0.3592-0.7656j, 0.4601+0.2702j]])
----------Measure----------
Probability:  tensor([[0.7153, 0.2847]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4437-0.7427j, 0.4589+0.2025j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.4437-0.7427j, 0.4589+0.2025j]])
New state:  tensor([[0.3131-0.8065j, 0.4185+0.2764j]])
----------Measure----------
Probability:  tensor([[0.7484, 0.2516]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3906-0.4964j, 0.7170+0.2948j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.3906-0.4964j, 0.7170+0.2948j]])
New state:  tensor([[0.3020-0.5548j, 0.6576+0.4106j]])
----------Measure----------
Probability:  tensor([[0.3990, 0.6010]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2762-0.7020j, 0.5070+0.4169j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.2762-0.7020j, 0.5070+0.4169j]])
New state:  tensor([[0.1548-0.7384j, 0.4301+0.4959j]])
----------Measure----------
Probability:  tensor([[0.5692, 0.4308]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1595-0.8107j, 0.2927+0.4814j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.1595-0.8107j, 0.2927+0.4814j]])
New state:  tensor([[0.0216-0.8259j, 0.2080+0.5236j]])
----------Measure----------
Probability:  tensor([[0.6826, 0.3174]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0569-0.3476j, 0.7914+0.4996j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.0569-0.3476j, 0.7914+0.4996j]])
New state:  tensor([[-0.0021-0.3522j,  0.6967+0.6250j]])
----------Measure----------
Probability:  tensor([[0.1241, 0.8759]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3068-0.5463j, 0.6793+0.3822j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.3068-0.5463j, 0.6793+0.3822j]])
New state:  tensor([[0.2111-0.5899j, 0.6058+0.4905j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5823-0.6283j, 0.5035+0.1123j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.5823-0.6283j, 0.5035+0.1123j]])
New state:  tensor([[0.4690-0.7169j, 0.4776+0.1949j]])
----------Measure----------
Probability:  tensor([[0.7339, 0.2661]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4051-0.5344j, 0.6823+0.2911j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.4051-0.5344j, 0.6823+0.2911j]])
New state:  tensor([[0.3100-0.5947j, 0.6239+0.4012j]])
----------Measure----------
Probability:  tensor([[0.4498, 0.5502]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4432-0.7104j, 0.4980+0.2256j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.4432-0.7104j, 0.4980+0.2256j]])
New state:  tensor([[0.3180-0.7745j, 0.4533+0.3058j]])
----------Measure----------
Probability:  tensor([[0.7010, 0.2990]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5361+0.j]])
ry_matrix:  tensor([[ 0.9643-0.j, -0.2649-0.j],
        [ 0.2649+0.j,  0.9643-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5239-0.7678j, 0.3645+0.0552j]])
Inside  rz
rz_matrix theta:  tensor([[0.3363+0.j]])
rz_matrix:  tensor([[0.9859-0.1674j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9859+0.1674j]])
Performing matrix multiplication

Current state:  tensor([[0.5239-0.7678j, 0.3645+0.0552j]])
New state:  tensor([[0.3881-0.8447j, 0.3502+0.1154j]])
----------Measure----------
Probability:  tensor([[0.8641, 0.1359]])
valid set accuracy: 1.0
valid set loss: 0.3645816147327423
------------------------------Epoch75------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0566-0.3478j, 0.7915+0.4994j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.0566-0.3478j, 0.7915+0.4994j]])
New state:  tensor([[-0.0017-0.3524j,  0.6979+0.6235j]])
----------Measure----------
Probability:  tensor([[0.1242, 0.8758]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5583-0.6226j, 0.5300+0.1408j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.5583-0.6226j, 0.5300+0.1408j]])
New state:  tensor([[0.4476-0.7064j, 0.4994+0.2266j]])
----------Measure----------
Probability:  tensor([[0.6993, 0.3007]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4611-0.6864j, 0.5186+0.2177j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.4611-0.6864j, 0.5186+0.2177j]])
New state:  tensor([[0.3411-0.7532j, 0.4754+0.3005j]])
----------Measure----------
Probability:  tensor([[0.6837, 0.3163]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0060-0.2818j, 0.8388+0.4657j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.0060-0.2818j, 0.8388+0.4657j]])
New state:  tensor([[-0.0407-0.2789j,  0.7502+0.5981j]])
----------Measure----------
Probability:  tensor([[0.0794, 0.9206]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4779-0.4221j, 0.7412+0.2098j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.4779-0.4221j, 0.7412+0.2098j]])
New state:  tensor([[0.4014-0.4954j, 0.6963+0.3296j]])
----------Measure----------
Probability:  tensor([[0.4065, 0.5935]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6000-0.5991j, 0.5192+0.1068j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.6000-0.5991j, 0.5192+0.1068j]])
New state:  tensor([[0.4926-0.6902j, 0.4944+0.1913j]])
----------Measure----------
Probability:  tensor([[0.7190, 0.2810]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5108-0.2985j, 0.7924+0.1484j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.5108-0.2985j, 0.7924+0.1484j]])
New state:  tensor([[0.4544-0.3789j, 0.7569+0.2774j]])
----------Measure----------
Probability:  tensor([[0.3501, 0.6499]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4435-0.7428j, 0.4591+0.2022j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.4435-0.7428j, 0.4591+0.2022j]])
New state:  tensor([[0.3144-0.8059j, 0.4193+0.2754j]])
----------Measure----------
Probability:  tensor([[0.7484, 0.2516]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2853-0.4209j, 0.7889+0.3452j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.2853-0.4209j, 0.7889+0.3452j]])
New state:  tensor([[0.2117-0.4623j, 0.7209+0.4710j]])
----------Measure----------
Probability:  tensor([[0.2586, 0.7414]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2760-0.7022j, 0.5071+0.4166j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.2760-0.7022j, 0.5071+0.4166j]])
New state:  tensor([[0.1560-0.7382j, 0.4312+0.4948j]])
----------Measure----------
Probability:  tensor([[0.5693, 0.4307]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4632-0.7192j, 0.4795+0.1958j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.4632-0.7192j, 0.4795+0.1958j]])
New state:  tensor([[0.3378-0.7859j, 0.4405+0.2724j]])
----------Measure----------
Probability:  tensor([[0.7318, 0.2682]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3903-0.4965j, 0.7172+0.2946j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.3903-0.4965j, 0.7172+0.2946j]])
New state:  tensor([[0.3028-0.5543j, 0.6585+0.4092j]])
----------Measure----------
Probability:  tensor([[0.3989, 0.6011]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4821-0.6948j, 0.4991+0.1891j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.4821-0.6948j, 0.4991+0.1891j]])
New state:  tensor([[0.3605-0.7650j, 0.4609+0.2691j]])
----------Measure----------
Probability:  tensor([[0.7152, 0.2848]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.5001-0.3447j, 0.7757+0.1713j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.5001-0.3447j, 0.7757+0.1713j]])
New state:  tensor([[0.4362-0.4227j, 0.7367+0.2973j]])
----------Measure----------
Probability:  tensor([[0.3689, 0.6311]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2332-0.8083j, 0.3617+0.4018j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.2332-0.8083j, 0.3617+0.4018j]])
New state:  tensor([[0.0962-0.8358j, 0.2902+0.4561j]])
----------Measure----------
Probability:  tensor([[0.7078, 0.2922]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3976-0.6564j, 0.5687+0.2961j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.3976-0.6564j, 0.5687+0.2961j]])
New state:  tensor([[0.2835-0.7131j, 0.5119+0.3862j]])
----------Measure----------
Probability:  tensor([[0.5889, 0.4111]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5238-0.7678j, 0.3648+0.0549j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.7678j, 0.3648+0.0549j]])
New state:  tensor([[0.3895-0.8439j, 0.3506+0.1145j]])
----------Measure----------
Probability:  tensor([[0.8639, 0.1361]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3836-0.7783j, 0.4315+0.2469j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.3836-0.7783j, 0.4315+0.2469j]])
New state:  tensor([[0.2495-0.8310j, 0.3847+0.3149j]])
----------Measure----------
Probability:  tensor([[0.7529, 0.2471]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6672-0.6648j, 0.3323-0.0498j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.6672-0.6648j, 0.3323-0.0498j]])
New state:  tensor([[0.5480-0.7660j, 0.3360+0.0059j]])
----------Measure----------
Probability:  tensor([[0.8871, 0.1129]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3239-0.4059j, 0.7974+0.3074j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.3239-0.4059j, 0.7974+0.3074j]])
New state:  tensor([[0.2522-0.4539j, 0.7355+0.4351j]])
----------Measure----------
Probability:  tensor([[0.2697, 0.7303]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3065-0.5464j, 0.6794+0.3820j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.3065-0.5464j, 0.6794+0.3820j]])
New state:  tensor([[0.2119-0.5896j, 0.6068+0.4891j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1593-0.8108j, 0.2928+0.4811j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.1593-0.8108j, 0.2928+0.4811j]])
New state:  tensor([[0.0230-0.8260j, 0.2091+0.5229j]])
----------Measure----------
Probability:  tensor([[0.6829, 0.3171]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3487-0.7233j, 0.4988+0.3263j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.3487-0.7233j, 0.4988+0.3263j]])
New state:  tensor([[0.2242-0.7710j, 0.4379+0.4044j]])
----------Measure----------
Probability:  tensor([[0.6447, 0.3553]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4010-0.4681j, 0.7368+0.2777j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.4010-0.4681j, 0.7368+0.2777j]])
New state:  tensor([[0.3180-0.5280j, 0.6807+0.3958j]])
----------Measure----------
Probability:  tensor([[0.3800, 0.6200]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4049-0.5345j, 0.6824+0.2909j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.4049-0.5345j, 0.6824+0.2909j]])
New state:  tensor([[0.3108-0.5942j, 0.6249+0.3998j]])
----------Measure----------
Probability:  tensor([[0.4497, 0.5503]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5821-0.6284j, 0.5037+0.1120j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6284j, 0.5037+0.1120j]])
New state:  tensor([[0.4701-0.7160j, 0.4782+0.1938j]])
----------Measure----------
Probability:  tensor([[0.7337, 0.2663]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4606-0.3780j, 0.7763+0.2057j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.4606-0.3780j, 0.7763+0.2057j]])
New state:  tensor([[0.3917-0.4490j, 0.7316+0.3313j]])
----------Measure----------
Probability:  tensor([[0.3550, 0.6450]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4430-0.7105j, 0.4982+0.2253j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.4430-0.7105j, 0.4982+0.2253j]])
New state:  tensor([[0.3193-0.7740j, 0.4541+0.3047j]])
----------Measure----------
Probability:  tensor([[0.7010, 0.2990]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5369+0.j]])
ry_matrix:  tensor([[ 0.9642-0.j, -0.2652-0.j],
        [ 0.2652+0.j,  0.9642-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.6000-0.5991j, 0.5192+0.1068j]])
Inside  rz
rz_matrix theta:  tensor([[0.3325+0.j]])
rz_matrix:  tensor([[0.9862-0.1655j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9862+0.1655j]])
Performing matrix multiplication

Current state:  tensor([[0.6000-0.5991j, 0.5192+0.1068j]])
New state:  tensor([[0.4926-0.6902j, 0.4944+0.1913j]])
----------Measure----------
Probability:  tensor([[0.7190, 0.2810]])
valid set accuracy: 1.0
valid set loss: 0.36453893780708313
------------------------------Epoch76------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4433-0.7428j, 0.4592+0.2019j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.4433-0.7428j, 0.4592+0.2019j]])
New state:  tensor([[0.3157-0.8054j, 0.4200+0.2744j]])
----------Measure----------
Probability:  tensor([[0.7483, 0.2517]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1592-0.8110j, 0.2928+0.4808j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.1592-0.8110j, 0.2928+0.4808j]])
New state:  tensor([[0.0243-0.8261j, 0.2102+0.5223j]])
----------Measure----------
Probability:  tensor([[0.6831, 0.3169]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5820-0.6284j, 0.5039+0.1118j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.5820-0.6284j, 0.5039+0.1118j]])
New state:  tensor([[0.4712-0.7152j, 0.4788+0.1928j]])
----------Measure----------
Probability:  tensor([[0.7336, 0.2664]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4609-0.6865j, 0.5187+0.2175j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.4609-0.6865j, 0.5187+0.2175j]])
New state:  tensor([[0.3423-0.7527j, 0.4761+0.2995j]])
----------Measure----------
Probability:  tensor([[0.6836, 0.3164]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4046-0.5346j, 0.6826+0.2907j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.4046-0.5346j, 0.6826+0.2907j]])
New state:  tensor([[0.3117-0.5937j, 0.6257+0.3986j]])
----------Measure----------
Probability:  tensor([[0.4496, 0.5504]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3901-0.4966j, 0.7173+0.2944j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.3901-0.4966j, 0.7173+0.2944j]])
New state:  tensor([[0.3035-0.5538j, 0.6594+0.4079j]])
----------Measure----------
Probability:  tensor([[0.3988, 0.6012]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3974-0.6565j, 0.5688+0.2959j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.3974-0.6565j, 0.5688+0.2959j]])
New state:  tensor([[0.2845-0.7127j, 0.5127+0.3851j]])
----------Measure----------
Probability:  tensor([[0.5889, 0.4111]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4603-0.3780j, 0.7765+0.2056j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.4603-0.3780j, 0.7765+0.2056j]])
New state:  tensor([[0.3922-0.4483j, 0.7323+0.3299j]])
----------Measure----------
Probability:  tensor([[0.3548, 0.6452]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2850-0.4210j, 0.7890+0.3450j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.2850-0.4210j, 0.7890+0.3450j]])
New state:  tensor([[0.2123-0.4620j, 0.7218+0.4695j]])
----------Measure----------
Probability:  tensor([[0.2585, 0.7415]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3835-0.7784j, 0.4316+0.2466j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.3835-0.7784j, 0.4316+0.2466j]])
New state:  tensor([[0.2509-0.8307j, 0.3854+0.3139j]])
----------Measure----------
Probability:  tensor([[0.7529, 0.2471]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3236-0.4060j, 0.7975+0.3072j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.3236-0.4060j, 0.7975+0.3072j]])
New state:  tensor([[0.2528-0.4535j, 0.7364+0.4337j]])
----------Measure----------
Probability:  tensor([[0.2696, 0.7304]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3063-0.5465j, 0.6795+0.3818j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.3063-0.5465j, 0.6795+0.3818j]])
New state:  tensor([[0.2127-0.5893j, 0.6078+0.4879j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5106-0.2985j, 0.7926+0.1483j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.5106-0.2985j, 0.7926+0.1483j]])
New state:  tensor([[0.4548-0.3781j, 0.7576+0.2760j]])
----------Measure----------
Probability:  tensor([[0.3498, 0.6502]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0563-0.3479j, 0.7915+0.4993j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.0563-0.3479j, 0.7915+0.4993j]])
New state:  tensor([[-0.0014-0.3525j,  0.6991+0.6222j]])
----------Measure----------
Probability:  tensor([[0.1242, 0.8758]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4630-0.7193j, 0.4796+0.1955j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.4630-0.7193j, 0.4796+0.1955j]])
New state:  tensor([[0.3390-0.7854j, 0.4411+0.2714j]])
----------Measure----------
Probability:  tensor([[0.7317, 0.2683]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4428-0.7105j, 0.4984+0.2251j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.4428-0.7105j, 0.4984+0.2251j]])
New state:  tensor([[0.3205-0.7735j, 0.4548+0.3037j]])
----------Measure----------
Probability:  tensor([[0.7010, 0.2990]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4008-0.4682j, 0.7369+0.2776j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.4008-0.4682j, 0.7369+0.2776j]])
New state:  tensor([[0.3187-0.5275j, 0.6816+0.3945j]])
----------Measure----------
Probability:  tensor([[0.3799, 0.6201]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6671-0.6648j, 0.3325-0.0500j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.6671-0.6648j, 0.3325-0.0500j]])
New state:  tensor([[0.5492-0.7650j, 0.3362+0.0051j]])
----------Measure----------
Probability:  tensor([[0.8869, 0.1131]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4819-0.6949j, 0.4992+0.1889j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.4819-0.6949j, 0.4992+0.1889j]])
New state:  tensor([[0.3617-0.7644j, 0.4616+0.2681j]])
----------Measure----------
Probability:  tensor([[0.7151, 0.2849]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2330-0.8085j, 0.3618+0.4015j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.2330-0.8085j, 0.3618+0.4015j]])
New state:  tensor([[0.0975-0.8357j, 0.2911+0.4553j]])
----------Measure----------
Probability:  tensor([[0.7079, 0.2921]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4776-0.4222j, 0.7414+0.2097j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.4776-0.4222j, 0.7414+0.2097j]])
New state:  tensor([[0.4020-0.4947j, 0.6971+0.3282j]])
----------Measure----------
Probability:  tensor([[0.4064, 0.5936]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5999-0.5992j, 0.5194+0.1066j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.5999-0.5992j, 0.5194+0.1066j]])
New state:  tensor([[0.4937-0.6893j, 0.4950+0.1902j]])
----------Measure----------
Probability:  tensor([[0.7188, 0.2812]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3485-0.7234j, 0.4989+0.3261j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.3485-0.7234j, 0.4989+0.3261j]])
New state:  tensor([[0.2254-0.7707j, 0.4388+0.4034j]])
----------Measure----------
Probability:  tensor([[0.6448, 0.3552]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4998-0.3447j, 0.7759+0.1712j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.4998-0.3447j, 0.7759+0.1712j]])
New state:  tensor([[0.4366-0.4219j, 0.7374+0.2959j]])
----------Measure----------
Probability:  tensor([[0.3687, 0.6313]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5582-0.6226j, 0.5301+0.1406j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.5582-0.6226j, 0.5301+0.1406j]])
New state:  tensor([[0.4487-0.7056j, 0.5000+0.2255j]])
----------Measure----------
Probability:  tensor([[0.6992, 0.3008]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2758-0.7023j, 0.5072+0.4164j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.2758-0.7023j, 0.5072+0.4164j]])
New state:  tensor([[0.1571-0.7380j, 0.4322+0.4938j]])
----------Measure----------
Probability:  tensor([[0.5694, 0.4306]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5237-0.7679j, 0.3649+0.0547j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.5237-0.7679j, 0.3649+0.0547j]])
New state:  tensor([[0.3909-0.8432j, 0.3511+0.1137j]])
----------Measure----------
Probability:  tensor([[0.8638, 0.1362]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0058-0.2819j, 0.8389+0.4656j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.0058-0.2819j, 0.8389+0.4656j]])
New state:  tensor([[-0.0405-0.2791j,  0.7513+0.5967j]])
----------Measure----------
Probability:  tensor([[0.0795, 0.9205]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5376+0.j]])
ry_matrix:  tensor([[ 0.9641-0.j, -0.2656-0.j],
        [ 0.2656+0.j,  0.9641-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5999-0.5992j, 0.5194+0.1066j]])
Inside  rz
rz_matrix theta:  tensor([[0.3289+0.j]])
rz_matrix:  tensor([[0.9865-0.1637j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9865+0.1637j]])
Performing matrix multiplication

Current state:  tensor([[0.5999-0.5992j, 0.5194+0.1066j]])
New state:  tensor([[0.4937-0.6893j, 0.4950+0.1902j]])
----------Measure----------
Probability:  tensor([[0.7188, 0.2812]])
valid set accuracy: 1.0
valid set loss: 0.36450299620628357
------------------------------Epoch77------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1591-0.8112j, 0.2929+0.4805j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.1591-0.8112j, 0.2929+0.4805j]])
New state:  tensor([[0.0256-0.8262j, 0.2111+0.5216j]])
----------Measure----------
Probability:  tensor([[0.6833, 0.3167]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3483-0.7235j, 0.4990+0.3258j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.3483-0.7235j, 0.4990+0.3258j]])
New state:  tensor([[0.2264-0.7704j, 0.4396+0.4024j]])
----------Measure----------
Probability:  tensor([[0.6448, 0.3552]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3061-0.5467j, 0.6796+0.3816j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.3061-0.5467j, 0.6796+0.3816j]])
New state:  tensor([[0.2134-0.5890j, 0.6088+0.4867j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4044-0.5347j, 0.6827+0.2906j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.4044-0.5347j, 0.6827+0.2906j]])
New state:  tensor([[0.3124-0.5932j, 0.6266+0.3974j]])
----------Measure----------
Probability:  tensor([[0.4495, 0.5505]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2329-0.8086j, 0.3618+0.4012j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.2329-0.8086j, 0.3618+0.4012j]])
New state:  tensor([[0.0988-0.8357j, 0.2920+0.4546j]])
----------Measure----------
Probability:  tensor([[0.7081, 0.2919]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5580-0.6227j, 0.5303+0.1404j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.5580-0.6227j, 0.5303+0.1404j]])
New state:  tensor([[0.4497-0.7049j, 0.5006+0.2245j]])
----------Measure----------
Probability:  tensor([[0.6990, 0.3010]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5103-0.2986j, 0.7928+0.1482j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.5103-0.2986j, 0.7928+0.1482j]])
New state:  tensor([[0.4552-0.3774j, 0.7583+0.2747j]])
----------Measure----------
Probability:  tensor([[0.3496, 0.6504]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2757-0.7025j, 0.5073+0.4161j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.2757-0.7025j, 0.5073+0.4161j]])
New state:  tensor([[0.1581-0.7379j, 0.4331+0.4929j]])
----------Measure----------
Probability:  tensor([[0.5695, 0.4305]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3233-0.4061j, 0.7976+0.3071j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.3233-0.4061j, 0.7976+0.3071j]])
New state:  tensor([[0.2532-0.4532j, 0.7373+0.4323j]])
----------Measure----------
Probability:  tensor([[0.2695, 0.7305]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0561-0.3481j, 0.7915+0.4992j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.0561-0.3481j, 0.7915+0.4992j]])
New state:  tensor([[-0.0011-0.3526j,  0.7001+0.6209j]])
----------Measure----------
Probability:  tensor([[0.1243, 0.8757]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6670-0.6648j, 0.3328-0.0503j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.6670-0.6648j, 0.3328-0.0503j]])
New state:  tensor([[0.5504-0.7641j, 0.3365+0.0043j]])
----------Measure----------
Probability:  tensor([[0.8867, 0.1133]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4629-0.7193j, 0.4798+0.1953j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.4629-0.7193j, 0.4798+0.1953j]])
New state:  tensor([[0.3401-0.7848j, 0.4418+0.2705j]])
----------Measure----------
Probability:  tensor([[0.7317, 0.2683]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4996-0.3448j, 0.7761+0.1711j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.4996-0.3448j, 0.7761+0.1711j]])
New state:  tensor([[0.4371-0.4212j, 0.7381+0.2946j]])
----------Measure----------
Probability:  tensor([[0.3684, 0.6316]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2848-0.4211j, 0.7891+0.3449j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.2848-0.4211j, 0.7891+0.3449j]])
New state:  tensor([[0.2127-0.4617j, 0.7227+0.4682j]])
----------Measure----------
Probability:  tensor([[0.2584, 0.7416]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5818-0.6285j, 0.5041+0.1116j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.5818-0.6285j, 0.5041+0.1116j]])
New state:  tensor([[0.4722-0.7144j, 0.4794+0.1918j]])
----------Measure----------
Probability:  tensor([[0.7334, 0.2666]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3898-0.4967j, 0.7174+0.2943j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.3898-0.4967j, 0.7174+0.2943j]])
New state:  tensor([[0.3042-0.5534j, 0.6602+0.4067j]])
----------Measure----------
Probability:  tensor([[0.3987, 0.6013]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4005-0.4683j, 0.7371+0.2774j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.4005-0.4683j, 0.7371+0.2774j]])
New state:  tensor([[0.3193-0.5271j, 0.6824+0.3932j]])
----------Measure----------
Probability:  tensor([[0.3797, 0.6203]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4432-0.7429j, 0.4594+0.2017j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.4432-0.7429j, 0.4594+0.2017j]])
New state:  tensor([[0.3169-0.8049j, 0.4206+0.2735j]])
----------Measure----------
Probability:  tensor([[0.7483, 0.2517]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4601-0.3781j, 0.7766+0.2055j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.4601-0.3781j, 0.7766+0.2055j]])
New state:  tensor([[0.3927-0.4477j, 0.7331+0.3286j]])
----------Measure----------
Probability:  tensor([[0.3546, 0.6454]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4773-0.4223j, 0.7416+0.2095j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.4773-0.4223j, 0.7416+0.2095j]])
New state:  tensor([[0.4026-0.4941j, 0.6978+0.3270j]])
----------Measure----------
Probability:  tensor([[0.4062, 0.5938]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4818-0.6949j, 0.4994+0.1887j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.4818-0.6949j, 0.4994+0.1887j]])
New state:  tensor([[0.3627-0.7638j, 0.4622+0.2671j]])
----------Measure----------
Probability:  tensor([[0.7150, 0.2850]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5235-0.7679j, 0.3651+0.0544j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.5235-0.7679j, 0.3651+0.0544j]])
New state:  tensor([[0.3921-0.8426j, 0.3515+0.1128j]])
----------Measure----------
Probability:  tensor([[0.8637, 0.1363]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5997-0.5992j, 0.5196+0.1064j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.5997-0.5992j, 0.5196+0.1064j]])
New state:  tensor([[0.4946-0.6885j, 0.4955+0.1892j]])
----------Measure----------
Probability:  tensor([[0.7187, 0.2813]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3833-0.7785j, 0.4317+0.2463j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.3833-0.7785j, 0.4317+0.2463j]])
New state:  tensor([[0.2521-0.8303j, 0.3861+0.3131j]])
----------Measure----------
Probability:  tensor([[0.7529, 0.2471]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4607-0.6865j, 0.5189+0.2172j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.4607-0.6865j, 0.5189+0.2172j]])
New state:  tensor([[0.3433-0.7521j, 0.4768+0.2985j]])
----------Measure----------
Probability:  tensor([[0.6836, 0.3164]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0055-0.2821j, 0.8389+0.4655j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.0055-0.2821j, 0.8389+0.4655j]])
New state:  tensor([[-0.0403-0.2792j,  0.7523+0.5954j]])
----------Measure----------
Probability:  tensor([[0.0796, 0.9204]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5997-0.5992j, 0.5196+0.1064j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.5997-0.5992j, 0.5196+0.1064j]])
New state:  tensor([[0.4946-0.6885j, 0.4955+0.1892j]])
----------Measure----------
Probability:  tensor([[0.7187, 0.2813]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3972-0.6566j, 0.5690+0.2957j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.3972-0.6566j, 0.5690+0.2957j]])
New state:  tensor([[0.2855-0.7123j, 0.5135+0.3840j]])
----------Measure----------
Probability:  tensor([[0.5888, 0.4112]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5383+0.j]])
ry_matrix:  tensor([[ 0.9640-0.j, -0.2659-0.j],
        [ 0.2659+0.j,  0.9640-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4426-0.7106j, 0.4985+0.2249j]])
Inside  rz
rz_matrix theta:  tensor([[0.3256+0.j]])
rz_matrix:  tensor([[0.9868-0.1621j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9868+0.1621j]])
Performing matrix multiplication

Current state:  tensor([[0.4426-0.7106j, 0.4985+0.2249j]])
New state:  tensor([[0.3216-0.7730j, 0.4555+0.3027j]])
----------Measure----------
Probability:  tensor([[0.7009, 0.2991]])
valid set accuracy: 1.0
valid set loss: 0.3644658327102661
------------------------------Epoch78------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1591-0.8113j, 0.2929+0.4803j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.1591-0.8113j, 0.2929+0.4803j]])
New state:  tensor([[0.0267-0.8263j, 0.2120+0.5211j]])
----------Measure----------
Probability:  tensor([[0.6835, 0.3165]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2328-0.8087j, 0.3619+0.4010j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.2328-0.8087j, 0.3619+0.4010j]])
New state:  tensor([[0.1000-0.8356j, 0.2928+0.4539j]])
----------Measure----------
Probability:  tensor([[0.7082, 0.2918]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3482-0.7236j, 0.4991+0.3257j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.3482-0.7236j, 0.4991+0.3257j]])
New state:  tensor([[0.2275-0.7701j, 0.4403+0.4016j]])
----------Measure----------
Probability:  tensor([[0.6448, 0.3552]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6669-0.6648j, 0.3329-0.0504j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.6669-0.6648j, 0.3329-0.0504j]])
New state:  tensor([[0.5515-0.7632j, 0.3367+0.0037j]])
----------Measure----------
Probability:  tensor([[0.8866, 0.1134]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5235-0.7679j, 0.3652+0.0542j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.5235-0.7679j, 0.3652+0.0542j]])
New state:  tensor([[0.3934-0.8420j, 0.3518+0.1122j]])
----------Measure----------
Probability:  tensor([[0.8637, 0.1363]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4816-0.6950j, 0.4995+0.1885j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.4816-0.6950j, 0.4995+0.1885j]])
New state:  tensor([[0.3638-0.7633j, 0.4627+0.2663j]])
----------Measure----------
Probability:  tensor([[0.7150, 0.2850]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3232-0.4062j, 0.7977+0.3070j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.3232-0.4062j, 0.7977+0.3070j]])
New state:  tensor([[0.2537-0.4528j, 0.7380+0.4311j]])
----------Measure----------
Probability:  tensor([[0.2694, 0.7306]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4003-0.4684j, 0.7372+0.2773j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.4003-0.4684j, 0.7372+0.2773j]])
New state:  tensor([[0.3199-0.5266j, 0.6831+0.3921j]])
----------Measure----------
Probability:  tensor([[0.3797, 0.6203]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5101-0.2986j, 0.7929+0.1481j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.5101-0.2986j, 0.7929+0.1481j]])
New state:  tensor([[0.4555-0.3767j, 0.7588+0.2735j]])
----------Measure----------
Probability:  tensor([[0.3494, 0.6506]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4425-0.7107j, 0.4986+0.2247j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.4425-0.7107j, 0.4986+0.2247j]])
New state:  tensor([[0.3226-0.7725j, 0.4561+0.3019j]])
----------Measure----------
Probability:  tensor([[0.7009, 0.2991]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4431-0.7430j, 0.4595+0.2015j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.4431-0.7430j, 0.4595+0.2015j]])
New state:  tensor([[0.3180-0.8045j, 0.4211+0.2727j]])
----------Measure----------
Probability:  tensor([[0.7483, 0.2517]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4994-0.3448j, 0.7762+0.1710j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.4994-0.3448j, 0.7762+0.1710j]])
New state:  tensor([[0.4375-0.4205j, 0.7387+0.2934j]])
----------Measure----------
Probability:  tensor([[0.3683, 0.6317]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4043-0.5348j, 0.6828+0.2904j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.4043-0.5348j, 0.6828+0.2904j]])
New state:  tensor([[0.3131-0.5928j, 0.6273+0.3963j]])
----------Measure----------
Probability:  tensor([[0.4494, 0.5506]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2846-0.4212j, 0.7891+0.3448j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.2846-0.4212j, 0.7891+0.3448j]])
New state:  tensor([[0.2132-0.4614j, 0.7235+0.4670j]])
----------Measure----------
Probability:  tensor([[0.2584, 0.7416]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5578-0.6227j, 0.5305+0.1402j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.5578-0.6227j, 0.5305+0.1402j]])
New state:  tensor([[0.4506-0.7042j, 0.5011+0.2236j]])
----------Measure----------
Probability:  tensor([[0.6989, 0.3011]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0559-0.3482j, 0.7915+0.4991j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.0559-0.3482j, 0.7915+0.4991j]])
New state:  tensor([[-0.0008-0.3527j,  0.7011+0.6197j]])
----------Measure----------
Probability:  tensor([[0.1244, 0.8756]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5996-0.5992j, 0.5198+0.1063j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.5996-0.5992j, 0.5198+0.1063j]])
New state:  tensor([[0.4956-0.6877j, 0.4960+0.1883j]])
----------Measure----------
Probability:  tensor([[0.7186, 0.2814]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4599-0.3782j, 0.7767+0.2054j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.4599-0.3782j, 0.7767+0.2054j]])
New state:  tensor([[0.3932-0.4471j, 0.7337+0.3274j]])
----------Measure----------
Probability:  tensor([[0.3545, 0.6455]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4772-0.4223j, 0.7417+0.2094j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.4772-0.4223j, 0.7417+0.2094j]])
New state:  tensor([[0.4032-0.4935j, 0.6984+0.3258j]])
----------Measure----------
Probability:  tensor([[0.4061, 0.5939]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3970-0.6566j, 0.5691+0.2955j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.3970-0.6566j, 0.5691+0.2955j]])
New state:  tensor([[0.2864-0.7119j, 0.5142+0.3831j]])
----------Measure----------
Probability:  tensor([[0.5888, 0.4112]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3832-0.7785j, 0.4318+0.2461j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.3832-0.7785j, 0.4318+0.2461j]])
New state:  tensor([[0.2532-0.8299j, 0.3867+0.3123j]])
----------Measure----------
Probability:  tensor([[0.7529, 0.2471]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5817-0.6285j, 0.5042+0.1114j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.5817-0.6285j, 0.5042+0.1114j]])
New state:  tensor([[0.4732-0.7137j, 0.4798+0.1910j]])
----------Measure----------
Probability:  tensor([[0.7333, 0.2667]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5996-0.5992j, 0.5198+0.1063j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.5996-0.5992j, 0.5198+0.1063j]])
New state:  tensor([[0.4956-0.6877j, 0.4960+0.1883j]])
----------Measure----------
Probability:  tensor([[0.7186, 0.2814]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2755-0.7026j, 0.5074+0.4160j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.2755-0.7026j, 0.5074+0.4160j]])
New state:  tensor([[0.1591-0.7377j, 0.4340+0.4920j]])
----------Measure----------
Probability:  tensor([[0.5696, 0.4304]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0053-0.2822j, 0.8389+0.4655j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.0053-0.2822j, 0.8389+0.4655j]])
New state:  tensor([[-0.0401-0.2794j,  0.7532+0.5941j]])
----------Measure----------
Probability:  tensor([[0.0797, 0.9203]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4628-0.7194j, 0.4799+0.1951j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.4628-0.7194j, 0.4799+0.1951j]])
New state:  tensor([[0.3412-0.7843j, 0.4423+0.2696j]])
----------Measure----------
Probability:  tensor([[0.7316, 0.2684]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3897-0.4968j, 0.7175+0.2941j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.3897-0.4968j, 0.7175+0.2941j]])
New state:  tensor([[0.3048-0.5529j, 0.6610+0.4055j]])
----------Measure----------
Probability:  tensor([[0.3987, 0.6013]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4606-0.6866j, 0.5190+0.2171j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.4606-0.6866j, 0.5190+0.2171j]])
New state:  tensor([[0.3443-0.7516j, 0.4774+0.2976j]])
----------Measure----------
Probability:  tensor([[0.6835, 0.3165]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5387+0.j]])
ry_matrix:  tensor([[ 0.9639-0.j, -0.2661-0.j],
        [ 0.2661+0.j,  0.9639-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3059-0.5468j, 0.6797+0.3815j]])
Inside  rz
rz_matrix theta:  tensor([[0.3226+0.j]])
rz_matrix:  tensor([[0.9870-0.1606j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9870+0.1606j]])
Performing matrix multiplication

Current state:  tensor([[0.3059-0.5468j, 0.6797+0.3815j]])
New state:  tensor([[0.2141-0.5888j, 0.6096+0.4857j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
valid set accuracy: 1.0
valid set loss: 0.36444124579429626
------------------------------Epoch79------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4991-0.3449j, 0.7764+0.1709j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.4991-0.3449j, 0.7764+0.1709j]])
New state:  tensor([[0.4378-0.4199j, 0.7393+0.2923j]])
----------Measure----------
Probability:  tensor([[0.3680, 0.6320]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3480-0.7237j, 0.4993+0.3254j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.3480-0.7237j, 0.4993+0.3254j]])
New state:  tensor([[0.2284-0.7699j, 0.4411+0.4007j]])
----------Measure----------
Probability:  tensor([[0.6449, 0.3551]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1590-0.8115j, 0.2930+0.4800j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.1590-0.8115j, 0.2930+0.4800j]])
New state:  tensor([[0.0278-0.8264j, 0.2128+0.5205j]])
----------Measure----------
Probability:  tensor([[0.6838, 0.3162]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4423-0.7108j, 0.4988+0.2244j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.4423-0.7108j, 0.4988+0.2244j]])
New state:  tensor([[0.3235-0.7721j, 0.4567+0.3009j]])
----------Measure----------
Probability:  tensor([[0.7008, 0.2992]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3894-0.4969j, 0.7177+0.2939j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.3894-0.4969j, 0.7177+0.2939j]])
New state:  tensor([[0.3053-0.5526j, 0.6617+0.4044j]])
----------Measure----------
Probability:  tensor([[0.3985, 0.6015]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2843-0.4214j, 0.7892+0.3446j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.2843-0.4214j, 0.7892+0.3446j]])
New state:  tensor([[0.2136-0.4612j, 0.7243+0.4659j]])
----------Measure----------
Probability:  tensor([[0.2583, 0.7417]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3830-0.7786j, 0.4320+0.2458j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.3830-0.7786j, 0.4320+0.2458j]])
New state:  tensor([[0.2542-0.8297j, 0.3873+0.3115j]])
----------Measure----------
Probability:  tensor([[0.7530, 0.2470]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3056-0.5469j, 0.6798+0.3812j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.3056-0.5469j, 0.6798+0.3812j]])
New state:  tensor([[0.2147-0.5886j, 0.6105+0.4846j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5815-0.6285j, 0.5045+0.1112j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.5815-0.6285j, 0.5045+0.1112j]])
New state:  tensor([[0.4740-0.7131j, 0.4804+0.1901j]])
----------Measure----------
Probability:  tensor([[0.7331, 0.2669]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4769-0.4224j, 0.7419+0.2093j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.4769-0.4224j, 0.7419+0.2093j]])
New state:  tensor([[0.4035-0.4929j, 0.6991+0.3247j]])
----------Measure----------
Probability:  tensor([[0.4058, 0.5942]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4429-0.7430j, 0.4597+0.2012j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.4429-0.7430j, 0.4597+0.2012j]])
New state:  tensor([[0.3189-0.8041j, 0.4218+0.2718j]])
----------Measure----------
Probability:  tensor([[0.7482, 0.2518]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0555-0.3484j, 0.7915+0.4990j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.0555-0.3484j, 0.7915+0.4990j]])
New state:  tensor([[-6.2957e-04-0.3528j,  7.0203e-01+0.6186j]])
----------Measure----------
Probability:  tensor([[0.1245, 0.8755]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3228-0.4063j, 0.7978+0.3068j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.3228-0.4063j, 0.7978+0.3068j]])
New state:  tensor([[0.2540-0.4526j, 0.7388+0.4299j]])
----------Measure----------
Probability:  tensor([[0.2693, 0.7307]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2753-0.7028j, 0.5075+0.4157j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.2753-0.7028j, 0.5075+0.4157j]])
New state:  tensor([[0.1599-0.7376j, 0.4348+0.4912j]])
----------Measure----------
Probability:  tensor([[0.5697, 0.4303]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5098-0.2987j, 0.7931+0.1480j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.5098-0.2987j, 0.7931+0.1480j]])
New state:  tensor([[0.4557-0.3760j, 0.7594+0.2723j]])
----------Measure----------
Probability:  tensor([[0.3491, 0.6509]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5233-0.7679j, 0.3655+0.0539j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.5233-0.7679j, 0.3655+0.0539j]])
New state:  tensor([[0.3944-0.8414j, 0.3522+0.1114j]])
----------Measure----------
Probability:  tensor([[0.8635, 0.1365]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5993-0.5993j, 0.5200+0.1060j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.5993-0.5993j, 0.5200+0.1060j]])
New state:  tensor([[0.4963-0.6870j, 0.4965+0.1874j]])
----------Measure----------
Probability:  tensor([[0.7184, 0.2816]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0049-0.2824j, 0.8389+0.4654j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.0049-0.2824j, 0.8389+0.4654j]])
New state:  tensor([[-0.0401-0.2796j,  0.7541+0.5930j]])
----------Measure----------
Probability:  tensor([[0.0798, 0.9202]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2327-0.8089j, 0.3620+0.4007j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.2327-0.8089j, 0.3620+0.4007j]])
New state:  tensor([[0.1010-0.8356j, 0.2936+0.4532j]])
----------Measure----------
Probability:  tensor([[0.7084, 0.2916]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4814-0.6951j, 0.4997+0.1882j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.4814-0.6951j, 0.4997+0.1882j]])
New state:  tensor([[0.3647-0.7628j, 0.4634+0.2654j]])
----------Measure----------
Probability:  tensor([[0.7149, 0.2851]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5576-0.6227j, 0.5307+0.1400j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.5576-0.6227j, 0.5307+0.1400j]])
New state:  tensor([[0.4514-0.7036j, 0.5017+0.2227j]])
----------Measure----------
Probability:  tensor([[0.6988, 0.3012]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6667-0.6647j, 0.3332-0.0507j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.6667-0.6647j, 0.3332-0.0507j]])
New state:  tensor([[0.5524-0.7624j, 0.3370+0.0030j]])
----------Measure----------
Probability:  tensor([[0.8864, 0.1136]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3968-0.6568j, 0.5692+0.2953j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.3968-0.6568j, 0.5692+0.2953j]])
New state:  tensor([[0.2872-0.7116j, 0.5150+0.3821j]])
----------Measure----------
Probability:  tensor([[0.5888, 0.4112]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4604-0.6867j, 0.5192+0.2168j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.4604-0.6867j, 0.5192+0.2168j]])
New state:  tensor([[0.3452-0.7512j, 0.4780+0.2967j]])
----------Measure----------
Probability:  tensor([[0.6835, 0.3165]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4626-0.7194j, 0.4801+0.1948j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.4626-0.7194j, 0.4801+0.1948j]])
New state:  tensor([[0.3421-0.7839j, 0.4430+0.2688j]])
----------Measure----------
Probability:  tensor([[0.7316, 0.2684]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.4000-0.4685j, 0.7373+0.2771j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.4000-0.4685j, 0.7373+0.2771j]])
New state:  tensor([[0.3204-0.5262j, 0.6838+0.3910j]])
----------Measure----------
Probability:  tensor([[0.3795, 0.6205]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5993-0.5993j, 0.5200+0.1060j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.5993-0.5993j, 0.5200+0.1060j]])
New state:  tensor([[0.4963-0.6870j, 0.4965+0.1874j]])
----------Measure----------
Probability:  tensor([[0.7184, 0.2816]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4040-0.5349j, 0.6830+0.2902j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.4040-0.5349j, 0.6830+0.2902j]])
New state:  tensor([[0.3137-0.5924j, 0.6281+0.3952j]])
----------Measure----------
Probability:  tensor([[0.4493, 0.5507]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5396+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2665-0.j],
        [ 0.2665+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4596-0.3782j, 0.7769+0.2052j]])
Inside  rz
rz_matrix theta:  tensor([[0.3197+0.j]])
rz_matrix:  tensor([[0.9872-0.1592j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9872+0.1592j]])
Performing matrix multiplication

Current state:  tensor([[0.4596-0.3782j, 0.7769+0.2052j]])
New state:  tensor([[0.3935-0.4466j, 0.7344+0.3263j]])
----------Measure----------
Probability:  tensor([[0.3543, 0.6457]])
valid set accuracy: 1.0
valid set loss: 0.3643973469734192
------------------------------Epoch80------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0554-0.3485j, 0.7916+0.4989j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.0554-0.3485j, 0.7916+0.4989j]])
New state:  tensor([[-3.0880e-04-0.3529j,  7.0285e-01+0.6176j]])
----------Measure----------
Probability:  tensor([[0.1245, 0.8755]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4814-0.6951j, 0.4998+0.1881j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.4814-0.6951j, 0.4998+0.1881j]])
New state:  tensor([[0.3656-0.7624j, 0.4638+0.2646j]])
----------Measure----------
Probability:  tensor([[0.7148, 0.2852]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2752-0.7028j, 0.5075+0.4156j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.2752-0.7028j, 0.5075+0.4156j]])
New state:  tensor([[0.1608-0.7375j, 0.4355+0.4905j]])
----------Measure----------
Probability:  tensor([[0.5697, 0.4303]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5575-0.6228j, 0.5308+0.1399j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.5575-0.6228j, 0.5308+0.1399j]])
New state:  tensor([[0.4522-0.7030j, 0.5020+0.2219j]])
----------Measure----------
Probability:  tensor([[0.6987, 0.3013]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4603-0.6867j, 0.5193+0.2167j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.4603-0.6867j, 0.5193+0.2167j]])
New state:  tensor([[0.3461-0.7508j, 0.4785+0.2959j]])
----------Measure----------
Probability:  tensor([[0.6834, 0.3166]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5232-0.7679j, 0.3655+0.0538j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.5232-0.7679j, 0.3655+0.0538j]])
New state:  tensor([[0.3954-0.8409j, 0.3525+0.1108j]])
----------Measure----------
Probability:  tensor([[0.8635, 0.1365]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4594-0.3783j, 0.7770+0.2052j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.4594-0.3783j, 0.7770+0.2052j]])
New state:  tensor([[0.3939-0.4461j, 0.7349+0.3253j]])
----------Measure----------
Probability:  tensor([[0.3542, 0.6458]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3227-0.4064j, 0.7979+0.3068j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.3227-0.4064j, 0.7979+0.3068j]])
New state:  tensor([[0.2545-0.4522j, 0.7394+0.4289j]])
----------Measure----------
Probability:  tensor([[0.2693, 0.7307]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4039-0.5350j, 0.6830+0.2901j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.4039-0.5350j, 0.6830+0.2901j]])
New state:  tensor([[0.3143-0.5920j, 0.6287+0.3943j]])
----------Measure----------
Probability:  tensor([[0.4493, 0.5507]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5993-0.5993j, 0.5201+0.1059j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.5993-0.5993j, 0.5201+0.1059j]])
New state:  tensor([[0.4971-0.6864j, 0.4969+0.1867j]])
----------Measure----------
Probability:  tensor([[0.7183, 0.2817]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1589-0.8116j, 0.2930+0.4799j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.1589-0.8116j, 0.2930+0.4799j]])
New state:  tensor([[0.0288-0.8265j, 0.2136+0.5201j]])
----------Measure----------
Probability:  tensor([[0.6839, 0.3161]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.3999-0.4686j, 0.7374+0.2770j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.3999-0.4686j, 0.7374+0.2770j]])
New state:  tensor([[0.3209-0.5258j, 0.6844+0.3900j]])
----------Measure----------
Probability:  tensor([[0.3795, 0.6205]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4625-0.7195j, 0.4802+0.1947j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.4625-0.7195j, 0.4802+0.1947j]])
New state:  tensor([[0.3431-0.7835j, 0.4434+0.2681j]])
----------Measure----------
Probability:  tensor([[0.7315, 0.2685]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3830-0.7787j, 0.4320+0.2457j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.3830-0.7787j, 0.4320+0.2457j]])
New state:  tensor([[0.2552-0.8294j, 0.3878+0.3108j]])
----------Measure----------
Probability:  tensor([[0.7530, 0.2470]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4428-0.7431j, 0.4597+0.2011j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.4428-0.7431j, 0.4597+0.2011j]])
New state:  tensor([[0.3199-0.8037j, 0.4222+0.2711j]])
----------Measure----------
Probability:  tensor([[0.7482, 0.2518]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3479-0.7238j, 0.4993+0.3252j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.3479-0.7238j, 0.4993+0.3252j]])
New state:  tensor([[0.2293-0.7696j, 0.4417+0.4000j]])
----------Measure----------
Probability:  tensor([[0.6449, 0.3551]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0048-0.2825j, 0.8389+0.4653j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.0048-0.2825j, 0.8389+0.4653j]])
New state:  tensor([[-0.0399-0.2797j,  0.7549+0.5919j]])
----------Measure----------
Probability:  tensor([[0.0798, 0.9202]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4989-0.3449j, 0.7765+0.1708j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.4989-0.3449j, 0.7765+0.1708j]])
New state:  tensor([[0.4382-0.4194j, 0.7398+0.2913j]])
----------Measure----------
Probability:  tensor([[0.3679, 0.6321]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6667-0.6647j, 0.3333-0.0508j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.6667-0.6647j, 0.3333-0.0508j]])
New state:  tensor([[0.5534-0.7617j, 0.3371+0.0025j]])
----------Measure----------
Probability:  tensor([[0.8863, 0.1137]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5097-0.2987j, 0.7932+0.1479j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.5097-0.2987j, 0.7932+0.1479j]])
New state:  tensor([[0.4561-0.3754j, 0.7599+0.2713j]])
----------Measure----------
Probability:  tensor([[0.3490, 0.6510]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5993-0.5993j, 0.5201+0.1059j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.5993-0.5993j, 0.5201+0.1059j]])
New state:  tensor([[0.4971-0.6864j, 0.4969+0.1867j]])
----------Measure----------
Probability:  tensor([[0.7183, 0.2817]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3892-0.4970j, 0.7177+0.2938j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.3892-0.4970j, 0.7177+0.2938j]])
New state:  tensor([[0.3059-0.5522j, 0.6623+0.4035j]])
----------Measure----------
Probability:  tensor([[0.3985, 0.6015]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2326-0.8089j, 0.3620+0.4006j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.2326-0.8089j, 0.3620+0.4006j]])
New state:  tensor([[0.1020-0.8355j, 0.2942+0.4527j]])
----------Measure----------
Probability:  tensor([[0.7085, 0.2915]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3967-0.6568j, 0.5693+0.2951j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.3967-0.6568j, 0.5693+0.2951j]])
New state:  tensor([[0.2880-0.7112j, 0.5156+0.3813j]])
----------Measure----------
Probability:  tensor([[0.5888, 0.4112]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5814-0.6285j, 0.5046+0.1111j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.5814-0.6285j, 0.5046+0.1111j]])
New state:  tensor([[0.4748-0.7125j, 0.4807+0.1894j]])
----------Measure----------
Probability:  tensor([[0.7331, 0.2669]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4422-0.7108j, 0.4989+0.2243j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.4422-0.7108j, 0.4989+0.2243j]])
New state:  tensor([[0.3244-0.7717j, 0.4572+0.3002j]])
----------Measure----------
Probability:  tensor([[0.7008, 0.2992]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2841-0.4214j, 0.7893+0.3445j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.2841-0.4214j, 0.7893+0.3445j]])
New state:  tensor([[0.2140-0.4610j, 0.7250+0.4648j]])
----------Measure----------
Probability:  tensor([[0.2583, 0.7417]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3055-0.5470j, 0.6799+0.3811j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.3055-0.5470j, 0.6799+0.3811j]])
New state:  tensor([[0.2153-0.5883j, 0.6112+0.4837j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5399+0.j]])
ry_matrix:  tensor([[ 0.9638-0.j, -0.2667-0.j],
        [ 0.2667+0.j,  0.9638-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4767-0.4224j, 0.7420+0.2092j]])
Inside  rz
rz_matrix theta:  tensor([[0.3171+0.j]])
rz_matrix:  tensor([[0.9875-0.1579j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9875+0.1579j]])
Performing matrix multiplication

Current state:  tensor([[0.4767-0.4224j, 0.7420+0.2092j]])
New state:  tensor([[0.4041-0.4924j, 0.6996+0.3237j]])
----------Measure----------
Probability:  tensor([[0.4057, 0.5943]])
valid set accuracy: 1.0
valid set loss: 0.3643800616264343
------------------------------Epoch81------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4812-0.6951j, 0.4999+0.1879j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.4812-0.6951j, 0.4999+0.1879j]])
New state:  tensor([[0.3664-0.7620j, 0.4643+0.2639j]])
----------Measure----------
Probability:  tensor([[0.7148, 0.2852]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4037-0.5350j, 0.6831+0.2900j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.4037-0.5350j, 0.6831+0.2900j]])
New state:  tensor([[0.3149-0.5917j, 0.6292+0.3935j]])
----------Measure----------
Probability:  tensor([[0.4492, 0.5508]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5095-0.2988j, 0.7933+0.1478j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.5095-0.2988j, 0.7933+0.1478j]])
New state:  tensor([[0.4564-0.3749j, 0.7603+0.2703j]])
----------Measure----------
Probability:  tensor([[0.3488, 0.6512]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4624-0.7195j, 0.4803+0.1945j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.4624-0.7195j, 0.4803+0.1945j]])
New state:  tensor([[0.3439-0.7831j, 0.4439+0.2674j]])
----------Measure----------
Probability:  tensor([[0.7315, 0.2685]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4421-0.7109j, 0.4990+0.2241j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.4421-0.7109j, 0.4990+0.2241j]])
New state:  tensor([[0.3252-0.7714j, 0.4577+0.2995j]])
----------Measure----------
Probability:  tensor([[0.7008, 0.2992]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6666-0.6647j, 0.3335-0.0510j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.6666-0.6647j, 0.3335-0.0510j]])
New state:  tensor([[0.5542-0.7610j, 0.3373+0.0019j]])
----------Measure----------
Probability:  tensor([[0.8862, 0.1138]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2325-0.8090j, 0.3621+0.4004j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.2325-0.8090j, 0.3621+0.4004j]])
New state:  tensor([[0.1029-0.8355j, 0.2949+0.4522j]])
----------Measure----------
Probability:  tensor([[0.7086, 0.2914]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2839-0.4215j, 0.7894+0.3444j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.2839-0.4215j, 0.7894+0.3444j]])
New state:  tensor([[0.2144-0.4608j, 0.7256+0.4639j]])
----------Measure----------
Probability:  tensor([[0.2583, 0.7417]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2751-0.7029j, 0.5076+0.4154j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.2751-0.7029j, 0.5076+0.4154j]])
New state:  tensor([[0.1616-0.7374j, 0.4362+0.4898j]])
----------Measure----------
Probability:  tensor([[0.5698, 0.4302]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4987-0.3450j, 0.7766+0.1707j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.4987-0.3450j, 0.7766+0.1707j]])
New state:  tensor([[0.4385-0.4189j, 0.7403+0.2903j]])
----------Measure----------
Probability:  tensor([[0.3677, 0.6323]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5991-0.5993j, 0.5203+0.1058j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.5991-0.5993j, 0.5203+0.1058j]])
New state:  tensor([[0.4978-0.6858j, 0.4973+0.1860j]])
----------Measure----------
Probability:  tensor([[0.7181, 0.2819]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1588-0.8117j, 0.2931+0.4796j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.1588-0.8117j, 0.2931+0.4796j]])
New state:  tensor([[0.0297-0.8265j, 0.2143+0.5196j]])
----------Measure----------
Probability:  tensor([[0.6841, 0.3159]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4427-0.7431j, 0.4598+0.2009j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.4427-0.7431j, 0.4598+0.2009j]])
New state:  tensor([[0.3207-0.8033j, 0.4227+0.2705j]])
----------Measure----------
Probability:  tensor([[0.7482, 0.2518]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3891-0.4971j, 0.7178+0.2937j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.3891-0.4971j, 0.7178+0.2937j]])
New state:  tensor([[0.3064-0.5519j, 0.6629+0.4026j]])
----------Measure----------
Probability:  tensor([[0.3984, 0.6016]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0046-0.2826j, 0.8389+0.4652j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.0046-0.2826j, 0.8389+0.4652j]])
New state:  tensor([[-0.0398-0.2798j,  0.7556+0.5909j]])
----------Measure----------
Probability:  tensor([[0.0799, 0.9201]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3478-0.7239j, 0.4994+0.3251j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.3478-0.7239j, 0.4994+0.3251j]])
New state:  tensor([[0.2301-0.7694j, 0.4423+0.3993j]])
----------Measure----------
Probability:  tensor([[0.6449, 0.3551]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.3997-0.4686j, 0.7375+0.2769j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.3997-0.4686j, 0.7375+0.2769j]])
New state:  tensor([[0.3214-0.5255j, 0.6850+0.3891j]])
----------Measure----------
Probability:  tensor([[0.3794, 0.6206]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5232-0.7679j, 0.3657+0.0536j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.5232-0.7679j, 0.3657+0.0536j]])
New state:  tensor([[0.3964-0.8404j, 0.3528+0.1102j]])
----------Measure----------
Probability:  tensor([[0.8634, 0.1366]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4592-0.3783j, 0.7771+0.2051j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.4592-0.3783j, 0.7771+0.2051j]])
New state:  tensor([[0.3943-0.4456j, 0.7354+0.3243j]])
----------Measure----------
Probability:  tensor([[0.3540, 0.6460]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5991-0.5993j, 0.5203+0.1058j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.5991-0.5993j, 0.5203+0.1058j]])
New state:  tensor([[0.4978-0.6858j, 0.4973+0.1860j]])
----------Measure----------
Probability:  tensor([[0.7181, 0.2819]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4601-0.6868j, 0.5194+0.2165j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.4601-0.6868j, 0.5194+0.2165j]])
New state:  tensor([[0.3468-0.7504j, 0.4790+0.2952j]])
----------Measure----------
Probability:  tensor([[0.6834, 0.3166]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0552-0.3487j, 0.7916+0.4988j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.0552-0.3487j, 0.7916+0.4988j]])
New state:  tensor([[-1.0390e-04-0.3530j,  7.0362e-01+0.6167j]])
----------Measure----------
Probability:  tensor([[0.1246, 0.8754]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3966-0.6569j, 0.5694+0.2950j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.3966-0.6569j, 0.5694+0.2950j]])
New state:  tensor([[0.2887-0.7109j, 0.5161+0.3806j]])
----------Measure----------
Probability:  tensor([[0.5888, 0.4112]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3829-0.7787j, 0.4321+0.2455j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.3829-0.7787j, 0.4321+0.2455j]])
New state:  tensor([[0.2561-0.8291j, 0.3883+0.3102j]])
----------Measure----------
Probability:  tensor([[0.7530, 0.2470]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5812-0.6286j, 0.5047+0.1109j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.5812-0.6286j, 0.5047+0.1109j]])
New state:  tensor([[0.4756-0.7119j, 0.4811+0.1886j]])
----------Measure----------
Probability:  tensor([[0.7329, 0.2671]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3225-0.4065j, 0.7980+0.3067j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.3225-0.4065j, 0.7980+0.3067j]])
New state:  tensor([[0.2548-0.4520j, 0.7400+0.4279j]])
----------Measure----------
Probability:  tensor([[0.2692, 0.7308]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5574-0.6228j, 0.5309+0.1397j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.5574-0.6228j, 0.5309+0.1397j]])
New state:  tensor([[0.4529-0.7025j, 0.5025+0.2212j]])
----------Measure----------
Probability:  tensor([[0.6986, 0.3014]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4766-0.4225j, 0.7421+0.2091j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.4766-0.4225j, 0.7421+0.2091j]])
New state:  tensor([[0.4045-0.4920j, 0.7001+0.3228j]])
----------Measure----------
Probability:  tensor([[0.4056, 0.5944]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5404+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2669-0.j],
        [ 0.2669+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3053-0.5471j, 0.6799+0.3810j]])
Inside  rz
rz_matrix theta:  tensor([[0.3147+0.j]])
rz_matrix:  tensor([[0.9876-0.1567j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9876+0.1567j]])
Performing matrix multiplication

Current state:  tensor([[0.3053-0.5471j, 0.6799+0.3810j]])
New state:  tensor([[0.2158-0.5882j, 0.6118+0.4828j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
valid set accuracy: 1.0
valid set loss: 0.3643532991409302
------------------------------Epoch82------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0044-0.2827j, 0.8389+0.4652j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.0044-0.2827j, 0.8389+0.4652j]])
New state:  tensor([[-0.0396-0.2799j,  0.7562+0.5901j]])
----------Measure----------
Probability:  tensor([[0.0799, 0.9201]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2325-0.8091j, 0.3621+0.4002j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.2325-0.8091j, 0.3621+0.4002j]])
New state:  tensor([[0.1037-0.8354j, 0.2954+0.4517j]])
----------Measure----------
Probability:  tensor([[0.7087, 0.2913]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5573-0.6228j, 0.5310+0.1396j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.5573-0.6228j, 0.5310+0.1396j]])
New state:  tensor([[0.4536-0.7020j, 0.5029+0.2205j]])
----------Measure----------
Probability:  tensor([[0.6985, 0.3015]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4035-0.5351j, 0.6832+0.2899j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.4035-0.5351j, 0.6832+0.2899j]])
New state:  tensor([[0.3154-0.5914j, 0.6298+0.3927j]])
----------Measure----------
Probability:  tensor([[0.4492, 0.5508]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5990-0.5993j, 0.5204+0.1056j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.5990-0.5993j, 0.5204+0.1056j]])
New state:  tensor([[0.4985-0.6853j, 0.4976+0.1853j]])
----------Measure----------
Probability:  tensor([[0.7180, 0.2820]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3828-0.7788j, 0.4322+0.2453j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.3828-0.7788j, 0.4322+0.2453j]])
New state:  tensor([[0.2569-0.8288j, 0.3888+0.3096j]])
----------Measure----------
Probability:  tensor([[0.7530, 0.2470]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5990-0.5993j, 0.5204+0.1056j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.5990-0.5993j, 0.5204+0.1056j]])
New state:  tensor([[0.4985-0.6853j, 0.4976+0.1853j]])
----------Measure----------
Probability:  tensor([[0.7180, 0.2820]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4986-0.3450j, 0.7767+0.1706j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.4986-0.3450j, 0.7767+0.1706j]])
New state:  tensor([[0.4388-0.4184j, 0.7407+0.2894j]])
----------Measure----------
Probability:  tensor([[0.3676, 0.6324]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4591-0.3784j, 0.7772+0.2050j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.4591-0.3784j, 0.7772+0.2050j]])
New state:  tensor([[0.3946-0.4452j, 0.7358+0.3234j]])
----------Measure----------
Probability:  tensor([[0.3539, 0.6461]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4623-0.7196j, 0.4804+0.1944j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.4623-0.7196j, 0.4804+0.1944j]])
New state:  tensor([[0.3446-0.7827j, 0.4443+0.2668j]])
----------Measure----------
Probability:  tensor([[0.7315, 0.2685]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6665-0.6647j, 0.3336-0.0511j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.6665-0.6647j, 0.3336-0.0511j]])
New state:  tensor([[0.5550-0.7603j, 0.3375+0.0014j]])
----------Measure----------
Probability:  tensor([[0.8861, 0.1139]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0551-0.3488j, 0.7916+0.4987j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.0551-0.3488j, 0.7916+0.4987j]])
New state:  tensor([[1.1366e-04-0.3531j, 7.0432e-01+0.6158j]])
----------Measure----------
Probability:  tensor([[0.1247, 0.8753]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1588-0.8118j, 0.2931+0.4795j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.1588-0.8118j, 0.2931+0.4795j]])
New state:  tensor([[0.0305-0.8266j, 0.2149+0.5193j]])
----------Measure----------
Probability:  tensor([[0.6842, 0.3158]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3964-0.6569j, 0.5695+0.2949j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.3964-0.6569j, 0.5695+0.2949j]])
New state:  tensor([[0.2894-0.7106j, 0.5167+0.3799j]])
----------Measure----------
Probability:  tensor([[0.5887, 0.4113]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3052-0.5471j, 0.6800+0.3809j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.3052-0.5471j, 0.6800+0.3809j]])
New state:  tensor([[0.2163-0.5880j, 0.6124+0.4821j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3889-0.4971j, 0.7179+0.2936j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.3889-0.4971j, 0.7179+0.2936j]])
New state:  tensor([[0.3068-0.5516j, 0.6635+0.4018j]])
----------Measure----------
Probability:  tensor([[0.3984, 0.6016]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4600-0.6868j, 0.5195+0.2164j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.4600-0.6868j, 0.5195+0.2164j]])
New state:  tensor([[0.3476-0.7500j, 0.4795+0.2946j]])
----------Measure----------
Probability:  tensor([[0.6833, 0.3167]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2838-0.4216j, 0.7894+0.3444j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.2838-0.4216j, 0.7894+0.3444j]])
New state:  tensor([[0.2147-0.4606j, 0.7262+0.4630j]])
----------Measure----------
Probability:  tensor([[0.2582, 0.7418]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5811-0.6286j, 0.5048+0.1108j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.5811-0.6286j, 0.5048+0.1108j]])
New state:  tensor([[0.4762-0.7114j, 0.4815+0.1880j]])
----------Measure----------
Probability:  tensor([[0.7329, 0.2671]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3477-0.7239j, 0.4995+0.3249j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.3477-0.7239j, 0.4995+0.3249j]])
New state:  tensor([[0.2308-0.7692j, 0.4428+0.3987j]])
----------Measure----------
Probability:  tensor([[0.6450, 0.3550]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4811-0.6952j, 0.5000+0.1878j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.4811-0.6952j, 0.5000+0.1878j]])
New state:  tensor([[0.3671-0.7616j, 0.4647+0.2633j]])
----------Measure----------
Probability:  tensor([[0.7147, 0.2853]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4764-0.4225j, 0.7422+0.2090j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.4764-0.4225j, 0.7422+0.2090j]])
New state:  tensor([[0.4049-0.4915j, 0.7006+0.3219j]])
----------Measure----------
Probability:  tensor([[0.4055, 0.5945]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4426-0.7432j, 0.4599+0.2007j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.4426-0.7432j, 0.4599+0.2007j]])
New state:  tensor([[0.3215-0.8030j, 0.4231+0.2699j]])
----------Measure----------
Probability:  tensor([[0.7482, 0.2518]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.3996-0.4687j, 0.7376+0.2768j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.3996-0.4687j, 0.7376+0.2768j]])
New state:  tensor([[0.3218-0.5252j, 0.6855+0.3882j]])
----------Measure----------
Probability:  tensor([[0.3793, 0.6207]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3223-0.4065j, 0.7980+0.3066j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.3223-0.4065j, 0.7980+0.3066j]])
New state:  tensor([[0.2551-0.4517j, 0.7406+0.4270j]])
----------Measure----------
Probability:  tensor([[0.2692, 0.7308]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5231-0.7679j, 0.3658+0.0534j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.5231-0.7679j, 0.3658+0.0534j]])
New state:  tensor([[0.3972-0.8400j, 0.3530+0.1097j]])
----------Measure----------
Probability:  tensor([[0.8634, 0.1366]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2750-0.7030j, 0.5076+0.4152j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.2750-0.7030j, 0.5076+0.4152j]])
New state:  tensor([[0.1623-0.7373j, 0.4368+0.4892j]])
----------Measure----------
Probability:  tensor([[0.5699, 0.4301]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5093-0.2988j, 0.7934+0.1478j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.5093-0.2988j, 0.7934+0.1478j]])
New state:  tensor([[0.4566-0.3744j, 0.7607+0.2695j]])
----------Measure----------
Probability:  tensor([[0.3487, 0.6513]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5408+0.j]])
ry_matrix:  tensor([[ 0.9637-0.j, -0.2671-0.j],
        [ 0.2671+0.j,  0.9637-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4420-0.7109j, 0.4991+0.2240j]])
Inside  rz
rz_matrix theta:  tensor([[0.3125+0.j]])
rz_matrix:  tensor([[0.9878-0.1556j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9878+0.1556j]])
Performing matrix multiplication

Current state:  tensor([[0.4420-0.7109j, 0.4991+0.2240j]])
New state:  tensor([[0.3260-0.7710j, 0.4582+0.2989j]])
----------Measure----------
Probability:  tensor([[0.7008, 0.2992]])
valid set accuracy: 1.0
valid set loss: 0.36433255672454834
------------------------------Epoch83------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.3995-0.4687j, 0.7377+0.2768j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.3995-0.4687j, 0.7377+0.2768j]])
New state:  tensor([[0.3222-0.5249j, 0.6860+0.3875j]])
----------Measure----------
Probability:  tensor([[0.3793, 0.6207]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4419-0.7109j, 0.4992+0.2239j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.4419-0.7109j, 0.4992+0.2239j]])
New state:  tensor([[0.3267-0.7707j, 0.4585+0.2983j]])
----------Measure----------
Probability:  tensor([[0.7007, 0.2993]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2749-0.7031j, 0.5077+0.4151j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.2749-0.7031j, 0.5077+0.4151j]])
New state:  tensor([[0.1629-0.7371j, 0.4374+0.4887j]])
----------Measure----------
Probability:  tensor([[0.5699, 0.4301]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3222-0.4066j, 0.7981+0.3065j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.3222-0.4066j, 0.7981+0.3065j]])
New state:  tensor([[0.2555-0.4515j, 0.7411+0.4262j]])
----------Measure----------
Probability:  tensor([[0.2691, 0.7309]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5989-0.5994j, 0.5205+0.1055j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.5989-0.5994j, 0.5205+0.1055j]])
New state:  tensor([[0.4991-0.6848j, 0.4979+0.1848j]])
----------Measure----------
Probability:  tensor([[0.7180, 0.2820]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6665-0.6647j, 0.3337-0.0512j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.6665-0.6647j, 0.3337-0.0512j]])
New state:  tensor([[0.5557-0.7598j, 0.3376+0.0010j]])
----------Measure----------
Probability:  tensor([[0.8860, 0.1140]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4622-0.7196j, 0.4804+0.1943j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.4622-0.7196j, 0.4804+0.1943j]])
New state:  tensor([[0.3453-0.7824j, 0.4446+0.2662j]])
----------Measure----------
Probability:  tensor([[0.7314, 0.2686]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5811-0.6286j, 0.5049+0.1107j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.5811-0.6286j, 0.5049+0.1107j]])
New state:  tensor([[0.4769-0.7109j, 0.4817+0.1874j]])
----------Measure----------
Probability:  tensor([[0.7328, 0.2672]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0043-0.2827j, 0.8389+0.4651j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.0043-0.2827j, 0.8389+0.4651j]])
New state:  tensor([[-0.0395-0.2800j,  0.7568+0.5893j]])
----------Measure----------
Probability:  tensor([[0.0800, 0.9200]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3476-0.7240j, 0.4995+0.3248j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.3476-0.7240j, 0.4995+0.3248j]])
New state:  tensor([[0.2315-0.7690j, 0.4433+0.3981j]])
----------Measure----------
Probability:  tensor([[0.6450, 0.3550]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5989-0.5994j, 0.5205+0.1055j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.5989-0.5994j, 0.5205+0.1055j]])
New state:  tensor([[0.4991-0.6848j, 0.4979+0.1848j]])
----------Measure----------
Probability:  tensor([[0.7180, 0.2820]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2324-0.8092j, 0.3622+0.4001j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.2324-0.8092j, 0.3622+0.4001j]])
New state:  tensor([[0.1045-0.8354j, 0.2960+0.4513j]])
----------Measure----------
Probability:  tensor([[0.7088, 0.2912]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3964-0.6570j, 0.5695+0.2948j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.3964-0.6570j, 0.5695+0.2948j]])
New state:  tensor([[0.2900-0.7104j, 0.5171+0.3793j]])
----------Measure----------
Probability:  tensor([[0.5887, 0.4113]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3888-0.4972j, 0.7180+0.2935j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.3888-0.4972j, 0.7180+0.2935j]])
New state:  tensor([[0.3073-0.5513j, 0.6639+0.4010j]])
----------Measure----------
Probability:  tensor([[0.3983, 0.6017]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4985-0.3450j, 0.7768+0.1706j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.4985-0.3450j, 0.7768+0.1706j]])
New state:  tensor([[0.4391-0.4180j, 0.7411+0.2887j]])
----------Measure----------
Probability:  tensor([[0.3675, 0.6325]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5230-0.7680j, 0.3659+0.0533j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.5230-0.7680j, 0.3659+0.0533j]])
New state:  tensor([[0.3980-0.8396j, 0.3532+0.1092j]])
----------Measure----------
Probability:  tensor([[0.8633, 0.1367]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4590-0.3784j, 0.7773+0.2049j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.4590-0.3784j, 0.7773+0.2049j]])
New state:  tensor([[0.3949-0.4448j, 0.7362+0.3227j]])
----------Measure----------
Probability:  tensor([[0.3538, 0.6462]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0549-0.3488j, 0.7916+0.4987j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.0549-0.3488j, 0.7916+0.4987j]])
New state:  tensor([[3.3460e-04-0.3531j, 7.0495e-01+0.6151j]])
----------Measure----------
Probability:  tensor([[0.1247, 0.8753]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5572-0.6229j, 0.5311+0.1395j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.5572-0.6229j, 0.5311+0.1395j]])
New state:  tensor([[0.4542-0.7015j, 0.5032+0.2200j]])
----------Measure----------
Probability:  tensor([[0.6984, 0.3016]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1587-0.8119j, 0.2931+0.4794j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.1587-0.8119j, 0.2931+0.4794j]])
New state:  tensor([[0.0313-0.8266j, 0.2155+0.5189j]])
----------Measure----------
Probability:  tensor([[0.6843, 0.3157]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5092-0.2988j, 0.7935+0.1477j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.5092-0.2988j, 0.7935+0.1477j]])
New state:  tensor([[0.4569-0.3739j, 0.7611+0.2687j]])
----------Measure----------
Probability:  tensor([[0.3486, 0.6514]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3827-0.7788j, 0.4323+0.2452j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.3827-0.7788j, 0.4323+0.2452j]])
New state:  tensor([[0.2577-0.8286j, 0.3892+0.3091j]])
----------Measure----------
Probability:  tensor([[0.7530, 0.2470]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4811-0.6952j, 0.5001+0.1877j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.4811-0.6952j, 0.5001+0.1877j]])
New state:  tensor([[0.3678-0.7612j, 0.4650+0.2627j]])
----------Measure----------
Probability:  tensor([[0.7147, 0.2853]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3051-0.5472j, 0.6801+0.3808j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.3051-0.5472j, 0.6801+0.3808j]])
New state:  tensor([[0.2168-0.5878j, 0.6130+0.4814j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2836-0.4216j, 0.7895+0.3443j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.2836-0.4216j, 0.7895+0.3443j]])
New state:  tensor([[0.2150-0.4604j, 0.7267+0.4622j]])
----------Measure----------
Probability:  tensor([[0.2582, 0.7418]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4763-0.4226j, 0.7422+0.2089j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.4763-0.4226j, 0.7422+0.2089j]])
New state:  tensor([[0.4052-0.4911j, 0.7010+0.3212j]])
----------Measure----------
Probability:  tensor([[0.4054, 0.5946]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4600-0.6868j, 0.5195+0.2163j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.4600-0.6868j, 0.5195+0.2163j]])
New state:  tensor([[0.3482-0.7497j, 0.4798+0.2940j]])
----------Measure----------
Probability:  tensor([[0.6833, 0.3167]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4034-0.5351j, 0.6833+0.2898j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.4034-0.5351j, 0.6833+0.2898j]])
New state:  tensor([[0.3158-0.5911j, 0.6302+0.3920j]])
----------Measure----------
Probability:  tensor([[0.4491, 0.5509]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5411+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2673-0.j],
        [ 0.2673+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4425-0.7432j, 0.4600+0.2006j]])
Inside  rz
rz_matrix theta:  tensor([[0.3105+0.j]])
rz_matrix:  tensor([[0.9880-0.1546j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9880+0.1546j]])
Performing matrix multiplication

Current state:  tensor([[0.4425-0.7432j, 0.4600+0.2006j]])
New state:  tensor([[0.3223-0.8027j, 0.4234+0.2694j]])
----------Measure----------
Probability:  tensor([[0.7481, 0.2519]])
valid set accuracy: 1.0
valid set loss: 0.36431655287742615
------------------------------Epoch84------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3963-0.6570j, 0.5696+0.2946j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.3963-0.6570j, 0.5696+0.2946j]])
New state:  tensor([[0.2905-0.7102j, 0.5175+0.3787j]])
----------Measure----------
Probability:  tensor([[0.5887, 0.4113]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3887-0.4972j, 0.7180+0.2935j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.3887-0.4972j, 0.7180+0.2935j]])
New state:  tensor([[0.3076-0.5511j, 0.6644+0.4004j]])
----------Measure----------
Probability:  tensor([[0.3983, 0.6017]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2323-0.8092j, 0.3622+0.3999j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.2323-0.8092j, 0.3622+0.3999j]])
New state:  tensor([[0.1052-0.8353j, 0.2964+0.4509j]])
----------Measure----------
Probability:  tensor([[0.7089, 0.2911]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2835-0.4217j, 0.7895+0.3442j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.2835-0.4217j, 0.7895+0.3442j]])
New state:  tensor([[0.2153-0.4603j, 0.7272+0.4615j]])
----------Measure----------
Probability:  tensor([[0.2582, 0.7418]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4621-0.7196j, 0.4805+0.1941j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.4621-0.7196j, 0.4805+0.1941j]])
New state:  tensor([[0.3460-0.7821j, 0.4450+0.2657j]])
----------Measure----------
Probability:  tensor([[0.7314, 0.2686]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5989-0.5994j, 0.5206+0.1054j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.5989-0.5994j, 0.5206+0.1054j]])
New state:  tensor([[0.4996-0.6843j, 0.4982+0.1842j]])
----------Measure----------
Probability:  tensor([[0.7179, 0.2821]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.3993-0.4688j, 0.7377+0.2767j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.3993-0.4688j, 0.7377+0.2767j]])
New state:  tensor([[0.3225-0.5246j, 0.6864+0.3868j]])
----------Measure----------
Probability:  tensor([[0.3792, 0.6208]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4033-0.5352j, 0.6833+0.2897j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.4033-0.5352j, 0.6833+0.2897j]])
New state:  tensor([[0.3162-0.5908j, 0.6307+0.3913j]])
----------Measure----------
Probability:  tensor([[0.4491, 0.5509]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5090-0.2988j, 0.7936+0.1477j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.5090-0.2988j, 0.7936+0.1477j]])
New state:  tensor([[0.4571-0.3735j, 0.7614+0.2679j]])
----------Measure----------
Probability:  tensor([[0.3484, 0.6516]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5571-0.6229j, 0.5312+0.1394j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.5571-0.6229j, 0.5312+0.1394j]])
New state:  tensor([[0.4547-0.7011j, 0.5035+0.2194j]])
----------Measure----------
Probability:  tensor([[0.6984, 0.3016]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2748-0.7032j, 0.5077+0.4150j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.2748-0.7032j, 0.5077+0.4150j]])
New state:  tensor([[0.1635-0.7371j, 0.4379+0.4881j]])
----------Measure----------
Probability:  tensor([[0.5700, 0.4300]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3475-0.7240j, 0.4996+0.3247j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.3475-0.7240j, 0.4996+0.3247j]])
New state:  tensor([[0.2321-0.7689j, 0.4437+0.3976j]])
----------Measure----------
Probability:  tensor([[0.6450, 0.3550]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4424-0.7432j, 0.4601+0.2005j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.4424-0.7432j, 0.4601+0.2005j]])
New state:  tensor([[0.3229-0.8024j, 0.4238+0.2689j]])
----------Measure----------
Probability:  tensor([[0.7481, 0.2519]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4762-0.4226j, 0.7423+0.2089j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.4762-0.4226j, 0.7423+0.2089j]])
New state:  tensor([[0.4055-0.4908j, 0.7014+0.3205j]])
----------Measure----------
Probability:  tensor([[0.4053, 0.5947]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4599-0.6869j, 0.5196+0.2161j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.4599-0.6869j, 0.5196+0.2161j]])
New state:  tensor([[0.3488-0.7494j, 0.4802+0.2935j]])
----------Measure----------
Probability:  tensor([[0.6833, 0.3167]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4418-0.7110j, 0.4992+0.2237j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.4418-0.7110j, 0.4992+0.2237j]])
New state:  tensor([[0.3273-0.7705j, 0.4589+0.2978j]])
----------Measure----------
Probability:  tensor([[0.7007, 0.2993]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5989-0.5994j, 0.5206+0.1054j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.5989-0.5994j, 0.5206+0.1054j]])
New state:  tensor([[0.4996-0.6843j, 0.4982+0.1842j]])
----------Measure----------
Probability:  tensor([[0.7179, 0.2821]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4983-0.3451j, 0.7769+0.1705j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.4983-0.3451j, 0.7769+0.1705j]])
New state:  tensor([[0.4394-0.4176j, 0.7414+0.2879j]])
----------Measure----------
Probability:  tensor([[0.3674, 0.6326]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5230-0.7680j, 0.3659+0.0532j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.5230-0.7680j, 0.3659+0.0532j]])
New state:  tensor([[0.3987-0.8392j, 0.3534+0.1088j]])
----------Measure----------
Probability:  tensor([[0.8633, 0.1367]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0548-0.3489j, 0.7916+0.4986j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.0548-0.3489j, 0.7916+0.4986j]])
New state:  tensor([[5.0529e-04-0.3532j, 7.0552e-01+0.6144j]])
----------Measure----------
Probability:  tensor([[0.1247, 0.8753]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0041-0.2828j, 0.8389+0.4651j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.0041-0.2828j, 0.8389+0.4651j]])
New state:  tensor([[-0.0394-0.2801j,  0.7574+0.5885j]])
----------Measure----------
Probability:  tensor([[0.0800, 0.9200]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4810-0.6952j, 0.5002+0.1876j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.4810-0.6952j, 0.5002+0.1876j]])
New state:  tensor([[0.3684-0.7609j, 0.4654+0.2622j]])
----------Measure----------
Probability:  tensor([[0.7147, 0.2853]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6664-0.6647j, 0.3338-0.0513j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.6664-0.6647j, 0.3338-0.0513j]])
New state:  tensor([[0.5563-7.5924e-01j, 0.3377+6.0986e-04j]])
----------Measure----------
Probability:  tensor([[0.8859, 0.1141]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1587-0.8119j, 0.2931+0.4792j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.1587-0.8119j, 0.2931+0.4792j]])
New state:  tensor([[0.0320-0.8267j, 0.2160+0.5186j]])
----------Measure----------
Probability:  tensor([[0.6844, 0.3156]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3050-0.5473j, 0.6801+0.3807j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.3050-0.5473j, 0.6801+0.3807j]])
New state:  tensor([[0.2172-0.5876j, 0.6135+0.4807j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5810-0.6286j, 0.5050+0.1106j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.5810-0.6286j, 0.5050+0.1106j]])
New state:  tensor([[0.4774-0.7105j, 0.4820+0.1869j]])
----------Measure----------
Probability:  tensor([[0.7327, 0.2673]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4588-0.3784j, 0.7774+0.2049j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.4588-0.3784j, 0.7774+0.2049j]])
New state:  tensor([[0.3952-0.4445j, 0.7366+0.3219j]])
----------Measure----------
Probability:  tensor([[0.3537, 0.6463]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3221-0.4066j, 0.7981+0.3064j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.3221-0.4066j, 0.7981+0.3064j]])
New state:  tensor([[0.2557-0.4513j, 0.7415+0.4255j]])
----------Measure----------
Probability:  tensor([[0.2691, 0.7309]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5414+0.j]])
ry_matrix:  tensor([[ 0.9636-0.j, -0.2674-0.j],
        [ 0.2674+0.j,  0.9636-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3826-0.7788j, 0.4323+0.2451j]])
Inside  rz
rz_matrix theta:  tensor([[0.3087+0.j]])
rz_matrix:  tensor([[0.9881-0.1537j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9881+0.1537j]])
Performing matrix multiplication

Current state:  tensor([[0.3826-0.7788j, 0.4323+0.2451j]])
New state:  tensor([[0.2583-0.8284j, 0.3895+0.3086j]])
----------Measure----------
Probability:  tensor([[0.7530, 0.2470]])
valid set accuracy: 1.0
valid set loss: 0.36429864168167114
------------------------------Epoch85------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5809-0.6287j, 0.5051+0.1105j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.5809-0.6287j, 0.5051+0.1105j]])
New state:  tensor([[0.4779-0.7101j, 0.4823+0.1864j]])
----------Measure----------
Probability:  tensor([[0.7326, 0.2674]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5570-0.6229j, 0.5313+0.1393j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.5570-0.6229j, 0.5313+0.1393j]])
New state:  tensor([[0.4552-0.7008j, 0.5038+0.2189j]])
----------Measure----------
Probability:  tensor([[0.6983, 0.3017]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5988-0.5994j, 0.5207+0.1053j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.5988-0.5994j, 0.5207+0.1053j]])
New state:  tensor([[0.5000-0.6839j, 0.4985+0.1837j]])
----------Measure----------
Probability:  tensor([[0.7178, 0.2822]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5988-0.5994j, 0.5207+0.1053j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.5988-0.5994j, 0.5207+0.1053j]])
New state:  tensor([[0.5000-0.6839j, 0.4985+0.1837j]])
----------Measure----------
Probability:  tensor([[0.7178, 0.2822]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4598-0.6869j, 0.5197+0.2160j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.4598-0.6869j, 0.5197+0.2160j]])
New state:  tensor([[0.3493-0.7492j, 0.4805+0.2930j]])
----------Measure----------
Probability:  tensor([[0.6832, 0.3168]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4417-0.7110j, 0.4993+0.2236j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.4417-0.7110j, 0.4993+0.2236j]])
New state:  tensor([[0.3278-0.7702j, 0.4592+0.2973j]])
----------Measure----------
Probability:  tensor([[0.7007, 0.2993]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2748-0.7032j, 0.5078+0.4149j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.2748-0.7032j, 0.5078+0.4149j]])
New state:  tensor([[0.1640-0.7370j, 0.4384+0.4877j]])
----------Measure----------
Probability:  tensor([[0.5700, 0.4300]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4032-0.5353j, 0.6834+0.2896j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.4032-0.5353j, 0.6834+0.2896j]])
New state:  tensor([[0.3166-0.5906j, 0.6311+0.3907j]])
----------Measure----------
Probability:  tensor([[0.4491, 0.5509]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2323-0.8093j, 0.3623+0.3998j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.2323-0.8093j, 0.3623+0.3998j]])
New state:  tensor([[0.1058-0.8353j, 0.2969+0.4505j]])
----------Measure----------
Probability:  tensor([[0.7089, 0.2911]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4760-0.4227j, 0.7424+0.2088j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.4760-0.4227j, 0.7424+0.2088j]])
New state:  tensor([[0.4058-0.4905j, 0.7017+0.3199j]])
----------Measure----------
Probability:  tensor([[0.4052, 0.5948]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3474-0.7241j, 0.4997+0.3245j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.3474-0.7241j, 0.4997+0.3245j]])
New state:  tensor([[0.2326-0.7687j, 0.4441+0.3971j]])
----------Measure----------
Probability:  tensor([[0.6450, 0.3550]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4809-0.6953j, 0.5002+0.1874j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.4809-0.6953j, 0.5002+0.1874j]])
New state:  tensor([[0.3689-0.7606j, 0.4657+0.2617j]])
----------Measure----------
Probability:  tensor([[0.7146, 0.2854]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4423-0.7433j, 0.4602+0.2004j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.4423-0.7433j, 0.4602+0.2004j]])
New state:  tensor([[0.3235-0.8022j, 0.4241+0.2684j]])
----------Measure----------
Probability:  tensor([[0.7481, 0.2519]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3962-0.6571j, 0.5697+0.2945j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.3962-0.6571j, 0.5697+0.2945j]])
New state:  tensor([[0.2910-0.7100j, 0.5179+0.3782j]])
----------Measure----------
Probability:  tensor([[0.5887, 0.4113]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0547-0.3490j, 0.7916+0.4986j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.0547-0.3490j, 0.7916+0.4986j]])
New state:  tensor([[6.2758e-04-0.3533j, 7.0604e-01+0.6138j]])
----------Measure----------
Probability:  tensor([[0.1248, 0.8752]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1586-0.8120j, 0.2932+0.4791j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.1586-0.8120j, 0.2932+0.4791j]])
New state:  tensor([[0.0326-0.8267j, 0.2164+0.5183j]])
----------Measure----------
Probability:  tensor([[0.6845, 0.3155]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0040-0.2829j, 0.8389+0.4650j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.0040-0.2829j, 0.8389+0.4650j]])
New state:  tensor([[-0.0393-0.2802j,  0.7579+0.5879j]])
----------Measure----------
Probability:  tensor([[0.0801, 0.9199]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6664-0.6647j, 0.3339-0.0514j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.6664-0.6647j, 0.3339-0.0514j]])
New state:  tensor([[0.5569-7.5878e-01j, 0.3379+2.3201e-04j]])
----------Measure----------
Probability:  tensor([[0.8858, 0.1142]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2834-0.4217j, 0.7896+0.3441j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.2834-0.4217j, 0.7896+0.3441j]])
New state:  tensor([[0.2155-0.4601j, 0.7276+0.4608j]])
----------Measure----------
Probability:  tensor([[0.2582, 0.7418]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4982-0.3451j, 0.7770+0.1705j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.4982-0.3451j, 0.7770+0.1705j]])
New state:  tensor([[0.4395-0.4172j, 0.7417+0.2873j]])
----------Measure----------
Probability:  tensor([[0.3673, 0.6327]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.3992-0.4688j, 0.7378+0.2766j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.3992-0.4688j, 0.7378+0.2766j]])
New state:  tensor([[0.3228-0.5244j, 0.6868+0.3862j]])
----------Measure----------
Probability:  tensor([[0.3792, 0.6208]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5089-0.2989j, 0.7937+0.1476j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.5089-0.2989j, 0.7937+0.1476j]])
New state:  tensor([[0.4572-0.3732j, 0.7618+0.2673j]])
----------Measure----------
Probability:  tensor([[0.3483, 0.6517]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5229-0.7680j, 0.3660+0.0530j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.5229-0.7680j, 0.3660+0.0530j]])
New state:  tensor([[0.3993-0.8389j, 0.3536+0.1084j]])
----------Measure----------
Probability:  tensor([[0.8632, 0.1368]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3886-0.4973j, 0.7181+0.2934j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.3886-0.4973j, 0.7181+0.2934j]])
New state:  tensor([[0.3079-0.5508j, 0.6648+0.3998j]])
----------Measure----------
Probability:  tensor([[0.3982, 0.6018]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3219-0.4067j, 0.7982+0.3064j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.3219-0.4067j, 0.7982+0.3064j]])
New state:  tensor([[0.2559-0.4511j, 0.7419+0.4248j]])
----------Measure----------
Probability:  tensor([[0.2690, 0.7310]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4620-0.7197j, 0.4806+0.1940j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.4620-0.7197j, 0.4806+0.1940j]])
New state:  tensor([[0.3465-0.7819j, 0.4453+0.2652j]])
----------Measure----------
Probability:  tensor([[0.7314, 0.2686]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4587-0.3785j, 0.7775+0.2048j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.4587-0.3785j, 0.7775+0.2048j]])
New state:  tensor([[0.3954-0.4442j, 0.7370+0.3213j]])
----------Measure----------
Probability:  tensor([[0.3536, 0.6464]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3049-0.5473j, 0.6802+0.3806j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.3049-0.5473j, 0.6802+0.3806j]])
New state:  tensor([[0.2176-0.5875j, 0.6139+0.4802j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5418+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2676-0.j],
        [ 0.2676+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3826-0.7789j, 0.4324+0.2449j]])
Inside  rz
rz_matrix theta:  tensor([[0.3071+0.j]])
rz_matrix:  tensor([[0.9882-0.1529j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9882+0.1529j]])
Performing matrix multiplication

Current state:  tensor([[0.3826-0.7789j, 0.4324+0.2449j]])
New state:  tensor([[0.2589-0.8282j, 0.3899+0.3082j]])
----------Measure----------
Probability:  tensor([[0.7530, 0.2470]])
valid set accuracy: 1.0
valid set loss: 0.36427897214889526
------------------------------Epoch86------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2322-0.8094j, 0.3623+0.3997j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.2322-0.8094j, 0.3623+0.3997j]])
New state:  tensor([[0.1063-0.8353j, 0.2972+0.4502j]])
----------Measure----------
Probability:  tensor([[0.7090, 0.2910]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3218-0.4067j, 0.7982+0.3063j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.3218-0.4067j, 0.7982+0.3063j]])
New state:  tensor([[0.2562-0.4510j, 0.7423+0.4243j]])
----------Measure----------
Probability:  tensor([[0.2690, 0.7310]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4031-0.5353j, 0.6835+0.2896j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.4031-0.5353j, 0.6835+0.2896j]])
New state:  tensor([[0.3169-0.5904j, 0.6314+0.3902j]])
----------Measure----------
Probability:  tensor([[0.4490, 0.5510]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5570-0.6229j, 0.5314+0.1392j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.5570-0.6229j, 0.5314+0.1392j]])
New state:  tensor([[0.4556-0.7005j, 0.5040+0.2185j]])
----------Measure----------
Probability:  tensor([[0.6982, 0.3018]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3825-0.7789j, 0.4325+0.2449j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.3825-0.7789j, 0.4325+0.2449j]])
New state:  tensor([[0.2595-0.8281j, 0.3901+0.3078j]])
----------Measure----------
Probability:  tensor([[0.7530, 0.2470]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5808-0.6287j, 0.5052+0.1104j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.5808-0.6287j, 0.5052+0.1104j]])
New state:  tensor([[0.4783-0.7098j, 0.4825+0.1860j]])
----------Measure----------
Probability:  tensor([[0.7326, 0.2674]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3048-0.5474j, 0.6802+0.3805j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.3048-0.5474j, 0.6802+0.3805j]])
New state:  tensor([[0.2179-0.5874j, 0.6143+0.4797j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2747-0.7033j, 0.5078+0.4148j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.2747-0.7033j, 0.5078+0.4148j]])
New state:  tensor([[0.1644-0.7369j, 0.4387+0.4873j]])
----------Measure----------
Probability:  tensor([[0.5701, 0.4299]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4417-0.7111j, 0.4994+0.2235j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.4417-0.7111j, 0.4994+0.2235j]])
New state:  tensor([[0.3283-0.7700j, 0.4595+0.2969j]])
----------Measure----------
Probability:  tensor([[0.7007, 0.2993]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4423-0.7433j, 0.4602+0.2003j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.4423-0.7433j, 0.4602+0.2003j]])
New state:  tensor([[0.3240-0.8020j, 0.4244+0.2680j]])
----------Measure----------
Probability:  tensor([[0.7481, 0.2519]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2833-0.4218j, 0.7896+0.3441j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.2833-0.4218j, 0.7896+0.3441j]])
New state:  tensor([[0.2158-0.4600j, 0.7280+0.4603j]])
----------Measure----------
Probability:  tensor([[0.2581, 0.7419]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4808-0.6953j, 0.5003+0.1873j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.4808-0.6953j, 0.5003+0.1873j]])
New state:  tensor([[0.3694-0.7604j, 0.4659+0.2613j]])
----------Measure----------
Probability:  tensor([[0.7146, 0.2854]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4759-0.4227j, 0.7425+0.2087j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.4759-0.4227j, 0.7425+0.2087j]])
New state:  tensor([[0.4061-0.4902j, 0.7020+0.3193j]])
----------Measure----------
Probability:  tensor([[0.4052, 0.5948]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5987-0.5994j, 0.5208+0.1053j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.5987-0.5994j, 0.5208+0.1053j]])
New state:  tensor([[0.5005-0.6836j, 0.4987+0.1833j]])
----------Measure----------
Probability:  tensor([[0.7177, 0.2823]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5088-0.2989j, 0.7937+0.1476j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.5088-0.2989j, 0.7937+0.1476j]])
New state:  tensor([[0.4574-0.3729j, 0.7620+0.2667j]])
----------Measure----------
Probability:  tensor([[0.3482, 0.6518]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4620-0.7197j, 0.4807+0.1939j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.4620-0.7197j, 0.4807+0.1939j]])
New state:  tensor([[0.3470-0.7816j, 0.4455+0.2648j]])
----------Measure----------
Probability:  tensor([[0.7314, 0.2686]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3885-0.4973j, 0.7182+0.2933j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.3885-0.4973j, 0.7182+0.2933j]])
New state:  tensor([[0.3082-0.5506j, 0.6651+0.3992j]])
----------Measure----------
Probability:  tensor([[0.3982, 0.6018]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.3991-0.4689j, 0.7378+0.2765j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.3991-0.4689j, 0.7378+0.2765j]])
New state:  tensor([[0.3231-0.5241j, 0.6871+0.3856j]])
----------Measure----------
Probability:  tensor([[0.3791, 0.6209]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4981-0.3451j, 0.7770+0.1704j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.4981-0.3451j, 0.7770+0.1704j]])
New state:  tensor([[0.4397-0.4169j, 0.7420+0.2867j]])
----------Measure----------
Probability:  tensor([[0.3672, 0.6328]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6663-0.6647j, 0.3340-0.0515j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.6663-0.6647j, 0.3340-0.0515j]])
New state:  tensor([[0.5574-7.5836e-01j, 0.3380-7.3444e-05j]])
----------Measure----------
Probability:  tensor([[0.8858, 0.1142]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4597-0.6869j, 0.5198+0.2159j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.4597-0.6869j, 0.5198+0.2159j]])
New state:  tensor([[0.3498-0.7489j, 0.4808+0.2925j]])
----------Measure----------
Probability:  tensor([[0.6832, 0.3168]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4586-0.3785j, 0.7775+0.2047j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.4586-0.3785j, 0.7775+0.2047j]])
New state:  tensor([[0.3956-0.4439j, 0.7373+0.3207j]])
----------Measure----------
Probability:  tensor([[0.3536, 0.6464]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5987-0.5994j, 0.5208+0.1053j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.5987-0.5994j, 0.5208+0.1053j]])
New state:  tensor([[0.5005-0.6836j, 0.4987+0.1833j]])
----------Measure----------
Probability:  tensor([[0.7177, 0.2823]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3474-0.7241j, 0.4997+0.3245j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.3474-0.7241j, 0.4997+0.3245j]])
New state:  tensor([[0.2331-0.7686j, 0.4445+0.3967j]])
----------Measure----------
Probability:  tensor([[0.6450, 0.3550]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5229-0.7680j, 0.3661+0.0529j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.5229-0.7680j, 0.3661+0.0529j]])
New state:  tensor([[0.3998-0.8386j, 0.3538+0.1080j]])
----------Measure----------
Probability:  tensor([[0.8632, 0.1368]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0039-0.2830j, 0.8389+0.4650j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.0039-0.2830j, 0.8389+0.4650j]])
New state:  tensor([[-0.0392-0.2803j,  0.7583+0.5873j]])
----------Measure----------
Probability:  tensor([[0.0801, 0.9199]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0546-0.3491j, 0.7916+0.4985j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.0546-0.3491j, 0.7916+0.4985j]])
New state:  tensor([[0.0008-0.3533j, 0.7065+0.6132j]])
----------Measure----------
Probability:  tensor([[0.1248, 0.8752]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3961-0.6571j, 0.5697+0.2944j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.3961-0.6571j, 0.5697+0.2944j]])
New state:  tensor([[0.2914-0.7098j, 0.5183+0.3777j]])
----------Measure----------
Probability:  tensor([[0.5887, 0.4113]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5420+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2677-0.j],
        [ 0.2677+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1586-0.8121j, 0.2932+0.4790j]])
Inside  rz
rz_matrix theta:  tensor([[0.3057+0.j]])
rz_matrix:  tensor([[0.9883-0.1522j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9883+0.1522j]])
Performing matrix multiplication

Current state:  tensor([[0.1586-0.8121j, 0.2932+0.4790j]])
New state:  tensor([[0.0331-0.8268j, 0.2169+0.5180j]])
----------Measure----------
Probability:  tensor([[0.6846, 0.3154]])
valid set accuracy: 1.0
valid set loss: 0.3642672598361969
------------------------------Epoch87------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4980-0.3451j, 0.7771+0.1704j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.4980-0.3451j, 0.7771+0.1704j]])
New state:  tensor([[0.4400-0.4166j, 0.7422+0.2862j]])
----------Measure----------
Probability:  tensor([[0.3672, 0.6328]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3884-0.4973j, 0.7182+0.2933j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.3884-0.4973j, 0.7182+0.2933j]])
New state:  tensor([[0.3085-0.5505j, 0.6654+0.3988j]])
----------Measure----------
Probability:  tensor([[0.3982, 0.6018]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3825-0.7789j, 0.4325+0.2448j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.3825-0.7789j, 0.4325+0.2448j]])
New state:  tensor([[0.2600-0.8279j, 0.3904+0.3075j]])
----------Measure----------
Probability:  tensor([[0.7530, 0.2470]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4597-0.6870j, 0.5198+0.2159j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.4597-0.6870j, 0.5198+0.2159j]])
New state:  tensor([[0.3502-0.7487j, 0.4810+0.2922j]])
----------Measure----------
Probability:  tensor([[0.6832, 0.3168]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4808-0.6953j, 0.5003+0.1873j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.4808-0.6953j, 0.5003+0.1873j]])
New state:  tensor([[0.3698-0.7602j, 0.4661+0.2610j]])
----------Measure----------
Probability:  tensor([[0.7146, 0.2854]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4031-0.5353j, 0.6835+0.2895j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.4031-0.5353j, 0.6835+0.2895j]])
New state:  tensor([[0.3173-0.5902j, 0.6317+0.3898j]])
----------Measure----------
Probability:  tensor([[0.4490, 0.5510]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6663-0.6647j, 0.3341-0.0516j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.6663-0.6647j, 0.3341-0.0516j]])
New state:  tensor([[0.5578-7.5800e-01j, 0.3380-3.2642e-04j]])
----------Measure----------
Probability:  tensor([[0.8857, 0.1143]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2322-0.8094j, 0.3623+0.3996j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.2322-0.8094j, 0.3623+0.3996j]])
New state:  tensor([[0.1068-0.8352j, 0.2975+0.4499j]])
----------Measure----------
Probability:  tensor([[0.7090, 0.2910]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5808-0.6287j, 0.5052+0.1104j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.5808-0.6287j, 0.5052+0.1104j]])
New state:  tensor([[0.4788-0.7095j, 0.4827+0.1857j]])
----------Measure----------
Probability:  tensor([[0.7325, 0.2675]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5088-0.2989j, 0.7938+0.1476j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.5088-0.2989j, 0.7938+0.1476j]])
New state:  tensor([[0.4576-0.3726j, 0.7622+0.2662j]])
----------Measure----------
Probability:  tensor([[0.3482, 0.6518]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5569-0.6229j, 0.5314+0.1392j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.5569-0.6229j, 0.5314+0.1392j]])
New state:  tensor([[0.4560-0.7002j, 0.5042+0.2181j]])
----------Measure----------
Probability:  tensor([[0.6982, 0.3018]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4759-0.4227j, 0.7425+0.2087j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.4759-0.4227j, 0.7425+0.2087j]])
New state:  tensor([[0.4063-0.4900j, 0.7023+0.3189j]])
----------Measure----------
Probability:  tensor([[0.4051, 0.5949]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4416-0.7111j, 0.4994+0.2235j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.4416-0.7111j, 0.4994+0.2235j]])
New state:  tensor([[0.3287-0.7698j, 0.4597+0.2966j]])
----------Measure----------
Probability:  tensor([[0.7007, 0.2993]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3047-0.5474j, 0.6802+0.3805j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.3047-0.5474j, 0.6802+0.3805j]])
New state:  tensor([[0.2182-0.5873j, 0.6147+0.4792j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3960-0.6572j, 0.5698+0.2944j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.3960-0.6572j, 0.5698+0.2944j]])
New state:  tensor([[0.2918-0.7096j, 0.5185+0.3774j]])
----------Measure----------
Probability:  tensor([[0.5887, 0.4113]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3218-0.4067j, 0.7982+0.3063j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.3218-0.4067j, 0.7982+0.3063j]])
New state:  tensor([[0.2564-0.4508j, 0.7426+0.4238j]])
----------Measure----------
Probability:  tensor([[0.2690, 0.7310]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5987-0.5994j, 0.5208+0.1052j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.5987-0.5994j, 0.5208+0.1052j]])
New state:  tensor([[0.5009-0.6833j, 0.4988+0.1830j]])
----------Measure----------
Probability:  tensor([[0.7177, 0.2823]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4585-0.3785j, 0.7775+0.2047j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.4585-0.3785j, 0.7775+0.2047j]])
New state:  tensor([[0.3958-0.4437j, 0.7375+0.3202j]])
----------Measure----------
Probability:  tensor([[0.3535, 0.6465]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5987-0.5994j, 0.5208+0.1052j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.5987-0.5994j, 0.5208+0.1052j]])
New state:  tensor([[0.5009-0.6833j, 0.4988+0.1830j]])
----------Measure----------
Probability:  tensor([[0.7177, 0.2823]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2747-0.7033j, 0.5078+0.4148j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.2747-0.7033j, 0.5078+0.4148j]])
New state:  tensor([[0.1649-0.7368j, 0.4391+0.4870j]])
----------Measure----------
Probability:  tensor([[0.5701, 0.4299]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2832-0.4218j, 0.7896+0.3441j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.2832-0.4218j, 0.7896+0.3441j]])
New state:  tensor([[0.2160-0.4599j, 0.7283+0.4598j]])
----------Measure----------
Probability:  tensor([[0.2581, 0.7419]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4423-0.7433j, 0.4602+0.2002j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.4423-0.7433j, 0.4602+0.2002j]])
New state:  tensor([[0.3245-0.8018j, 0.4246+0.2677j]])
----------Measure----------
Probability:  tensor([[0.7481, 0.2519]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4619-0.7197j, 0.4807+0.1939j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.4619-0.7197j, 0.4807+0.1939j]])
New state:  tensor([[0.3475-0.7814j, 0.4458+0.2645j]])
----------Measure----------
Probability:  tensor([[0.7313, 0.2687]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0545-0.3491j, 0.7916+0.4985j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.0545-0.3491j, 0.7916+0.4985j]])
New state:  tensor([[0.0009-0.3533j, 0.7069+0.6128j]])
----------Measure----------
Probability:  tensor([[0.1248, 0.8752]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5228-0.7680j, 0.3661+0.0529j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.5228-0.7680j, 0.3661+0.0529j]])
New state:  tensor([[0.4004-0.8384j, 0.3539+0.1078j]])
----------Measure----------
Probability:  tensor([[0.8631, 0.1369]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.3991-0.4689j, 0.7379+0.2765j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.3991-0.4689j, 0.7379+0.2765j]])
New state:  tensor([[0.3234-0.5240j, 0.6874+0.3852j]])
----------Measure----------
Probability:  tensor([[0.3791, 0.6209]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1586-0.8121j, 0.2932+0.4789j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.1586-0.8121j, 0.2932+0.4789j]])
New state:  tensor([[0.0336-0.8268j, 0.2172+0.5178j]])
----------Measure----------
Probability:  tensor([[0.6847, 0.3153]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3474-0.7241j, 0.4997+0.3244j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.3474-0.7241j, 0.4997+0.3244j]])
New state:  tensor([[0.2336-0.7684j, 0.4448+0.3964j]])
----------Measure----------
Probability:  tensor([[0.6450, 0.3550]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5422+0.j]])
ry_matrix:  tensor([[ 0.9635-0.j, -0.2678-0.j],
        [ 0.2678+0.j,  0.9635-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0038-0.2830j, 0.8389+0.4650j]])
Inside  rz
rz_matrix theta:  tensor([[0.3044+0.j]])
rz_matrix:  tensor([[0.9884-0.1516j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9884+0.1516j]])
Performing matrix multiplication

Current state:  tensor([[0.0038-0.2830j, 0.8389+0.4650j]])
New state:  tensor([[-0.0391-0.2803j,  0.7587+0.5868j]])
----------Measure----------
Probability:  tensor([[0.0801, 0.9199]])
valid set accuracy: 1.0
valid set loss: 0.3642599880695343
------------------------------Epoch88------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3824-0.7790j, 0.4325+0.2447j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.3824-0.7790j, 0.4325+0.2447j]])
New state:  tensor([[0.2604-0.8278j, 0.3906+0.3072j]])
----------Measure----------
Probability:  tensor([[0.7530, 0.2470]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5569-0.6229j, 0.5315+0.1391j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.5569-0.6229j, 0.5315+0.1391j]])
New state:  tensor([[0.4564-0.6999j, 0.5044+0.2178j]])
----------Measure----------
Probability:  tensor([[0.6982, 0.3018]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6663-0.6647j, 0.3341-0.0516j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.6663-0.6647j, 0.3341-0.0516j]])
New state:  tensor([[0.5582-7.5768e-01j, 0.3381-5.7399e-04j]])
----------Measure----------
Probability:  tensor([[0.8857, 0.1143]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0544-0.3492j, 0.7916+0.4985j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.0544-0.3492j, 0.7916+0.4985j]])
New state:  tensor([[0.0010-0.3534j, 0.7072+0.6123j]])
----------Measure----------
Probability:  tensor([[0.1249, 0.8751]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4980-0.3451j, 0.7771+0.1704j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.4980-0.3451j, 0.7771+0.1704j]])
New state:  tensor([[0.4401-0.4164j, 0.7425+0.2858j]])
----------Measure----------
Probability:  tensor([[0.3671, 0.6329]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5986-0.5994j, 0.5209+0.1052j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.5986-0.5994j, 0.5209+0.1052j]])
New state:  tensor([[0.5012-0.6830j, 0.4990+0.1826j]])
----------Measure----------
Probability:  tensor([[0.7176, 0.2824]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4584-0.3785j, 0.7776+0.2047j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.4584-0.3785j, 0.7776+0.2047j]])
New state:  tensor([[0.3960-0.4435j, 0.7377+0.3198j]])
----------Measure----------
Probability:  tensor([[0.3535, 0.6465]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4030-0.5353j, 0.6835+0.2895j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.4030-0.5353j, 0.6835+0.2895j]])
New state:  tensor([[0.3175-0.5901j, 0.6320+0.3894j]])
----------Measure----------
Probability:  tensor([[0.4490, 0.5510]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0037-0.2830j, 0.8389+0.4650j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.0037-0.2830j, 0.8389+0.4650j]])
New state:  tensor([[-0.0391-0.2804j,  0.7590+0.5863j]])
----------Measure----------
Probability:  tensor([[0.0801, 0.9199]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4807-0.6953j, 0.5004+0.1872j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.4807-0.6953j, 0.5004+0.1872j]])
New state:  tensor([[0.3702-0.7600j, 0.4664+0.2607j]])
----------Measure----------
Probability:  tensor([[0.7146, 0.2854]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4596-0.6870j, 0.5198+0.2158j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.4596-0.6870j, 0.5198+0.2158j]])
New state:  tensor([[0.3506-0.7485j, 0.4813+0.2919j]])
----------Measure----------
Probability:  tensor([[0.6832, 0.3168]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5986-0.5994j, 0.5209+0.1052j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.5986-0.5994j, 0.5209+0.1052j]])
New state:  tensor([[0.5012-0.6830j, 0.4990+0.1826j]])
----------Measure----------
Probability:  tensor([[0.7176, 0.2824]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2322-0.8094j, 0.3623+0.3995j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.2322-0.8094j, 0.3623+0.3995j]])
New state:  tensor([[0.1072-0.8352j, 0.2978+0.4497j]])
----------Measure----------
Probability:  tensor([[0.7091, 0.2909]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2746-0.7034j, 0.5079+0.4147j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.2746-0.7034j, 0.5079+0.4147j]])
New state:  tensor([[0.1652-0.7368j, 0.4394+0.4866j]])
----------Measure----------
Probability:  tensor([[0.5701, 0.4299]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.3990-0.4689j, 0.7379+0.2765j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.3990-0.4689j, 0.7379+0.2765j]])
New state:  tensor([[0.3236-0.5238j, 0.6877+0.3848j]])
----------Measure----------
Probability:  tensor([[0.3791, 0.6209]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4422-0.7433j, 0.4603+0.2001j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.4422-0.7433j, 0.4603+0.2001j]])
New state:  tensor([[0.3248-0.8016j, 0.4248+0.2674j]])
----------Measure----------
Probability:  tensor([[0.7481, 0.2519]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3473-0.7242j, 0.4998+0.3243j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.3473-0.7242j, 0.4998+0.3243j]])
New state:  tensor([[0.2339-0.7683j, 0.4450+0.3961j]])
----------Measure----------
Probability:  tensor([[0.6451, 0.3549]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3960-0.6572j, 0.5698+0.2943j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.3960-0.6572j, 0.5698+0.2943j]])
New state:  tensor([[0.2922-0.7095j, 0.5188+0.3770j]])
----------Measure----------
Probability:  tensor([[0.5887, 0.4113]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4619-0.7197j, 0.4808+0.1938j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.4619-0.7197j, 0.4808+0.1938j]])
New state:  tensor([[0.3478-0.7812j, 0.4460+0.2642j]])
----------Measure----------
Probability:  tensor([[0.7313, 0.2687]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3217-0.4068j, 0.7983+0.3062j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.3217-0.4068j, 0.7983+0.3062j]])
New state:  tensor([[0.2565-0.4507j, 0.7429+0.4233j]])
----------Measure----------
Probability:  tensor([[0.2690, 0.7310]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3047-0.5475j, 0.6803+0.3804j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.3047-0.5475j, 0.6803+0.3804j]])
New state:  tensor([[0.2185-0.5872j, 0.6150+0.4788j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1585-0.8122j, 0.2932+0.4788j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.1585-0.8122j, 0.2932+0.4788j]])
New state:  tensor([[0.0340-0.8268j, 0.2175+0.5176j]])
----------Measure----------
Probability:  tensor([[0.6847, 0.3153]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4758-0.4227j, 0.7426+0.2087j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.4758-0.4227j, 0.7426+0.2087j]])
New state:  tensor([[0.4065-0.4897j, 0.7025+0.3184j]])
----------Measure----------
Probability:  tensor([[0.4051, 0.5949]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5228-0.7680j, 0.3662+0.0528j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.5228-0.7680j, 0.3662+0.0528j]])
New state:  tensor([[0.4008-0.8381j, 0.3540+0.1075j]])
----------Measure----------
Probability:  tensor([[0.8631, 0.1369]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5087-0.2989j, 0.7938+0.1475j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.5087-0.2989j, 0.7938+0.1475j]])
New state:  tensor([[0.4577-0.3723j, 0.7624+0.2658j]])
----------Measure----------
Probability:  tensor([[0.3481, 0.6519]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5807-0.6287j, 0.5053+0.1103j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.5807-0.6287j, 0.5053+0.1103j]])
New state:  tensor([[0.4791-0.7092j, 0.4829+0.1854j]])
----------Measure----------
Probability:  tensor([[0.7325, 0.2675]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4416-0.7111j, 0.4994+0.2234j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.4416-0.7111j, 0.4994+0.2234j]])
New state:  tensor([[0.3291-0.7696j, 0.4600+0.2963j]])
----------Measure----------
Probability:  tensor([[0.7007, 0.2993]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3883-0.4973j, 0.7182+0.2932j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.3883-0.4973j, 0.7182+0.2932j]])
New state:  tensor([[0.3088-0.5503j, 0.6657+0.3984j]])
----------Measure----------
Probability:  tensor([[0.3982, 0.6018]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5424+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2679-0.j],
        [ 0.2679+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2831-0.4218j, 0.7896+0.3440j]])
Inside  rz
rz_matrix theta:  tensor([[0.3033+0.j]])
rz_matrix:  tensor([[0.9885-0.1511j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9885+0.1511j]])
Performing matrix multiplication

Current state:  tensor([[0.2831-0.4218j, 0.7896+0.3440j]])
New state:  tensor([[0.2162-0.4598j, 0.7286+0.4594j]])
----------Measure----------
Probability:  tensor([[0.2581, 0.7419]])
valid set accuracy: 1.0
valid set loss: 0.364248663187027
------------------------------Epoch89------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4596-0.6870j, 0.5199+0.2157j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.4596-0.6870j, 0.5199+0.2157j]])
New state:  tensor([[0.3509-0.7484j, 0.4815+0.2916j]])
----------Measure----------
Probability:  tensor([[0.6832, 0.3168]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2831-0.4219j, 0.7897+0.3440j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.2831-0.4219j, 0.7897+0.3440j]])
New state:  tensor([[0.2163-0.4597j, 0.7289+0.4590j]])
----------Measure----------
Probability:  tensor([[0.2581, 0.7419]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5986-0.5994j, 0.5209+0.1051j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.5986-0.5994j, 0.5209+0.1051j]])
New state:  tensor([[0.5015-0.6827j, 0.4992+0.1823j]])
----------Measure----------
Probability:  tensor([[0.7176, 0.2824]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4422-0.7433j, 0.4603+0.2001j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.4422-0.7433j, 0.4603+0.2001j]])
New state:  tensor([[0.3252-0.8015j, 0.4250+0.2671j]])
----------Measure----------
Probability:  tensor([[0.7481, 0.2519]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1585-0.8122j, 0.2932+0.4787j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.1585-0.8122j, 0.2932+0.4787j]])
New state:  tensor([[0.0344-0.8268j, 0.2178+0.5174j]])
----------Measure----------
Probability:  tensor([[0.6848, 0.3152]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4807-0.6953j, 0.5004+0.1871j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.4807-0.6953j, 0.5004+0.1871j]])
New state:  tensor([[0.3705-0.7598j, 0.4665+0.2604j]])
----------Measure----------
Probability:  tensor([[0.7145, 0.2855]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4757-0.4227j, 0.7426+0.2086j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4227j, 0.7426+0.2086j]])
New state:  tensor([[0.4066-0.4896j, 0.7027+0.3181j]])
----------Measure----------
Probability:  tensor([[0.4050, 0.5950]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3883-0.4974j, 0.7183+0.2932j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.3883-0.4974j, 0.7183+0.2932j]])
New state:  tensor([[0.3089-0.5502j, 0.6659+0.3980j]])
----------Measure----------
Probability:  tensor([[0.3981, 0.6019]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5086-0.2989j, 0.7939+0.1475j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.5086-0.2989j, 0.7939+0.1475j]])
New state:  tensor([[0.4578-0.3721j, 0.7626+0.2654j]])
----------Measure----------
Probability:  tensor([[0.3480, 0.6520]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4029-0.5354j, 0.6836+0.2894j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.4029-0.5354j, 0.6836+0.2894j]])
New state:  tensor([[0.3177-0.5899j, 0.6322+0.3890j]])
----------Measure----------
Probability:  tensor([[0.4490, 0.5510]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5228-0.7680j, 0.3663+0.0527j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.5228-0.7680j, 0.3663+0.0527j]])
New state:  tensor([[0.4011-0.8380j, 0.3541+0.1073j]])
----------Measure----------
Probability:  tensor([[0.8631, 0.1369]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3824-0.7790j, 0.4326+0.2446j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.3824-0.7790j, 0.4326+0.2446j]])
New state:  tensor([[0.2607-0.8277j, 0.3908+0.3070j]])
----------Measure----------
Probability:  tensor([[0.7530, 0.2470]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3216-0.4068j, 0.7983+0.3062j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.3216-0.4068j, 0.7983+0.3062j]])
New state:  tensor([[0.2567-0.4506j, 0.7431+0.4229j]])
----------Measure----------
Probability:  tensor([[0.2689, 0.7311]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4584-0.3786j, 0.7776+0.2046j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.4584-0.3786j, 0.7776+0.2046j]])
New state:  tensor([[0.3961-0.4433j, 0.7379+0.3194j]])
----------Measure----------
Probability:  tensor([[0.3534, 0.6466]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5568-0.6230j, 0.5316+0.1390j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.5568-0.6230j, 0.5316+0.1390j]])
New state:  tensor([[0.4567-0.6997j, 0.5046+0.2175j]])
----------Measure----------
Probability:  tensor([[0.6981, 0.3019]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2745-0.7034j, 0.5079+0.4146j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.2745-0.7034j, 0.5079+0.4146j]])
New state:  tensor([[0.1655-0.7367j, 0.4397+0.4864j]])
----------Measure----------
Probability:  tensor([[0.5701, 0.4299]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5807-0.6287j, 0.5054+0.1102j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.5807-0.6287j, 0.5054+0.1102j]])
New state:  tensor([[0.4794-0.7090j, 0.4830+0.1851j]])
----------Measure----------
Probability:  tensor([[0.7325, 0.2675]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.3989-0.4689j, 0.7380+0.2764j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.3989-0.4689j, 0.7380+0.2764j]])
New state:  tensor([[0.3237-0.5237j, 0.6879+0.3844j]])
----------Measure----------
Probability:  tensor([[0.3790, 0.6210]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0543-0.3492j, 0.7916+0.4984j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.0543-0.3492j, 0.7916+0.4984j]])
New state:  tensor([[0.0011-0.3534j, 0.7075+0.6120j]])
----------Measure----------
Probability:  tensor([[0.1249, 0.8751]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2321-0.8095j, 0.3624+0.3995j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.2321-0.8095j, 0.3624+0.3995j]])
New state:  tensor([[0.1076-0.8352j, 0.2981+0.4495j]])
----------Measure----------
Probability:  tensor([[0.7091, 0.2909]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0036-0.2831j, 0.8389+0.4649j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.0036-0.2831j, 0.8389+0.4649j]])
New state:  tensor([[-0.0390-0.2804j,  0.7593+0.5859j]])
----------Measure----------
Probability:  tensor([[0.0802, 0.9198]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4415-0.7111j, 0.4995+0.2233j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.4415-0.7111j, 0.4995+0.2233j]])
New state:  tensor([[0.3294-0.7695j, 0.4602+0.2960j]])
----------Measure----------
Probability:  tensor([[0.7006, 0.2994]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3959-0.6572j, 0.5698+0.2943j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.3959-0.6572j, 0.5698+0.2943j]])
New state:  tensor([[0.2924-0.7093j, 0.5190+0.3767j]])
----------Measure----------
Probability:  tensor([[0.5887, 0.4113]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6662-0.6647j, 0.3342-0.0517j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.6662-0.6647j, 0.3342-0.0517j]])
New state:  tensor([[0.5585-0.7574j, 0.3382-0.0008j]])
----------Measure----------
Probability:  tensor([[0.8856, 0.1144]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3472-0.7242j, 0.4998+0.3243j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.3472-0.7242j, 0.4998+0.3243j]])
New state:  tensor([[0.2342-0.7683j, 0.4453+0.3958j]])
----------Measure----------
Probability:  tensor([[0.6451, 0.3549]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3046-0.5475j, 0.6803+0.3804j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.3046-0.5475j, 0.6803+0.3804j]])
New state:  tensor([[0.2187-0.5871j, 0.6152+0.4785j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5986-0.5994j, 0.5209+0.1051j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.5986-0.5994j, 0.5209+0.1051j]])
New state:  tensor([[0.5015-0.6827j, 0.4992+0.1823j]])
----------Measure----------
Probability:  tensor([[0.7176, 0.2824]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4618-0.7197j, 0.4808+0.1937j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.4618-0.7197j, 0.4808+0.1937j]])
New state:  tensor([[0.3482-0.7811j, 0.4461+0.2639j]])
----------Measure----------
Probability:  tensor([[0.7313, 0.2687]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5426+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2680-0.j],
        [ 0.2680+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4979-0.3452j, 0.7772+0.1703j]])
Inside  rz
rz_matrix theta:  tensor([[0.3023+0.j]])
rz_matrix:  tensor([[0.9886-0.1506j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9886+0.1506j]])
Performing matrix multiplication

Current state:  tensor([[0.4979-0.3452j, 0.7772+0.1703j]])
New state:  tensor([[0.4402-0.4162j, 0.7426+0.2854j]])
----------Measure----------
Probability:  tensor([[0.3670, 0.6330]])
valid set accuracy: 1.0
valid set loss: 0.36423781514167786
------------------------------Epoch90------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5985-0.5994j, 0.5210+0.1051j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.5985-0.5994j, 0.5210+0.1051j]])
New state:  tensor([[0.5017-0.6825j, 0.4993+0.1821j]])
----------Measure----------
Probability:  tensor([[0.7176, 0.2824]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2745-0.7034j, 0.5079+0.4146j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.2745-0.7034j, 0.5079+0.4146j]])
New state:  tensor([[0.1658-0.7367j, 0.4399+0.4861j]])
----------Measure----------
Probability:  tensor([[0.5702, 0.4298]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5227-0.7680j, 0.3663+0.0527j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.5227-0.7680j, 0.3663+0.0527j]])
New state:  tensor([[0.4014-0.8378j, 0.3542+0.1071j]])
----------Measure----------
Probability:  tensor([[0.8631, 0.1369]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3959-0.6572j, 0.5699+0.2942j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.3959-0.6572j, 0.5699+0.2942j]])
New state:  tensor([[0.2927-0.7092j, 0.5192+0.3765j]])
----------Measure----------
Probability:  tensor([[0.5887, 0.4113]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4806-0.6953j, 0.5005+0.1871j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.4806-0.6953j, 0.5005+0.1871j]])
New state:  tensor([[0.3708-0.7597j, 0.4667+0.2601j]])
----------Measure----------
Probability:  tensor([[0.7145, 0.2855]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2830-0.4219j, 0.7897+0.3439j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.2830-0.4219j, 0.7897+0.3439j]])
New state:  tensor([[0.2164-0.4596j, 0.7291+0.4586j]])
----------Measure----------
Probability:  tensor([[0.2581, 0.7419]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2321-0.8095j, 0.3624+0.3994j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.2321-0.8095j, 0.3624+0.3994j]])
New state:  tensor([[0.1079-0.8352j, 0.2983+0.4493j]])
----------Measure----------
Probability:  tensor([[0.7092, 0.2908]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3045-0.5475j, 0.6803+0.3804j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.3045-0.5475j, 0.6803+0.3804j]])
New state:  tensor([[0.2188-0.5870j, 0.6155+0.4782j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4595-0.6870j, 0.5199+0.2157j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.4595-0.6870j, 0.5199+0.2157j]])
New state:  tensor([[0.3511-0.7482j, 0.4816+0.2913j]])
----------Measure----------
Probability:  tensor([[0.6832, 0.3168]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4978-0.3452j, 0.7772+0.1703j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.4978-0.3452j, 0.7772+0.1703j]])
New state:  tensor([[0.4403-0.4160j, 0.7428+0.2851j]])
----------Measure----------
Probability:  tensor([[0.3670, 0.6330]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.3989-0.4690j, 0.7380+0.2764j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.3989-0.4690j, 0.7380+0.2764j]])
New state:  tensor([[0.3239-0.5235j, 0.6881+0.3841j]])
----------Measure----------
Probability:  tensor([[0.3790, 0.6210]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5568-0.6230j, 0.5316+0.1390j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.5568-0.6230j, 0.5316+0.1390j]])
New state:  tensor([[0.4569-0.6995j, 0.5047+0.2173j]])
----------Measure----------
Probability:  tensor([[0.6981, 0.3019]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4618-0.7198j, 0.4808+0.1937j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.4618-0.7198j, 0.4808+0.1937j]])
New state:  tensor([[0.3484-0.7809j, 0.4463+0.2637j]])
----------Measure----------
Probability:  tensor([[0.7313, 0.2687]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0036-0.2831j, 0.8389+0.4649j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.0036-0.2831j, 0.8389+0.4649j]])
New state:  tensor([[-0.0390-0.2805j,  0.7595+0.5856j]])
----------Measure----------
Probability:  tensor([[0.0802, 0.9198]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0543-0.3492j, 0.7916+0.4984j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.0543-0.3492j, 0.7916+0.4984j]])
New state:  tensor([[0.0012-0.3534j, 0.7078+0.6116j]])
----------Measure----------
Probability:  tensor([[0.1249, 0.8751]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5085-0.2989j, 0.7939+0.1475j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.5085-0.2989j, 0.7939+0.1475j]])
New state:  tensor([[0.4579-0.3719j, 0.7627+0.2651j]])
----------Measure----------
Probability:  tensor([[0.3480, 0.6520]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3472-0.7242j, 0.4998+0.3242j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.3472-0.7242j, 0.4998+0.3242j]])
New state:  tensor([[0.2345-0.7682j, 0.4454+0.3956j]])
----------Measure----------
Probability:  tensor([[0.6451, 0.3549]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4421-0.7434j, 0.4604+0.2000j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.4421-0.7434j, 0.4604+0.2000j]])
New state:  tensor([[0.3255-0.8013j, 0.4251+0.2669j]])
----------Measure----------
Probability:  tensor([[0.7481, 0.2519]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4029-0.5354j, 0.6836+0.2894j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.4029-0.5354j, 0.6836+0.2894j]])
New state:  tensor([[0.3179-0.5898j, 0.6324+0.3888j]])
----------Measure----------
Probability:  tensor([[0.4490, 0.5510]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3216-0.4068j, 0.7983+0.3062j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.3216-0.4068j, 0.7983+0.3062j]])
New state:  tensor([[0.2568-0.4505j, 0.7433+0.4226j]])
----------Measure----------
Probability:  tensor([[0.2689, 0.7311]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4757-0.4227j, 0.7426+0.2086j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4227j, 0.7426+0.2086j]])
New state:  tensor([[0.4068-0.4894j, 0.7029+0.3178j]])
----------Measure----------
Probability:  tensor([[0.4050, 0.5950]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3824-0.7790j, 0.4326+0.2446j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.3824-0.7790j, 0.4326+0.2446j]])
New state:  tensor([[0.2610-0.8276j, 0.3910+0.3068j]])
----------Measure----------
Probability:  tensor([[0.7530, 0.2470]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1585-0.8122j, 0.2932+0.4787j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.1585-0.8122j, 0.2932+0.4787j]])
New state:  tensor([[0.0347-0.8268j, 0.2180+0.5173j]])
----------Measure----------
Probability:  tensor([[0.6849, 0.3151]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5806-0.6287j, 0.5054+0.1102j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.5806-0.6287j, 0.5054+0.1102j]])
New state:  tensor([[0.4796-0.7088j, 0.4831+0.1848j]])
----------Measure----------
Probability:  tensor([[0.7324, 0.2676]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4415-0.7111j, 0.4995+0.2233j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.4415-0.7111j, 0.4995+0.2233j]])
New state:  tensor([[0.3297-0.7694j, 0.4603+0.2958j]])
----------Measure----------
Probability:  tensor([[0.7006, 0.2994]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6662-0.6647j, 0.3343-0.0518j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.6662-0.6647j, 0.3343-0.0518j]])
New state:  tensor([[0.5588-0.7572j, 0.3382-0.0010j]])
----------Measure----------
Probability:  tensor([[0.8856, 0.1144]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3882-0.4974j, 0.7183+0.2931j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.3882-0.4974j, 0.7183+0.2931j]])
New state:  tensor([[0.3091-0.5501j, 0.6661+0.3977j]])
----------Measure----------
Probability:  tensor([[0.3981, 0.6019]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5985-0.5994j, 0.5210+0.1051j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.5985-0.5994j, 0.5210+0.1051j]])
New state:  tensor([[0.5017-0.6825j, 0.4993+0.1821j]])
----------Measure----------
Probability:  tensor([[0.7176, 0.2824]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5427+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4583-0.3786j, 0.7777+0.2046j]])
Inside  rz
rz_matrix theta:  tensor([[0.3015+0.j]])
rz_matrix:  tensor([[0.9887-0.1502j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1502j]])
Performing matrix multiplication

Current state:  tensor([[0.4583-0.3786j, 0.7777+0.2046j]])
New state:  tensor([[0.3963-0.4431j, 0.7381+0.3191j]])
----------Measure----------
Probability:  tensor([[0.3534, 0.6466]])
valid set accuracy: 1.0
valid set loss: 0.3642306923866272
------------------------------Epoch91------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.3988-0.4690j, 0.7380+0.2763j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.3988-0.4690j, 0.7380+0.2763j]])
New state:  tensor([[0.3240-0.5234j, 0.6883+0.3838j]])
----------Measure----------
Probability:  tensor([[0.3790, 0.6210]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4421-0.7434j, 0.4604+0.2000j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.4421-0.7434j, 0.4604+0.2000j]])
New state:  tensor([[0.3257-0.8012j, 0.4252+0.2667j]])
----------Measure----------
Probability:  tensor([[0.7481, 0.2519]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5085-0.2989j, 0.7939+0.1475j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.5085-0.2989j, 0.7939+0.1475j]])
New state:  tensor([[0.4579-0.3718j, 0.7629+0.2648j]])
----------Measure----------
Probability:  tensor([[0.3479, 0.6521]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3472-0.7243j, 0.4998+0.3242j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.3472-0.7243j, 0.4998+0.3242j]])
New state:  tensor([[0.2347-0.7681j, 0.4456+0.3954j]])
----------Measure----------
Probability:  tensor([[0.6451, 0.3549]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4028-0.5354j, 0.6836+0.2893j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.4028-0.5354j, 0.6836+0.2893j]])
New state:  tensor([[0.3180-0.5897j, 0.6326+0.3885j]])
----------Measure----------
Probability:  tensor([[0.4489, 0.5511]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5227-0.7680j, 0.3663+0.0526j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.5227-0.7680j, 0.3663+0.0526j]])
New state:  tensor([[0.4017-0.8377j, 0.3543+0.1069j]])
----------Measure----------
Probability:  tensor([[0.8630, 0.1370]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2745-0.7035j, 0.5079+0.4145j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.2745-0.7035j, 0.5079+0.4145j]])
New state:  tensor([[0.1660-0.7366j, 0.4401+0.4859j]])
----------Measure----------
Probability:  tensor([[0.5702, 0.4298]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2829-0.4219j, 0.7897+0.3439j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.2829-0.4219j, 0.7897+0.3439j]])
New state:  tensor([[0.2165-0.4596j, 0.7293+0.4584j]])
----------Measure----------
Probability:  tensor([[0.2581, 0.7419]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4583-0.3786j, 0.7777+0.2046j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.4583-0.3786j, 0.7777+0.2046j]])
New state:  tensor([[0.3963-0.4430j, 0.7383+0.3188j]])
----------Measure----------
Probability:  tensor([[0.3533, 0.6467]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5567-0.6230j, 0.5316+0.1389j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.5567-0.6230j, 0.5316+0.1389j]])
New state:  tensor([[0.4571-0.6994j, 0.5048+0.2170j]])
----------Measure----------
Probability:  tensor([[0.6981, 0.3019]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3045-0.5475j, 0.6803+0.3803j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.3045-0.5475j, 0.6803+0.3803j]])
New state:  tensor([[0.2190-0.5870j, 0.6156+0.4780j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3882-0.4974j, 0.7183+0.2931j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.3882-0.4974j, 0.7183+0.2931j]])
New state:  tensor([[0.3092-0.5500j, 0.6663+0.3974j]])
----------Measure----------
Probability:  tensor([[0.3981, 0.6019]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3958-0.6573j, 0.5699+0.2942j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.3958-0.6573j, 0.5699+0.2942j]])
New state:  tensor([[0.2929-0.7092j, 0.5194+0.3762j]])
----------Measure----------
Probability:  tensor([[0.5887, 0.4113]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3215-0.4069j, 0.7984+0.3061j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.3215-0.4069j, 0.7984+0.3061j]])
New state:  tensor([[0.2569-0.4504j, 0.7435+0.4223j]])
----------Measure----------
Probability:  tensor([[0.2689, 0.7311]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4756-0.4228j, 0.7427+0.2086j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.4756-0.4228j, 0.7427+0.2086j]])
New state:  tensor([[0.4069-0.4893j, 0.7030+0.3175j]])
----------Measure----------
Probability:  tensor([[0.4050, 0.5950]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4415-0.7111j, 0.4995+0.2232j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.4415-0.7111j, 0.4995+0.2232j]])
New state:  tensor([[0.3299-0.7693j, 0.4605+0.2956j]])
----------Measure----------
Probability:  tensor([[0.7006, 0.2994]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4978-0.3452j, 0.7772+0.1703j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.4978-0.3452j, 0.7772+0.1703j]])
New state:  tensor([[0.4404-0.4159j, 0.7429+0.2848j]])
----------Measure----------
Probability:  tensor([[0.3669, 0.6331]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6662-0.6647j, 0.3343-0.0518j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.6662-0.6647j, 0.3343-0.0518j]])
New state:  tensor([[0.5591-0.7570j, 0.3383-0.0011j]])
----------Measure----------
Probability:  tensor([[0.8856, 0.1144]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1585-0.8123j, 0.2933+0.4786j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.1585-0.8123j, 0.2933+0.4786j]])
New state:  tensor([[0.0350-0.8269j, 0.2182+0.5172j]])
----------Measure----------
Probability:  tensor([[0.6849, 0.3151]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4595-0.6870j, 0.5199+0.2156j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.4595-0.6870j, 0.5199+0.2156j]])
New state:  tensor([[0.3514-0.7481j, 0.4818+0.2911j]])
----------Measure----------
Probability:  tensor([[0.6832, 0.3168]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5985-0.5995j, 0.5210+0.1050j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.5985-0.5995j, 0.5210+0.1050j]])
New state:  tensor([[0.5019-0.6824j, 0.4994+0.1819j]])
----------Measure----------
Probability:  tensor([[0.7175, 0.2825]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4806-0.6954j, 0.5005+0.1871j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.4806-0.6954j, 0.5005+0.1871j]])
New state:  tensor([[0.3710-0.7595j, 0.4668+0.2599j]])
----------Measure----------
Probability:  tensor([[0.7145, 0.2855]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0035-0.2832j, 0.8389+0.4649j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.0035-0.2832j, 0.8389+0.4649j]])
New state:  tensor([[-0.0390-0.2805j,  0.7597+0.5853j]])
----------Measure----------
Probability:  tensor([[0.0802, 0.9198]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4618-0.7198j, 0.4809+0.1936j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.4618-0.7198j, 0.4809+0.1936j]])
New state:  tensor([[0.3487-0.7808j, 0.4464+0.2635j]])
----------Measure----------
Probability:  tensor([[0.7313, 0.2687]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0542-0.3493j, 0.7916+0.4984j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.0542-0.3493j, 0.7916+0.4984j]])
New state:  tensor([[0.0013-0.3535j, 0.7080+0.6114j]])
----------Measure----------
Probability:  tensor([[0.1249, 0.8751]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3823-0.7790j, 0.4326+0.2445j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.3823-0.7790j, 0.4326+0.2445j]])
New state:  tensor([[0.2613-0.8275j, 0.3911+0.3066j]])
----------Measure----------
Probability:  tensor([[0.7530, 0.2470]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2321-0.8095j, 0.3624+0.3993j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.2321-0.8095j, 0.3624+0.3993j]])
New state:  tensor([[0.1081-0.8352j, 0.2984+0.4491j]])
----------Measure----------
Probability:  tensor([[0.7092, 0.2908]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5806-0.6287j, 0.5055+0.1101j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.5806-0.6287j, 0.5055+0.1101j]])
New state:  tensor([[0.4798-0.7086j, 0.4832+0.1846j]])
----------Measure----------
Probability:  tensor([[0.7324, 0.2676]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5429+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2681-0.j],
        [ 0.2681+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5985-0.5995j, 0.5210+0.1050j]])
Inside  rz
rz_matrix theta:  tensor([[0.3009+0.j]])
rz_matrix:  tensor([[0.9887-0.1499j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1499j]])
Performing matrix multiplication

Current state:  tensor([[0.5985-0.5995j, 0.5210+0.1050j]])
New state:  tensor([[0.5019-0.6824j, 0.4994+0.1819j]])
----------Measure----------
Probability:  tensor([[0.7175, 0.2825]])
valid set accuracy: 1.0
valid set loss: 0.3642233908176422
------------------------------Epoch92------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4806-0.6954j, 0.5005+0.1870j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.4806-0.6954j, 0.5005+0.1870j]])
New state:  tensor([[0.3712-0.7594j, 0.4669+0.2598j]])
----------Measure----------
Probability:  tensor([[0.7145, 0.2855]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2829-0.4219j, 0.7897+0.3439j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.2829-0.4219j, 0.7897+0.3439j]])
New state:  tensor([[0.2166-0.4595j, 0.7294+0.4582j]])
----------Measure----------
Probability:  tensor([[0.2581, 0.7419]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1585-0.8123j, 0.2933+0.4786j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.1585-0.8123j, 0.2933+0.4786j]])
New state:  tensor([[0.0352-0.8269j, 0.2184+0.5171j]])
----------Measure----------
Probability:  tensor([[0.6849, 0.3151]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4977-0.3452j, 0.7772+0.1703j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.4977-0.3452j, 0.7772+0.1703j]])
New state:  tensor([[0.4405-0.4158j, 0.7430+0.2846j]])
----------Measure----------
Probability:  tensor([[0.3669, 0.6331]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.3988-0.4690j, 0.7380+0.2763j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.3988-0.4690j, 0.7380+0.2763j]])
New state:  tensor([[0.3241-0.5234j, 0.6884+0.3836j]])
----------Measure----------
Probability:  tensor([[0.3790, 0.6210]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2321-0.8095j, 0.3624+0.3993j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.2321-0.8095j, 0.3624+0.3993j]])
New state:  tensor([[0.1084-0.8351j, 0.2986+0.4490j]])
----------Measure----------
Probability:  tensor([[0.7092, 0.2908]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4582-0.3786j, 0.7777+0.2046j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.4582-0.3786j, 0.7777+0.2046j]])
New state:  tensor([[0.3964-0.4429j, 0.7384+0.3186j]])
----------Measure----------
Probability:  tensor([[0.3533, 0.6467]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3881-0.4974j, 0.7183+0.2931j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.3881-0.4974j, 0.7183+0.2931j]])
New state:  tensor([[0.3094-0.5499j, 0.6664+0.3972j]])
----------Measure----------
Probability:  tensor([[0.3981, 0.6019]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0035-0.2832j, 0.8389+0.4649j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.0035-0.2832j, 0.8389+0.4649j]])
New state:  tensor([[-0.0389-0.2805j,  0.7599+0.5851j]])
----------Measure----------
Probability:  tensor([[0.0802, 0.9198]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3823-0.7790j, 0.4326+0.2445j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.3823-0.7790j, 0.4326+0.2445j]])
New state:  tensor([[0.2615-0.8275j, 0.3912+0.3065j]])
----------Measure----------
Probability:  tensor([[0.7530, 0.2470]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4028-0.5354j, 0.6837+0.2893j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.4028-0.5354j, 0.6837+0.2893j]])
New state:  tensor([[0.3182-0.5896j, 0.6327+0.3883j]])
----------Measure----------
Probability:  tensor([[0.4489, 0.5511]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5227-0.7680j, 0.3663+0.0526j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.5227-0.7680j, 0.3663+0.0526j]])
New state:  tensor([[0.4019-0.8375j, 0.3544+0.1068j]])
----------Measure----------
Probability:  tensor([[0.8630, 0.1370]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5806-0.6287j, 0.5055+0.1101j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.5806-0.6287j, 0.5055+0.1101j]])
New state:  tensor([[0.4800-0.7085j, 0.4833+0.1845j]])
----------Measure----------
Probability:  tensor([[0.7324, 0.2676]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5985-0.5995j, 0.5210+0.1050j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.5985-0.5995j, 0.5210+0.1050j]])
New state:  tensor([[0.5021-0.6822j, 0.4995+0.1817j]])
----------Measure----------
Probability:  tensor([[0.7175, 0.2825]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4595-0.6870j, 0.5200+0.2156j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.4595-0.6870j, 0.5200+0.2156j]])
New state:  tensor([[0.3515-0.7480j, 0.4819+0.2910j]])
----------Measure----------
Probability:  tensor([[0.6831, 0.3169]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4421-0.7434j, 0.4604+0.1999j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.4421-0.7434j, 0.4604+0.1999j]])
New state:  tensor([[0.3259-0.8011j, 0.4253+0.2666j]])
----------Measure----------
Probability:  tensor([[0.7480, 0.2520]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5084-0.2989j, 0.7940+0.1475j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.5084-0.2989j, 0.7940+0.1475j]])
New state:  tensor([[0.4580-0.3716j, 0.7630+0.2646j]])
----------Measure----------
Probability:  tensor([[0.3479, 0.6521]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6662-0.6646j, 0.3343-0.0518j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.6662-0.6646j, 0.3343-0.0518j]])
New state:  tensor([[0.5593-0.7568j, 0.3383-0.0012j]])
----------Measure----------
Probability:  tensor([[0.8855, 0.1145]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5567-0.6230j, 0.5317+0.1389j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.5567-0.6230j, 0.5317+0.1389j]])
New state:  tensor([[0.4573-0.6993j, 0.5049+0.2169j]])
----------Measure----------
Probability:  tensor([[0.6980, 0.3020]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3958-0.6573j, 0.5699+0.2941j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.3958-0.6573j, 0.5699+0.2941j]])
New state:  tensor([[0.2931-0.7091j, 0.5195+0.3761j]])
----------Measure----------
Probability:  tensor([[0.5887, 0.4113]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4415-0.7112j, 0.4996+0.2232j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.4415-0.7112j, 0.4996+0.2232j]])
New state:  tensor([[0.3301-0.7692j, 0.4606+0.2954j]])
----------Measure----------
Probability:  tensor([[0.7006, 0.2994]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3472-0.7243j, 0.4999+0.3241j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.3472-0.7243j, 0.4999+0.3241j]])
New state:  tensor([[0.2349-0.7681j, 0.4457+0.3952j]])
----------Measure----------
Probability:  tensor([[0.6451, 0.3549]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5985-0.5995j, 0.5210+0.1050j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.5985-0.5995j, 0.5210+0.1050j]])
New state:  tensor([[0.5021-0.6822j, 0.4995+0.1817j]])
----------Measure----------
Probability:  tensor([[0.7175, 0.2825]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4617-0.7198j, 0.4809+0.1936j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.4617-0.7198j, 0.4809+0.1936j]])
New state:  tensor([[0.3489-0.7807j, 0.4465+0.2633j]])
----------Measure----------
Probability:  tensor([[0.7313, 0.2687]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2745-0.7035j, 0.5079+0.4145j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.2745-0.7035j, 0.5079+0.4145j]])
New state:  tensor([[0.1661-0.7366j, 0.4402+0.4858j]])
----------Measure----------
Probability:  tensor([[0.5702, 0.4298]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4756-0.4228j, 0.7427+0.2085j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.4756-0.4228j, 0.7427+0.2085j]])
New state:  tensor([[0.4070-0.4892j, 0.7031+0.3173j]])
----------Measure----------
Probability:  tensor([[0.4049, 0.5951]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0542-0.3493j, 0.7916+0.4984j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.0542-0.3493j, 0.7916+0.4984j]])
New state:  tensor([[0.0013-0.3535j, 0.7082+0.6112j]])
----------Measure----------
Probability:  tensor([[0.1249, 0.8751]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3215-0.4069j, 0.7984+0.3061j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.3215-0.4069j, 0.7984+0.3061j]])
New state:  tensor([[0.2570-0.4504j, 0.7436+0.4221j]])
----------Measure----------
Probability:  tensor([[0.2689, 0.7311]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3045-0.5476j, 0.6803+0.3803j]])
Inside  rz
rz_matrix theta:  tensor([[0.3003+0.j]])
rz_matrix:  tensor([[0.9887-0.1496j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9887+0.1496j]])
Performing matrix multiplication

Current state:  tensor([[0.3045-0.5476j, 0.6803+0.3803j]])
New state:  tensor([[0.2191-0.5869j, 0.6158+0.4778j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
valid set accuracy: 1.0
valid set loss: 0.36421945691108704
------------------------------Epoch93------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4582-0.3786j, 0.7777+0.2046j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.4582-0.3786j, 0.7777+0.2046j]])
New state:  tensor([[0.3965-0.4428j, 0.7385+0.3184j]])
----------Measure----------
Probability:  tensor([[0.3533, 0.6467]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3958-0.6573j, 0.5699+0.2941j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.3958-0.6573j, 0.5699+0.2941j]])
New state:  tensor([[0.2932-0.7090j, 0.5196+0.3759j]])
----------Measure----------
Probability:  tensor([[0.5887, 0.4113]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5984-0.5995j, 0.5211+0.1050j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.5984-0.5995j, 0.5211+0.1050j]])
New state:  tensor([[0.5022-0.6821j, 0.4995+0.1816j]])
----------Measure----------
Probability:  tensor([[0.7175, 0.2825]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3214-0.4069j, 0.7984+0.3061j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.3214-0.4069j, 0.7984+0.3061j]])
New state:  tensor([[0.2571-0.4503j, 0.7437+0.4219j]])
----------Measure----------
Probability:  tensor([[0.2689, 0.7311]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3044-0.5476j, 0.6804+0.3803j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.3044-0.5476j, 0.6804+0.3803j]])
New state:  tensor([[0.2192-0.5869j, 0.6159+0.4776j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4414-0.7112j, 0.4996+0.2232j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.4414-0.7112j, 0.4996+0.2232j]])
New state:  tensor([[0.3303-0.7691j, 0.4606+0.2953j]])
----------Measure----------
Probability:  tensor([[0.7006, 0.2994]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4756-0.4228j, 0.7427+0.2085j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.4756-0.4228j, 0.7427+0.2085j]])
New state:  tensor([[0.4071-0.4891j, 0.7032+0.3171j]])
----------Measure----------
Probability:  tensor([[0.4049, 0.5951]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5227-0.7680j, 0.3664+0.0525j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.5227-0.7680j, 0.3664+0.0525j]])
New state:  tensor([[0.4021-0.8375j, 0.3544+0.1067j]])
----------Measure----------
Probability:  tensor([[0.8630, 0.1370]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5984-0.5995j, 0.5211+0.1050j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.5984-0.5995j, 0.5211+0.1050j]])
New state:  tensor([[0.5022-0.6821j, 0.4995+0.1816j]])
----------Measure----------
Probability:  tensor([[0.7175, 0.2825]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4028-0.5354j, 0.6837+0.2893j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.4028-0.5354j, 0.6837+0.2893j]])
New state:  tensor([[0.3183-0.5896j, 0.6328+0.3882j]])
----------Measure----------
Probability:  tensor([[0.4489, 0.5511]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4595-0.6870j, 0.5200+0.2156j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.4595-0.6870j, 0.5200+0.2156j]])
New state:  tensor([[0.3517-0.7480j, 0.4819+0.2908j]])
----------Measure----------
Probability:  tensor([[0.6831, 0.3169]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3881-0.4974j, 0.7184+0.2931j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.3881-0.4974j, 0.7184+0.2931j]])
New state:  tensor([[0.3095-0.5498j, 0.6665+0.3971j]])
----------Measure----------
Probability:  tensor([[0.3981, 0.6019]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3471-0.7243j, 0.4999+0.3241j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.3471-0.7243j, 0.4999+0.3241j]])
New state:  tensor([[0.2351-0.7680j, 0.4458+0.3951j]])
----------Measure----------
Probability:  tensor([[0.6451, 0.3549]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5084-0.2989j, 0.7940+0.1474j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.5084-0.2989j, 0.7940+0.1474j]])
New state:  tensor([[0.4581-0.3715j, 0.7631+0.2644j]])
----------Measure----------
Probability:  tensor([[0.3478, 0.6522]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5567-0.6230j, 0.5317+0.1389j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.5567-0.6230j, 0.5317+0.1389j]])
New state:  tensor([[0.4574-0.6992j, 0.5050+0.2167j]])
----------Measure----------
Probability:  tensor([[0.6980, 0.3020]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2321-0.8096j, 0.3624+0.3993j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.2321-0.8096j, 0.3624+0.3993j]])
New state:  tensor([[0.1085-0.8351j, 0.2987+0.4489j]])
----------Measure----------
Probability:  tensor([[0.7092, 0.2908]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.3987-0.4690j, 0.7380+0.2763j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.3987-0.4690j, 0.7380+0.2763j]])
New state:  tensor([[0.3242-0.5233j, 0.6885+0.3834j]])
----------Measure----------
Probability:  tensor([[0.3790, 0.6210]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5806-0.6287j, 0.5055+0.1101j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.5806-0.6287j, 0.5055+0.1101j]])
New state:  tensor([[0.4802-0.7084j, 0.4834+0.1844j]])
----------Measure----------
Probability:  tensor([[0.7324, 0.2676]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4421-0.7434j, 0.4604+0.1999j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.4421-0.7434j, 0.4604+0.1999j]])
New state:  tensor([[0.3261-0.8011j, 0.4254+0.2664j]])
----------Measure----------
Probability:  tensor([[0.7480, 0.2520]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0035-0.2832j, 0.8389+0.4649j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.0035-0.2832j, 0.8389+0.4649j]])
New state:  tensor([[-0.0389-0.2805j,  0.7600+0.5849j]])
----------Measure----------
Probability:  tensor([[0.0802, 0.9198]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2744-0.7035j, 0.5080+0.4145j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.2744-0.7035j, 0.5080+0.4145j]])
New state:  tensor([[0.1663-0.7366j, 0.4404+0.4857j]])
----------Measure----------
Probability:  tensor([[0.5702, 0.4298]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2829-0.4220j, 0.7897+0.3439j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.2829-0.4220j, 0.7897+0.3439j]])
New state:  tensor([[0.2167-0.4595j, 0.7295+0.4580j]])
----------Measure----------
Probability:  tensor([[0.2581, 0.7419]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6662-0.6646j, 0.3344-0.0519j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.6662-0.6646j, 0.3344-0.0519j]])
New state:  tensor([[0.5594-0.7567j, 0.3384-0.0013j]])
----------Measure----------
Probability:  tensor([[0.8855, 0.1145]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4977-0.3452j, 0.7773+0.1703j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.4977-0.3452j, 0.7773+0.1703j]])
New state:  tensor([[0.4406-0.4157j, 0.7431+0.2844j]])
----------Measure----------
Probability:  tensor([[0.3669, 0.6331]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0542-0.3493j, 0.7916+0.4983j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.0542-0.3493j, 0.7916+0.4983j]])
New state:  tensor([[0.0014-0.3535j, 0.7083+0.6110j]])
----------Measure----------
Probability:  tensor([[0.1250, 0.8750]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4617-0.7198j, 0.4809+0.1936j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.4617-0.7198j, 0.4809+0.1936j]])
New state:  tensor([[0.3490-0.7807j, 0.4466+0.2632j]])
----------Measure----------
Probability:  tensor([[0.7313, 0.2687]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1584-0.8123j, 0.2933+0.4786j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.1584-0.8123j, 0.2933+0.4786j]])
New state:  tensor([[0.0353-0.8269j, 0.2185+0.5170j]])
----------Measure----------
Probability:  tensor([[0.6850, 0.3150]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3823-0.7790j, 0.4327+0.2445j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.3823-0.7790j, 0.4327+0.2445j]])
New state:  tensor([[0.2616-0.8274j, 0.3913+0.3063j]])
----------Measure----------
Probability:  tensor([[0.7531, 0.2469]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5430+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4806-0.6954j, 0.5005+0.1870j]])
Inside  rz
rz_matrix theta:  tensor([[0.2999+0.j]])
rz_matrix:  tensor([[0.9888-0.1494j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1494j]])
Performing matrix multiplication

Current state:  tensor([[0.4806-0.6954j, 0.5005+0.1870j]])
New state:  tensor([[0.3713-0.7594j, 0.4670+0.2597j]])
----------Measure----------
Probability:  tensor([[0.7145, 0.2855]])
valid set accuracy: 1.0
valid set loss: 0.36421528458595276
------------------------------Epoch94------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5806-0.6287j, 0.5055+0.1101j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.5806-0.6287j, 0.5055+0.1101j]])
New state:  tensor([[0.4803-0.7083j, 0.4834+0.1843j]])
----------Measure----------
Probability:  tensor([[0.7323, 0.2677]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2744-0.7035j, 0.5080+0.4144j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.2744-0.7035j, 0.5080+0.4144j]])
New state:  tensor([[0.1664-0.7366j, 0.4404+0.4856j]])
----------Measure----------
Probability:  tensor([[0.5702, 0.4298]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5227-0.7680j, 0.3664+0.0525j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.5227-0.7680j, 0.3664+0.0525j]])
New state:  tensor([[0.4022-0.8374j, 0.3544+0.1066j]])
----------Measure----------
Probability:  tensor([[0.8630, 0.1370]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4756-0.4228j, 0.7427+0.2085j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.4756-0.4228j, 0.7427+0.2085j]])
New state:  tensor([[0.4072-0.4890j, 0.7033+0.3170j]])
----------Measure----------
Probability:  tensor([[0.4049, 0.5951]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3044-0.5476j, 0.6804+0.3803j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.3044-0.5476j, 0.6804+0.3803j]])
New state:  tensor([[0.2193-0.5869j, 0.6160+0.4775j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2829-0.4220j, 0.7897+0.3439j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.2829-0.4220j, 0.7897+0.3439j]])
New state:  tensor([[0.2167-0.4594j, 0.7296+0.4578j]])
----------Measure----------
Probability:  tensor([[0.2581, 0.7419]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1584-0.8123j, 0.2933+0.4786j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.1584-0.8123j, 0.2933+0.4786j]])
New state:  tensor([[0.0355-0.8269j, 0.2186+0.5170j]])
----------Measure----------
Probability:  tensor([[0.6850, 0.3150]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5084-0.2990j, 0.7940+0.1474j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.5084-0.2990j, 0.7940+0.1474j]])
New state:  tensor([[0.4581-0.3715j, 0.7631+0.2642j]])
----------Measure----------
Probability:  tensor([[0.3478, 0.6522]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4420-0.7434j, 0.4604+0.1999j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.4420-0.7434j, 0.4604+0.1999j]])
New state:  tensor([[0.3262-0.8010j, 0.4255+0.2664j]])
----------Measure----------
Probability:  tensor([[0.7480, 0.2520]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3214-0.4069j, 0.7984+0.3061j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.3214-0.4069j, 0.7984+0.3061j]])
New state:  tensor([[0.2571-0.4503j, 0.7438+0.4218j]])
----------Measure----------
Probability:  tensor([[0.2689, 0.7311]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0034-0.2832j, 0.8389+0.4649j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.0034-0.2832j, 0.8389+0.4649j]])
New state:  tensor([[-0.0389-0.2806j,  0.7601+0.5848j]])
----------Measure----------
Probability:  tensor([[0.0802, 0.9198]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4977-0.3452j, 0.7773+0.1702j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.4977-0.3452j, 0.7773+0.1702j]])
New state:  tensor([[0.4406-0.4156j, 0.7432+0.2843j]])
----------Measure----------
Probability:  tensor([[0.3669, 0.6331]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6661-0.6646j, 0.3344-0.0519j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.6661-0.6646j, 0.3344-0.0519j]])
New state:  tensor([[0.5595-0.7566j, 0.3384-0.0014j]])
----------Measure----------
Probability:  tensor([[0.8855, 0.1145]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
New state:  tensor([[0.5023-0.6820j, 0.4996+0.1815j]])
----------Measure----------
Probability:  tensor([[0.7175, 0.2825]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4414-0.7112j, 0.4996+0.2231j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.4414-0.7112j, 0.4996+0.2231j]])
New state:  tensor([[0.3304-0.7691j, 0.4607+0.2952j]])
----------Measure----------
Probability:  tensor([[0.7006, 0.2994]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2320-0.8096j, 0.3624+0.3993j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.2320-0.8096j, 0.3624+0.3993j]])
New state:  tensor([[0.1087-0.8351j, 0.2988+0.4489j]])
----------Measure----------
Probability:  tensor([[0.7092, 0.2908]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4028-0.5354j, 0.6837+0.2893j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.4028-0.5354j, 0.6837+0.2893j]])
New state:  tensor([[0.3184-0.5895j, 0.6329+0.3880j]])
----------Measure----------
Probability:  tensor([[0.4489, 0.5511]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3881-0.4974j, 0.7184+0.2931j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.3881-0.4974j, 0.7184+0.2931j]])
New state:  tensor([[0.3095-0.5498j, 0.6666+0.3969j]])
----------Measure----------
Probability:  tensor([[0.3981, 0.6019]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4806-0.6954j, 0.5005+0.1870j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.4806-0.6954j, 0.5005+0.1870j]])
New state:  tensor([[0.3714-0.7593j, 0.4670+0.2596j]])
----------Measure----------
Probability:  tensor([[0.7145, 0.2855]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3958-0.6573j, 0.5699+0.2941j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.3958-0.6573j, 0.5699+0.2941j]])
New state:  tensor([[0.2933-0.7090j, 0.5197+0.3758j]])
----------Measure----------
Probability:  tensor([[0.5887, 0.4113]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4617-0.7198j, 0.4809+0.1935j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.4617-0.7198j, 0.4809+0.1935j]])
New state:  tensor([[0.3491-0.7806j, 0.4467+0.2631j]])
----------Measure----------
Probability:  tensor([[0.7313, 0.2687]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
New state:  tensor([[0.5023-0.6820j, 0.4996+0.1815j]])
----------Measure----------
Probability:  tensor([[0.7175, 0.2825]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.3987-0.4690j, 0.7380+0.2763j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.3987-0.4690j, 0.7380+0.2763j]])
New state:  tensor([[0.3243-0.5232j, 0.6886+0.3833j]])
----------Measure----------
Probability:  tensor([[0.3789, 0.6211]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4594-0.6871j, 0.5200+0.2156j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.4594-0.6871j, 0.5200+0.2156j]])
New state:  tensor([[0.3518-0.7479j, 0.4820+0.2907j]])
----------Measure----------
Probability:  tensor([[0.6831, 0.3169]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3471-0.7243j, 0.4999+0.3241j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.3471-0.7243j, 0.4999+0.3241j]])
New state:  tensor([[0.2352-0.7680j, 0.4459+0.3950j]])
----------Measure----------
Probability:  tensor([[0.6451, 0.3549]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4582-0.3786j, 0.7777+0.2045j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.4582-0.3786j, 0.7777+0.2045j]])
New state:  tensor([[0.3966-0.4427j, 0.7385+0.3183j]])
----------Measure----------
Probability:  tensor([[0.3533, 0.6467]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5567-0.6230j, 0.5317+0.1389j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.5567-0.6230j, 0.5317+0.1389j]])
New state:  tensor([[0.4575-0.6991j, 0.5050+0.2166j]])
----------Measure----------
Probability:  tensor([[0.6980, 0.3020]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3823-0.7790j, 0.4327+0.2444j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.3823-0.7790j, 0.4327+0.2444j]])
New state:  tensor([[0.2618-0.8274j, 0.3913+0.3063j]])
----------Measure----------
Probability:  tensor([[0.7531, 0.2469]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0541-0.3493j, 0.7916+0.4983j]])
Inside  rz
rz_matrix theta:  tensor([[0.2995+0.j]])
rz_matrix:  tensor([[0.9888-0.1492j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1492j]])
Performing matrix multiplication

Current state:  tensor([[0.0541-0.3493j, 0.7916+0.4983j]])
New state:  tensor([[0.0014-0.3535j, 0.7084+0.6109j]])
----------Measure----------
Probability:  tensor([[0.1250, 0.8750]])
valid set accuracy: 1.0
valid set loss: 0.3642130196094513
------------------------------Epoch95------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4617-0.7198j, 0.4809+0.1935j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.4617-0.7198j, 0.4809+0.1935j]])
New state:  tensor([[0.3492-0.7806j, 0.4467+0.2631j]])
----------Measure----------
Probability:  tensor([[0.7313, 0.2687]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5567-0.6230j, 0.5317+0.1389j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.5567-0.6230j, 0.5317+0.1389j]])
New state:  tensor([[0.4576-0.6990j, 0.5051+0.2166j]])
----------Measure----------
Probability:  tensor([[0.6980, 0.3020]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0034-0.2832j, 0.8389+0.4648j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.0034-0.2832j, 0.8389+0.4648j]])
New state:  tensor([[-0.0388-0.2806j,  0.7602+0.5847j]])
----------Measure----------
Probability:  tensor([[0.0802, 0.9198]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3823-0.7791j, 0.4327+0.2444j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.3823-0.7791j, 0.4327+0.2444j]])
New state:  tensor([[0.2619-0.8273j, 0.3914+0.3062j]])
----------Measure----------
Probability:  tensor([[0.7531, 0.2469]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4027-0.5354j, 0.6837+0.2893j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.4027-0.5354j, 0.6837+0.2893j]])
New state:  tensor([[0.3184-0.5895j, 0.6329+0.3879j]])
----------Measure----------
Probability:  tensor([[0.4489, 0.5511]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4805-0.6954j, 0.5006+0.1870j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.4805-0.6954j, 0.5006+0.1870j]])
New state:  tensor([[0.3715-0.7592j, 0.4671+0.2595j]])
----------Measure----------
Probability:  tensor([[0.7145, 0.2855]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.3987-0.4690j, 0.7381+0.2763j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.3987-0.4690j, 0.7381+0.2763j]])
New state:  tensor([[0.3244-0.5232j, 0.6886+0.3832j]])
----------Measure----------
Probability:  tensor([[0.3789, 0.6211]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5084-0.2990j, 0.7940+0.1474j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.5084-0.2990j, 0.7940+0.1474j]])
New state:  tensor([[0.4581-0.3714j, 0.7632+0.2641j]])
----------Measure----------
Probability:  tensor([[0.3478, 0.6522]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1584-0.8123j, 0.2933+0.4785j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.1584-0.8123j, 0.2933+0.4785j]])
New state:  tensor([[0.0356-0.8269j, 0.2187+0.5169j]])
----------Measure----------
Probability:  tensor([[0.6850, 0.3150]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2828-0.4220j, 0.7897+0.3439j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.2828-0.4220j, 0.7897+0.3439j]])
New state:  tensor([[0.2168-0.4594j, 0.7297+0.4577j]])
----------Measure----------
Probability:  tensor([[0.2581, 0.7419]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5227-0.7680j, 0.3664+0.0525j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.5227-0.7680j, 0.3664+0.0525j]])
New state:  tensor([[0.4023-0.8373j, 0.3545+0.1065j]])
----------Measure----------
Probability:  tensor([[0.8630, 0.1370]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2744-0.7035j, 0.5080+0.4144j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.2744-0.7035j, 0.5080+0.4144j]])
New state:  tensor([[0.1665-0.7366j, 0.4405+0.4855j]])
----------Measure----------
Probability:  tensor([[0.5702, 0.4298]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4420-0.7434j, 0.4604+0.1999j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.4420-0.7434j, 0.4604+0.1999j]])
New state:  tensor([[0.3263-0.8010j, 0.4255+0.2663j]])
----------Measure----------
Probability:  tensor([[0.7480, 0.2520]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4414-0.7112j, 0.4996+0.2231j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.4414-0.7112j, 0.4996+0.2231j]])
New state:  tensor([[0.3305-0.7690j, 0.4608+0.2951j]])
----------Measure----------
Probability:  tensor([[0.7006, 0.2994]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3044-0.5476j, 0.6804+0.3803j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.3044-0.5476j, 0.6804+0.3803j]])
New state:  tensor([[0.2194-0.5868j, 0.6161+0.4774j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3214-0.4069j, 0.7984+0.3061j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.3214-0.4069j, 0.7984+0.3061j]])
New state:  tensor([[0.2572-0.4503j, 0.7439+0.4217j]])
----------Measure----------
Probability:  tensor([[0.2689, 0.7311]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0541-0.3493j, 0.7916+0.4983j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.0541-0.3493j, 0.7916+0.4983j]])
New state:  tensor([[0.0015-0.3535j, 0.7085+0.6108j]])
----------Measure----------
Probability:  tensor([[0.1250, 0.8750]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
New state:  tensor([[0.5024-0.6820j, 0.4996+0.1814j]])
----------Measure----------
Probability:  tensor([[0.7175, 0.2825]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4977-0.3452j, 0.7773+0.1702j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.4977-0.3452j, 0.7773+0.1702j]])
New state:  tensor([[0.4407-0.4155j, 0.7432+0.2842j]])
----------Measure----------
Probability:  tensor([[0.3668, 0.6332]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
New state:  tensor([[0.5024-0.6820j, 0.4996+0.1814j]])
----------Measure----------
Probability:  tensor([[0.7175, 0.2825]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3471-0.7243j, 0.4999+0.3241j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.3471-0.7243j, 0.4999+0.3241j]])
New state:  tensor([[0.2353-0.7680j, 0.4460+0.3950j]])
----------Measure----------
Probability:  tensor([[0.6451, 0.3549]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4755-0.4228j, 0.7427+0.2085j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.4755-0.4228j, 0.7427+0.2085j]])
New state:  tensor([[0.4072-0.4890j, 0.7033+0.3169j]])
----------Measure----------
Probability:  tensor([[0.4049, 0.5951]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6661-0.6646j, 0.3344-0.0519j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.6661-0.6646j, 0.3344-0.0519j]])
New state:  tensor([[0.5596-0.7565j, 0.3384-0.0015j]])
----------Measure----------
Probability:  tensor([[0.8855, 0.1145]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5806-0.6287j, 0.5055+0.1101j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.5806-0.6287j, 0.5055+0.1101j]])
New state:  tensor([[0.4803-0.7082j, 0.4835+0.1842j]])
----------Measure----------
Probability:  tensor([[0.7323, 0.2677]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3958-0.6573j, 0.5699+0.2941j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.3958-0.6573j, 0.5699+0.2941j]])
New state:  tensor([[0.2934-0.7089j, 0.5197+0.3758j]])
----------Measure----------
Probability:  tensor([[0.5887, 0.4113]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3881-0.4975j, 0.7184+0.2930j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.3881-0.4975j, 0.7184+0.2930j]])
New state:  tensor([[0.3096-0.5497j, 0.6667+0.3969j]])
----------Measure----------
Probability:  tensor([[0.3981, 0.6019]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2320-0.8096j, 0.3624+0.3993j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.2320-0.8096j, 0.3624+0.3993j]])
New state:  tensor([[0.1088-0.8351j, 0.2988+0.4488j]])
----------Measure----------
Probability:  tensor([[0.7093, 0.2907]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4594-0.6871j, 0.5200+0.2156j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.4594-0.6871j, 0.5200+0.2156j]])
New state:  tensor([[0.3519-0.7479j, 0.4821+0.2907j]])
----------Measure----------
Probability:  tensor([[0.6831, 0.3169]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5431+0.j]])
ry_matrix:  tensor([[ 0.9634-0.j, -0.2682-0.j],
        [ 0.2682+0.j,  0.9634-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4582-0.3786j, 0.7778+0.2045j]])
Inside  rz
rz_matrix theta:  tensor([[0.2993+0.j]])
rz_matrix:  tensor([[0.9888-0.1491j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1491j]])
Performing matrix multiplication

Current state:  tensor([[0.4582-0.3786j, 0.7778+0.2045j]])
New state:  tensor([[0.3966-0.4427j, 0.7386+0.3182j]])
----------Measure----------
Probability:  tensor([[0.3533, 0.6467]])
valid set accuracy: 1.0
valid set loss: 0.3642110228538513
------------------------------Epoch96------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3958-0.6573j, 0.5700+0.2941j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.3958-0.6573j, 0.5700+0.2941j]])
New state:  tensor([[0.2934-0.7089j, 0.5198+0.3757j]])
----------Measure----------
Probability:  tensor([[0.5887, 0.4113]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.3987-0.4690j, 0.7381+0.2763j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.3987-0.4690j, 0.7381+0.2763j]])
New state:  tensor([[0.3244-0.5232j, 0.6887+0.3832j]])
----------Measure----------
Probability:  tensor([[0.3789, 0.6211]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6661-0.6646j, 0.3344-0.0519j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.6661-0.6646j, 0.3344-0.0519j]])
New state:  tensor([[0.5597-0.7565j, 0.3384-0.0015j]])
----------Measure----------
Probability:  tensor([[0.8855, 0.1145]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
New state:  tensor([[0.5024-0.6819j, 0.4996+0.1814j]])
----------Measure----------
Probability:  tensor([[0.7175, 0.2825]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4420-0.7434j, 0.4605+0.1999j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.4420-0.7434j, 0.4605+0.1999j]])
New state:  tensor([[0.3263-0.8010j, 0.4255+0.2662j]])
----------Measure----------
Probability:  tensor([[0.7480, 0.2520]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1584-0.8123j, 0.2933+0.4785j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.1584-0.8123j, 0.2933+0.4785j]])
New state:  tensor([[0.0356-0.8269j, 0.2187+0.5169j]])
----------Measure----------
Probability:  tensor([[0.6850, 0.3150]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4027-0.5354j, 0.6837+0.2893j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.4027-0.5354j, 0.6837+0.2893j]])
New state:  tensor([[0.3185-0.5895j, 0.6330+0.3879j]])
----------Measure----------
Probability:  tensor([[0.4489, 0.5511]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
New state:  tensor([[0.5024-0.6819j, 0.4996+0.1814j]])
----------Measure----------
Probability:  tensor([[0.7175, 0.2825]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3881-0.4975j, 0.7184+0.2930j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.3881-0.4975j, 0.7184+0.2930j]])
New state:  tensor([[0.3096-0.5497j, 0.6667+0.3968j]])
----------Measure----------
Probability:  tensor([[0.3981, 0.6019]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3044-0.5476j, 0.6804+0.3802j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.3044-0.5476j, 0.6804+0.3802j]])
New state:  tensor([[0.2194-0.5868j, 0.6161+0.4774j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4594-0.6871j, 0.5200+0.2156j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.4594-0.6871j, 0.5200+0.2156j]])
New state:  tensor([[0.3519-0.7478j, 0.4821+0.2906j]])
----------Measure----------
Probability:  tensor([[0.6831, 0.3169]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3471-0.7243j, 0.4999+0.3241j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.3471-0.7243j, 0.4999+0.3241j]])
New state:  tensor([[0.2353-0.7679j, 0.4460+0.3949j]])
----------Measure----------
Probability:  tensor([[0.6451, 0.3549]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5227-0.7680j, 0.3664+0.0525j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.5227-0.7680j, 0.3664+0.0525j]])
New state:  tensor([[0.4024-0.8373j, 0.3545+0.1065j]])
----------Measure----------
Probability:  tensor([[0.8630, 0.1370]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5084-0.2990j, 0.7940+0.1474j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.5084-0.2990j, 0.7940+0.1474j]])
New state:  tensor([[0.4582-0.3714j, 0.7632+0.2641j]])
----------Measure----------
Probability:  tensor([[0.3478, 0.6522]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5567-0.6230j, 0.5317+0.1389j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.5567-0.6230j, 0.5317+0.1389j]])
New state:  tensor([[0.4576-0.6990j, 0.5051+0.2165j]])
----------Measure----------
Probability:  tensor([[0.6980, 0.3020]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2320-0.8096j, 0.3624+0.3992j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.2320-0.8096j, 0.3624+0.3992j]])
New state:  tensor([[0.1088-0.8351j, 0.2989+0.4488j]])
----------Measure----------
Probability:  tensor([[0.7093, 0.2907]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4755-0.4228j, 0.7427+0.2085j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.4755-0.4228j, 0.7427+0.2085j]])
New state:  tensor([[0.4072-0.4889j, 0.7034+0.3168j]])
----------Measure----------
Probability:  tensor([[0.4049, 0.5951]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4617-0.7198j, 0.4809+0.1935j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.4617-0.7198j, 0.4809+0.1935j]])
New state:  tensor([[0.3493-0.7805j, 0.4467+0.2630j]])
----------Measure----------
Probability:  tensor([[0.7313, 0.2687]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0541-0.3493j, 0.7916+0.4983j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.0541-0.3493j, 0.7916+0.4983j]])
New state:  tensor([[0.0015-0.3535j, 0.7086+0.6107j]])
----------Measure----------
Probability:  tensor([[0.1250, 0.8750]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4977-0.3452j, 0.7773+0.1702j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.4977-0.3452j, 0.7773+0.1702j]])
New state:  tensor([[0.4407-0.4155j, 0.7433+0.2841j]])
----------Measure----------
Probability:  tensor([[0.3668, 0.6332]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0034-0.2832j, 0.8389+0.4648j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.0034-0.2832j, 0.8389+0.4648j]])
New state:  tensor([[-0.0388-0.2806j,  0.7602+0.5846j]])
----------Measure----------
Probability:  tensor([[0.0802, 0.9198]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4805-0.6954j, 0.5006+0.1870j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.4805-0.6954j, 0.5006+0.1870j]])
New state:  tensor([[0.3716-0.7592j, 0.4671+0.2594j]])
----------Measure----------
Probability:  tensor([[0.7145, 0.2855]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2744-0.7035j, 0.5080+0.4144j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.2744-0.7035j, 0.5080+0.4144j]])
New state:  tensor([[0.1665-0.7365j, 0.4406+0.4855j]])
----------Measure----------
Probability:  tensor([[0.5702, 0.4298]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4414-0.7112j, 0.4996+0.2231j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.4414-0.7112j, 0.4996+0.2231j]])
New state:  tensor([[0.3305-0.7690j, 0.4608+0.2951j]])
----------Measure----------
Probability:  tensor([[0.7006, 0.2994]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3823-0.7791j, 0.4327+0.2444j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.3823-0.7791j, 0.4327+0.2444j]])
New state:  tensor([[0.2619-0.8273j, 0.3914+0.3062j]])
----------Measure----------
Probability:  tensor([[0.7531, 0.2469]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3214-0.4069j, 0.7984+0.3061j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.3214-0.4069j, 0.7984+0.3061j]])
New state:  tensor([[0.2572-0.4502j, 0.7439+0.4216j]])
----------Measure----------
Probability:  tensor([[0.2689, 0.7311]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2828-0.4220j, 0.7898+0.3439j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.2828-0.4220j, 0.7898+0.3439j]])
New state:  tensor([[0.2168-0.4594j, 0.7297+0.4577j]])
----------Measure----------
Probability:  tensor([[0.2581, 0.7419]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4582-0.3786j, 0.7778+0.2045j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.4582-0.3786j, 0.7778+0.2045j]])
New state:  tensor([[0.3966-0.4426j, 0.7386+0.3181j]])
----------Measure----------
Probability:  tensor([[0.3533, 0.6467]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5805-0.6287j, 0.5055+0.1101j]])
Inside  rz
rz_matrix theta:  tensor([[0.2991+0.j]])
rz_matrix:  tensor([[0.9888-0.1490j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1490j]])
Performing matrix multiplication

Current state:  tensor([[0.5805-0.6287j, 0.5055+0.1101j]])
New state:  tensor([[0.4804-0.7082j, 0.4835+0.1841j]])
----------Measure----------
Probability:  tensor([[0.7323, 0.2677]])
valid set accuracy: 1.0
valid set loss: 0.3642096221446991
------------------------------Epoch97------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6661-0.6646j, 0.3344-0.0519j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.6661-0.6646j, 0.3344-0.0519j]])
New state:  tensor([[0.5597-0.7564j, 0.3384-0.0015j]])
----------Measure----------
Probability:  tensor([[0.8855, 0.1145]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3471-0.7243j, 0.4999+0.3240j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3471-0.7243j, 0.4999+0.3240j]])
New state:  tensor([[0.2354-0.7679j, 0.4461+0.3949j]])
----------Measure----------
Probability:  tensor([[0.6451, 0.3549]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5084-0.2990j, 0.7940+0.1474j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5084-0.2990j, 0.7940+0.1474j]])
New state:  tensor([[0.4582-0.3713j, 0.7632+0.2640j]])
----------Measure----------
Probability:  tensor([[0.3478, 0.6522]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4581-0.3786j, 0.7778+0.2045j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4581-0.3786j, 0.7778+0.2045j]])
New state:  tensor([[0.3967-0.4426j, 0.7386+0.3181j]])
----------Measure----------
Probability:  tensor([[0.3532, 0.6468]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0034-0.2832j, 0.8389+0.4648j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.0034-0.2832j, 0.8389+0.4648j]])
New state:  tensor([[-0.0388-0.2806j,  0.7603+0.5846j]])
----------Measure----------
Probability:  tensor([[0.0802, 0.9198]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4420-0.7434j, 0.4605+0.1999j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4420-0.7434j, 0.4605+0.1999j]])
New state:  tensor([[0.3264-0.8009j, 0.4256+0.2662j]])
----------Measure----------
Probability:  tensor([[0.7480, 0.2520]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4027-0.5354j, 0.6837+0.2892j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4027-0.5354j, 0.6837+0.2892j]])
New state:  tensor([[0.3185-0.5895j, 0.6330+0.3878j]])
----------Measure----------
Probability:  tensor([[0.4489, 0.5511]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3881-0.4975j, 0.7184+0.2930j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3881-0.4975j, 0.7184+0.2930j]])
New state:  tensor([[0.3097-0.5497j, 0.6667+0.3967j]])
----------Measure----------
Probability:  tensor([[0.3981, 0.6019]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5226-0.7680j, 0.3664+0.0525j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5226-0.7680j, 0.3664+0.0525j]])
New state:  tensor([[0.4024-0.8373j, 0.3545+0.1065j]])
----------Measure----------
Probability:  tensor([[0.8630, 0.1370]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5805-0.6287j, 0.5055+0.1100j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5805-0.6287j, 0.5055+0.1100j]])
New state:  tensor([[0.4804-0.7082j, 0.4835+0.1841j]])
----------Measure----------
Probability:  tensor([[0.7323, 0.2677]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
New state:  tensor([[0.5025-0.6819j, 0.4997+0.1814j]])
----------Measure----------
Probability:  tensor([[0.7175, 0.2825]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3823-0.7791j, 0.4327+0.2444j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3823-0.7791j, 0.4327+0.2444j]])
New state:  tensor([[0.2620-0.8273j, 0.3915+0.3061j]])
----------Measure----------
Probability:  tensor([[0.7531, 0.2469]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5567-0.6230j, 0.5317+0.1389j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5567-0.6230j, 0.5317+0.1389j]])
New state:  tensor([[0.4577-0.6990j, 0.5051+0.2165j]])
----------Measure----------
Probability:  tensor([[0.6980, 0.3020]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2744-0.7035j, 0.5080+0.4144j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.2744-0.7035j, 0.5080+0.4144j]])
New state:  tensor([[0.1666-0.7365j, 0.4406+0.4854j]])
----------Measure----------
Probability:  tensor([[0.5702, 0.4298]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3214-0.4069j, 0.7984+0.3061j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3214-0.4069j, 0.7984+0.3061j]])
New state:  tensor([[0.2572-0.4502j, 0.7439+0.4216j]])
----------Measure----------
Probability:  tensor([[0.2689, 0.7311]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.3987-0.4690j, 0.7381+0.2763j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3987-0.4690j, 0.7381+0.2763j]])
New state:  tensor([[0.3244-0.5232j, 0.6887+0.3831j]])
----------Measure----------
Probability:  tensor([[0.3789, 0.6211]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
New state:  tensor([[0.5025-0.6819j, 0.4997+0.1814j]])
----------Measure----------
Probability:  tensor([[0.7175, 0.2825]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4617-0.7198j, 0.4809+0.1935j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4617-0.7198j, 0.4809+0.1935j]])
New state:  tensor([[0.3493-0.7805j, 0.4467+0.2630j]])
----------Measure----------
Probability:  tensor([[0.7313, 0.2687]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4414-0.7112j, 0.4996+0.2231j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4414-0.7112j, 0.4996+0.2231j]])
New state:  tensor([[0.3306-0.7690j, 0.4608+0.2950j]])
----------Measure----------
Probability:  tensor([[0.7006, 0.2994]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2828-0.4220j, 0.7898+0.3438j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.2828-0.4220j, 0.7898+0.3438j]])
New state:  tensor([[0.2168-0.4594j, 0.7297+0.4576j]])
----------Measure----------
Probability:  tensor([[0.2581, 0.7419]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4594-0.6871j, 0.5200+0.2156j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4594-0.6871j, 0.5200+0.2156j]])
New state:  tensor([[0.3520-0.7478j, 0.4821+0.2906j]])
----------Measure----------
Probability:  tensor([[0.6831, 0.3169]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1584-0.8123j, 0.2933+0.4785j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.1584-0.8123j, 0.2933+0.4785j]])
New state:  tensor([[0.0357-0.8269j, 0.2187+0.5169j]])
----------Measure----------
Probability:  tensor([[0.6850, 0.3150]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2320-0.8096j, 0.3624+0.3992j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.2320-0.8096j, 0.3624+0.3992j]])
New state:  tensor([[0.1089-0.8351j, 0.2989+0.4488j]])
----------Measure----------
Probability:  tensor([[0.7093, 0.2907]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4755-0.4228j, 0.7427+0.2085j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4755-0.4228j, 0.7427+0.2085j]])
New state:  tensor([[0.4073-0.4889j, 0.7034+0.3168j]])
----------Measure----------
Probability:  tensor([[0.4049, 0.5951]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4805-0.6954j, 0.5006+0.1870j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4805-0.6954j, 0.5006+0.1870j]])
New state:  tensor([[0.3716-0.7592j, 0.4671+0.2594j]])
----------Measure----------
Probability:  tensor([[0.7145, 0.2855]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4977-0.3452j, 0.7773+0.1702j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4977-0.3452j, 0.7773+0.1702j]])
New state:  tensor([[0.4407-0.4155j, 0.7433+0.2841j]])
----------Measure----------
Probability:  tensor([[0.3668, 0.6332]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0541-0.3493j, 0.7916+0.4983j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.0541-0.3493j, 0.7916+0.4983j]])
New state:  tensor([[0.0015-0.3535j, 0.7086+0.6107j]])
----------Measure----------
Probability:  tensor([[0.1250, 0.8750]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3958-0.6573j, 0.5700+0.2941j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3958-0.6573j, 0.5700+0.2941j]])
New state:  tensor([[0.2935-0.7089j, 0.5198+0.3757j]])
----------Measure----------
Probability:  tensor([[0.5887, 0.4113]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3044-0.5476j, 0.6804+0.3802j]])
Inside  rz
rz_matrix theta:  tensor([[0.2990+0.j]])
rz_matrix:  tensor([[0.9888-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9888+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3044-0.5476j, 0.6804+0.3802j]])
New state:  tensor([[0.2194-0.5868j, 0.6162+0.4773j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
valid set accuracy: 1.0
valid set loss: 0.36420854926109314
------------------------------Epoch98------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4581-0.3786j, 0.7778+0.2045j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4581-0.3786j, 0.7778+0.2045j]])
New state:  tensor([[0.3967-0.4426j, 0.7386+0.3181j]])
----------Measure----------
Probability:  tensor([[0.3532, 0.6468]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4414-0.7112j, 0.4996+0.2231j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4414-0.7112j, 0.4996+0.2231j]])
New state:  tensor([[0.3306-0.7690j, 0.4608+0.2950j]])
----------Measure----------
Probability:  tensor([[0.7006, 0.2994]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3823-0.7791j, 0.4327+0.2444j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3823-0.7791j, 0.4327+0.2444j]])
New state:  tensor([[0.2620-0.8273j, 0.3915+0.3061j]])
----------Measure----------
Probability:  tensor([[0.7531, 0.2469]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0541-0.3493j, 0.7916+0.4983j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.0541-0.3493j, 0.7916+0.4983j]])
New state:  tensor([[0.0015-0.3535j, 0.7086+0.6106j]])
----------Measure----------
Probability:  tensor([[0.1250, 0.8750]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5805-0.6287j, 0.5055+0.1100j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5805-0.6287j, 0.5055+0.1100j]])
New state:  tensor([[0.4805-0.7082j, 0.4835+0.1841j]])
----------Measure----------
Probability:  tensor([[0.7323, 0.2677]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4977-0.3452j, 0.7773+0.1702j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4977-0.3452j, 0.7773+0.1702j]])
New state:  tensor([[0.4407-0.4155j, 0.7433+0.2841j]])
----------Measure----------
Probability:  tensor([[0.3668, 0.6332]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6661-0.6646j, 0.3344-0.0519j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.6661-0.6646j, 0.3344-0.0519j]])
New state:  tensor([[0.5597-0.7564j, 0.3384-0.0015j]])
----------Measure----------
Probability:  tensor([[0.8855, 0.1145]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2744-0.7035j, 0.5080+0.4144j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.2744-0.7035j, 0.5080+0.4144j]])
New state:  tensor([[0.1666-0.7365j, 0.4406+0.4854j]])
----------Measure----------
Probability:  tensor([[0.5702, 0.4298]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3471-0.7243j, 0.4999+0.3240j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3471-0.7243j, 0.4999+0.3240j]])
New state:  tensor([[0.2354-0.7679j, 0.4461+0.3949j]])
----------Measure----------
Probability:  tensor([[0.6451, 0.3549]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
New state:  tensor([[0.5025-0.6819j, 0.4997+0.1813j]])
----------Measure----------
Probability:  tensor([[0.7174, 0.2826]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.3987-0.4690j, 0.7381+0.2763j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3987-0.4690j, 0.7381+0.2763j]])
New state:  tensor([[0.3244-0.5231j, 0.6887+0.3831j]])
----------Measure----------
Probability:  tensor([[0.3789, 0.6211]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4594-0.6871j, 0.5200+0.2155j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4594-0.6871j, 0.5200+0.2155j]])
New state:  tensor([[0.3520-0.7478j, 0.4821+0.2906j]])
----------Measure----------
Probability:  tensor([[0.6831, 0.3169]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
New state:  tensor([[0.5025-0.6819j, 0.4997+0.1813j]])
----------Measure----------
Probability:  tensor([[0.7174, 0.2826]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1584-0.8124j, 0.2933+0.4785j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.1584-0.8124j, 0.2933+0.4785j]])
New state:  tensor([[0.0357-0.8269j, 0.2188+0.5168j]])
----------Measure----------
Probability:  tensor([[0.6850, 0.3150]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3214-0.4069j, 0.7984+0.3061j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3214-0.4069j, 0.7984+0.3061j]])
New state:  tensor([[0.2572-0.4502j, 0.7439+0.4216j]])
----------Measure----------
Probability:  tensor([[0.2689, 0.7311]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3881-0.4975j, 0.7184+0.2930j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3881-0.4975j, 0.7184+0.2930j]])
New state:  tensor([[0.3097-0.5497j, 0.6667+0.3967j]])
----------Measure----------
Probability:  tensor([[0.3981, 0.6019]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5567-0.6230j, 0.5317+0.1388j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5567-0.6230j, 0.5317+0.1388j]])
New state:  tensor([[0.4577-0.6989j, 0.5051+0.2165j]])
----------Measure----------
Probability:  tensor([[0.6980, 0.3020]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3044-0.5476j, 0.6804+0.3802j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3044-0.5476j, 0.6804+0.3802j]])
New state:  tensor([[0.2195-0.5868j, 0.6162+0.4773j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4027-0.5355j, 0.6837+0.2892j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4027-0.5355j, 0.6837+0.2892j]])
New state:  tensor([[0.3185-0.5894j, 0.6330+0.3878j]])
----------Measure----------
Probability:  tensor([[0.4489, 0.5511]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5226-0.7680j, 0.3664+0.0525j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5226-0.7680j, 0.3664+0.0525j]])
New state:  tensor([[0.4025-0.8373j, 0.3545+0.1065j]])
----------Measure----------
Probability:  tensor([[0.8630, 0.1370]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5084-0.2990j, 0.7940+0.1474j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5084-0.2990j, 0.7940+0.1474j]])
New state:  tensor([[0.4582-0.3713j, 0.7632+0.2640j]])
----------Measure----------
Probability:  tensor([[0.3478, 0.6522]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4420-0.7434j, 0.4605+0.1999j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4420-0.7434j, 0.4605+0.1999j]])
New state:  tensor([[0.3264-0.8009j, 0.4256+0.2662j]])
----------Measure----------
Probability:  tensor([[0.7480, 0.2520]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4805-0.6954j, 0.5006+0.1870j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4805-0.6954j, 0.5006+0.1870j]])
New state:  tensor([[0.3716-0.7592j, 0.4672+0.2594j]])
----------Measure----------
Probability:  tensor([[0.7145, 0.2855]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2320-0.8096j, 0.3624+0.3992j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.2320-0.8096j, 0.3624+0.3992j]])
New state:  tensor([[0.1089-0.8351j, 0.2989+0.4487j]])
----------Measure----------
Probability:  tensor([[0.7093, 0.2907]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3958-0.6573j, 0.5700+0.2941j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3958-0.6573j, 0.5700+0.2941j]])
New state:  tensor([[0.2935-0.7089j, 0.5198+0.3756j]])
----------Measure----------
Probability:  tensor([[0.5887, 0.4113]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2828-0.4220j, 0.7898+0.3438j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.2828-0.4220j, 0.7898+0.3438j]])
New state:  tensor([[0.2168-0.4594j, 0.7298+0.4576j]])
----------Measure----------
Probability:  tensor([[0.2581, 0.7419]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0034-0.2832j, 0.8389+0.4648j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.0034-0.2832j, 0.8389+0.4648j]])
New state:  tensor([[-0.0388-0.2806j,  0.7603+0.5846j]])
----------Measure----------
Probability:  tensor([[0.0802, 0.9198]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4755-0.4228j, 0.7427+0.2085j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4755-0.4228j, 0.7427+0.2085j]])
New state:  tensor([[0.4073-0.4889j, 0.7034+0.3168j]])
----------Measure----------
Probability:  tensor([[0.4049, 0.5951]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4617-0.7198j, 0.4809+0.1935j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4617-0.7198j, 0.4809+0.1935j]])
New state:  tensor([[0.3494-0.7805j, 0.4468+0.2630j]])
----------Measure----------
Probability:  tensor([[0.7313, 0.2687]])
valid set accuracy: 1.0
valid set loss: 0.3642081916332245
------------------------------Epoch99------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4414-0.7112j, 0.4996+0.2231j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4414-0.7112j, 0.4996+0.2231j]])
New state:  tensor([[0.3306-0.7690j, 0.4608+0.2950j]])
----------Measure----------
Probability:  tensor([[0.7006, 0.2994]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
New state:  tensor([[0.5025-0.6819j, 0.4997+0.1813j]])
----------Measure----------
Probability:  tensor([[0.7174, 0.2826]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5226-0.7680j, 0.3664+0.0525j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5226-0.7680j, 0.3664+0.0525j]])
New state:  tensor([[0.4025-0.8373j, 0.3545+0.1065j]])
----------Measure----------
Probability:  tensor([[0.8630, 0.1370]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4594-0.6871j, 0.5200+0.2155j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4594-0.6871j, 0.5200+0.2155j]])
New state:  tensor([[0.3520-0.7478j, 0.4821+0.2906j]])
----------Measure----------
Probability:  tensor([[0.6831, 0.3169]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5084-0.2990j, 0.7940+0.1474j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5084-0.2990j, 0.7940+0.1474j]])
New state:  tensor([[0.4582-0.3713j, 0.7632+0.2640j]])
----------Measure----------
Probability:  tensor([[0.3478, 0.6522]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3214-0.4069j, 0.7984+0.3061j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3214-0.4069j, 0.7984+0.3061j]])
New state:  tensor([[0.2572-0.4502j, 0.7439+0.4215j]])
----------Measure----------
Probability:  tensor([[0.2689, 0.7311]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2744-0.7035j, 0.5080+0.4144j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.2744-0.7035j, 0.5080+0.4144j]])
New state:  tensor([[0.1666-0.7365j, 0.4406+0.4854j]])
----------Measure----------
Probability:  tensor([[0.5702, 0.4298]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2828-0.4220j, 0.7898+0.3438j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.2828-0.4220j, 0.7898+0.3438j]])
New state:  tensor([[0.2168-0.4594j, 0.7298+0.4576j]])
----------Measure----------
Probability:  tensor([[0.2581, 0.7419]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3958-0.6573j, 0.5700+0.2941j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3958-0.6573j, 0.5700+0.2941j]])
New state:  tensor([[0.2935-0.7089j, 0.5198+0.3756j]])
----------Measure----------
Probability:  tensor([[0.5887, 0.4113]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0034-0.2832j, 0.8389+0.4648j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.0034-0.2832j, 0.8389+0.4648j]])
New state:  tensor([[-0.0388-0.2806j,  0.7603+0.5845j]])
----------Measure----------
Probability:  tensor([[0.0802, 0.9198]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5805-0.6287j, 0.5055+0.1100j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5805-0.6287j, 0.5055+0.1100j]])
New state:  tensor([[0.4805-0.7081j, 0.4835+0.1841j]])
----------Measure----------
Probability:  tensor([[0.7323, 0.2677]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6661-0.6646j, 0.3344-0.0519j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.6661-0.6646j, 0.3344-0.0519j]])
New state:  tensor([[0.5598-0.7564j, 0.3384-0.0015j]])
----------Measure----------
Probability:  tensor([[0.8855, 0.1145]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1584-0.8124j, 0.2933+0.4785j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.1584-0.8124j, 0.2933+0.4785j]])
New state:  tensor([[0.0357-0.8269j, 0.2188+0.5168j]])
----------Measure----------
Probability:  tensor([[0.6850, 0.3150]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4617-0.7198j, 0.4809+0.1935j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4617-0.7198j, 0.4809+0.1935j]])
New state:  tensor([[0.3494-0.7805j, 0.4468+0.2630j]])
----------Measure----------
Probability:  tensor([[0.7313, 0.2687]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4976-0.3452j, 0.7773+0.1702j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4976-0.3452j, 0.7773+0.1702j]])
New state:  tensor([[0.4407-0.4155j, 0.7433+0.2841j]])
----------Measure----------
Probability:  tensor([[0.3668, 0.6332]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4027-0.5355j, 0.6837+0.2892j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4027-0.5355j, 0.6837+0.2892j]])
New state:  tensor([[0.3185-0.5894j, 0.6330+0.3878j]])
----------Measure----------
Probability:  tensor([[0.4489, 0.5511]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3471-0.7243j, 0.4999+0.3240j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3471-0.7243j, 0.4999+0.3240j]])
New state:  tensor([[0.2354-0.7679j, 0.4461+0.3949j]])
----------Measure----------
Probability:  tensor([[0.6451, 0.3549]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2320-0.8096j, 0.3624+0.3992j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.2320-0.8096j, 0.3624+0.3992j]])
New state:  tensor([[0.1089-0.8351j, 0.2989+0.4487j]])
----------Measure----------
Probability:  tensor([[0.7093, 0.2907]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.3987-0.4690j, 0.7381+0.2763j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3987-0.4690j, 0.7381+0.2763j]])
New state:  tensor([[0.3244-0.5231j, 0.6887+0.3831j]])
----------Measure----------
Probability:  tensor([[0.3789, 0.6211]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
New state:  tensor([[0.5025-0.6819j, 0.4997+0.1813j]])
----------Measure----------
Probability:  tensor([[0.7174, 0.2826]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0541-0.3494j, 0.7916+0.4983j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.0541-0.3494j, 0.7916+0.4983j]])
New state:  tensor([[0.0015-0.3535j, 0.7086+0.6106j]])
----------Measure----------
Probability:  tensor([[0.1250, 0.8750]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3823-0.7791j, 0.4327+0.2444j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3823-0.7791j, 0.4327+0.2444j]])
New state:  tensor([[0.2620-0.8273j, 0.3915+0.3061j]])
----------Measure----------
Probability:  tensor([[0.7531, 0.2469]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5567-0.6230j, 0.5317+0.1388j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5567-0.6230j, 0.5317+0.1388j]])
New state:  tensor([[0.4577-0.6989j, 0.5051+0.2165j]])
----------Measure----------
Probability:  tensor([[0.6980, 0.3020]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4581-0.3786j, 0.7778+0.2045j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4581-0.3786j, 0.7778+0.2045j]])
New state:  tensor([[0.3967-0.4426j, 0.7387+0.3180j]])
----------Measure----------
Probability:  tensor([[0.3532, 0.6468]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4805-0.6954j, 0.5006+0.1869j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4805-0.6954j, 0.5006+0.1869j]])
New state:  tensor([[0.3716-0.7592j, 0.4672+0.2594j]])
----------Measure----------
Probability:  tensor([[0.7145, 0.2855]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4420-0.7434j, 0.4605+0.1999j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4420-0.7434j, 0.4605+0.1999j]])
New state:  tensor([[0.3264-0.8009j, 0.4256+0.2662j]])
----------Measure----------
Probability:  tensor([[0.7480, 0.2520]])
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4755-0.4228j, 0.7427+0.2085j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4755-0.4228j, 0.7427+0.2085j]])
New state:  tensor([[0.4073-0.4889j, 0.7034+0.3167j]])
----------Measure----------
Probability:  tensor([[0.4049, 0.5951]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3881-0.4975j, 0.7184+0.2930j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3881-0.4975j, 0.7184+0.2930j]])
New state:  tensor([[0.3097-0.5497j, 0.6668+0.3967j]])
----------Measure----------
Probability:  tensor([[0.3981, 0.6019]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3044-0.5476j, 0.6804+0.3802j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3044-0.5476j, 0.6804+0.3802j]])
New state:  tensor([[0.2195-0.5868j, 0.6162+0.4773j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
valid set accuracy: 1.0
valid set loss: 0.36420780420303345
------------------------------Epoch100------------------------------
--------------------Train--------------------
--------------------Validation--------------------
----------
valid input:  tensor([[1.4595, 0.9818]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6573-0.3514j, 0.5879+0.3143j]])
New state:  tensor([[0.4755-0.4228j, 0.7427+0.2085j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4755-0.4228j, 0.7427+0.2085j]])
New state:  tensor([[0.4073-0.4889j, 0.7034+0.3167j]])
----------Measure----------
Probability:  tensor([[0.4049, 0.5951]])
----------
valid input:  tensor([[1.6078, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.3777j, 0.6041+0.3920j]])
New state:  tensor([[0.3987-0.4690j, 0.7381+0.2763j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3987-0.4690j, 0.7381+0.2763j]])
New state:  tensor([[0.3244-0.5231j, 0.6887+0.3831j]])
----------Measure----------
Probability:  tensor([[0.3789, 0.6211]])
----------
valid input:  tensor([[2.4619, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2645-0.2029j, 0.7481+0.5738j]])
New state:  tensor([[0.0541-0.3494j, 0.7916+0.4983j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.0541-0.3494j, 0.7916+0.4983j]])
New state:  tensor([[0.0015-0.3535j, 0.7086+0.6106j]])
----------Measure----------
Probability:  tensor([[0.1250, 0.8750]])
----------
valid input:  tensor([[0.9818, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6789-0.5629j, 0.3629+0.3009j]])
New state:  tensor([[0.5567-0.6230j, 0.5317+0.1388j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5567-0.6230j, 0.5317+0.1388j]])
New state:  tensor([[0.4577-0.6989j, 0.5051+0.2165j]])
----------Measure----------
Probability:  tensor([[0.6980, 0.3020]])
----------
valid input:  tensor([[1.8331, 1.0685]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5238-0.3099j, 0.6829+0.4040j]])
New state:  tensor([[0.3214-0.4069j, 0.7984+0.3061j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3214-0.4069j, 0.7984+0.3061j]])
New state:  tensor([[0.2572-0.4502j, 0.7439+0.4215j]])
----------Measure----------
Probability:  tensor([[0.2689, 0.7311]])
----------
valid input:  tensor([[0.6797, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6018-0.7258j, 0.2128+0.2566j]])
New state:  tensor([[0.5226-0.7680j, 0.3664+0.0525j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5226-0.7680j, 0.3664+0.0525j]])
New state:  tensor([[0.4025-0.8373j, 0.3545+0.1065j]])
----------Measure----------
Probability:  tensor([[0.8630, 0.1370]])
----------
valid input:  tensor([[1.0685, 1.7571]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5493-0.6625j, 0.3250+0.3920j]])
New state:  tensor([[0.4420-0.7434j, 0.4605+0.1999j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4420-0.7434j, 0.4605+0.1999j]])
New state:  tensor([[0.3264-0.8009j, 0.4256+0.2662j]])
----------Measure----------
Probability:  tensor([[0.7480, 0.2520]])
----------
valid input:  tensor([[0.8897, 1.3845]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6949-0.5762j, 0.3313+0.2747j]])
New state:  tensor([[0.5805-0.6287j, 0.5055+0.1100j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5805-0.6287j, 0.5055+0.1100j]])
New state:  tensor([[0.4805-0.7081j, 0.4835+0.1841j]])
----------Measure----------
Probability:  tensor([[0.7323, 0.2677]])
----------
valid input:  tensor([[1.1512, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5821-0.6041j, 0.3777+0.3920j]])
New state:  tensor([[0.4594-0.6871j, 0.5200+0.2155j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4594-0.6871j, 0.5200+0.2155j]])
New state:  tensor([[0.3520-0.7478j, 0.4821+0.2906j]])
----------Measure----------
Probability:  tensor([[0.6831, 0.3169]])
----------
valid input:  tensor([[1.5338, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5714-0.4382j, 0.5506+0.4223j]])
New state:  tensor([[0.4027-0.5355j, 0.6837+0.2892j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4027-0.5355j, 0.6837+0.2892j]])
New state:  tensor([[0.3185-0.5894j, 0.6330+0.3878j]])
----------Measure----------
Probability:  tensor([[0.4489, 0.5511]])
----------
valid input:  tensor([[1.3845, 1.8331]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4685-0.6108j, 0.3884+0.5065j]])
New state:  tensor([[0.3471-0.7243j, 0.4999+0.3240j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3471-0.7243j, 0.4999+0.3240j]])
New state:  tensor([[0.2354-0.7679j, 0.4461+0.3948j]])
----------Measure----------
Probability:  tensor([[0.6451, 0.3549]])
----------
valid input:  tensor([[1.1512, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5592-0.6253j, 0.3629+0.4057j]])
New state:  tensor([[0.4414-0.7112j, 0.4996+0.2231j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4414-0.7112j, 0.4996+0.2231j]])
New state:  tensor([[0.3306-0.7690j, 0.4608+0.2950j]])
----------Measure----------
Probability:  tensor([[0.7006, 0.2994]])
----------
valid input:  tensor([[1.5338, 0.8897]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6500-0.3099j, 0.6264+0.2986j]])
New state:  tensor([[0.4581-0.3786j, 0.7778+0.2045j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4581-0.3786j, 0.7778+0.2045j]])
New state:  tensor([[0.3967-0.4426j, 0.7387+0.3180j]])
----------Measure----------
Probability:  tensor([[0.3532, 0.6468]])
----------
valid input:  tensor([[1.6078, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4006-0.5666j, 0.4157+0.5879j]])
New state:  tensor([[0.2744-0.7035j, 0.5080+0.4144j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.2744-0.7035j, 0.5080+0.4144j]])
New state:  tensor([[0.1666-0.7365j, 0.4406+0.4854j]])
----------Measure----------
Probability:  tensor([[0.5702, 0.4298]])
----------
valid input:  tensor([[1.4595, 0.7902]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.6879-0.2869j, 0.6153+0.2566j]])
New state:  tensor([[0.4976-0.3452j, 0.7773+0.1702j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4976-0.3452j, 0.7773+0.1702j]])
New state:  tensor([[0.4407-0.4154j, 0.7433+0.2841j]])
----------Measure----------
Probability:  tensor([[0.3668, 0.6332]])
----------
valid input:  tensor([[1.6078, 2.4619]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2313-0.6542j, 0.2400+0.6789j]])
New state:  tensor([[0.1584-0.8124j, 0.2933+0.4785j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.1584-0.8124j, 0.2933+0.4785j]])
New state:  tensor([[0.0357-0.8269j, 0.2188+0.5168j]])
----------Measure----------
Probability:  tensor([[0.6850, 0.3150]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
New state:  tensor([[0.5025-0.6819j, 0.4997+0.1813j]])
----------Measure----------
Probability:  tensor([[0.7174, 0.2826]])
----------
valid input:  tensor([[1.0685, 1.6821]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5738-0.6415j, 0.3395+0.3795j]])
New state:  tensor([[0.4617-0.7198j, 0.4809+0.1935j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4617-0.7198j, 0.4809+0.1935j]])
New state:  tensor([[0.3494-0.7805j, 0.4468+0.2630j]])
----------Measure----------
Probability:  tensor([[0.7313, 0.2687]])
----------
valid input:  tensor([[1.9106, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.3143j, 0.6849+0.4444j]])
New state:  tensor([[0.2828-0.4220j, 0.7898+0.3438j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.2828-0.4220j, 0.7898+0.3438j]])
New state:  tensor([[0.2168-0.4594j, 0.7298+0.4576j]])
----------Measure----------
Probability:  tensor([[0.2581, 0.7419]])
----------
valid input:  tensor([[1.1512, 1.9106]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4843-0.6849j, 0.3143+0.4444j]])
New state:  tensor([[0.3823-0.7791j, 0.4327+0.2444j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3823-0.7791j, 0.4327+0.2444j]])
New state:  tensor([[0.2620-0.8273j, 0.3915+0.3061j]])
----------Measure----------
Probability:  tensor([[0.7531, 0.2469]])
----------
valid input:  tensor([[0.8897, 1.3085]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7163-0.5493j, 0.3415+0.2619j]])
New state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5984-0.5995j, 0.5211+0.1049j]])
New state:  tensor([[0.5025-0.6819j, 0.4997+0.1813j]])
----------Measure----------
Probability:  tensor([[0.7174, 0.2826]])
----------
valid input:  tensor([[1.3845, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5342-0.5543j, 0.4429+0.4596j]])
New state:  tensor([[0.3958-0.6573j, 0.5700+0.2941j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3958-0.6573j, 0.5700+0.2941j]])
New state:  tensor([[0.2935-0.7089j, 0.5198+0.3756j]])
----------Measure----------
Probability:  tensor([[0.5887, 0.4113]])
----------
valid input:  tensor([[1.7571, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.4757-0.4255j, 0.5738+0.5132j]])
New state:  tensor([[0.3044-0.5476j, 0.6804+0.3802j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3044-0.5476j, 0.6804+0.3802j]])
New state:  tensor([[0.2195-0.5868j, 0.6162+0.4773j]])
----------Measure----------
Probability:  tensor([[0.3925, 0.6075]])
----------
valid input:  tensor([[2.5903, 1.1512]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.2283-0.1481j, 0.8072+0.5238j]])
New state:  tensor([[0.0034-0.2832j, 0.8389+0.4648j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.0034-0.2832j, 0.8389+0.4648j]])
New state:  tensor([[-0.0388-0.2806j,  0.7603+0.5845j]])
----------Measure----------
Probability:  tensor([[0.0802, 0.9198]])
----------
valid input:  tensor([[1.4595, 2.2519]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.3208-0.6728j, 0.2869+0.6018j]])
New state:  tensor([[0.2320-0.8096j, 0.3624+0.3992j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.2320-0.8096j, 0.3624+0.3992j]])
New state:  tensor([[0.1089-0.8351j, 0.2989+0.4487j]])
----------Measure----------
Probability:  tensor([[0.7093, 0.2907]])
----------
valid input:  tensor([[1.6078, 1.2310]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5666-0.4006j, 0.5879+0.4157j]])
New state:  tensor([[0.3881-0.4975j, 0.7184+0.2930j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.3881-0.4975j, 0.7184+0.2930j]])
New state:  tensor([[0.3097-0.5497j, 0.6668+0.3967j]])
----------Measure----------
Probability:  tensor([[0.3981, 0.6019]])
----------
valid input:  tensor([[0.3873, 1.4595]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7314-0.6542j, 0.1434+0.1283j]])
New state:  tensor([[0.6661-0.6646j, 0.3344-0.0519j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.6661-0.6646j, 0.3344-0.0519j]])
New state:  tensor([[0.5598-0.7564j, 0.3384-0.0015j]])
----------Measure----------
Probability:  tensor([[0.8855, 0.1145]])
----------
valid input:  tensor([[1.4595, 0.6797]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.7027-0.2485j, 0.6285+0.2222j]])
New state:  tensor([[0.5084-0.2990j, 0.7940+0.1474j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.5084-0.2990j, 0.7940+0.1474j]])
New state:  tensor([[0.4582-0.3713j, 0.7632+0.2640j]])
----------Measure----------
Probability:  tensor([[0.3478, 0.6522]])
----------
valid input:  tensor([[1.0685, 1.6078]], dtype=torch.float64)
valid 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  ry
ry_matrix theta:  tensor([[0.5432+0.j]])
ry_matrix:  tensor([[ 0.9633-0.j, -0.2683-0.j],
        [ 0.2683+0.j,  0.9633-0.j]])
Performing matrix multiplication

Current state:  tensor([[0.5972-0.6197j, 0.3533+0.3666j]])
New state:  tensor([[0.4805-0.6954j, 0.5006+0.1869j]])
Inside  rz
rz_matrix theta:  tensor([[0.2989+0.j]])
rz_matrix:  tensor([[0.9889-0.1489j, 0.0000+0.0000j],
        [0.0000+0.0000j, 0.9889+0.1489j]])
Performing matrix multiplication

Current state:  tensor([[0.4805-0.6954j, 0.5006+0.1869j]])
New state:  tensor([[0.3717-0.7592j, 0.4672+0.2594j]])
----------Measure----------
Probability:  tensor([[0.7145, 0.2855]])
valid set accuracy: 1.0
valid set loss: 0.36420780420303345
--------------------Test--------------------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
test set accuracy: 1.0
test set loss: 0.36420777440071106
