qml/layers.py
def entangling_layer(qubits):
    """Layer of CNOTs followed by another shifted layer of CNOT.
    """
    # In other words it should apply something like :
    # CNOT  CNOT  CNOT  CNOT...  CNOT
    #   CNOT  CNOT  CNOT...  CNOT
    for i in range(0, qubits - 1, 2):  # Loop over even indices: i=0,2,...N-2
        qml.CNOT(wires=[i, i + 1])
    for i in range(1, qubits - 1, 2):  # Loop over odd indices:  i=1,3,...N-3
        qml.CNOT(wires=[i, i + 1])
Layer of CNOTs followed by another shifted layer of CNOT.
    
Layer of CNOTs followed by another shifted layer of CNOT.
Layer of CNOTs followed by another shifted layer of CNOT .
def entangling_layer(qubits):
    for i in range(0, qubits - 1, 2):  
        qml.CNOT(wires=[i, i + 1])
    for i in range(1, qubits - 1, 2):  
        qml.CNOT(wires=[i, i + 1])
def entangling_layer ( qubits ) : for i in range ( 0 , qubits - 1 , 2 ) : qml . CNOT ( wires = [ i , i + 1 ] ) for i in range ( 1 , qubits - 1 , 2 ) : qml . CNOT ( wires = [ i , i + 1 ] )
Layer of CNOTs followed by another shifted layer of CNOT.
Layer of CNOTs followed by another shifted layer of CNOT .
"""Layer of CNOTs followed by another shifted layer of CNOT.
    """ # In other words it should apply something like : # CNOT  CNOT  CNOT  CNOT...  CNOT #   CNOT  CNOT  CNOT...  CNOT # Loop over even indices: i=0,2,...N-2 # Loop over odd indices:  i=1,3,...N-3
qubits