def __init__(self):
# Set colors
basis_color = '#F0E68C'
clifford_color = '#6FA4FF'
non_gate_color = '#000000'
other_color = '#BB8BFF'
pauli_color = '#05BAB6'
iden_color = '#05BAB6'
self.error_color = '#DC143C'
self.name = 'iqx'
self.tc = '#000000'
self.sc = '#000000'
self.lc = '#000000'
self.not_gate_lc = '#ffffff'
self.cc = '#778899'
self.gc = other_color
self.gt = '#000000'
self.bc = '#bdbdbd'
self.bg = '#ffffff'
self.edge_color = None
self.math_fs = 15
self.fs = 13
self.sfs = 8
self.colored_add_width = 0.2
self.disptex = {
'id': 'Id',
'u0': 'U_0',
'u1': 'U_1',
'u2': 'U_2',
'u3': 'U_3',
'x': 'X',
'y': 'Y',
'z': 'Z',
'h': 'H',
's': 'S',
'sdg': 'S^\\dagger',
't': 'T',
'tdg': 'T^\\dagger',
'rx': 'R_x',
'ry': 'R_y',
'rz': 'R_z',
'reset': '\\left|0\\right\\rangle',
'barrier': 'barrier',
'perm': 'perm',
'unitary': 'unitary',
'phase': 'phase',
'Custom gate': 'custom'
}
self.dispcol = {
'u0': basis_color,
'u1': basis_color,
'u2': basis_color,
'u3': basis_color,
'id': iden_color,
'x': pauli_color,
'y': pauli_color,
'z': pauli_color,
'h': clifford_color,
'cx': clifford_color,
's': clifford_color,
'sdg': clifford_color,
't': other_color,
'tdg': other_color,
'rx': other_color,
'ry': other_color,
'rz': other_color,
'reset': non_gate_color,
'barrier': other_color,
'target': '#ffffff',
'swap': other_color,
'multi': other_color,
'meas': non_gate_color,
'perm': other_color,
'unitary': other_color,
'phase': other_color,
'Custom gate': other_color
}
self.latexmode = False
self.fold = None # To be removed after 0.10 is released
self.bundle = True
self.index = False
self.figwidth = -1
self.dpi = 150
self.margin = [2.0, 0.1, 0.1, 0.3]
self.cline = 'doublet'