Esempio n. 1
0
##############################################################################
# Plot individual series for each input circuit size in Super-Kitaev

shapes = ['-', '.', '*', 'o', '+', ':']
L_range = range(0,4)

for L_power in L_range:
	L = 10**L_power
	y = pylab.arange(I_MAX, dtype=float)

	for i in range(I_MAX):
		#print str(2**i)
		# x[i] = 
		n_prime = i
		resources = cphase(n = n_prime+2, L_prime = L)
		#print "n= " + str(n_prime+2)
		#print "resources= " + str(resources)
		#gates = (6*resources['toffoli']) + resources['cnot']
		y[i] = resources['depth'] / L
		#print str(gates/L_prime)
		#print str(resources['ancilla'])
	
	pylab.plot(x,y,'g'+shapes[L_power],label='KSV $L='+str(L)+'$')

##############################################################################
# Plot the baseline plot of Solovay-Kitaev
from skc.utils import *
import math

c_approx = 4*math.sqrt(2)
Esempio n. 2
0
# Test file to compile pi/6 gate with 10^-16 precision requested by Ken Brown
from cphase import *

# 10^-16 = 2^-53
# 10^-6 = 2^-20
# 10^-11 = 2^-37
n_prime = 37 + 2
resources = cphase(n=n_prime, L_prime = (10**11)/200)
print "n= " + str(n_prime)
print "resources= " + str(resources)