tket
|
Multiplexed single-axis rotations. More...
#include <Multiplexor.hpp>
Public Member Functions | |
MultiplexedRotationBox (const ctrl_op_map_t &op_map) | |
Construct from a op_map. | |
MultiplexedRotationBox (const MultiplexedRotationBox &other) | |
Copy constructor. | |
~MultiplexedRotationBox () 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 MultiplexedRotationBox 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 |
std::vector< GateSpec > | decompose () const |
![]() | |
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) | |
![]() | |
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 Op_ptr | deserialize (const nlohmann::json &j) |
Protected Member Functions | |
void | generate_circuit () const override |
Implement multiplexed rotation (i.e. | |
![]() | |
Op (const OpType &type) | |
Additional Inherited Members | |
![]() | |
static boost::uuids::uuid | idgen () |
![]() | |
op_signature_t | signature_ |
std::shared_ptr< Circuit > | circ_ |
boost::uuids::uuid | id_ |
![]() | |
const OpDesc | desc_ |
Operation descriptor. | |
const OpType | type_ |
Operation type. | |
Multiplexed single-axis rotations.
Definition at line 118 of file Multiplexor.hpp.
|
explicit |
Construct from a op_map.
All ops should be of the same type. They can be either Rx, Ry or Rz.
op_map |
Definition at line 469 of file Multiplexor.cpp.
tket::MultiplexedRotationBox::MultiplexedRotationBox | ( | const MultiplexedRotationBox & | other | ) |
Copy constructor.
Definition at line 503 of file Multiplexor.cpp.
|
inlineoverride |
Definition at line 132 of file Multiplexor.hpp.
|
overridevirtual |
Inverse (of a unitary operation)
BadOpType | if operation is not unitary |
Reimplemented from tket::Op.
Definition at line 520 of file Multiplexor.cpp.
std::vector< GateSpec > tket::MultiplexedRotationBox::decompose | ( | ) | const |
Definition at line 555 of file Multiplexor.cpp.
|
overridevirtual |
Set of all free symbols occurring in operation parameters.
Implements tket::Op.
Definition at line 516 of file Multiplexor.cpp.
|
static |
Definition at line 547 of file Multiplexor.cpp.
|
overrideprotectedvirtual |
Implement multiplexed rotation (i.e.
uniformly controlled same-axis rotations (UCR)), with 2^ctrl_qubits SQ rotations, 2^ctrl_qubits CXs, and 2 H gates for X-axis rotations.
https://arxiv.org/abs/quant-ph/0410066
Implements tket::Box.
Definition at line 581 of file Multiplexor.cpp.
|
inline |
Definition at line 152 of file Multiplexor.hpp.
|
inline |
Definition at line 139 of file Multiplexor.hpp.
|
overridevirtual |
Vector specifying type of data for each port on op.
Reimplemented from tket::Box.
Definition at line 528 of file Multiplexor.cpp.
|
overridevirtual |
Equality check between two MultiplexedRotationBox instances.
Reimplemented from tket::Op.
Definition at line 533 of file Multiplexor.cpp.
|
overridevirtual |
Operation with values for symbols substituted.
sub_map | map from symbols to values |
Implements tket::Op.
Definition at line 510 of file Multiplexor.cpp.
|
static |
Definition at line 540 of file Multiplexor.cpp.
|
overridevirtual |
Transpose of a unitary operation.
Reimplemented from tket::Op.
Definition at line 524 of file Multiplexor.cpp.