Skip to content

Implementation of graph visualization for Gaussian pure state#152

Open
Hugh-888 wants to merge 1 commit intoTuringQ:mainfrom
Hugh-888:dev-gaussian_pure_visual
Open

Implementation of graph visualization for Gaussian pure state#152
Hugh-888 wants to merge 1 commit intoTuringQ:mainfrom
Hugh-888:dev-gaussian_pure_visual

Conversation

@Hugh-888
Copy link
Collaborator

  • Implementing a unified graphical calculus for Gaussian pure states based on the paper "Graphical calculus for Gaussian pure states" (Menicucci et al., 2011). It allows representing any Gaussian pure state as an undirected graph with complex-weighted edges (Z=V+iU), where:

    • V (Real part): Represents the entanglement structure (equivalent to Cz interaction strengths).
    • U (Imaginary part): Represents the squeezing properties of the state.
  • Code example

nmode = 4
cir = dq.QumodeCircuit(nmode, init_state='vac', backend='gaussian')
for i in range(nmode):
    cir.s(i, 1)
for i in range(nmode-1):
    cir.cz([i, i+1], [np.pi/3, np.pi/3])
re = cir()
cir.draw()
image
s = dq.GaussianState(re)
s.visualize_gaussian_graph()
image

@Hugh-888 Hugh-888 added the enhancement New feature or request label Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant