  Efficient decompositions of multi-qubit gates are essential in NISQ
applications, where the number of gates or the circuit depth is limited. This
paper presents efficient decompositions of CCZ and CCCZ gates, typical
multi-qubit gates, under several qubit connectivities. We can construct the CCZ
gate with only four CZ-depth when the qubit is square-shaped, including one
auxiliary qubit. In T-shaped qubit connectivity, which has no closed loop, we
can decompose the CCCZ gate with 17 CZ gates. While previous studies have shown
a CCCZ gate decomposition with 14 CZ gates for the fully connected case, we
found only four connections are sufficient for 14 CZ gates' implementation. The
search for constraint-sufficient decompositions is aided by an optimization
method we devised to bring the parameterized quantum circuit closer to the
target quantum gate. We can apply this scheme to decompose any quantum gates,
not only CCZ and CCCZ. Such decompositions of multi-qubit gates, together with
the newly found CCZ and CCCZ decompositions, shorten the execution time of
quantum circuits and improve the accuracy of complex quantum algorithms on near
future QPUs.
