|
| Box (const OpType &type, const op_signature_t &signature={}) |
|
| Box (const Box &other) |
|
unsigned | n_qubits () const override |
| Number of Quantum inputs.
|
|
unsigned | n_boolean () const |
| Number of Boolean inputs.
|
|
unsigned | n_classical () const |
| Number of Classical inputs.
|
|
op_signature_t | get_signature () const override |
| Vector specifying type of data for each port on op.
|
|
nlohmann::json | serialize () const override |
|
std::shared_ptr< Circuit > | to_circuit () const |
| Circuit represented by box.
|
|
virtual std::optional< Eigen::MatrixXcd > | get_box_unitary () const |
| If meaningful and implemented, return the numerical unitary matrix (in ILO-BE convention) which this Box represents.
|
|
Eigen::MatrixXcd | get_unitary () const override |
| If meaningful and implemented, return the numerical unitary matrix (in ILO-BE convention) which this Op represents.
|
|
boost::uuids::uuid | get_id () const |
| Unique identifier (preserved on copy)
|
|
virtual Op_ptr | dagger () const |
| Inverse (of a unitary operation)
|
|
virtual Op_ptr | transpose () const |
| Transpose of a unitary operation.
|
|
virtual Op_ptr | symbol_substitution (const SymEngine::map_basic_basic &sub_map) const =0 |
| Operation with values for symbols substituted.
|
|
virtual std::vector< Expr > | get_params () const |
| Sequence of phase parameters, if applicable.
|
|
virtual std::vector< Expr > | get_params_reduced () const |
| Sequence of phase parameters reduced to canonical range, if applicable.
|
|
virtual std::string | get_name (bool latex=false) const |
| String representation.
|
|
virtual std::string | get_command_str (const unit_vector_t &args) const |
| Command representation.
|
|
OpDesc | get_desc () const |
| Get operation descriptor.
|
|
OpType | get_type () const |
| Get operation type.
|
|
virtual SymSet | free_symbols () const =0 |
| Set of all free symbols occurring in operation parameters.
|
|
virtual std::optional< Pauli > | commuting_basis (port_t i) const |
| Which Pauli, if any, commutes with the operation at a given port.
|
|
virtual bool | commutes_with_basis (const std::optional< Pauli > &colour, port_t i) const |
| Whether the operation commutes with the given Pauli at the given port.
|
|
virtual bool | is_extern () const |
| return if the op is external
|
|
virtual std::optional< double > | is_identity () const |
| Test whether operation is identity up to a phase and return phase if so.
|
|
virtual bool | is_clifford () const |
| Test whether operation is in the Clifford group.
|
|
virtual bool | has_symmetry (unsigned port1, unsigned port2) const |
| Checks for symmetry of port pairs.
|
|
virtual | ~Op () |
|
bool | operator== (const Op &other) const |
|
virtual bool | is_equal (const Op &) const |
| Checks equality between two instances of the same class.
|
|
Abstract class for an operation from which a circuit can be extracted.
Definition at line 38 of file Boxes.hpp.