pygsti.protocols.mirror_edesign.init_layer#
- init_layer(qubits, gate_set, state_initialization=None, state_init_kwargs=None, rand_state=None)#
Create initial layer for mirror circuit.
- Parameters:
qubits (list) – A list of qubit labels for the layer.
gate_set (str) – The gate set for the mirror circuit (e.g., ‘u3_cx_cz’).
state_initialization (Optional[Union[str, Callable[..., _Circuit]]], optional) – Custom function for creating initial layer, or the string ‘none’. If ‘none’ is provided, then an empty initial layer is created, i.e., there is no state preparation layer. Default is None, which prepares an initial layer according to the gate set.
state_init_kwargs (Optional[dict], optional) – Additional keyword arguments for the state initialization function. Default is None.
rand_state (Optional[_np.random.RandomState], optional) – A random state for reproducibility. Default is None.
- Returns:
A new circuit representing the initial layer of gates.
- Return type:
pygsti.circuits.Circuit