Skip to content

Cubes appear missing in the blockgraph visualisation function #676

@adityakhanna-rvln

Description

@adityakhanna-rvln

Describe the bug

Some cubes appear to be missing in the visualisation of a blockgraph produced by:
[BlockGraph].view_as_html()

Steps to reproduce the behavior

This is in a Google Colab environment, so we install TQEC by adding:
!python -m pip install git+https://github.com/tqec/tqec.git to the first cell.

Taking the example of a CNOT gate from the examples:

from tqec.gallery import cnot 

cnot().view_as_html()

We get the following result:
Image

For a simpler example:

from tqec.computation.block_graph import BlockGraph
from tqec.utils.position import Position3D


def simple_blockgraph() -> BlockGraph:
    g = BlockGraph()
    g.add_cube(Position3D(0, 0, 0), "ZXZ")
    g.add_cube(Position3D(0, 0, 1), "ZXZ")
    g.add_pipe(Position3D(0, 0, 0), Position3D(0, 0, 1))
    return g
simple_blockgraph().view_as_html()
Image

Expected behavior

The CNOT gate should look as it does in the TQEC gallery:

Image

Python dependency versions

tqec @ git+https://github.com/tqec/tqec.git@a9e850f tqecd==0.1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions