Automated design of photonic two-qubit quantum gates and circuits via optimization and pruning | Quantum Network