BloqAsCirqGate#

qualtran.cirq_interop.BloqAsCirqGate

A shim for using bloqs in a Cirq circuit.

bloq

The bloq to wrap.

bloq

The bloq we’re wrapping.

Methods#

bloq_on

View source

Shim bloq into a cirq gate and call it on cirq_quregs.

This is used as a default implementation for Bloq.as_cirq_op if a native cirq conversion is not specified.

Args

bloq

The bloq to be wrapped with BloqAsCirqGate

cirq_quregs

The cirq qubit registers on which we call the gate. Should correspond to registers in self.bloq.signature.lefts().

qubit_manager

A cirq.QubitManager to allocate new qubits.

Returns

op

A cirq operation whose gate is the BloqAsCirqGate-wrapped version of bloq.

cirq_quregs

The output cirq qubit registers.

__pow__

View source

__eq__

View source

Return self==value.

num_qubits

The number of qubits this gate acts on.