from __future__ import division, print_function, absolute_import, unicode_literals
import numpy as np
import pygsti
from pygsti.construction import std1Q_XYI as std
from pygsti.construction import std2Q_XYICNOT as std2Q
from pygsti.extras import circuit
print(list(map(str,std.gs_target.gates.keys())))
print(std.gs_target.gates.keys())
['Gi', 'Gx', 'Gy'] odict_keys([Label('Gi',), Label('Gx',), Label('Gy',)])
print(std.gs_target['Gx'])
Fully Parameterized gate with shape (4, 4) 1.00 0 0 0 0 1.00 0 0 0 0 0-1.00 0 0 1.00 0
std.gs_target.probs(('Gx','Gy'))
OutcomeLabelDict([(('0',), 0.5000000000000001), (('1',), 0.4999999999999999)])
c = pygsti.obj.Circuit(gatestring=('Gx','Gy'), num_lines=1)
print(c.line_items)
print(c.tup)
print(c.str)
print(c)
[[Label('Gx',), Label('Gy',)]] (Label('Gx',), Label('Gy',)) GxGy Qubit 0 ---Gx|-|Gy|-|--
from pygsti.objects import Label as L
gs = pygsti.obj.GateString( (L('Gx',0),L('Gy',1),L('Gcnot',(1,2)) ))
c2 = pygsti.obj.Circuit(gatestring=gs, num_lines=3)
print(c2.line_items)
print(c2.tup)
print(c2.str)
print(c2)
[[Label('Gx', 0), Label('I', 0)], [Label('Gy', 1), Label('Gcnot', 1, 2)], [Label('I', 2), Label('Gcnot', 1, 2)]] (Label('Gx', 0), Label('Gy', 1), Label('Gcnot', 1, 2)) Gx:0Gy:1Gcnot:1:2 Qubit 0 ---|Gx |-| |--- Qubit 1 ---|Gy |-Gcnot:1:2|-|-- Qubit 2 ---| |-Gcnot:1:2|-|--
c3 = pygsti.obj.Circuit(gatestring=[ ('Gx','Q0'), ('Gy','Q1'), ('Gcnot','Q1','Q2') ], line_labels=('Q0','Q1','Q2'))
print(c3.line_items)
print(c3.tup)
print(c3.str)
print(c3)
[[Label('Gx', 'Q0'), Label('I', 'Q0')], [Label('Gy', 'Q1'), Label('Gcnot', 'Q1', 'Q2')], [Label('I', 'Q2'), Label('Gcnot', 'Q1', 'Q2')]] (Label('Gx', 'Q0'), Label('Gy', 'Q1'), Label('Gcnot', 'Q1', 'Q2')) Gx:Q0Gy:Q1Gcnot:Q1:Q2 Qubit 0 ---|Gx |-| |--- Qubit 1 ---|Gy |-Gcnot:Q1:Q2|-|-- Qubit 2 ---| |-Gcnot:Q1:Q2|-|--
#Test initializing an empty circuit & debug circuit -> tuple lazy eval
c0 = pygsti.obj.Circuit(num_lines=3)
c1 = pygsti.obj.Circuit(gatestring=( ('Gx',0), ('Gcnot',0,1)), num_lines=3)
print("HERE1")
print(c1[0])
c1.insert_layer([pygsti.obj.Label('Gy',1)],0)
print("HERE2")
print(c1[0])
HERE1 Gx:0 HERE2 Gy:1
gs1 = std.gs_target.copy()
print(gs1.probs(c))
print(c.simulate(gs1))
OutcomeLabelDict([(('0',), 0.5000000000000001), (('1',), 0.4999999999999999)]) OutcomeLabelDict([(('0',), 0.5000000000000001), (('1',), 0.4999999999999999)])
from pygsti.objects.gatemapcalc import GateMapCalc
nQubits = 3
basis1Q = pygsti.obj.Basis("pp",2)
v0 = pygsti.construction.basis_build_vector("0", basis1Q)
v1 = pygsti.construction.basis_build_vector("1", basis1Q)
gs3 = pygsti.obj.GateSet()
gs3.stateSpaceLabels = ('Q0','Q1','Q2')
gs3.preps['rho0'] = pygsti.obj.TensorProdSPAMVec('prep',
[pygsti.obj.TPParameterizedSPAMVec(v0) for i in range(nQubits)] )
gs3.povms['Mdefault'] = pygsti.obj.TensorProdPOVM(
[ pygsti.obj.TPPOVM([('0',v0),('1',v1)] ) for i in range(nQubits) ] )
Gx = std.gs_target['Gx'].copy()
Gy = std.gs_target['Gy'].copy()
for i in range(nQubits):
gs3[('Gx','Q%d' % i)] = Gx
gs3[('Gy','Q%d' % i)] = Gy
Gcnot = std2Q.gs_target['Gcnot'].copy()
gs3[('Gcnot','Q0','Q1')] = Gcnot
gs3[('Gcnot','Q1','Q2')] = Gcnot
gs3._calcClass = GateMapCalc
print(gs3.probs(c3))
print(c3.simulate(gs3))
OutcomeLabelDict([(('000',), 0.2500000000000003), (('001',), 0.2500000000000003), (('010',), 0.0), (('011',), 0.0), (('100',), 0.2500000000000002), (('101',), 0.2500000000000002), (('110',), 0.0), (('111',), 0.0)]) OutcomeLabelDict([(('000',), 0.2500000000000003), (('001',), 0.2500000000000003), (('010',), 0.0), (('011',), 0.0), (('100',), 0.2500000000000002), (('101',), 0.2500000000000002), (('110',), 0.0), (('111',), 0.0)])
from pygsti.objects.gatemapcalc import GateMapCalc
from pygsti.objects.labeldicts import StateSpaceLabels
nQubits = 3
basis1Q = pygsti.obj.Basis("pp",2)
v0 = pygsti.construction.basis_build_vector("0", basis1Q)
v1 = pygsti.construction.basis_build_vector("1", basis1Q)
gs2 = pygsti.obj.GateSet()
gs2.stateSpaceLabels = (0,1,2)
gs2.preps['rho0'] = pygsti.obj.TensorProdSPAMVec('prep',
[pygsti.obj.TPParameterizedSPAMVec(v0) for i in range(nQubits)] )
gs2.povms['Mdefault'] = pygsti.obj.TensorProdPOVM(
[ pygsti.obj.TPPOVM([('0',v0),('1',v1)] ) for i in range(nQubits) ] )
Gx = std.gs_target['Gx'].copy()
Gy = std.gs_target['Gy'].copy()
for i in range(nQubits):
gs2[('Gx',i)] = Gx
gs2[('Gy',i)] = Gy
Gcnot = std2Q.gs_target['Gcnot'].copy()
gs2[('Gcnot',0,1)] = Gcnot
gs2[('Gcnot',1,2)] = Gcnot
gs2._calcClass = GateMapCalc
print(gs2.probs(c2))
print(c2.simulate(gs2))
OutcomeLabelDict([(('000',), 0.2500000000000003), (('001',), 0.2500000000000003), (('010',), 0.0), (('011',), 0.0), (('100',), 0.2500000000000002), (('101',), 0.2500000000000002), (('110',), 0.0), (('111',), 0.0)]) OutcomeLabelDict([(('000',), 0.2500000000000003), (('001',), 0.2500000000000003), (('010',), 0.0), (('011',), 0.0), (('100',), 0.2500000000000002), (('101',), 0.2500000000000002), (('110',), 0.0), (('111',), 0.0)])
#Unitary gateset in pygsti
import scipy.linalg as spl
from pygsti.objects.gatematrixcalc import UnitaryGateMatrixCalc
from pygsti.objects.gatemapcalc import UnitaryGateMapCalc
X = np.array([[0.,1.],[1.,0.]])
Ut = np.array([[1.,0.],[0.,np.exp(np.pi*1j/4)]])
Ux = 1j*spl.expm( -1j* np.pi/4 * X) # pi/2
#Ux = np.array([[0.,1.],[1.,0.]]) # pi
v0 = np.array([[1],[0]],'d')
v1 = np.array([[0],[1]],'d')
gs = pygsti.obj.GateSet()
#gs._calcClass = UnitaryGateMatrixCalc
gs._calcClass = UnitaryGateMapCalc
gs['Gt'] = pygsti.obj.StaticGate(Ut)
gs['Gx'] = pygsti.obj.StaticGate(Ux)
gs['rho0'] = pygsti.obj.StaticSPAMVec( v0 )
gs['M0'] = pygsti.obj.UnconstrainedPOVM({'0': pygsti.obj.StaticSPAMVec( v0 ), '1': pygsti.obj.StaticSPAMVec( v1 )})
Ux
array([[0. +0.70710678j, 0.70710678+0. j], [0.70710678+0. j, 0. +0.70710678j]])
#print(gs.product(()))
#print()
print(gs.probs(()))
OutcomeLabelDict([(('1',), 0.0), (('0',), 1.0)])
#print(gs.product(('Gx',)))
#print()
print(gs.probs(('Gx',)))
OutcomeLabelDict([(('1',), 0.4999999999999998), (('0',), 0.5000000000000002)])
#print(gs.product(('Gt',)))
#print()
print(gs.probs(('Gt',)))
OutcomeLabelDict([(('1',), 0.0), (('0',), 1.0)])
#print(gs.product(('Gt','Gx')))
#print()
print(gs.probs(('Gt','Gx')))
OutcomeLabelDict([(('1',), 0.4999999999999998), (('0',), 0.5000000000000002)])
#print(gs.product(('Gx','Gx')))
#print()
print(gs.probs(('Gx','Gx')))
OutcomeLabelDict([(('1',), 0.9999999999999998), (('0',), 1.1093356479670479e-31)])
Based off of some of the initial cells in other test notebook.
import pygsti
import numpy as np
# A list of standard hard-coded gate labels
#gllist = ['I', 'H','P','CNOT']
gllist = ['Gi','Gh','Gp','Gcnot','Gt'] # note: must include Gt here in addition to in 'unitaries' below
# A dictionary of unitaries that do not need to be already known to the code
#unitaries={'T' : np.array([[1.,0.],[0.,np.exp(np.pi*1j/4)]])}
unitaries={'Gt' : np.array([[1.,0.],[0.,np.exp(np.pi*1j/4)]])}
# The number of qubits
n = 10
# The availiability of gates that are not available to all qubit / qubit pairs
availability = {}
# Let's make a the CNOT gate be connected in a directed ring.
# a = np.zeros((n,n),int)
# for i in range(0,n-1):
# a[i,i+1] = 1
# a[n-1,0] = 1
a = [(i,i+1) for i in range(0,n-1)] + [(n-1,0)]
#availability={'CNOT':a}
availability={'Gcnot':a}
BGS = pygsti.construction.build_nqubit_standard_gateset(
nQubits=n, gate_names=gllist, nonstd_gate_unitaries=unitaries,
availability=availability, parameterization='static', sim_type="dmmap")
#print(BGS.preps['rho0'])
#print(list(map(str,BGS.gates.keys())))
#print(BGS)
# test circuit simulation
circuit = pygsti.obj.Circuit(gatestring=( ('Gh',1),('Gp',2),('Gcnot',1,2),('Gt',3) ), num_lines=n)
%time print(BGS.probs(circuit))
# ~1 min for 10Q
OutcomeLabelDict([(('0000000000',), 0.5000000000000001), (('0000000001',), 0.5000000000000001), (('0000000010',), 0.5000000000000001), (('0000000011',), 0.5000000000000001), (('0000000100',), 0.5000000000000001), (('0000000101',), 0.5000000000000001), (('0000000110',), 0.5000000000000001), (('0000000111',), 0.5000000000000001), (('0000001000',), 0.5000000000000001), (('0000001001',), 0.5000000000000001), (('0000001010',), 0.5000000000000001), (('0000001011',), 0.5000000000000001), (('0000001100',), 0.5000000000000001), (('0000001101',), 0.5000000000000001), (('0000001110',), 0.5000000000000001), (('0000001111',), 0.5000000000000001), (('0000010000',), 0.5000000000000001), (('0000010001',), 0.5000000000000001), (('0000010010',), 0.5000000000000001), (('0000010011',), 0.5000000000000001), (('0000010100',), 0.5000000000000001), (('0000010101',), 0.5000000000000001), (('0000010110',), 0.5000000000000001), (('0000010111',), 0.5000000000000001), (('0000011000',), 0.5000000000000001), (('0000011001',), 0.5000000000000001), (('0000011010',), 0.5000000000000001), (('0000011011',), 0.5000000000000001), (('0000011100',), 0.5000000000000001), (('0000011101',), 0.5000000000000001), (('0000011110',), 0.5000000000000001), (('0000011111',), 0.5000000000000001), (('0000100000',), 0.5000000000000001), (('0000100001',), 0.5000000000000001), (('0000100010',), 0.5000000000000001), (('0000100011',), 0.5000000000000001), (('0000100100',), 0.5000000000000001), (('0000100101',), 0.5000000000000001), (('0000100110',), 0.5000000000000001), (('0000100111',), 0.5000000000000001), (('0000101000',), 0.5000000000000001), (('0000101001',), 0.5000000000000001), (('0000101010',), 0.5000000000000001), (('0000101011',), 0.5000000000000001), (('0000101100',), 0.5000000000000001), (('0000101101',), 0.5000000000000001), (('0000101110',), 0.5000000000000001), (('0000101111',), 0.5000000000000001), (('0000110000',), 0.5000000000000001), (('0000110001',), 0.5000000000000001), (('0000110010',), 0.5000000000000001), (('0000110011',), 0.5000000000000001), (('0000110100',), 0.5000000000000001), (('0000110101',), 0.5000000000000001), (('0000110110',), 0.5000000000000001), (('0000110111',), 0.5000000000000001), (('0000111000',), 0.5000000000000001), (('0000111001',), 0.5000000000000001), (('0000111010',), 0.5000000000000001), (('0000111011',), 0.5000000000000001), (('0000111100',), 0.5000000000000001), (('0000111101',), 0.5000000000000001), (('0000111110',), 0.5000000000000001), (('0000111111',), 0.5000000000000001), (('0001000000',), 0.5000000000000001), (('0001000001',), 0.5000000000000001), (('0001000010',), 0.5000000000000001), (('0001000011',), 0.5000000000000001), (('0001000100',), 0.5000000000000001), (('0001000101',), 0.5000000000000001), (('0001000110',), 0.5000000000000001), (('0001000111',), 0.5000000000000001), (('0001001000',), 0.5000000000000001), (('0001001001',), 0.5000000000000001), (('0001001010',), 0.5000000000000001), (('0001001011',), 0.5000000000000001), (('0001001100',), 0.5000000000000001), (('0001001101',), 0.5000000000000001), (('0001001110',), 0.5000000000000001), (('0001001111',), 0.5000000000000001), (('0001010000',), 0.5000000000000001), (('0001010001',), 0.5000000000000001), (('0001010010',), 0.5000000000000001), (('0001010011',), 0.5000000000000001), (('0001010100',), 0.5000000000000001), (('0001010101',), 0.5000000000000001), (('0001010110',), 0.5000000000000001), (('0001010111',), 0.5000000000000001), (('0001011000',), 0.5000000000000001), (('0001011001',), 0.5000000000000001), (('0001011010',), 0.5000000000000001), (('0001011011',), 0.5000000000000001), (('0001011100',), 0.5000000000000001), (('0001011101',), 0.5000000000000001), (('0001011110',), 0.5000000000000001), (('0001011111',), 0.5000000000000001), (('0001100000',), 0.5000000000000001), (('0001100001',), 0.5000000000000001), (('0001100010',), 0.5000000000000001), (('0001100011',), 0.5000000000000001), (('0001100100',), 0.5000000000000001), (('0001100101',), 0.5000000000000001), (('0001100110',), 0.5000000000000001), (('0001100111',), 0.5000000000000001), (('0001101000',), 0.5000000000000001), (('0001101001',), 0.5000000000000001), (('0001101010',), 0.5000000000000001), (('0001101011',), 0.5000000000000001), (('0001101100',), 0.5000000000000001), (('0001101101',), 0.5000000000000001), (('0001101110',), 0.5000000000000001), (('0001101111',), 0.5000000000000001), (('0001110000',), 0.5000000000000001), (('0001110001',), 0.5000000000000001), (('0001110010',), 0.5000000000000001), (('0001110011',), 0.5000000000000001), (('0001110100',), 0.5000000000000001), (('0001110101',), 0.5000000000000001), (('0001110110',), 0.5000000000000001), (('0001110111',), 0.5000000000000001), (('0001111000',), 0.5000000000000001), (('0001111001',), 0.5000000000000001), (('0001111010',), 0.5000000000000001), (('0001111011',), 0.5000000000000001), (('0001111100',), 0.5000000000000001), (('0001111101',), 0.5000000000000001), (('0001111110',), 0.5000000000000001), (('0001111111',), 0.5000000000000001), (('0010000000',), 0.5000000000000001), (('0010000001',), 0.5000000000000001), (('0010000010',), 0.5000000000000001), (('0010000011',), 0.5000000000000001), (('0010000100',), 0.5000000000000001), (('0010000101',), 0.5000000000000001), (('0010000110',), 0.5000000000000001), (('0010000111',), 0.5000000000000001), (('0010001000',), 0.5000000000000001), (('0010001001',), 0.5000000000000001), (('0010001010',), 0.5000000000000001), (('0010001011',), 0.5000000000000001), (('0010001100',), 0.5000000000000001), (('0010001101',), 0.5000000000000001), (('0010001110',), 0.5000000000000001), (('0010001111',), 0.5000000000000001), (('0010010000',), 0.5000000000000001), (('0010010001',), 0.5000000000000001), (('0010010010',), 0.5000000000000001), (('0010010011',), 0.5000000000000001), (('0010010100',), 0.5000000000000001), (('0010010101',), 0.5000000000000001), (('0010010110',), 0.5000000000000001), (('0010010111',), 0.5000000000000001), (('0010011000',), 0.5000000000000001), (('0010011001',), 0.5000000000000001), (('0010011010',), 0.5000000000000001), (('0010011011',), 0.5000000000000001), (('0010011100',), 0.5000000000000001), (('0010011101',), 0.5000000000000001), (('0010011110',), 0.5000000000000001), (('0010011111',), 0.5000000000000001), (('0010100000',), 0.5000000000000001), (('0010100001',), 0.5000000000000001), (('0010100010',), 0.5000000000000001), (('0010100011',), 0.5000000000000001), (('0010100100',), 0.5000000000000001), (('0010100101',), 0.5000000000000001), (('0010100110',), 0.5000000000000001), (('0010100111',), 0.5000000000000001), (('0010101000',), 0.5000000000000001), (('0010101001',), 0.5000000000000001), (('0010101010',), 0.5000000000000001), (('0010101011',), 0.5000000000000001), (('0010101100',), 0.5000000000000001), (('0010101101',), 0.5000000000000001), (('0010101110',), 0.5000000000000001), (('0010101111',), 0.5000000000000001), (('0010110000',), 0.5000000000000001), (('0010110001',), 0.5000000000000001), (('0010110010',), 0.5000000000000001), (('0010110011',), 0.5000000000000001), (('0010110100',), 0.5000000000000001), (('0010110101',), 0.5000000000000001), (('0010110110',), 0.5000000000000001), (('0010110111',), 0.5000000000000001), (('0010111000',), 0.5000000000000001), (('0010111001',), 0.5000000000000001), (('0010111010',), 0.5000000000000001), (('0010111011',), 0.5000000000000001), (('0010111100',), 0.5000000000000001), (('0010111101',), 0.5000000000000001), (('0010111110',), 0.5000000000000001), (('0010111111',), 0.5000000000000001), (('0011000000',), 0.5000000000000001), (('0011000001',), 0.5000000000000001), (('0011000010',), 0.5000000000000001), (('0011000011',), 0.5000000000000001), (('0011000100',), 0.5000000000000001), (('0011000101',), 0.5000000000000001), (('0011000110',), 0.5000000000000001), (('0011000111',), 0.5000000000000001), (('0011001000',), 0.5000000000000001), (('0011001001',), 0.5000000000000001), (('0011001010',), 0.5000000000000001), (('0011001011',), 0.5000000000000001), (('0011001100',), 0.5000000000000001), (('0011001101',), 0.5000000000000001), (('0011001110',), 0.5000000000000001), (('0011001111',), 0.5000000000000001), (('0011010000',), 0.5000000000000001), (('0011010001',), 0.5000000000000001), (('0011010010',), 0.5000000000000001), (('0011010011',), 0.5000000000000001), (('0011010100',), 0.5000000000000001), (('0011010101',), 0.5000000000000001), (('0011010110',), 0.5000000000000001), (('0011010111',), 0.5000000000000001), (('0011011000',), 0.5000000000000001), (('0011011001',), 0.5000000000000001), (('0011011010',), 0.5000000000000001), (('0011011011',), 0.5000000000000001), (('0011011100',), 0.5000000000000001), (('0011011101',), 0.5000000000000001), (('0011011110',), 0.5000000000000001), (('0011011111',), 0.5000000000000001), (('0011100000',), 0.5000000000000001), (('0011100001',), 0.5000000000000001), (('0011100010',), 0.5000000000000001), (('0011100011',), 0.5000000000000001), (('0011100100',), 0.5000000000000001), (('0011100101',), 0.5000000000000001), (('0011100110',), 0.5000000000000001), (('0011100111',), 0.5000000000000001), (('0011101000',), 0.5000000000000001), (('0011101001',), 0.5000000000000001), (('0011101010',), 0.5000000000000001), (('0011101011',), 0.5000000000000001), (('0011101100',), 0.5000000000000001), (('0011101101',), 0.5000000000000001), (('0011101110',), 0.5000000000000001), (('0011101111',), 0.5000000000000001), (('0011110000',), 0.5000000000000001), (('0011110001',), 0.5000000000000001), (('0011110010',), 0.5000000000000001), (('0011110011',), 0.5000000000000001), (('0011110100',), 0.5000000000000001), (('0011110101',), 0.5000000000000001), (('0011110110',), 0.5000000000000001), (('0011110111',), 0.5000000000000001), (('0011111000',), 0.5000000000000001), (('0011111001',), 0.5000000000000001), (('0011111010',), 0.5000000000000001), (('0011111011',), 0.5000000000000001), (('0011111100',), 0.5000000000000001), (('0011111101',), 0.5000000000000001), (('0011111110',), 0.5000000000000001), (('0011111111',), 0.5000000000000001), (('0100000000',), -2.42861286636753e-17), (('0100000001',), -2.42861286636753e-17), (('0100000010',), -2.42861286636753e-17), (('0100000011',), -2.42861286636753e-17), (('0100000100',), -2.42861286636753e-17), (('0100000101',), -2.42861286636753e-17), (('0100000110',), -2.42861286636753e-17), (('0100000111',), -2.42861286636753e-17), (('0100001000',), -2.42861286636753e-17), (('0100001001',), -2.42861286636753e-17), (('0100001010',), -2.42861286636753e-17), (('0100001011',), -2.42861286636753e-17), (('0100001100',), -2.42861286636753e-17), (('0100001101',), -2.42861286636753e-17), (('0100001110',), -2.42861286636753e-17), (('0100001111',), -2.42861286636753e-17), (('0100010000',), -2.42861286636753e-17), (('0100010001',), -2.42861286636753e-17), (('0100010010',), -2.42861286636753e-17), (('0100010011',), -2.42861286636753e-17), (('0100010100',), -2.42861286636753e-17), (('0100010101',), -2.42861286636753e-17), (('0100010110',), -2.42861286636753e-17), (('0100010111',), -2.42861286636753e-17), (('0100011000',), -2.42861286636753e-17), (('0100011001',), -2.42861286636753e-17), (('0100011010',), -2.42861286636753e-17), (('0100011011',), -2.42861286636753e-17), (('0100011100',), -2.42861286636753e-17), (('0100011101',), -2.42861286636753e-17), (('0100011110',), -2.42861286636753e-17), (('0100011111',), -2.42861286636753e-17), (('0100100000',), -2.42861286636753e-17), (('0100100001',), -2.42861286636753e-17), (('0100100010',), -2.42861286636753e-17), (('0100100011',), -2.42861286636753e-17), (('0100100100',), -2.42861286636753e-17), (('0100100101',), -2.42861286636753e-17), (('0100100110',), -2.42861286636753e-17), (('0100100111',), -2.42861286636753e-17), (('0100101000',), -2.42861286636753e-17), (('0100101001',), -2.42861286636753e-17), (('0100101010',), -2.42861286636753e-17), (('0100101011',), -2.42861286636753e-17), (('0100101100',), -2.42861286636753e-17), (('0100101101',), -2.42861286636753e-17), (('0100101110',), -2.42861286636753e-17), (('0100101111',), -2.42861286636753e-17), (('0100110000',), -2.42861286636753e-17), (('0100110001',), -2.42861286636753e-17), (('0100110010',), -2.42861286636753e-17), (('0100110011',), -2.42861286636753e-17), (('0100110100',), -2.42861286636753e-17), (('0100110101',), -2.42861286636753e-17), (('0100110110',), -2.42861286636753e-17), (('0100110111',), -2.42861286636753e-17), (('0100111000',), -2.42861286636753e-17), (('0100111001',), -2.42861286636753e-17), (('0100111010',), -2.42861286636753e-17), (('0100111011',), -2.42861286636753e-17), (('0100111100',), -2.42861286636753e-17), (('0100111101',), -2.42861286636753e-17), (('0100111110',), -2.42861286636753e-17), (('0100111111',), -2.42861286636753e-17), (('0101000000',), -2.42861286636753e-17), (('0101000001',), -2.42861286636753e-17), (('0101000010',), -2.42861286636753e-17), (('0101000011',), -2.42861286636753e-17), (('0101000100',), -2.42861286636753e-17), (('0101000101',), -2.42861286636753e-17), (('0101000110',), -2.42861286636753e-17), (('0101000111',), -2.42861286636753e-17), (('0101001000',), -2.42861286636753e-17), (('0101001001',), -2.42861286636753e-17), (('0101001010',), -2.42861286636753e-17), (('0101001011',), -2.42861286636753e-17), (('0101001100',), -2.42861286636753e-17), (('0101001101',), -2.42861286636753e-17), (('0101001110',), -2.42861286636753e-17), (('0101001111',), -2.42861286636753e-17), (('0101010000',), -2.42861286636753e-17), (('0101010001',), -2.42861286636753e-17), (('0101010010',), -2.42861286636753e-17), (('0101010011',), -2.42861286636753e-17), (('0101010100',), -2.42861286636753e-17), (('0101010101',), -2.42861286636753e-17), (('0101010110',), -2.42861286636753e-17), (('0101010111',), -2.42861286636753e-17), (('0101011000',), -2.42861286636753e-17), (('0101011001',), -2.42861286636753e-17), (('0101011010',), -2.42861286636753e-17), (('0101011011',), -2.42861286636753e-17), (('0101011100',), -2.42861286636753e-17), (('0101011101',), -2.42861286636753e-17), (('0101011110',), -2.42861286636753e-17), (('0101011111',), -2.42861286636753e-17), (('0101100000',), -2.42861286636753e-17), (('0101100001',), -2.42861286636753e-17), (('0101100010',), -2.42861286636753e-17), (('0101100011',), -2.42861286636753e-17), (('0101100100',), -2.42861286636753e-17), (('0101100101',), -2.42861286636753e-17), (('0101100110',), -2.42861286636753e-17), (('0101100111',), -2.42861286636753e-17), (('0101101000',), -2.42861286636753e-17), (('0101101001',), -2.42861286636753e-17), (('0101101010',), -2.42861286636753e-17), (('0101101011',), -2.42861286636753e-17), (('0101101100',), -2.42861286636753e-17), (('0101101101',), -2.42861286636753e-17), (('0101101110',), -2.42861286636753e-17), (('0101101111',), -2.42861286636753e-17), (('0101110000',), -2.42861286636753e-17), (('0101110001',), -2.42861286636753e-17), (('0101110010',), -2.42861286636753e-17), (('0101110011',), -2.42861286636753e-17), (('0101110100',), -2.42861286636753e-17), (('0101110101',), -2.42861286636753e-17), (('0101110110',), -2.42861286636753e-17), (('0101110111',), -2.42861286636753e-17), (('0101111000',), -2.42861286636753e-17), (('0101111001',), -2.42861286636753e-17), (('0101111010',), -2.42861286636753e-17), (('0101111011',), -2.42861286636753e-17), (('0101111100',), -2.42861286636753e-17), (('0101111101',), -2.42861286636753e-17), (('0101111110',), -2.42861286636753e-17), (('0101111111',), -2.42861286636753e-17), (('0110000000',), -2.42861286636753e-17), (('0110000001',), -2.42861286636753e-17), (('0110000010',), -2.42861286636753e-17), (('0110000011',), -2.42861286636753e-17), (('0110000100',), -2.42861286636753e-17), (('0110000101',), -2.42861286636753e-17), (('0110000110',), -2.42861286636753e-17), (('0110000111',), -2.42861286636753e-17), (('0110001000',), -2.42861286636753e-17), (('0110001001',), -2.42861286636753e-17), (('0110001010',), -2.42861286636753e-17), (('0110001011',), -2.42861286636753e-17), (('0110001100',), -2.42861286636753e-17), (('0110001101',), -2.42861286636753e-17), (('0110001110',), -2.42861286636753e-17), (('0110001111',), -2.42861286636753e-17), (('0110010000',), -2.42861286636753e-17), (('0110010001',), -2.42861286636753e-17), (('0110010010',), -2.42861286636753e-17), (('0110010011',), -2.42861286636753e-17), (('0110010100',), -2.42861286636753e-17), (('0110010101',), -2.42861286636753e-17), (('0110010110',), -2.42861286636753e-17), (('0110010111',), -2.42861286636753e-17), (('0110011000',), -2.42861286636753e-17), (('0110011001',), -2.42861286636753e-17), (('0110011010',), -2.42861286636753e-17), (('0110011011',), -2.42861286636753e-17), (('0110011100',), -2.42861286636753e-17), (('0110011101',), -2.42861286636753e-17), (('0110011110',), -2.42861286636753e-17), (('0110011111',), -2.42861286636753e-17), (('0110100000',), -2.42861286636753e-17), (('0110100001',), -2.42861286636753e-17), (('0110100010',), -2.42861286636753e-17), (('0110100011',), -2.42861286636753e-17), (('0110100100',), -2.42861286636753e-17), (('0110100101',), -2.42861286636753e-17), (('0110100110',), -2.42861286636753e-17), (('0110100111',), -2.42861286636753e-17), (('0110101000',), -2.42861286636753e-17), (('0110101001',), -2.42861286636753e-17), (('0110101010',), -2.42861286636753e-17), (('0110101011',), -2.42861286636753e-17), (('0110101100',), -2.42861286636753e-17), (('0110101101',), -2.42861286636753e-17), (('0110101110',), -2.42861286636753e-17), (('0110101111',), -2.42861286636753e-17), (('0110110000',), -2.42861286636753e-17), (('0110110001',), -2.42861286636753e-17), (('0110110010',), -2.42861286636753e-17), (('0110110011',), -2.42861286636753e-17), (('0110110100',), -2.42861286636753e-17), (('0110110101',), -2.42861286636753e-17), (('0110110110',), -2.42861286636753e-17), (('0110110111',), -2.42861286636753e-17), (('0110111000',), -2.42861286636753e-17), (('0110111001',), -2.42861286636753e-17), (('0110111010',), -2.42861286636753e-17), (('0110111011',), -2.42861286636753e-17), (('0110111100',), -2.42861286636753e-17), (('0110111101',), -2.42861286636753e-17), (('0110111110',), -2.42861286636753e-17), (('0110111111',), -2.42861286636753e-17), (('0111000000',), -2.42861286636753e-17), (('0111000001',), -2.42861286636753e-17), (('0111000010',), -2.42861286636753e-17), (('0111000011',), -2.42861286636753e-17), (('0111000100',), -2.42861286636753e-17), (('0111000101',), -2.42861286636753e-17), (('0111000110',), -2.42861286636753e-17), (('0111000111',), -2.42861286636753e-17), (('0111001000',), -2.42861286636753e-17), (('0111001001',), -2.42861286636753e-17), (('0111001010',), -2.42861286636753e-17), (('0111001011',), -2.42861286636753e-17), (('0111001100',), -2.42861286636753e-17), (('0111001101',), -2.42861286636753e-17), (('0111001110',), -2.42861286636753e-17), (('0111001111',), -2.42861286636753e-17), (('0111010000',), -2.42861286636753e-17), (('0111010001',), -2.42861286636753e-17), (('0111010010',), -2.42861286636753e-17), (('0111010011',), -2.42861286636753e-17), (('0111010100',), -2.42861286636753e-17), (('0111010101',), -2.42861286636753e-17), (('0111010110',), -2.42861286636753e-17), (('0111010111',), -2.42861286636753e-17), (('0111011000',), -2.42861286636753e-17), (('0111011001',), -2.42861286636753e-17), (('0111011010',), -2.42861286636753e-17), (('0111011011',), -2.42861286636753e-17), (('0111011100',), -2.42861286636753e-17), (('0111011101',), -2.42861286636753e-17), (('0111011110',), -2.42861286636753e-17), (('0111011111',), -2.42861286636753e-17), (('0111100000',), -2.42861286636753e-17), (('0111100001',), -2.42861286636753e-17), (('0111100010',), -2.42861286636753e-17), (('0111100011',), -2.42861286636753e-17), (('0111100100',), -2.42861286636753e-17), (('0111100101',), -2.42861286636753e-17), (('0111100110',), -2.42861286636753e-17), (('0111100111',), -2.42861286636753e-17), (('0111101000',), -2.42861286636753e-17), (('0111101001',), -2.42861286636753e-17), (('0111101010',), -2.42861286636753e-17), (('0111101011',), -2.42861286636753e-17), (('0111101100',), -2.42861286636753e-17), (('0111101101',), -2.42861286636753e-17), (('0111101110',), -2.42861286636753e-17), (('0111101111',), -2.42861286636753e-17), (('0111110000',), -2.42861286636753e-17), (('0111110001',), -2.42861286636753e-17), (('0111110010',), -2.42861286636753e-17), (('0111110011',), -2.42861286636753e-17), (('0111110100',), -2.42861286636753e-17), (('0111110101',), -2.42861286636753e-17), (('0111110110',), -2.42861286636753e-17), (('0111110111',), -2.42861286636753e-17), (('0111111000',), -2.42861286636753e-17), (('0111111001',), -2.42861286636753e-17), (('0111111010',), -2.42861286636753e-17), (('0111111011',), -2.42861286636753e-17), (('0111111100',), -2.42861286636753e-17), (('0111111101',), -2.42861286636753e-17), (('0111111110',), -2.42861286636753e-17), (('0111111111',), -2.42861286636753e-17), (('1000000000',), 0.5000000000000001), (('1000000001',), 0.5000000000000001), (('1000000010',), 0.5000000000000001), (('1000000011',), 0.5000000000000001), (('1000000100',), 0.5000000000000001), (('1000000101',), 0.5000000000000001), (('1000000110',), 0.5000000000000001), (('1000000111',), 0.5000000000000001), (('1000001000',), 0.5000000000000001), (('1000001001',), 0.5000000000000001), (('1000001010',), 0.5000000000000001), (('1000001011',), 0.5000000000000001), (('1000001100',), 0.5000000000000001), (('1000001101',), 0.5000000000000001), (('1000001110',), 0.5000000000000001), (('1000001111',), 0.5000000000000001), (('1000010000',), 0.5000000000000001), (('1000010001',), 0.5000000000000001), (('1000010010',), 0.5000000000000001), (('1000010011',), 0.5000000000000001), (('1000010100',), 0.5000000000000001), (('1000010101',), 0.5000000000000001), (('1000010110',), 0.5000000000000001), (('1000010111',), 0.5000000000000001), (('1000011000',), 0.5000000000000001), (('1000011001',), 0.5000000000000001), (('1000011010',), 0.5000000000000001), (('1000011011',), 0.5000000000000001), (('1000011100',), 0.5000000000000001), (('1000011101',), 0.5000000000000001), (('1000011110',), 0.5000000000000001), (('1000011111',), 0.5000000000000001), (('1000100000',), 0.5000000000000001), (('1000100001',), 0.5000000000000001), (('1000100010',), 0.5000000000000001), (('1000100011',), 0.5000000000000001), (('1000100100',), 0.5000000000000001), (('1000100101',), 0.5000000000000001), (('1000100110',), 0.5000000000000001), (('1000100111',), 0.5000000000000001), (('1000101000',), 0.5000000000000001), (('1000101001',), 0.5000000000000001), (('1000101010',), 0.5000000000000001), (('1000101011',), 0.5000000000000001), (('1000101100',), 0.5000000000000001), (('1000101101',), 0.5000000000000001), (('1000101110',), 0.5000000000000001), (('1000101111',), 0.5000000000000001), (('1000110000',), 0.5000000000000001), (('1000110001',), 0.5000000000000001), (('1000110010',), 0.5000000000000001), (('1000110011',), 0.5000000000000001), (('1000110100',), 0.5000000000000001), (('1000110101',), 0.5000000000000001), (('1000110110',), 0.5000000000000001), (('1000110111',), 0.5000000000000001), (('1000111000',), 0.5000000000000001), (('1000111001',), 0.5000000000000001), (('1000111010',), 0.5000000000000001), (('1000111011',), 0.5000000000000001), (('1000111100',), 0.5000000000000001), (('1000111101',), 0.5000000000000001), (('1000111110',), 0.5000000000000001), (('1000111111',), 0.5000000000000001), (('1001000000',), 0.5000000000000001), (('1001000001',), 0.5000000000000001), (('1001000010',), 0.5000000000000001), (('1001000011',), 0.5000000000000001), (('1001000100',), 0.5000000000000001), (('1001000101',), 0.5000000000000001), (('1001000110',), 0.5000000000000001), (('1001000111',), 0.5000000000000001), (('1001001000',), 0.5000000000000001), (('1001001001',), 0.5000000000000001), (('1001001010',), 0.5000000000000001), (('1001001011',), 0.5000000000000001), (('1001001100',), 0.5000000000000001), (('1001001101',), 0.5000000000000001), (('1001001110',), 0.5000000000000001), (('1001001111',), 0.5000000000000001), (('1001010000',), 0.5000000000000001), (('1001010001',), 0.5000000000000001), (('1001010010',), 0.5000000000000001), (('1001010011',), 0.5000000000000001), (('1001010100',), 0.5000000000000001), (('1001010101',), 0.5000000000000001), (('1001010110',), 0.5000000000000001), (('1001010111',), 0.5000000000000001), (('1001011000',), 0.5000000000000001), (('1001011001',), 0.5000000000000001), (('1001011010',), 0.5000000000000001), (('1001011011',), 0.5000000000000001), (('1001011100',), 0.5000000000000001), (('1001011101',), 0.5000000000000001), (('1001011110',), 0.5000000000000001), (('1001011111',), 0.5000000000000001), (('1001100000',), 0.5000000000000001), (('1001100001',), 0.5000000000000001), (('1001100010',), 0.5000000000000001), (('1001100011',), 0.5000000000000001), (('1001100100',), 0.5000000000000001), (('1001100101',), 0.5000000000000001), (('1001100110',), 0.5000000000000001), (('1001100111',), 0.5000000000000001), (('1001101000',), 0.5000000000000001), (('1001101001',), 0.5000000000000001), (('1001101010',), 0.5000000000000001), (('1001101011',), 0.5000000000000001), (('1001101100',), 0.5000000000000001), (('1001101101',), 0.5000000000000001), (('1001101110',), 0.5000000000000001), (('1001101111',), 0.5000000000000001), (('1001110000',), 0.5000000000000001), (('1001110001',), 0.5000000000000001), (('1001110010',), 0.5000000000000001), (('1001110011',), 0.5000000000000001), (('1001110100',), 0.5000000000000001), (('1001110101',), 0.5000000000000001), (('1001110110',), 0.5000000000000001), (('1001110111',), 0.5000000000000001), (('1001111000',), 0.5000000000000001), (('1001111001',), 0.5000000000000001), (('1001111010',), 0.5000000000000001), (('1001111011',), 0.5000000000000001), (('1001111100',), 0.5000000000000001), (('1001111101',), 0.5000000000000001), (('1001111110',), 0.5000000000000001), (('1001111111',), 0.5000000000000001), (('1010000000',), 0.5000000000000001), (('1010000001',), 0.5000000000000001), (('1010000010',), 0.5000000000000001), (('1010000011',), 0.5000000000000001), (('1010000100',), 0.5000000000000001), (('1010000101',), 0.5000000000000001), (('1010000110',), 0.5000000000000001), (('1010000111',), 0.5000000000000001), (('1010001000',), 0.5000000000000001), (('1010001001',), 0.5000000000000001), (('1010001010',), 0.5000000000000001), (('1010001011',), 0.5000000000000001), (('1010001100',), 0.5000000000000001), (('1010001101',), 0.5000000000000001), (('1010001110',), 0.5000000000000001), (('1010001111',), 0.5000000000000001), (('1010010000',), 0.5000000000000001), (('1010010001',), 0.5000000000000001), (('1010010010',), 0.5000000000000001), (('1010010011',), 0.5000000000000001), (('1010010100',), 0.5000000000000001), (('1010010101',), 0.5000000000000001), (('1010010110',), 0.5000000000000001), (('1010010111',), 0.5000000000000001), (('1010011000',), 0.5000000000000001), (('1010011001',), 0.5000000000000001), (('1010011010',), 0.5000000000000001), (('1010011011',), 0.5000000000000001), (('1010011100',), 0.5000000000000001), (('1010011101',), 0.5000000000000001), (('1010011110',), 0.5000000000000001), (('1010011111',), 0.5000000000000001), (('1010100000',), 0.5000000000000001), (('1010100001',), 0.5000000000000001), (('1010100010',), 0.5000000000000001), (('1010100011',), 0.5000000000000001), (('1010100100',), 0.5000000000000001), (('1010100101',), 0.5000000000000001), (('1010100110',), 0.5000000000000001), (('1010100111',), 0.5000000000000001), (('1010101000',), 0.5000000000000001), (('1010101001',), 0.5000000000000001), (('1010101010',), 0.5000000000000001), (('1010101011',), 0.5000000000000001), (('1010101100',), 0.5000000000000001), (('1010101101',), 0.5000000000000001), (('1010101110',), 0.5000000000000001), (('1010101111',), 0.5000000000000001), (('1010110000',), 0.5000000000000001), (('1010110001',), 0.5000000000000001), (('1010110010',), 0.5000000000000001), (('1010110011',), 0.5000000000000001), (('1010110100',), 0.5000000000000001), (('1010110101',), 0.5000000000000001), (('1010110110',), 0.5000000000000001), (('1010110111',), 0.5000000000000001), (('1010111000',), 0.5000000000000001), (('1010111001',), 0.5000000000000001), (('1010111010',), 0.5000000000000001), (('1010111011',), 0.5000000000000001), (('1010111100',), 0.5000000000000001), (('1010111101',), 0.5000000000000001), (('1010111110',), 0.5000000000000001), (('1010111111',), 0.5000000000000001), (('1011000000',), 0.5000000000000001), (('1011000001',), 0.5000000000000001), (('1011000010',), 0.5000000000000001), (('1011000011',), 0.5000000000000001), (('1011000100',), 0.5000000000000001), (('1011000101',), 0.5000000000000001), (('1011000110',), 0.5000000000000001), (('1011000111',), 0.5000000000000001), (('1011001000',), 0.5000000000000001), (('1011001001',), 0.5000000000000001), (('1011001010',), 0.5000000000000001), (('1011001011',), 0.5000000000000001), (('1011001100',), 0.5000000000000001), (('1011001101',), 0.5000000000000001), (('1011001110',), 0.5000000000000001), (('1011001111',), 0.5000000000000001), (('1011010000',), 0.5000000000000001), (('1011010001',), 0.5000000000000001), (('1011010010',), 0.5000000000000001), (('1011010011',), 0.5000000000000001), (('1011010100',), 0.5000000000000001), (('1011010101',), 0.5000000000000001), (('1011010110',), 0.5000000000000001), (('1011010111',), 0.5000000000000001), (('1011011000',), 0.5000000000000001), (('1011011001',), 0.5000000000000001), (('1011011010',), 0.5000000000000001), (('1011011011',), 0.5000000000000001), (('1011011100',), 0.5000000000000001), (('1011011101',), 0.5000000000000001), (('1011011110',), 0.5000000000000001), (('1011011111',), 0.5000000000000001), (('1011100000',), 0.5000000000000001), (('1011100001',), 0.5000000000000001), (('1011100010',), 0.5000000000000001), (('1011100011',), 0.5000000000000001), (('1011100100',), 0.5000000000000001), (('1011100101',), 0.5000000000000001), (('1011100110',), 0.5000000000000001), (('1011100111',), 0.5000000000000001), (('1011101000',), 0.5000000000000001), (('1011101001',), 0.5000000000000001), (('1011101010',), 0.5000000000000001), (('1011101011',), 0.5000000000000001), (('1011101100',), 0.5000000000000001), (('1011101101',), 0.5000000000000001), (('1011101110',), 0.5000000000000001), (('1011101111',), 0.5000000000000001), (('1011110000',), 0.5000000000000001), (('1011110001',), 0.5000000000000001), (('1011110010',), 0.5000000000000001), (('1011110011',), 0.5000000000000001), (('1011110100',), 0.5000000000000001), (('1011110101',), 0.5000000000000001), (('1011110110',), 0.5000000000000001), (('1011110111',), 0.5000000000000001), (('1011111000',), 0.5000000000000001), (('1011111001',), 0.5000000000000001), (('1011111010',), 0.5000000000000001), (('1011111011',), 0.5000000000000001), (('1011111100',), 0.5000000000000001), (('1011111101',), 0.5000000000000001), (('1011111110',), 0.5000000000000001), (('1011111111',), 0.5000000000000001), (('1100000000',), -2.42861286636753e-17), (('1100000001',), -2.42861286636753e-17), (('1100000010',), -2.42861286636753e-17), (('1100000011',), -2.42861286636753e-17), (('1100000100',), -2.42861286636753e-17), (('1100000101',), -2.42861286636753e-17), (('1100000110',), -2.42861286636753e-17), (('1100000111',), -2.42861286636753e-17), (('1100001000',), -2.42861286636753e-17), (('1100001001',), -2.42861286636753e-17), (('1100001010',), -2.42861286636753e-17), (('1100001011',), -2.42861286636753e-17), (('1100001100',), -2.42861286636753e-17), (('1100001101',), -2.42861286636753e-17), (('1100001110',), -2.42861286636753e-17), (('1100001111',), -2.42861286636753e-17), (('1100010000',), -2.42861286636753e-17), (('1100010001',), -2.42861286636753e-17), (('1100010010',), -2.42861286636753e-17), (('1100010011',), -2.42861286636753e-17), (('1100010100',), -2.42861286636753e-17), (('1100010101',), -2.42861286636753e-17), (('1100010110',), -2.42861286636753e-17), (('1100010111',), -2.42861286636753e-17), (('1100011000',), -2.42861286636753e-17), (('1100011001',), -2.42861286636753e-17), (('1100011010',), -2.42861286636753e-17), (('1100011011',), -2.42861286636753e-17), (('1100011100',), -2.42861286636753e-17), (('1100011101',), -2.42861286636753e-17), (('1100011110',), -2.42861286636753e-17), (('1100011111',), -2.42861286636753e-17), (('1100100000',), -2.42861286636753e-17), (('1100100001',), -2.42861286636753e-17), (('1100100010',), -2.42861286636753e-17), (('1100100011',), -2.42861286636753e-17), (('1100100100',), -2.42861286636753e-17), (('1100100101',), -2.42861286636753e-17), (('1100100110',), -2.42861286636753e-17), (('1100100111',), -2.42861286636753e-17), (('1100101000',), -2.42861286636753e-17), (('1100101001',), -2.42861286636753e-17), (('1100101010',), -2.42861286636753e-17), (('1100101011',), -2.42861286636753e-17), (('1100101100',), -2.42861286636753e-17), (('1100101101',), -2.42861286636753e-17), (('1100101110',), -2.42861286636753e-17), (('1100101111',), -2.42861286636753e-17), (('1100110000',), -2.42861286636753e-17), (('1100110001',), -2.42861286636753e-17), (('1100110010',), -2.42861286636753e-17), (('1100110011',), -2.42861286636753e-17), (('1100110100',), -2.42861286636753e-17), (('1100110101',), -2.42861286636753e-17), (('1100110110',), -2.42861286636753e-17), (('1100110111',), -2.42861286636753e-17), (('1100111000',), -2.42861286636753e-17), (('1100111001',), -2.42861286636753e-17), (('1100111010',), -2.42861286636753e-17), (('1100111011',), -2.42861286636753e-17), (('1100111100',), -2.42861286636753e-17), (('1100111101',), -2.42861286636753e-17), (('1100111110',), -2.42861286636753e-17), (('1100111111',), -2.42861286636753e-17), (('1101000000',), -2.42861286636753e-17), (('1101000001',), -2.42861286636753e-17), (('1101000010',), -2.42861286636753e-17), (('1101000011',), -2.42861286636753e-17), (('1101000100',), -2.42861286636753e-17), (('1101000101',), -2.42861286636753e-17), (('1101000110',), -2.42861286636753e-17), (('1101000111',), -2.42861286636753e-17), (('1101001000',), -2.42861286636753e-17), (('1101001001',), -2.42861286636753e-17), (('1101001010',), -2.42861286636753e-17), (('1101001011',), -2.42861286636753e-17), (('1101001100',), -2.42861286636753e-17), (('1101001101',), -2.42861286636753e-17), (('1101001110',), -2.42861286636753e-17), (('1101001111',), -2.42861286636753e-17), (('1101010000',), -2.42861286636753e-17), (('1101010001',), -2.42861286636753e-17), (('1101010010',), -2.42861286636753e-17), (('1101010011',), -2.42861286636753e-17), (('1101010100',), -2.42861286636753e-17), (('1101010101',), -2.42861286636753e-17), (('1101010110',), -2.42861286636753e-17), (('1101010111',), -2.42861286636753e-17), (('1101011000',), -2.42861286636753e-17), (('1101011001',), -2.42861286636753e-17), (('1101011010',), -2.42861286636753e-17), (('1101011011',), -2.42861286636753e-17), (('1101011100',), -2.42861286636753e-17), (('1101011101',), -2.42861286636753e-17), (('1101011110',), -2.42861286636753e-17), (('1101011111',), -2.42861286636753e-17), (('1101100000',), -2.42861286636753e-17), (('1101100001',), -2.42861286636753e-17), (('1101100010',), -2.42861286636753e-17), (('1101100011',), -2.42861286636753e-17), (('1101100100',), -2.42861286636753e-17), (('1101100101',), -2.42861286636753e-17), (('1101100110',), -2.42861286636753e-17), (('1101100111',), -2.42861286636753e-17), (('1101101000',), -2.42861286636753e-17), (('1101101001',), -2.42861286636753e-17), (('1101101010',), -2.42861286636753e-17), (('1101101011',), -2.42861286636753e-17), (('1101101100',), -2.42861286636753e-17), (('1101101101',), -2.42861286636753e-17), (('1101101110',), -2.42861286636753e-17), (('1101101111',), -2.42861286636753e-17), (('1101110000',), -2.42861286636753e-17), (('1101110001',), -2.42861286636753e-17), (('1101110010',), -2.42861286636753e-17), (('1101110011',), -2.42861286636753e-17), (('1101110100',), -2.42861286636753e-17), (('1101110101',), -2.42861286636753e-17), (('1101110110',), -2.42861286636753e-17), (('1101110111',), -2.42861286636753e-17), (('1101111000',), -2.42861286636753e-17), (('1101111001',), -2.42861286636753e-17), (('1101111010',), -2.42861286636753e-17), (('1101111011',), -2.42861286636753e-17), (('1101111100',), -2.42861286636753e-17), (('1101111101',), -2.42861286636753e-17), (('1101111110',), -2.42861286636753e-17), (('1101111111',), -2.42861286636753e-17), (('1110000000',), -2.42861286636753e-17), (('1110000001',), -2.42861286636753e-17), (('1110000010',), -2.42861286636753e-17), (('1110000011',), -2.42861286636753e-17), (('1110000100',), -2.42861286636753e-17), (('1110000101',), -2.42861286636753e-17), (('1110000110',), -2.42861286636753e-17), (('1110000111',), -2.42861286636753e-17), (('1110001000',), -2.42861286636753e-17), (('1110001001',), -2.42861286636753e-17), (('1110001010',), -2.42861286636753e-17), (('1110001011',), -2.42861286636753e-17), (('1110001100',), -2.42861286636753e-17), (('1110001101',), -2.42861286636753e-17), (('1110001110',), -2.42861286636753e-17), (('1110001111',), -2.42861286636753e-17), (('1110010000',), -2.42861286636753e-17), (('1110010001',), -2.42861286636753e-17), (('1110010010',), -2.42861286636753e-17), (('1110010011',), -2.42861286636753e-17), (('1110010100',), -2.42861286636753e-17), (('1110010101',), -2.42861286636753e-17), (('1110010110',), -2.42861286636753e-17), (('1110010111',), -2.42861286636753e-17), (('1110011000',), -2.42861286636753e-17), (('1110011001',), -2.42861286636753e-17), (('1110011010',), -2.42861286636753e-17), (('1110011011',), -2.42861286636753e-17), (('1110011100',), -2.42861286636753e-17), (('1110011101',), -2.42861286636753e-17), (('1110011110',), -2.42861286636753e-17), (('1110011111',), -2.42861286636753e-17), (('1110100000',), -2.42861286636753e-17), (('1110100001',), -2.42861286636753e-17), (('1110100010',), -2.42861286636753e-17), (('1110100011',), -2.42861286636753e-17), (('1110100100',), -2.42861286636753e-17), (('1110100101',), -2.42861286636753e-17), (('1110100110',), -2.42861286636753e-17), (('1110100111',), -2.42861286636753e-17), (('1110101000',), -2.42861286636753e-17), (('1110101001',), -2.42861286636753e-17), (('1110101010',), -2.42861286636753e-17), (('1110101011',), -2.42861286636753e-17), (('1110101100',), -2.42861286636753e-17), (('1110101101',), -2.42861286636753e-17), (('1110101110',), -2.42861286636753e-17), (('1110101111',), -2.42861286636753e-17), (('1110110000',), -2.42861286636753e-17), (('1110110001',), -2.42861286636753e-17), (('1110110010',), -2.42861286636753e-17), (('1110110011',), -2.42861286636753e-17), (('1110110100',), -2.42861286636753e-17), (('1110110101',), -2.42861286636753e-17), (('1110110110',), -2.42861286636753e-17), (('1110110111',), -2.42861286636753e-17), (('1110111000',), -2.42861286636753e-17), (('1110111001',), -2.42861286636753e-17), (('1110111010',), -2.42861286636753e-17), (('1110111011',), -2.42861286636753e-17), (('1110111100',), -2.42861286636753e-17), (('1110111101',), -2.42861286636753e-17), (('1110111110',), -2.42861286636753e-17), (('1110111111',), -2.42861286636753e-17), (('1111000000',), -2.42861286636753e-17), (('1111000001',), -2.42861286636753e-17), (('1111000010',), -2.42861286636753e-17), (('1111000011',), -2.42861286636753e-17), (('1111000100',), -2.42861286636753e-17), (('1111000101',), -2.42861286636753e-17), (('1111000110',), -2.42861286636753e-17), (('1111000111',), -2.42861286636753e-17), (('1111001000',), -2.42861286636753e-17), (('1111001001',), -2.42861286636753e-17), (('1111001010',), -2.42861286636753e-17), (('1111001011',), -2.42861286636753e-17), (('1111001100',), -2.42861286636753e-17), (('1111001101',), -2.42861286636753e-17), (('1111001110',), -2.42861286636753e-17), (('1111001111',), -2.42861286636753e-17), (('1111010000',), -2.42861286636753e-17), (('1111010001',), -2.42861286636753e-17), (('1111010010',), -2.42861286636753e-17), (('1111010011',), -2.42861286636753e-17), (('1111010100',), -2.42861286636753e-17), (('1111010101',), -2.42861286636753e-17), (('1111010110',), -2.42861286636753e-17), (('1111010111',), -2.42861286636753e-17), (('1111011000',), -2.42861286636753e-17), (('1111011001',), -2.42861286636753e-17), (('1111011010',), -2.42861286636753e-17), (('1111011011',), -2.42861286636753e-17), (('1111011100',), -2.42861286636753e-17), (('1111011101',), -2.42861286636753e-17), (('1111011110',), -2.42861286636753e-17), (('1111011111',), -2.42861286636753e-17), (('1111100000',), -2.42861286636753e-17), (('1111100001',), -2.42861286636753e-17), (('1111100010',), -2.42861286636753e-17), (('1111100011',), -2.42861286636753e-17), (('1111100100',), -2.42861286636753e-17), (('1111100101',), -2.42861286636753e-17), (('1111100110',), -2.42861286636753e-17), (('1111100111',), -2.42861286636753e-17), (('1111101000',), -2.42861286636753e-17), (('1111101001',), -2.42861286636753e-17), (('1111101010',), -2.42861286636753e-17), (('1111101011',), -2.42861286636753e-17), (('1111101100',), -2.42861286636753e-17), (('1111101101',), -2.42861286636753e-17), (('1111101110',), -2.42861286636753e-17), (('1111101111',), -2.42861286636753e-17), (('1111110000',), -2.42861286636753e-17), (('1111110001',), -2.42861286636753e-17), (('1111110010',), -2.42861286636753e-17), (('1111110011',), -2.42861286636753e-17), (('1111110100',), -2.42861286636753e-17), (('1111110101',), -2.42861286636753e-17), (('1111110110',), -2.42861286636753e-17), (('1111110111',), -2.42861286636753e-17), (('1111111000',), -2.42861286636753e-17), (('1111111001',), -2.42861286636753e-17), (('1111111010',), -2.42861286636753e-17), (('1111111011',), -2.42861286636753e-17), (('1111111100',), -2.42861286636753e-17), (('1111111101',), -2.42861286636753e-17), (('1111111110',), -2.42861286636753e-17), (('1111111111',), -2.42861286636753e-17)]) CPU times: user 1min 4s, sys: 3.74 s, total: 1min 8s Wall time: 1min 8s
gllist = ['Gi', 'Gh','Gp','Gcnot','Gt']
ps = pygsti.obj.ProcessorSpec(nQubits=n, gate_names=gllist,
nonstd_gate_unitaries=unitaries,
availability=availability, verbosity=0)
# automatically creates 'clifford' and 'target' models and std compilations
# To manually add another model, for example one w/density matrix simulation:
ps.models['dmsim'] = pygsti.construction.build_nqubit_standard_gateset(
n, gllist, unitaries, availability, parameterization="static", sim_type="dmmap")
# OR, more conveniently
ps.add_std_model('dmsim', parameterization="static", sim_type="dmmap")
/Users/enielse/research/pyGSTi/packages/pygsti/construction/gatesetconstruction.py:1142: UserWarning: Failed to create clifford gate Gt. Dropping it.
#Check out clifford gate on subsets of qubits (used in RB calcs)
#ps.clifford_gates_on_qubits
#ps.add_std_model('test', parameterization="static", sim_type="svmap")
gs = ps.models['target'].copy()
#print(list(gs.gates.keys()))
print(gs[('Gcnot',1,2)])
gs[('Gcnot',1,2)] = np.identity(4,'complex')
#NOTE: pygsti.tools.unitary_to_process_mx # unitary to paulimx
print(gs[('Gcnot',1,2)])
Embedded gate map with full dimension 1048576 and state space (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) that embeds the following 4-dimensional gate into acting on the (1, 2) space Static gate with shape (4, 4) 1.00 0 0 0 0 1.00 0 0 0 0 0 1.00 0 0 1.00 0 Embedded gate map with full dimension 1024 and state space (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) that embeds the following 4-dimensional gate into acting on the (1, 2) space Static gate with shape (4, 4) 1.00 0 0 0 0 1.00 0 0 0 0 1.00 0 0 0 0 1.00
#See where symplectic reps are stored (could also extract via gs.get_clifford_symplectic_reps() )
gs = ps.models['clifford']
print(gs[('Gcnot',0,1)].embedded_gate.smatrix) # each gate has it's own symplectic rep
assert(gs[('Gcnot',1,2)].embedded_gate is gs[('Gcnot',0,1)].embedded_gate) # different CNOT's share same "root"
[[1 0 0 0] [1 1 0 0] [0 0 1 1] [0 0 0 1]]
# Let's pick a random Clifford, and the inverse of that Clifford, and create an identity circuit
s, p = pygsti.tools.random_clifford(n)
sin, pin = pygsti.tools.inverse_clifford(s,p)
%time c = pygsti.alg.compile_clifford(s, p, pspec=ps)
%time c.append_circuit(pygsti.alg.compile_clifford(sin, pin, pspec=ps))
# ~3.5min each for 8Q, ~14min each for 10Q
print(len(c)) # 1389 for 8Q, 3057 for 10Q
print(c.depth()) # 1529 for 10Q
CPU times: user 3.55 s, sys: 13.3 ms, total: 3.57 s Wall time: 3.58 s CPU times: user 3.77 s, sys: 11.1 ms, total: 3.78 s Wall time: 3.79 s 3016 1536
# As we can see, the output is (0,0,0,0) with probability 1. (when no input is given to the simulators, the input
# is taken to be (0,0,0,0)).
#%load_ext line_profiler
%time simout = c.simulate(ps.models['target'])
# ~ 3.5s for 8Q, 47s fo 10Q
print(simout['0'*n])
x = 0
for key in list(simout.keys()):
x += simout[key]
x = x - simout['0'*n]
print(x)
CPU times: user 48.6 s, sys: 221 ms, total: 48.8 s Wall time: 49 s 0.999999999999694 1022.9999999996734