A Conditional Generative Model Based on Quantum Circuit and Classical Optimization