A federal judge granted bail Wednesday to Harvard scientist Kseniia Petrova, who has spent more than three months in custody after failing to declare frog embryos upon arriving in the United States.