pygsti.processors.random_compilation.pad_layer

Contents

pygsti.processors.random_compilation.pad_layer#

pad_layer(layer, qubits)#

Pads a layer of gates with idle gates for any unused qubits.

Parameters:
  • layer (list[pygsti.baseobjs.Label]) – A list of gate labels representing the layer to be padded.

  • qubits (list[str]) – A list of qubit labels to ensure all qubits are represented in the padded layer.

Returns:

A new layer containing the original gates and idle gates for unused qubits.

Return type:

list[pygsti.baseobjs.Label]