Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composing incompatible circuits raises obscure message about "more 'in' edges" #13935

Open
1ucian0 opened this issue Feb 28, 2025 · 1 comment
Labels
good first issue Good for newcomers

Comments

@1ucian0
Copy link
Member

1ucian0 commented Feb 28, 2025

When composing incompatible circuits like in these situations, the raising message is a bit obscure.

qc = QuantumCircuit(1)
qc.compose(QuantumCircuit(2))
qc = QuantumCircuit(1, 1)
qc.compose(QuantumCircuit(1, 2))
qiskit.circuit.exceptions.CircuitError: "Trying to compose with another QuantumCircuit which has more 'in' edges."

Specially for new users (that have greatest chance to see this message), I feel it is unnecessarily complicated to introduce the notion of 'in' edges. It could say something like a "a circuit with 2 qubit/s cannot be composed into a circuit with 1 qubit/s" or "a circuit with 2 classical bit/s cannot be composed into a circuit with 1 classical bit/s"

@1ucian0 1ucian0 added the good first issue Good for newcomers label Feb 28, 2025
@github-project-automation github-project-automation bot moved this to Tagged but unassigned in Contributor Monitoring Feb 28, 2025
@pdd23001
Copy link

I am relatively new to open source. This seems like a good first issue. Could I be assigned this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: Tagged but unassigned
Development

No branches or pull requests

2 participants