Skip to main content
4 votes

Can you decompose a 4-qubit Toffoli gate (CCCX) into basic gates without an ancillary state?

The seminal paper Barenco et al., Elementary gates for quantum computation is a great resource for decompositions of many quantum gates, including multi-control Toffoli gates, into elementary gates. (...
Norbert Schuch's user avatar
2 votes

How to implement multi controlled X gates in Qasm

There's no definition of multi-controlled X (MCX) gates in the standard qasm spec. What qasm allows you to do is define custom gates. You would have to define your own MCX gate by using gates that do ...
xzkxyz's user avatar
  • 451
1 vote

Showing the Toffoli gate can be constructed from one-qubit gates using computer matrix multiplication

The main problem is that ChatGPT completely ignores CNOT gates in both cases (and $S$ gate as well). What is more, you need not only CNOT for two adjacent qubits but also CNOT for non-adjacent qubits. ...
Martin Vesely's user avatar
1 vote

How to implement multi controlled X gates in Qasm

If you're using OpenQASM 3, you can use the ctrl (and negctrl) modifier to turn a gate into a controlled gate; you can stack ...
Cody Wang's user avatar
  • 1,233
1 vote

How to implement multi controlled X gates in Qasm

As pointed out by @xzkxyz, general multi-controlled X gates are not in the QASM2 spec. However CX gates and CCX gates are part of the QASM2 spec. If you have a qiskit ...
Callum's user avatar
  • 1,065
1 vote

Circumventing the Eastin-Knill theorem by means of Shor's fault tolerant Toffoli gate

Shor's toffoli gate might be fault-tolerant, but that doesn't mean it's transversal. (It's not.) You should really think about this gate in the context of magic state distillation: you have to prepare ...
DaftWullie's user avatar
  • 59.3k

Only top scored, non community-wiki answers of a minimum length are eligible