Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

Cubic phase inaccuracies due to high Fock cutoff requirement #753

@samcochran

Description

@samcochran

Before posting a feature request

  • I have searched exisisting GitHub issues to make sure the feature request does not already exist.

Feature details

We are encountering significant challenges in simulating algorithms that depend on the cubic phase gate due to numerical inaccuracies arising from the finite-dimensional cutoff in the Fock basis. As noted in the documentation, the existing implementation of the cubic phase gate suffers heavily from these inaccuracies. While we observe convergence as the number of Fock basis elements increases, the convergence is slow, especially when other gates are involved alongside the cubic phase, making our simulations computationally impractical. The inaccuracies become more extreme whenever two-qumode gates are needed on modes where cubic phases are also applied.

In particular, we analyzed the cubic phase gate by applying a single cubic phase gate to the vacuum state, followed by a two-qumode identity operation on a second mode. The results are summarized in the following observations:

  1. Mean Squared Error (MSE): The MSE of the Born rule probability distribution decreases as the cutoff dimension increases, but it remains larger than we need for all tested cutoff dimensions.
  2. Density Matrix Trace: The trace of the density matrix is less than one for all tested cutoff dimensions, indicating a nonphysical state.
  3. Largest Eigenvalue: The largest eigenvalue of the density matrix is also less than one, suggesting spurious correlations with the second qumode.

Image

The issue is that when multiple cubic phase gates are needed in sequence, the errors quickly accumulate. For example, when trying to implement a decomposition for a quartic phase gate, which involves multiple cubic phase gates, along with two-mode gates with an ancilla qumode, the errors prevent accurate simulation of even a single quartic phase gate.

Image

When increasing the cutoff dimension past 70 in an effort to increase accuracy, overflow errors prevent the simulation from even running.

Implementation

I am aware of a couple of approaches for improving performance of cubic phase gates when it comes to hardware, including repeat-until-success methods and Kerr-based implementations. However, I don't know if these would be relevant for improving the simulation of the cubic phase.

How important would you say this feature is?

3: Very important! Blocking work.

Additional information

We also ran these same tests using Piquasso, an alternative package for simulating photonic quantum computers developed by the Budapest Quantum Computing Group, and observed similar results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions