I’m trying to make a quantum circuit for a uniform quantum state. Below is the code that constructs the circuit, which works well on the ‘default.qubit’ device. However, when I try to run this code on real hardware (IBM-Kyoto), I get the following error message:
ValueError: At least one work wire is required to decompose operation: MultiControlledX
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings…
From the error message, I understand that I need to add an ancilla qubit for decomposing the CCCNOT gate into CNOT gates. How can I modify my code to include ancilla qubits for this purpose?
Quantum Circuit code to run it in IBM hardware
I have add an additional wire(qubit) to the circuit. However when I plot the circuit the additional wire did not appear. So I add an Identity gate to that wire and plotted again. The additional wire appeared to the plot. However this did not solve the problemCircuit Code with additional wire and Identity matrix applied
Jiseok Song is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.