mimiqcircuits.classical.setbits¶
Classes
- class mimiqcircuits.classical.setbits.SetBit0[source]¶
Bases:
AbstractClassicalSetBit0 operation.
Classical operation that sets a classical bit to 0. 0 → 0 and 1 → 0.
Examples
>>> from mimiqcircuits import * >>> not_op = SetBit0() >>> not_op.name 'set0' >>> c = Circuit() >>> c.push(SetBit0(), 1) 2-bit circuit with 1 instruction: └── c[1] = 0
- class mimiqcircuits.classical.setbits.SetBit1[source]¶
Bases:
AbstractClassicalSetBit1 operation.
Classical operation that sets a classical bit to 1. 0 → 1 and 1 → 1.
Examples
>>> from mimiqcircuits import * >>> not_op = SetBit1() >>> not_op.name 'set1' >>> c = Circuit() >>> c.push(SetBit1(), 1) 2-bit circuit with 1 instruction: └── c[1] = 1