cirq.ISwapGate

class cirq.ISwapGate(*, exponent: Union[cirq.value.symbol.Symbol, float] = 1.0)[source]

Rotates the |01⟩-vs-|10⟩ subspace of two qubits around its Bloch X-axis.

When exponent=1, swaps the two qubits and phases |01⟩ and |10⟩ by i. More generally, this gate’s matrix is defined as follows:

ISWAP**t ≡ exp(+i π t (X⊗X + Y⊗Y) / 4)
≡ [1 0 0 0]
[0 cos(π·t/2) i·sin(π·t/2) 0] [0 i·sin(π·t/2) cos(π·t/2) 0] [0 0 0 1]
__init__(*, exponent: Union[cirq.value.symbol.Symbol, float] = 1.0) → None

Initialize self. See help(type(self)) for accurate signature.

Methods

default_decompose(qubits) Yields operations for performing this gate on the given qubits.
extrapolate_effect(factor)
inverse()
is_parameterized() Whether the effect is parameterized.
matrix()
on(*qubits) Returns an application of this gate to the given qubits.
qubit_index_to_equivalence_group_key(index) Returns a key that differs between non-interchangeable qubits.
text_diagram_info(args) Describes how to draw something in a text diagram.
trace_distance_bound() A maximum on the trace distance between this effect’s input/output.
try_cast_to(desired_type, ext) Turns this value into the desired type, if possible.
validate_args(qubits) Checks if this gate can be applied to the given qubits.
with_parameters_resolved_by(param_resolver) Resolve the parameters in the effect.

Attributes

exponent