33 static const std::map<OpType, OpTypeInfo> typeinfo{
39 {
OpType::Sdg, {
"Sdg",
"$S^\\dagger$", {}, singleq}},
41 {
OpType::Tdg, {
"Tdg",
"$T^\\dagger$", {}, singleq}},
42 {
OpType::V, {
"V",
"$R_X{\\frac12}$", {}, singleq}},
43 {
OpType::Vdg, {
"Vdg",
"$R_X(\\frac12)^\\dagger$", {}, singleq}},
44 {
OpType::SX, {
"SX",
"$\\sqrt{X}$", {}, singleq}},
45 {
OpType::SXdg, {
"SXdg",
"$\\sqrt{X}^\\dagger$", {}, singleq}},
50 {
OpType::U3, {
"U3",
"U3", {4, 2, 2}, singleq}},
69 {
"PhaseGadget",
"$Z^{\\otimes n}$", {4}, std::nullopt}},
99 {
"PauliExpPairBox",
"PauliExpPairBox", {}, std::nullopt}},
101 {
"PauliExpCommutingSetBox",
102 "PauliExpCommutingSetBox",
106 {
"TermSequenceBox",
"TermSequenceBox", {}, std::nullopt}},
120 {
OpType::ZZMax, {
"ZZMax",
"$ZZ(\\frac{\\pi}{4})$", {}, doubleq}},
125 {
"XXPhase3",
"$R_{X_0X_1}R_{X_0X_2}R_{X_1X_2}$", {4}, tripleq}},
137 {
OpType::ESWAP, {
"ESWAP",
"$\\mathrm{eSWAP}$", {4}, doubleq}},
138 {
OpType::FSim, {
"FSim",
"$\\mathrm{fSim}$", {2, 2}, doubleq}},
144 {
"PhasePolyBox",
"PhasePolyBox", {}, std::nullopt}},
147 {
"MultiplexorBox",
"MultiplexorBox", {}, std::nullopt}},
149 {
"MultiplexedRotationBox",
"MultiplexedRotationBox", {}, std::nullopt}},
151 {
"MultiplexedU2Box",
"MultiplexedU2Box", {}, std::nullopt}},
153 {
"MultiplexedTensoredU2Box",
154 "MultiplexedTensoredU2Box",
158 {
"StatePreparationBox",
"StatePreparationBox", {}, std::nullopt}},
161 {
"ConjugationBox",
"ConjugationBox", {}, std::nullopt}},
164 {
"ProjectorAssertionBox",
"ProjectorAssertionBox", {}, std::nullopt}},
166 {
"StabiliserAssertionBox",
"StabiliserAssertionBox", {}, std::nullopt}},
170 {
"ClassicalTransform",
"ClassicalTransform", {}, std::nullopt}},
175 {
"RangePredicate",
"RangePredicate", {}, std::nullopt}},
177 {
"ExplicitPredicate",
"ExplicitPredicate", {}, std::nullopt}},
179 {
"ExplicitModifier",
"ExplicitModifier", {}, std::nullopt}},
182 {
"UnitaryTableauBox",
"UnitaryTableauBox", {}, std::nullopt}},
184 static std::unique_ptr<const std::map<OpType, OpTypeInfo>> opinfo =
185 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.
@ 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.
@ 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.
@ 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.
@ 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.
@ 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 ...
@ 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.