qxmt.visualization.plot_vqe_performance module

qxmt.visualization.plot_vqe_performance module#

qxmt.visualization.plot_vqe_performance.plot_energy_difference_by_bond_length(energy_list, baseline_energy_list, bond_length_list, absolute=False, title='Energy Difference by Bond Length', x_label='Bond Length', y_label='Energy Difference', grid=True, x_ticks_points=10, save_path=None, **kwargs)

Plot the energy difference between the VQE and the baseline energy.

Parameters:
  • cost_history (list[float]) – The cost history of the VQE.

  • baseline_cost (float) – The baseline cost of the VQE.

  • bond_length_list (list[float]) – The bond length list.

  • absolute (bool, optional) – Whether to use the absolute value of the energy difference. Defaults to False.

  • title (str, optional) – The title of the plot. Defaults to “Energy Difference by Bond Length”.

  • x_label (str, optional) – The label of the x-axis. Defaults to “Bond Length”.

  • y_label (str, optional) – The label of the y-axis. Defaults to “Energy Difference”.

  • grid (bool, optional) – Whether to show the grid. Defaults to True.

  • x_ticks_points (int, optional) – The number of points on the x-axis. Defaults to 10.

  • save_path (Optional[str | Path], optional) – The path to save the plot. Defaults to None.

  • energy_list (list[float])

  • baseline_energy_list (list[float])

  • kwargs (Any)

Return type:

None

qxmt.visualization.plot_vqe_performance.plot_pec(energy_list, hf_energy_list, fci_energy_list, bond_length_list, title='Potential Energy Curve', x_label='Bond Length', y_label='Energy', hf_label='HF', fci_label='FCI', vqe_label='VQE', grid=True, x_ticks_points=10, save_path=None, **kwargs)

Plot the Potential Energy Curve (PEC) of the VQE.

Parameters:
  • energy_list (list[float]) – The energy list.

  • hf_energy_list (list[float]) – The HF energy list.

  • fci_energy_list (list[float]) – The FCI energy list.

  • bond_length_list (list[float]) – The bond length list.

  • title (str, optional) – The title of the plot. Defaults to “Potential Energy Curve”.

  • x_label (str, optional) – The label of the x-axis. Defaults to “Bond Length”.

  • y_label (str, optional) – The label of the y-axis. Defaults to “Energy”.

  • hf_label (str, optional) – The label of the HF energy. Defaults to “HF”.

  • fci_label (str, optional) – The label of the FCI energy. Defaults to “FCI”.

  • vqe_label (str, optional) – The label of the VQE energy. Defaults to “VQE”.

  • grid (bool, optional) – Whether to show the grid. Defaults to True.

  • x_ticks_points (int, optional) – The number of points on the x-axis. Defaults to 10.

  • save_path (Optional[str | Path], optional) – The path to save the plot. Defaults to None.

  • kwargs (Any)

Return type:

None