# What is trivial and non-trivial gate in computing?

My question seems like it should be posted in Computer Engineering section, but below is how I found this word.

I was reading the textbook: Quantum Computation And Quantum Information - by Michael A. Nielsen and Issac L. Chuang. and I came across with the this word;

1.3.1 Single qubit gates Classical computer circuits consist of wires and logic gates. The wires are used to carry information around the circuit, while the logic gates perform manipulations of the information, converting it from one form to another. Consider, for example, classical single bit logic gates. The only non-trivial member of this class is the NOT gate, whose operation is defined by its truth table, in which 0 → 1 and 1 → 0, that is, the 0 and 1 states are interchanged.

I was wondering the meaning of this word, and I googled, then one source came;

logic gate (plural logic gates)

a physical device, typically electronic, which computes a Boolean logical output (0 or 1) from Boolean input or inputs according to the rules of some logical operator. There are six non-trivial, symmetric, two-input, Boolean logic gates: AND, OR, XOR, NAND, NOR and XNOR.

So, what is the meaning of trivial and non-trivial gate in "conventional" logic gate and what are the full examples?

## 1 Answer

"Trivial objects" are usually those that are immediately clear and uninteresting. It's not really a fixed definition.

Hence a "trivial" gate is certainly one that "does nothing". Maybe, to make the statement correct, you also want to call gates that map any state to a fixed state (e.g. the gate that does 0->1 and 1->1) "trivial".

Why are the statements then correct? There are four classic bit-gates: identity, NOT, fixed 0 outcome, fixed 1 outcome. Only NOT is not trivial in the above definition.

Four 2 input --> 1 output bit channels, there are $4^2$ of such channels. If we consider only symmetric channels, this means that the input 01 fixes the input 10, hence we only have $3^2$ channels. Out of these nine, the identity and the two constant channels are trivial, leaves six nontrivial gates.