def __init__(self, qecc, symbol, **gate_params):
    super().__init__(qecc, symbol, **gate_params)
    self.symbol = 'instr_init_plus'
    self.data_qudit_set = self.qecc.data_qudit_set
    self.ancilla_qudit_set = self.qecc.ancilla_qudit_set
    syn_ext = qecc.instruction('instr_syn_extract', **gate_params)
    self.abstract_circuit = syn_ext.abstract_circuit.copy()
    self.abstract_circuit.params.update(gate_params)
    self.ancilla_x_check = syn_ext.ancilla_x_check
    self.ancilla_z_check = syn_ext.ancilla_z_check
    data_qudits = syn_ext.data_qudit_set
    self.abstract_circuit.append('init |0>', locations=data_qudits, tick=0)
    self.abstract_circuit.append('H', locations=data_qudits, tick=1)
    self.initial_logical_ops = [{'X': None, 'Z': None}]
    self.final_logical_ops = [{'X': QuantumCircuit([{'X': set(qecc.sides['left'])}]), 'Z': QuantumCircuit([{'Z': set(qecc.sides['top'])}])}]
    self.logical_signs = [0]
    self.logical_stabilizers = ['X']
    self._compile_circuit(self.abstract_circuit)
    self._stabs_destabs = {}
def __init__(self, qecc, symbol, **gate_params):
    super().__init__(qecc, symbol, **gate_params)
    self.symbol = 'instr_init_plus'
    self.data_qudit_set = self.qecc.data_qudit_set
    self.ancilla_qudit_set = self.qecc.ancilla_qudit_set
    syn_ext = qecc.instruction('instr_syn_extract', **gate_params)
    self.abstract_circuit = syn_ext.abstract_circuit.copy()
    self.abstract_circuit.params.update(gate_params)
    self.ancilla_x_check = syn_ext.ancilla_x_check
    self.ancilla_z_check = syn_ext.ancilla_z_check
    data_qudits = syn_ext.data_qudit_set
    self.abstract_circuit.append('init |0>', locations=data_qudits, tick=0)
    self.abstract_circuit.append('H', locations=data_qudits, tick=1)
    self.initial_logical_ops = [{'X': None, 'Z': None}]
    self.final_logical_ops = [{'X': QuantumCircuit([{'X': set(qecc.sides['left'])}]), 'Z': QuantumCircuit([{'Z': set(qecc.sides['top'])}])}]
    self.logical_signs = [0]
    self.logical_stabilizers = ['X']
    self._compile_circuit(self.abstract_circuit)
    self._stabs_destabs = {}