TransWikia.com

How do you turn the CX gate upside down on ibm-q-experience?

Quantum Computing Asked on August 20, 2021

I am learning how to make Grover’s algorithm but the last cx gate needs to be the opposite way around. It always makes the top qubit the control, so how do you turn it around?

2 Answers

Just to add. If you do not have a possibility to switch control and target qubits, you can implement "upside down" CNOT with this circuit:

$$ (H otimes H) CNOT (H otimes H), $$

where $H$ is Hadamard gate and $CNOT$ is controlled NOT with control qubit upside and target qubit downside.

Answered by Martin Vesely on August 20, 2021

If you click the CX gate itself, it will be surrounded by a dashed box with a pen symbol in the top right corner.

enter image description here

If you click this pen you can choose which qubit is the target and which is the control by drag-and-drop.

dd pi

Answered by Cryoris on August 20, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP