Class that you can inherit from to make your own custom gate converter for use within DQCsim.
More...
|
template<class Unbound , class Bound > |
class | GateMap |
|
Class that you can inherit from to make your own custom gate converter for use within DQCsim.
Definition at line 4498 of file dqcsim.
◆ detect()
virtual bool dqcsim::wrap::CustomGateConverter::detect |
( |
Gate && |
gate, |
|
|
QubitSet & |
qubits, |
|
|
ArbData & |
params |
|
) |
| const |
|
inlinevirtual |
The to-be-implemented detector function.
- Parameters
-
gate | The gate to match. |
qubits | If the gate matches, its qubit arguments should be pushed into or assigned to this set. The set is initially empty. |
params | If the gate matches, its parameters should be pushed into or assigned to this ArbData . This data object is initially a copy of the incoming gate's ArbData attachment. |
- Returns
- Whether the incoming gate matches.
- Exceptions
-
std::exception | When an exception is thrown, its what() is returned to the user immediately. That is, any remaining detectors are not called. |
The default implementation simply returns false
, i.e. it never matches.
Definition at line 4580 of file dqcsim.
◆ construct()
virtual Gate dqcsim::wrap::CustomGateConverter::construct |
( |
QubitSet && |
qubits, |
|
|
ArbData && |
params |
|
) |
| const |
|
inlinevirtual |
The to-be-implemented constructor function.
- Parameters
-
qubits | The qubit arguments for the gate. |
params | The parameters for the gate. |
- Returns
- The constructed gate.
- Exceptions
-
std::exception | When an exception is thrown, its what() is returned to the user. |
The default implementation throws an exception indicating that no constructor is defined.
Definition at line 4596 of file dqcsim.
The documentation for this class was generated from the following file: