|
tket
|
Multiplexed U2 gate. More...
#include <Multiplexor.hpp>


Public Member Functions | |
| MultiplexedU2Box (const ctrl_op_map_t &op_map, bool impl_diag=true) | |
| Construct from a op_map. | |
| MultiplexedU2Box (const MultiplexedU2Box &other) | |
| Copy constructor. | |
| ~MultiplexedU2Box () override | |
| Op_ptr | symbol_substitution (const SymEngine::map_basic_basic &sub_map) const override |
| Operation with values for symbols substituted. | |
| SymSet | free_symbols () const override |
| Set of all free symbols occurring in operation parameters. | |
| ctrl_op_map_t | get_ops () const |
| bool | is_equal (const Op &op_other) const override |
| Equality check between two MultiplexedU2Box instances. | |
| Op_ptr | dagger () const override |
| Inverse (of a unitary operation) | |
| Op_ptr | transpose () const override |
| Transpose of a unitary operation. | |
| op_signature_t | get_signature () const override |
| Vector specifying type of data for each port on op. | |
| ctrl_op_map_t | get_op_map () const |
| bool | get_impl_diag () const |
| MultiplexedU2Commands | decompose () const |
| Decompose the multiplexor into a sequence of interleaving CX and single qubit gates followed by a diagonal matrix, given as command descriptions and a diagonal vector. | |
Public Member Functions inherited from tket::Box | |
| 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. | |
| 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) | |
Public Member Functions inherited from tket::Op | |
| 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 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 |
Static Public Member Functions | |
| static Op_ptr | from_json (const nlohmann::json &j) |
| static nlohmann::json | to_json (const Op_ptr &op) |
Static Public Member Functions inherited from tket::Box | |
| static Op_ptr | deserialize (const nlohmann::json &j) |
Protected Member Functions | |
| void | generate_circuit () const override |
| Implement multiplexed U2 gate (i.e. | |
Protected Member Functions inherited from tket::Op | |
| Op (const OpType &type) | |
Additional Inherited Members | |
Static Protected Member Functions inherited from tket::Box | |
| static boost::uuids::uuid | idgen () |
Protected Attributes inherited from tket::Box | |
| op_signature_t | signature_ |
| std::shared_ptr< Circuit > | circ_ |
| boost::uuids::uuid | id_ |
Protected Attributes inherited from tket::Op | |
| const OpDesc | desc_ |
| Operation descriptor. | |
| const OpType | type_ |
| Operation type. | |
Multiplexed U2 gate.
Definition at line 191 of file Multiplexor.hpp.
|
explicit |
Construct from a op_map.
Ops must be single-qubit unitary gate types or Unitary1QBox.
| op_map | |
| impl_diag | whether to implement the final DiagonalBox, default to true |
Definition at line 616 of file Multiplexor.cpp.
| tket::MultiplexedU2Box::MultiplexedU2Box | ( | const MultiplexedU2Box & | other | ) |
Copy constructor.
Definition at line 642 of file Multiplexor.cpp.
|
inlineoverride |
Definition at line 207 of file Multiplexor.hpp.
|
overridevirtual |
Inverse (of a unitary operation)
| BadOpType | if operation is not unitary |
Reimplemented from tket::Op.
Definition at line 658 of file Multiplexor.cpp.
| MultiplexedU2Commands tket::MultiplexedU2Box::decompose | ( | ) | const |
Decompose the multiplexor into a sequence of interleaving CX and single qubit gates followed by a diagonal matrix, given as command descriptions and a diagonal vector.
Definition at line 696 of file Multiplexor.cpp.
|
overridevirtual |
Set of all free symbols occurring in operation parameters.
Implements tket::Op.
Definition at line 654 of file Multiplexor.cpp.
|
static |
Definition at line 688 of file Multiplexor.cpp.
|
overrideprotectedvirtual |
Implement multiplexed U2 gate (i.e.
uniformly controlled U2 gate (UCU2)) with 2^ctrl_qubits SQ gates, 2^ctrl_qubits CXs, and a DiagonalBox at the end
https://arxiv.org/abs/quant-ph/0410066
Implements tket::Box.
Definition at line 753 of file Multiplexor.cpp.
|
inline |
Definition at line 229 of file Multiplexor.hpp.
|
inline |
Definition at line 227 of file Multiplexor.hpp.
|
inline |
Definition at line 214 of file Multiplexor.hpp.
|
overridevirtual |
Vector specifying type of data for each port on op.
Reimplemented from tket::Box.
Definition at line 667 of file Multiplexor.cpp.
|
overridevirtual |
Equality check between two MultiplexedU2Box instances.
Reimplemented from tket::Op.
Definition at line 672 of file Multiplexor.cpp.
|
overridevirtual |
Operation with values for symbols substituted.
| sub_map | map from symbols to values |
Implements tket::Op.
Definition at line 648 of file Multiplexor.cpp.
|
static |
Definition at line 680 of file Multiplexor.cpp.
|
overridevirtual |
Transpose of a unitary operation.
Reimplemented from tket::Op.
Definition at line 662 of file Multiplexor.cpp.