cirq.google.ExpZGate

class cirq.google.ExpZGate(*, half_turns: Union[cirq.value.symbol.Symbol, float, NoneType] = None, rads: Union[float, NoneType] = None, degs: Union[float, NoneType] = None)[source]

A rotation around the Z axis of the Bloch sphere.

This gate is exp(-i * pi * Z * half_turns / 2) where Z is the Z matrix
Z = [[1, 0],
[0, -1]]

Note the half_turn nomenclature here comes from viewing this as a rotation on the Bloch sphere. Two half_turns correspond to a rotation in the bloch sphere of 360 degrees.

__init__(*, half_turns: Union[cirq.value.symbol.Symbol, float, NoneType] = None, rads: Union[float, NoneType] = None, degs: Union[float, NoneType] = None) → None[source]

Initializes the gate.

At most one angle argument may be specified. If more are specified, the result is considered ambiguous and an error is thrown. If no angle argument is given, the default value of one half turn is used.

Parameters:
  • half_turns – The relative phasing of Z’s eigenstates, in half_turns.
  • rads – The relative phasing of Z’s eigenstates, in radians.
  • degs – The relative phasing of Z’s eigenstates, in degrees.

Methods

from_proto(op)
has_inverse()
has_matrix()
inverse()
is_parameterized() Whether the effect is parameterized.
is_xmon_op(op)
known_qasm_output(qubits, …], args) Returns lines of QASM output representing the gate on the given qubits or None if a simple conversion is not possible.
matrix()
on(*qubits) Returns an application of this gate to the given qubits.
on_each(targets) Returns a list of operations apply this gate to each of the targets.
parameterized_value_from_proto(message)
parameterized_value_to_proto(param, float], out)
phase_by(phase_turns, qubit_index) Returns a phased version of the effect.
text_diagram_info(args) Describes how to draw something in a text diagram.
to_proto(*qubits)
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.
try_get_xmon_gate(op)
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.