Automated qubit design for superconducting circuit topologies via autodifferentiation