Documentation Index
Fetch the complete documentation index at: https://docs.haiqu.ai/llms.txt
Use this file to discover all available pages before exploring further.
Haiqu.mps_loading(mps, shape=‘plr’, num_layers=2, truncation_cutoff=1e-06, fine_tuning_iterations=20, name=None)
Generate a quantum circuit that prepares a quantum state from matrix product state (MPS). The MPS is normalized in the process, and expect physical index to be of size 2. Given a MPS, this method creates a Data Loading job that runs in the Haiqu cloud. The result of this job is a circuit which can be used to supply the state to a quantum algorithm for processing. Two MPS formats are supported:- Standard form (only site tensors):
- Vidal form (site and bond tensors):
num_layers, truncation_cutoff, and
fine_tuning_iterations parameters. Passing the MPS with high bond dimension may degrade the
quality and synthesis time.
- Parameters:
- mps (Sequence) — The MPS in either standard or Vidal form. Standard form expects a list of rank-3 site tensors (one per each qubit). Vidal form is a tuple of site and bond tensors, where bonds tensors are rank-1 or diagonal rank-2 tensors. The MPS type is determined automatically. Standard form includes left- and right-canonical forms, while Vidal form includes central canonical form.
- shape (str) — shape of site tensors of the MPS. Site tensors are rank-3 tensors. Shape defines the order of axes in it. p - physical index, l - left index, r - right index. Defaults to “plr”, which is standard order in Qiskit.
- num_layers (int) — The number of layers in the generated circuit. More layers can improve the quality of the output vector at the cost of a deeper circuit. Defaults to 2.
- truncation_cutoff (Real) — The entanglement cutoff for later layers. Increasing this threshold may result in a smaller
(but more approximate) circuit. Defaults to
1e-6. - fine_tuning_iterations (int) — The maximum number of fine-tuning iterations to perform after each layer is added. Increasing this limit may improve the quality of the circuit by using more classical resources. Defaults to 20.
- name (str | None) — The name for the job and the produced circuit. If
None(default), a name will be automatically generated.
- Returns: The Data Loading job that will generate the circuit from the MPS.
- Return type: DataLoadingJobModel