mindquantum.utils

Utils.

Function

mindquantum.utils.fdopen

Context manager for opening files with correct permissions.

mindquantum.utils.ket_string

Get the ket format of the quantum state.

mindquantum.utils.mod

Calculate the mod of input vectors.

mindquantum.utils.normalize

Normalize the input vectors based on specified axis.

mindquantum.utils.random_circuit

Generate a random circuit.

mindquantum.utils.random_state

Generate some random quantum state.

mindquantum.utils.random_insert_gates

Randomly insert given numbers of single-qubit gates into a quantum circuit.

Progress bar

mindquantum.utils.SingleLoopProgress

A progress bar of task with single level for loop.

mindquantum.utils.TwoLoopsProgress

A progress bar of task with two level for loops.