Skip to content

Gate.control(num_ctrl_qubits) is not working when num_ctrl_qubits > 1 #10311

@SimoneGasperini

Description

@SimoneGasperini

Environment

  • Qiskit Terra version: 0.24.1
  • Python version: 3.11.3

What is happening?

The call gate.control(num_ctrl_qubits) is raising an unexpected error when gate is one of the 2-qubit interaction RXXGate, RYYGate, RZZGate, RZXGate and num_ctrl_qubits is greater than 1.

How can we reproduce the issue?

from qiskit.circuit import Parameter
from qiskit.circuit.library import RXXGate

p = Parameter('p')
gate = RXXGate(p).control(2)

What should happen?

The code above should work and return a multi-controlled parametric RXXGate.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions