Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
For questions on the process of mapping virtual qubits to physical ones when transpiling a quantum circuit. For questions that are about mapping some quantity to a qubit representation, use the encoding tag.
1
vote
2
answers
52
views
How to easily get the number of qubits required when using QAOA from qiskit_algrithms?
I would like to know if there is a easy way or native solution to retrieve the number of qubits that is required when using QAOA from qiskit_algorithms package to solve an optimization problem.
I unde …
0
votes
How to easily get the number of qubits required when using QAOA from qiskit_algrithms?
After experiments, this code works for me, posting here in case anyone needs it.
mod=from_docplex_mp(mdl)
operator,offset=mod.to_ising()
qubit_needed=operator.num_qubits
print('Needs qubit',qubit_need …