Utilities#

multi_measurement(qv_list[, shots, backend])

This functions facilitates the measurement of multiple QuantumVariables at the same time.

gate_wrap(*args[, permeability, is_qfree, ...])

Decorator to bundle up the quantum instructions of a function into a single gate object.

custom_control(func)

The custom_control decorator allows to specify the controlled version of the decorated function.

lifted(*args[, verify])

Shorthand for gate_wrap(permability = "args", is_qfree = True).

redirect_qfunction(function_to_redirect)

Decorator to turn a function returning a QuantumVariable into an in-place function.

as_hamiltonian(hamiltonian)

Decorator that recieves a regular Python function (returning a float) and returns a function of QuantumVariables, applying phases based on the function's output.

lock(qubits[, message])

Locks a list of qubits, implying an error will be raised if the user tries to perform any operation involving these qubits.

unlock(qubits)

Reverses the effect of "lock".

perm_lock(qubits[, message])

Locks a list of qubits such that only permeable gates can be executed on these qubits.

perm_unlock(qubits)

Reverses the effect of "perm_lock".

t_depth_indicator(op, epsilon)

This function returns the T-depth of an Operation object.

cnot_depth_indicator(op)

This function returns the CNOT-depth of an Operation object.

inpl_adder_test(inpl_adder)

This function runs tests on a desired inplace addition function.