def __init__(self, qecc, symbol, **gate_params):
    super().__init__(qecc, symbol, **gate_params)
    qecc_init_ticks = qecc.qecc_params.get('init_ticks', 0)
    qecc_meas_ticks = qecc.qecc_params.get('meas_ticks', 7)
    qecc_x_ticks = qecc.qecc_params.get('x_ticks', [2, 4, 3, 5])
    qecc_z_ticks = qecc.qecc_params.get('z_ticks', [2, 4, 3, 5])
    self.init_ticks = gate_params.get('init_ticks', qecc_init_ticks)
    self.meas_ticks = gate_params.get('meas_ticks', qecc_meas_ticks)
    self.x_ticks = gate_params.get('x_ticks', qecc_x_ticks)
    self.z_ticks = gate_params.get('z_ticks', qecc_z_ticks)
    self.abstract_circuit = QuantumCircuit(**gate_params)
    self.data_qudit_set = self.qecc.data_qudit_set
    self.ancilla_qudit_set = self.qecc.ancilla_qudit_set
    self.ancilla_x_check = set([])
    self.ancilla_z_check = set([])
    layout = qecc.layout
    self.pos2qudit = pos2qudit(layout)
    for (q, (x, y)) in layout.items():
        if (((x % 2) == 0) and ((y % 2) == 0)):
            if ((x % 4) == (y % 4)):
                self._create_x_check(q, x, y)
            else:
                self._create_z_check(q, x, y)
    z_qudits = set(qecc.sides['top'])
    x_qudits = set(qecc.sides['left'])
    logical_ops = [{'X': QuantumCircuit([{'X': x_qudits}]), 'Z': QuantumCircuit([{'Z': z_qudits}])}]
    self.initial_logical_ops = logical_ops
    logical_ops = [{'X': QuantumCircuit([{'X': x_qudits}]), 'Z': QuantumCircuit([{'Z': z_qudits}])}]
    self.final_logical_ops = logical_ops
    self.logical_signs = None
    self.logical_stabilizers = None
    self._compile_circuit(self.abstract_circuit)
    self._stabs_destabs = {}
def __init__(self, qecc, symbol, **gate_params):
    super().__init__(qecc, symbol, **gate_params)
    qecc_init_ticks = qecc.qecc_params.get('init_ticks', 0)
    qecc_meas_ticks = qecc.qecc_params.get('meas_ticks', 7)
    qecc_x_ticks = qecc.qecc_params.get('x_ticks', [2, 4, 3, 5])
    qecc_z_ticks = qecc.qecc_params.get('z_ticks', [2, 4, 3, 5])
    self.init_ticks = gate_params.get('init_ticks', qecc_init_ticks)
    self.meas_ticks = gate_params.get('meas_ticks', qecc_meas_ticks)
    self.x_ticks = gate_params.get('x_ticks', qecc_x_ticks)
    self.z_ticks = gate_params.get('z_ticks', qecc_z_ticks)
    self.abstract_circuit = QuantumCircuit(**gate_params)
    self.data_qudit_set = self.qecc.data_qudit_set
    self.ancilla_qudit_set = self.qecc.ancilla_qudit_set
    self.ancilla_x_check = set([])
    self.ancilla_z_check = set([])
    layout = qecc.layout
    self.pos2qudit = pos2qudit(layout)
    for (q, (x, y)) in layout.items():
        if (((x % 2) == 0) and ((y % 2) == 0)):
            if ((x % 4) == (y % 4)):
                self._create_x_check(q, x, y)
            else:
                self._create_z_check(q, x, y)
    z_qudits = set(qecc.sides['top'])
    x_qudits = set(qecc.sides['left'])
    logical_ops = [{'X': QuantumCircuit([{'X': x_qudits}]), 'Z': QuantumCircuit([{'Z': z_qudits}])}]
    self.initial_logical_ops = logical_ops
    logical_ops = [{'X': QuantumCircuit([{'X': x_qudits}]), 'Z': QuantumCircuit([{'Z': z_qudits}])}]
    self.final_logical_ops = logical_ops
    self.logical_signs = None
    self.logical_stabilizers = None
    self._compile_circuit(self.abstract_circuit)
    self._stabs_destabs = {}