QuantumCircuit.has_register

QuantumCircuit.has_register(register)[source]

Test if this circuit has the register r.

Parameters

register (Register) – a quantum or classical register.

Returns

True if the register is contained in this circuit.

Return type

bool