Quantum consistent neural/tensor networks for photonic circuits with strongly/weakly entangled states | Synapse