def test_queue(self, n_wires, weight_shape, expected_queue): """Checks the queue for the default settings.""" with pennylane._queuing.OperationRecorder() as rec: QAOAEmbedding(features=list(range(n_wires)), weights=np.zeros(shape=weight_shape), wires=range(n_wires)) for gate, expected_gate in zip(rec.queue, expected_queue): assert isinstance(gate, expected_gate)
def circuit(x=None): QAOAEmbedding(features=x, weights=weights, wires=range(n_wires), local_field='A') return [qml.expval(qml.PauliZ(i)) for i in range(n_wires)]
def circuit(x=None): QAOAEmbedding(features=x, weights=weights, wires=range(2)) return [qml.expval(qml.PauliZ(i)) for i in range(2)]
def circuit(x=None): QAOAEmbedding(features=x, weights=weights, wires='a') return qml.expval(qml.PauliZ(0))