0
$\begingroup$

Now, I'm studying about qubit mapping. When the mapping is done, the logical qubit will be randomly mapped to physical qubit. But I want to move the logical qubit location into desired state. For example, if the mapping state is like below. Left side is logical and right side is physical

1 -> 0
3 -> 1
2 -> 2
0 -> 3

So, after executing all quantum gates, I want the logical qubit's location would be like below

0
1
2
3

It means change the qubit state into desired state. (0, 1, 2, 3)

Or Is there any way(qiskit function) that I can extract the circuit's qubit location and change them?

$\endgroup$

1 Answer 1

1
$\begingroup$

I found something that could help you, it's a documentation with commands to do different operations between physical and virtual [qu]bits.

You could use something like this:

{(QuantumRegister(3, 'qr'), 0): 0,
 (QuantumRegister(3, 'qr'), 1): 1,
 (QuantumRegister(3, 'qr'), 2): 2}

Can be written more concisely as follows:

* virtual to physical::

    {qr[0]: 0,
     qr[1]: 1,
     qr[2]: 2}

* physical to virtual::

    {0: qr[0],
     1: qr[1],
     2: qr[2]}
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.