If I want to condition adding a gate to a circuit in qiskit, I understand how to use c_if()
to condition on one classical register, but is there a way to condition it on the measurement of two or more classical registers? Say I have
q = QuantumRegister(5)
c1 = ClassicalRegister(1)
c2 = ClassicalRegister(1)
qc = QuantumCircuit(q,c1)
qc.add_register(c2)
So there are two classical registers and 5 qubits. Then say
circuit.measure(q[1],c1)
circuit.measure(q[3],c2)
Is there a way for me to do something like
qc.x(q[4]).c_if((c1,1) AND (c2,3))
?