from scipy.stats import kruskal
import pandas as pd
import numpy as np

#if p value less than alpha reject
qiskit_data = np.concatenate((np.full(4925, 'z00'), np.full(5075, 'z11'), np.full(5016, 'x00'), 
                        np.full(4984, 'x11'), np.full(4898, 'y10'), np.full(5102, 'y01')))

print(qiskit_data)

cirq_data = np.concatenate((np.full(5043, 'z00'), np.full(4957, 'z11'), np.full(5041, 'x00'), 
                        np.full(4959, 'x11'), np.full(4971, 'y10'), np.full(5029, 'y01')))

print(cirq_data)

qs_data = np.concatenate((np.full(4981, 'z00'), np.full(5019, 'z11'), np.full(4994, 'x00'), 
                        np.full(5006, 'x11'), np.full(4956, 'y10'), np.full(5044, 'y01')))

print(qs_data)

kruskal(qiskit_data, cirq_data, qs_data)


qiskit_data = np.concatenate((np.full(4957, 'z10'), np.full(5043, 'z01'), np.full(5039, 'x10'), 
                        np.full(4961, 'x01'), np.full(5059, 'y10'), np.full(4941, 'y01')))

print(qiskit_data)

cirq_data = np.concatenate((np.full(4946, 'z10'), np.full(5054, 'z01'), np.full(4926, 'x10'), 
                        np.full(5074, 'x01'), np.full(5078, 'y10'), np.full(4922, 'y01')))

print(cirq_data)

qs_data = np.concatenate((np.full(5012, 'z10'), np.full(4988, 'z01'), np.full(4990, 'x10'), 
                        np.full(5010, 'x01'), np.full(4956, 'y10'), np.full(5044, 'y01')))

print(qs_data)

kruskal(qiskit_data, cirq_data, qs_data)

qiskit_data = np.concatenate((np.full(4958, 'z00'), np.full(5042, 'z11'), np.full(4950, 'x10'), 
                        np.full(5050, 'x01'), np.full(5029, 'y00'), np.full(4971, 'y11')))

print(qiskit_data)

cirq_data = np.concatenate((np.full(5063, 'z00'), np.full(4937, 'z11'), np.full(5001, 'x10'), 
                        np.full(4999, 'x01'), np.full(4921, 'y00'), np.full(5079, 'y11')))

print(cirq_data)

qs_data = np.concatenate((np.full(4993, 'z00'), np.full(5007, 'z11'), np.full(5058, 'x10'), 
                        np.full(4942, 'x01'), np.full(4998, 'y00'), np.full(5002, 'y11')))

print(qs_data)

kruskal(qiskit_data, cirq_data, qs_data)

qiskit_data = np.concatenate((np.full(10000, 'z00'), np.full(2545, 'x00'), np.full(2486, 'x01'), 
                        np.full(2458, 'x10'), np.full(2511, 'x11'), np.full(2479, 'y00'),
                        np.full(2436, 'y01'), np.full(2583, 'y10'), np.full(2502, 'y11')))

print(qiskit_data)

cirq_data = np.concatenate((np.full(10000, 'z00'), np.full(2431, 'x00'), np.full(2506, 'x01'), 
                        np.full(2498, 'x10'), np.full(2565, 'x11'), np.full(2436, 'y00'),
                        np.full(2563, 'y01'), np.full(2538, 'y10'), np.full(2463, 'y11')))

print(cirq_data)

qs_data = np.concatenate((np.full(10000, 'z00'), np.full(2512, 'x00'), np.full(2528, 'x01'), 
                        np.full(2529, 'x10'), np.full(2431, 'x11'), np.full(2560, 'y00'),
                        np.full(2524, 'y01'), np.full(2451, 'y10'), np.full(2465, 'y11')))

print(qs_data)

kruskal(qiskit_data, cirq_data, qs_data)

qiskit_data = np.concatenate((np.full(10000, 'z01'), np.full(2528, 'x00'), np.full(2475, 'x01'), 
                        np.full(2493, 'x10'), np.full(2504, 'x11'), np.full(2502, 'y00'),
                        np.full(2569, 'y01'), np.full(2474, 'y10'), np.full(2455, 'y11')))

print(qiskit_data)

cirq_data = np.concatenate((np.full(10000, 'z01'), np.full(2497, 'x00'), np.full(2525, 'x01'), 
                        np.full(2512, 'x10'), np.full(2466, 'x11'), np.full(2487, 'y00'),
                        np.full(2484, 'y01'), np.full(2507, 'y10'), np.full(2522, 'y11')))

print(cirq_data)

qs_data = np.concatenate((np.full(10000, 'z01'), np.full(2551, 'x00'), np.full(2504, 'x01'), 
                        np.full(2490, 'x10'), np.full(2455, 'x11'), np.full(2528, 'y00'),
                        np.full(2494, 'y01'), np.full(2506, 'y10'), np.full(2472, 'y11')))

print(qs_data)

kruskal(qiskit_data, cirq_data, qs_data)