|
tket
|
A classical operation applied simultaneously to multiple bits. More...
#include <ClassicalOps.hpp>


Public Member Functions | |
| MultiBitOp (std::shared_ptr< const ClassicalEvalOp > op, unsigned n) | |
| Op_ptr | symbol_substitution (const SymEngine::map_basic_basic &) const override |
| Operation with values for symbols substituted. | |
| std::string | get_name (bool latex) const override |
| String representation. | |
| std::shared_ptr< const ClassicalEvalOp > | get_op () const |
| unsigned | get_n () const |
| std::vector< bool > | eval (const std::vector< bool > &x) const override |
| Evaluation. | |
| bool | is_equal (const Op &other) const override |
| Equality check between two MultiBitOp instances. | |
Public Member Functions inherited from tket::ClassicalEvalOp | |
| ClassicalEvalOp (OpType type, unsigned n_i, unsigned n_io, unsigned n_o, const std::string &name="") | |
| Construct a ClassicalEvalOp of specified shape. | |
Public Member Functions inherited from tket::ClassicalOp | |
| ClassicalOp (OpType type, unsigned n_i, unsigned n_io, unsigned n_o, const std::string &name="") | |
| Construct a ClassicalOp of specified shape. | |
| SymSet | free_symbols () const override |
| Set of all free symbols occurring in operation parameters. | |
| unsigned | n_qubits () const override |
| op_signature_t | get_signature () const override |
| Vector specifying type of data for each port on op. | |
| nlohmann::json | serialize () const override |
| unsigned | get_n_i () const |
| Number of input-only bits. | |
| unsigned | get_n_io () const |
| Number of input-output bits. | |
| unsigned | get_n_o () const |
| Number of output-only bits. | |
Public Member Functions inherited from tket::Op | |
| virtual Op_ptr | dagger () const |
| Inverse (of a unitary operation) | |
| virtual Op_ptr | transpose () const |
| Transpose of a unitary operation. | |
| 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_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 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 Eigen::MatrixXcd | get_unitary () const |
| If meaningful and implemented, return the numerical unitary matrix (in ILO-BE convention) which this Op represents. | |
| virtual | ~Op () |
| bool | operator== (const Op &other) const |
Additional Inherited Members | |
Static Public Member Functions inherited from tket::ClassicalOp | |
| static Op_ptr | deserialize (const nlohmann::json &j) |
Protected Member Functions inherited from tket::Op | |
| Op (const OpType &type) | |
Protected Attributes inherited from tket::ClassicalOp | |
| const unsigned | n_i_ |
| const unsigned | n_io_ |
| const unsigned | n_o_ |
| const std::string | name_ |
| std::vector< EdgeType > | sig_ |
Protected Attributes inherited from tket::Op | |
| const OpDesc | desc_ |
| Operation descriptor. | |
| const OpType | type_ |
| Operation type. | |
A classical operation applied simultaneously to multiple bits.
The order of arguments is: all arguments to first operation, then all arguments to second operation, and so on.
Definition at line 510 of file ClassicalOps.hpp.
| tket::MultiBitOp::MultiBitOp | ( | std::shared_ptr< const ClassicalEvalOp > | op, |
| unsigned | n | ||
| ) |
Definition at line 428 of file ClassicalOps.cpp.
|
overridevirtual |
Evaluation.
| x | vector of input bits |
Implements tket::ClassicalEvalOp.
Definition at line 449 of file ClassicalOps.cpp.
|
inline |
Definition at line 523 of file ClassicalOps.hpp.
|
overridevirtual |
String representation.
Reimplemented from tket::ClassicalOp.
Definition at line 443 of file ClassicalOps.cpp.
|
inline |
Definition at line 521 of file ClassicalOps.hpp.
|
overridevirtual |
Equality check between two MultiBitOp instances.
Reimplemented from tket::ClassicalEvalOp.
Definition at line 469 of file ClassicalOps.cpp.
|
inlineoverridevirtual |
Operation with values for symbols substituted.
| sub_map | map from symbols to values |
Implements tket::Op.
Definition at line 514 of file ClassicalOps.hpp.