qiskit.ignis.verification.CNOTDihedral¶

class
CNOTDihedral
(data, validate=True)[소스]¶ CNOTdihedral Object Class. The CNOTdihedral group on num_qubits qubits is generated by the gates CNOT, T and X.
참조
Shelly Garion and Andrew W. Cross, On the structure of the CNOTDihedral group, arXiv:2006.12042 [quantph]
Andrew W. Cross, Easwar Magesan, Lev S. Bishop, John A. Smolin and Jay M. Gambetta, Scalable randomised benchmarking of nonClifford gates, npj Quantum Inf 2, 16012 (2016).
Initialize a CNOTDihedral operator object.
Methods
__init__
(data[, validate])Initialize a CNOTDihedral operator object.
adjoint
()Return the conjugate transpose of the CNOTDihedral element
cnot
(i, j)Apply a CNOT gate to this element.
compose
(other[, qargs, front])Return the composed operator.
Return the conjugate of the CNOTDihedral element.
copy
()Make a deep copy of current operator.
dot
(other[, qargs])Return the right multiplied operator self * other.
expand
(other)Return the tensor product operator: other tensor self.
flip
(i)Apply X to this element.
from_circuit
(circuit)Initialize from a QuantumCircuit or Instruction.
input_dims
([qargs])Return tuple of input dimension for specified subsystems.
Return True if input is a CNOTDihedral element.
output_dims
([qargs])Return tuple of output dimension for specified subsystems.
phase
(k, i)Apply an kth power of T to this element.
power
(n)Return the compose of a operator with itself n times.
reshape
([input_dims, output_dims, num_qubits])Return a shallow copy with reshaped input and output subsystem dimensions.
tensor
(other)Return the tensor product operator: self tensor other.
Return a QuantumCircuit implementing the CNOTDihedral element.
Return a Gate instruction implementing the CNOTDihedral object.
Convert operator to Numpy matrix.
Convert to an Operator object.
Return the transpose of the CNOTDihedral element.
Attributes
Return tuple (input_shape, output_shape).
Return a string representation of a CNOTdihedral object.
Return the number of qubits if a Nqubit operator or None otherwise.
Return the qargs for the operator.
Return operator settings.

compose
(other, qargs=None, front=False)[소스]¶ Return the composed operator.
 매개변수
other (CNOTDihedral) – an operator object.
qargs (None) – using specific qargs is not implemented for this operator.
front (bool) – if True compose using right operator multiplication, instead of left multiplication [default: False].
 반환값
The operator self @ other.
 반환 형식
 예외
QiskitError – if operators have incompatible dimensions for composition.
NotImplementedError – if qargs is not None.
 Additional Information:
Composition (
@
) is defined as left matrix multiplication for matrix operators. That is thatA @ B
is equal toB * A
. Settingfront=True
returns right matrix multiplicationA * B
and is equivalent to thedot()
method.

copy
()¶ Make a deep copy of current operator.

property
dim
¶ Return tuple (input_shape, output_shape).

dot
(other, qargs=None)[소스]¶ Return the right multiplied operator self * other.
 매개변수
other (CNOTDihedral) – an operator object.
qargs (None) – using specific qargs is not implemented for this operator.
 반환값
The operator self * other.
 반환 형식
 예외
QiskitError – if operators have incompatible dimensions for composition.
NotImplementedError – if qargs is not None.

expand
(other)[소스]¶ Return the tensor product operator: other tensor self.
 매개변수
other (CNOTDihedral) – an operator subclass object.
 반환값
the tensor product operator: other tensor other.
 반환 형식

from_circuit
(circuit)[소스]¶ Initialize from a QuantumCircuit or Instruction.
 매개변수
circuit (QuantumCircuit or Instruction) – instruction to initialize.
 반환값
the CNOTDihedral object for the circuit.
 반환 형식
 예외
QiskitError – if the input instruction is not CNOTDihedral or contains classical register instruction.

input_dims
(qargs=None)¶ Return tuple of input dimension for specified subsystems.

property
key
¶ Return a string representation of a CNOTdihedral object.

property
num_qubits
¶ Return the number of qubits if a Nqubit operator or None otherwise.

output_dims
(qargs=None)¶ Return tuple of output dimension for specified subsystems.

power
(n)¶ Return the compose of a operator with itself n times.
 매개변수
n (int) – the number of times to compose with self (n>0).
 반환값
the ntimes composed operator.
 반환 형식
 예외
QiskitError – if the input and output dimensions of the operator are not equal, or the power is not a positive integer.

property
qargs
¶ Return the qargs for the operator.

reshape
(input_dims=None, output_dims=None, num_qubits=None)¶ Return a shallow copy with reshaped input and output subsystem dimensions.
 매개변수
input_dims (None or tuple) – new subsystem input dimensions. If None the original input dims will be preserved [Default: None].
output_dims (None or tuple) – new subsystem output dimensions. If None the original output dims will be preserved [Default: None].
num_qubits (None or int) – reshape to an Nqubit operator [Default: None].
 반환값
returns self with reshaped input and output dimensions.
 반환 형식
BaseOperator
 예외
QiskitError – if combined size of all subsystem input dimension or subsystem output dimensions is not constant.

property
settings
¶ Return operator settings.

tensor
(other)[소스]¶ Return the tensor product operator: self tensor other.
 매개변수
other (CNOTDihedral) – an operator subclass object.
 반환값
the tensor product operator: self tensor other.
 반환 형식

to_circuit
()[소스]¶ Return a QuantumCircuit implementing the CNOTDihedral element.
 반환값
a circuit implementation of the CNOTDihedral object.
 반환 형식
 Remark:
Decompose 1 and 2qubit CNOTDihedral elements.
참조
Shelly Garion and Andrew W. Cross, On the structure of the CNOTDihedral group, arXiv:2006.12042 [quantph]
Andrew W. Cross, Easwar Magesan, Lev S. Bishop, John A. Smolin and Jay M. Gambetta, Scalable randomised benchmarking of nonClifford gates, npj Quantum Inf 2, 16012 (2016).