38 static const std::map<OpType, OpTypeInfo> typeinfo{
44 {
OpType::Sdg, {
"Sdg",
"$S^\\dagger$", {}, singleq}},
46 {
OpType::Tdg, {
"Tdg",
"$T^\\dagger$", {}, singleq}},
47 {
OpType::V, {
"V",
"$R_X{\\frac12}$", {}, singleq}},
48 {
OpType::Vdg, {
"Vdg",
"$R_X(\\frac12)^\\dagger$", {}, singleq}},
49 {
OpType::SX, {
"SX",
"$\\sqrt{X}$", {}, singleq}},
50 {
OpType::SXdg, {
"SXdg",
"$\\sqrt{X}^\\dagger$", {}, singleq}},
55 {
OpType::U3, {
"U3",
"U3", {4, 2, 2}, singleq}},
74 {
"PhaseGadget",
"$Z^{\\otimes n}$", {4}, std::nullopt}},
104 {
"PauliExpPairBox",
"PauliExpPairBox", {}, std::nullopt}},
106 {
"PauliExpCommutingSetBox",
107 "PauliExpCommutingSetBox",
111 {
"TermSequenceBox",
"TermSequenceBox", {}, std::nullopt}},
125 {
OpType::ZZMax, {
"ZZMax",
"$ZZ(\\frac{\\pi}{4})$", {}, doubleq}},
130 {
"XXPhase3",
"$R_{X_0X_1}R_{X_0X_2}R_{X_1X_2}$", {4}, tripleq}},
142 {
OpType::ESWAP, {
"ESWAP",
"$\\mathrm{eSWAP}$", {4}, doubleq}},
143 {
OpType::FSim, {
"FSim",
"$\\mathrm{fSim}$", {2, 2}, doubleq}},
149 {
"PhasePolyBox",
"PhasePolyBox", {}, std::nullopt}},
152 {
"MultiplexorBox",
"MultiplexorBox", {}, std::nullopt}},
154 {
"MultiplexedRotationBox",
"MultiplexedRotationBox", {}, std::nullopt}},
156 {
"MultiplexedU2Box",
"MultiplexedU2Box", {}, std::nullopt}},
158 {
"MultiplexedTensoredU2Box",
159 "MultiplexedTensoredU2Box",
163 {
"StatePreparationBox",
"StatePreparationBox", {}, std::nullopt}},
166 {
"ConjugationBox",
"ConjugationBox", {}, std::nullopt}},
169 {
"ProjectorAssertionBox",
"ProjectorAssertionBox", {}, std::nullopt}},
171 {
"StabiliserAssertionBox",
"StabiliserAssertionBox", {}, std::nullopt}},
175 {
"ClassicalTransform",
"ClassicalTransform", {}, std::nullopt}},
180 {
"RangePredicate",
"RangePredicate", {}, std::nullopt}},
182 {
"ExplicitPredicate",
"ExplicitPredicate", {}, std::nullopt}},
184 {
"ExplicitModifier",
"ExplicitModifier", {}, std::nullopt}},
187 {
"UnitaryTableauBox",
"UnitaryTableauBox", {}, std::nullopt}},
198 static std::unique_ptr<const std::map<OpType, OpTypeInfo>> opinfo =
199 std::make_unique<const std::map<OpType, OpTypeInfo>>(typeinfo);
Defines tket::DeviceCharacterisation, used in NoiseAwarePlacement and in commute_SQ_gates_through_SWA...
@ ToffoliBox
See ToffoliBox.
@ QControlBox
See QControlBox.
@ Measure
Measure a qubit, producing a classical output.
@ CVdg
Controlled OpType::Vdg.
@ Stop
Execution halts and the program terminates.
@ CnRx
Multiply-controlled OpType::Rx.
@ CRz
Controlled OpType::Rz.
@ RNGInput
RNG input node of the circuit.
@ MultiBit
A classical operation applied to multiple bits simultaneously.
@ CH
Controlled OpType::H.
@ ConjugationBox
See ConjugationBox.
@ PhasePolyBox
See PhasePolyBox.
@ Output
Quantum output node of the circuit.
@ NPhasedX
PhasedX gates on multiple qubits.
@ CU1
Controlled OpType::U1.
@ Collapse
Measure a qubit producing no output.
@ RNGNum
Get 32-bit output from an RNG.
@ Input
Quantum input node of the circuit.
@ Sycamore
Fixed instance of a OpType::FSim gate with parameters : .
@ Unitary1qBox
See Unitary1qBox.
@ CSXdg
Controlled OpType::SXdg.
@ StatePreparationBox
See StatePreparationBox.
@ ExplicitModifier
An operation defined by a truth table that modifies one bit.
@ MultiplexedTensoredU2Box
See MultiplexedTensoredU2Box.
@ Barrier
No-op that must be preserved by compilation.
@ MultiplexedRotationBox
See MultiplexedRotationBox.
@ CustomGate
See CustomGate.
@ RangePredicate
A classical predicate defined by a range of values in binary encoding.
@ CSdg
Controlled OpType::Sdg.
@ Reset
Reset a qubit to the zero state.
@ MultiplexorBox
See MultiplexorBox.
@ StabiliserAssertionBox
See StabiliserAssertionBox.
@ MultiplexedU2Box
See MultiplexedU2Box.
@ TermSequenceBox
See TermSequenceBox.
@ SetBits
An operation to set some bits to specified values.
@ CRx
Controlled OpType::Rx.
@ ClassicalTransform
A general classical operation where all inputs are also outputs.
@ CSWAP
Controlled OpType::SWAP.
@ CCX
Controlled OpType::CX.
@ CnRz
Multiply-controlled OpType::Rz.
@ Create
Quantum node with no predecessors, implicitly in zero state.
@ ClOutput
Classical output node of the circuit.
@ WASMOutput
WASM output node of the circuit.
@ JobShotNum
Get 32-bit (little-endian) shot number.
@ PauliExpCommutingSetBox
See PauliExpCommutingSetBox.
@ CnZ
Multiply-controlled OpType::Z.
@ CX
Controlled OpType::X.
@ ClInput
Classical input node of the circuit.
@ UnitaryTableauBox
See UnitaryTableauBox.
@ ISWAPMax
Fixed instance of a OpType::ISWAP gate with parameter : .
@ DiagonalBox
See DiagonalBox.
@ CS
Controlled OpType::S.
@ CY
Controlled OpType::Y.
@ ProjectorAssertionBox
See ProjectorAssertionBox.
@ CZ
Controlled OpType::Z.
@ Conditional
See Conditional.
@ CV
Controlled OpType::V.
@ XXPhase3
Three-qubit phase MSGate.
@ BRIDGE
Three-qubit gate that swaps the first and third qubits.
@ ExplicitPredicate
A classical predicate defined by a truth table.
@ PauliExpBox
See PauliExpBox.
@ Goto
Execution jumps to a label unconditionally.
@ Label
FlowOp introducing a target for Branch or Goto commands.
@ CnRy
Multiply-controlled OpType::Ry.
@ CopyBits
An operation to copy some bit values.
@ ClExpr
Function defined over bits and sequences of bits treated as integers.
@ CnY
Multiply-controlled OpType::Y.
@ Unitary2qBox
See Unitary2qBox.
@ WASM
Op containing a classical wasm function call.
@ CRy
Controlled OpType::Ry.
@ CSX
Controlled OpType::SX.
@ RNGOutput
RNG output node of the circuit.
@ RNGSeed
Seed an RNG using 64 bits.
@ Discard
Quantum node with no successors, not composable with input nodes of other circuits.
@ Branch
Execution jumps to a label if a condition bit is true (1), otherwise continues to next command.
@ CnX
Multiply-controlled OpType::X.
@ WASMInput
WASM input node of the circuit.
@ CU3
Controlled OpType::U3.
@ RNGIndex
Set a 32-bit index on an RNG.
@ RNGBound
Set an (inclusive) 32-bit upper bound on RNG output.
@ PauliExpPairBox
See PauliExpPairBox.
@ Unitary3qBox
See Unitary3qBox.
@ Quantum
A wire carrying quantum information, corresponding to some allocated Qubit.
@ Classical
A wire carrying classical information, corresponding to some allocated Bit.
@ Boolean
A wire carrying a bit of classical information from a classical output port of one op to a classical ...
@ RNG
A wire carrying the internal state of a (pseudo-)random number generator.
@ WASM
A wire to connect the wasm ops in the order they should be executed in.
std::vector< EdgeType > op_signature_t
const std::map< OpType, OpTypeInfo > & optypeinfo()
Information including name and shape of each operation type.