Inferring causal structure: a quantum advantage