Skip to content

[demo-ready] support QPDK: Merging features from palace-server#28

Merged
vvahidd merged 20 commits intogdsfactory:mainfrom
EpsilonForge:qpdk
Mar 5, 2026
Merged

[demo-ready] support QPDK: Merging features from palace-server#28
vvahidd merged 20 commits intogdsfactory:mainfrom
EpsilonForge:qpdk

Conversation

@mdmaas
Copy link
Contributor

@mdmaas mdmaas commented Feb 19, 2026

This became quite a large PR that implements several changes we should probably merge one by one.

  • New meshwell-inspired "boolean pipeline". Define a list of entities (gmsh tags and dims) and pass them through a standard CAD processor that will take care of cuts, fragments, and will name every surface with physical groups.
    • Unlike meshwell, this is ~150 lines of code.
    • Unlike the code we had, this eliminates the use of "margins" to circumvent meshing issues.
    • This also simplifies the "airbox" API, making the air enclousre optional (disabled by default in this branch).
  • New "graded" mesh preset which is very fine near conductor surfaces and similar to the "default" present elsewhere.
Screenshot from 2026-03-04 18-14-54
  • Ports can be moved towards a waveguide, in order to prevent them from surpassing the boundaries of a given area.
Screenshot from 2026-03-04 18-19-09 Screenshot from 2026-03-04 18-20-12

Computing time: 4.25 minute run in a 16-core Ryzen 9, 64 GB of RAM:

@mdmaas mdmaas changed the title [WIP] Merging features from palace-server [WIP] support QPDK: Merging features from palace-server Feb 19, 2026
@nikosavola nikosavola self-requested a review February 20, 2026 09:31
Co-authored-by: Niko Savola <nikomsavola@gmail.com>
Copy link
Member

@nikosavola nikosavola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! This looks awesome. I'll take a look more next week and test with the local backend.

@mdmaas
Copy link
Contributor Author

mdmaas commented Feb 27, 2026

Great job! This looks awesome. I'll take a look more next week and test with the local backend.

Thanks, Nico!

I'm not sure this is fully working yet. The example does run and generates a mesh, but I think we might still need to merge from main to get the ports right and we'll also probably need the planar conductors too, which aren't tested against the rest of the stack so I'm aftraid there could be some bugs there. Then we should also re-implement the josephson inductor as a lumped element and re-run the full tests (eigenvalue and S-parameters)...

@mdmaas
Copy link
Contributor Author

mdmaas commented Feb 27, 2026

Resonator meshes are back!

Screenshot from 2026-02-27 17-59-26

@nikosavola nikosavola self-requested a review March 4, 2026 11:01
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can these be run right now?

With the cloud runner I get

---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
Cell In[6], line 1
----> 1 results = sim.run()
      2 # sim.write_config()
      3 # results = sim.run_local()
      5 if results.ok:

File ~/dev/gsim/src/gsim/palace/eigenmode.py:578, in EigenmodeSim.run(self, output_dir, verbose)
    560 def run(
    561     self,
    562     output_dir: str | Path | None = None,
    563     *,
    564     verbose: bool = True,
    565 ) -> dict[str, Path]:
    566     """Run eigenmode simulation on GDSFactory+ cloud.
    567 
    568     Args:
   (...)    576         NotImplementedError: Eigenmode is not yet fully implemented
    577     """
--> 578     raise NotImplementedError(
    579         "Eigenmode simulation is not yet fully implemented on cloud. "
    580         "Use DrivenSim for S-parameter extraction."
    581     )

NotImplementedError: Eigenmode simulation is not yet fully implemented on cloud. Use DrivenSim for S-parameter extraction.

and trying with

sim.write_config()
results = sim.run_local()

I get

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[7], line 2
      1 # results = sim.run()
----> 2 sim.write_config()
      3 results = sim.run_local()
      5 if results.ok:

File ~/dev/gsim/.venv/lib/python3.12/site-packages/pydantic/main.py:1026, in BaseModel.__getattr__(self, item)
   1023     return super().__getattribute__(item)  # Raises AttributeError if appropriate
   1024 else:
   1025     # this is the current error
-> 1026     raise AttributeError(f'{type(self).__name__!r} object has no attribute {item!r}')

AttributeError: 'EigenmodeSim' object has no attribute 'write_config'

Seems the run_local is also implemented only for driven sims but the code could likely be just moved to https://github.com/gdsfactory/gsim/blob/main/src/gsim/palace/base.py

@mdmaas mdmaas changed the title [WIP] support QPDK: Merging features from palace-server [demo-ready] support QPDK: Merging features from palace-server Mar 4, 2026
@vvahidd vvahidd merged commit 33c8bbb into gdsfactory:main Mar 5, 2026
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants