Utilities#

multi_measurement()

Perform measurement on a list of QuantumVariables.

batched_measurement()

Perform batched measurement on a list of QuantumVariables.

gate_wrap()

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

custom_control()

Adds a custom control behavior to a function.

lifted()

Decorator that indicates that a function is qfree and permeable in its inputs.

redirect_qfunction()

Redirects a quantum function to a new target qubit.

as_hamiltonian()

Decorator that converts a function returning a phase into a diagonal Hamiltonian.

lock()

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

unlock()

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

perm_lock()

Context manager that permanently locks a list of qubits, preventing them from being used for automatic allocation.

perm_unlock()

Reverses perm_lock.

t_depth_indicator()

Returns the T-depth of a given operation.

cnot_depth_indicator()

Returns the CNOT-depth of a given operation.

inpl_adder_test()

Tests if an inplace adder is working correctly.