How to draw CCZ gate in IBM Quantum Composer? There is no CCZ gate in quantum composer.
In addition to this, please help me to draw the gate shown in below figure in quantum composer.
Quantum Computing Stack Exchange is a question and answer site for engineers, scientists, programmers, and computing professionals interested in quantum computing. It only takes a minute to sign up.
Sign up to join this communityHow to draw CCZ gate in IBM Quantum Composer? There is no CCZ gate in quantum composer.
In addition to this, please help me to draw the gate shown in below figure in quantum composer.
To my knowledge, there is no built-in CCZ
gate in Qiskit at all, and thus it doens't exist in the IBM Quantum Composer as well.
In order to run a CCZ
gate one needs to construct it. There are several options to do that, some more or less efficient than the others. Anyway a basic identity of single-qubit gates is $Z = HXH$ (You can try the matrix multiplication yourself and see it works). Since CCX
is a built-in gate in Qiskit and it's usable in IBM Quantum Composer you can construct easily the following circuit for CCZ
:
About the second question - the following decomposition for the gate in the picture you have posted can be implemented easily using IBM Quantum Composer:
It's equivalent to the gate in the picture that you have posted because q1 has been defined as an "anti-control" qubit - I.e the opposite of a control qubit, i.e perform the controlled operation if the qubit is in state $|0⟩$. So flipping this qubit just before and right after the control gate does the job.
I don't know why you limit yourself to IBM Quantum Composer only, but if we use Qiskit than we can construct the gate in the picture you have posted using the following code:
from qiskit import QuantumCircuit
from qiskit.circuit.library.standard_gates.z import ZGate
qc1 = QuantumCircuit(3)
U1 = ZGate().control(num_ctrl_qubits = 2, ctrl_state = '01')
qc1.append(U1,qargs = [0,1,2])