  Detection of entanglement is an indispensable step to practical quantum
computation and communication. Compared with the conventional entanglement
witness method based on fidelity, we propose a flexible, machine learning
assisted entanglement detection protocol that is robust to different types of
noises and sample efficient. In this protocol, an entanglement classifier for a
generic entangled state is obtained by training a classical machine learning
model with a synthetic dataset. The dataset contains classical features of two
types of states and their labels (either entangled or separable). The classical
features of a state, which are expectation values of a set of k-local Pauli
observables, are estimated sample-efficiently by the classical shadow method.
In the numerical simulation, our classifier can detect the entanglement of
4-qubit GHZ states with coherent noise and W states mixed with large white
noise, with high accuracy.
