Skip to content

ZZFeatureMap does not accept layer lists for entanglement kwarg #12432

@nonhermitian

Description

@nonhermitian

Environment

  • Qiskit version: 1.0.2
  • Python version:
  • Operating system:

What is happening?

N = 3
layer1 = [(0,1)]
layer2 = [(1,2)]

qc = ZZFeatureMap(N, reps=1, entanglement=[layer1, layer2])
qc.draw()

CircuitError: 'Number of items in qubits parameter (2) does not match number of qubits in the circuit (1).'

How can we reproduce the issue?

run above

What should happen?

It should work like TwoLocal does.

Any suggestions?

No response

Metadata

Metadata

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