Skip to content

Refine search#17

Merged
JooNiv merged 19 commits intorewrite/mainfrom
refine-search
Jun 12, 2025
Merged

Refine search#17
JooNiv merged 19 commits intorewrite/mainfrom
refine-search

Conversation

@JooNiv
Copy link
Copy Markdown
Member

@JooNiv JooNiv commented Jun 5, 2025

reformat constants.yml so that pages are separated:

title: FiQCI
author: The FiQCI Consortium
copyright: © 2024 The FiQCI Consortium
feedback_email: fiqci-feedback@postit.csc.fi
logo: assets/images/FiQCI-logo.png
favicon: assets/images/favicon.png
footer_icons: assets/footer-icons
funder_logos: assets/images/funders
description: >-
  Web presence of the Finnish Quantum-Computing Infrastructure. We provide state-of-the-art quantum-computing 
  services to Finnish RDI communities.
excerpt_max_length: 250
title_separator: ""

header_nav:
  - title: Home
    page: pages/home.md
  - title: About FiQCI
    page: pages/about.md
  - title: Get access
    page: pages/access.md
  - title: Blogs and instructions
    page: pages/publications.md
  - title: Status
    page: pages/status.md
  - title: Events
    page: pages/events.md
  - title: Search
    page: pages/search.md

#Following are constanst per page. Can be accessed with page.url
"/":
  hero:
      tagline: Making the power of quantum computing accessible
      subtitle: FiQCI – Finnish quantum-computing infrastructure
      announcement:
        text: Open call for pilot access to Helmi quantum computer now open!
        link:
          title: How to access Helmi, instructions
          href: FIXME
      buttons:
        - title: How to get access
          href: "#get-access"
        - title: Blogs and instructions
          href: /publications
        - title: About FiQCI
          href: "#about-fiqci"

  access_cards:
      - title: LUMI
        href: FIXME
        teaser: /assets/images/FiQCI-banner.jpg
        description: |-
          The backbone of the classical HPC resources in FiQCI, and the portal for quantum computing resources, 
          is the pan-European EuroHPC LUMI supercomputer. LUMI is the fastest and greenest supercomputer in Europe, 
          hosted by CSC in Kajaani, Finland.
        links:
          - title: Getting started with Lumi
            href: https://www.lumi-supercomputer.eu/get-started/
      - title: Helmi - VTT Q5
        href: FIXME
        teaser: /assets/images/vtt-images/VTT_lab-2.jpg
        description: |-
          Helmi, the first Finnish quantum computer, co-developed by VTT and IQM Quantum Computers, 
          is operated by VTT in Espoo, Finland. Helmi is based on superconducting technology, 
          and presently provides five qubits. Upgrades to 20, then 50 qubits is planned for the near future.
        links:
          - title: How to access Helmi, instructions
            href: FIXME
          - title: Read more about Helmi
            href: FIXME
      - title: Kvasi
        href: FIXME
        teaser: /assets/images/FiQCI-banner.jpg
        description: |-
          Kvasi, the Atos Quantum Learning Machine or Qaptiva is a quantum computing simulator with which you can learn 
          to use and develop new quantum algorithms. Kvasi provides a platform for developing and simulating quantum 
          algorithms in both ideal and realistic, noisy conditions. Kvasi is capable of simulating algorithms for 
          quantum computers of 30+ qubits.
        links:
          - title: How to access Kvasi, instructions
            href: FIXME
          - title: Read more about Kvasi
            href: FIXME

"/access/":
  quantum_resources:
    - name: Helmi
      desc: |-
        Helmi (VTT Q5), the Finnish quantum computer operated by VTT, co-developed with IQM.
        Helmi is based on superconducting technology, and presently provides five qubits.
        Upgrades to 20, then 50 qubits is planned for the near future. Helmi is accessible
        through the LUMI supercomputer environment. The pilot phase for Helmi access is now running!
      image: "/assets/images/vtt-images/VTT_lab-2.jpg"
      links:
        - link: FIXME
          teaser: "How to access Helmi, instructions"
          icon: mdiArrowRight
        - link: FIXME
          teaser: "Read more about Helmi (VTT website)"
          icon: mdiOpenInNew

    - name: VTT Q50
      desc: |-
        Lorem ipsum the Finnish quantum computer operated by VTT, co-developed with IQM.
        Lorem ipsum is accessible through the LUMI supercomputer environment. The pilot phase
        for VTT Q50 access is now running!
      image: "/assets/images/vtt-images/VTT_lab-2.jpg"
      links:
        - link: FIXME
          teaser: "How to access VTT Q50, instructions"
          icon: mdiArrowRight
        - link: FIXME
          teaser: "Read more about VTT Q50 (VTT website)"
          icon: mdiOpenInNew

  supercomputer_resources:
    - name: LUMI
      desc: |-
        The backbone of the classical HPC resources in FiQCI, and the portal for quantum computing resources, 
        is the pan-European EuroHPC LUMI supercomputer. LUMI is the fastest and greenest supercomputer in Europe, 
        hosted by CSC in Kajaani, Finland.
      image: "/assets/images/FiQCI-banner.jpg"
      links:
        - link: FIXME
          teaser: "How to access Lumi"
          icon: mdiArrowRight
        - link: FIXME
          teaser: "Read more about LUMI (LUMI website)"
          icon: mdiOpenInNew

  emulation_resources:
    - name: Quantum emuation with LUMI
      desc: |-
        With the LUMI supercomputer it is possible to emulate quantum computer with upto 40+ qubits.
      image: "/assets/images/FiQCI-banner.jpg"
      links:
        - link: FIXME
          teaser: "Quantum emulation dosumentation"
          icon: mdiArrowRight

"/about/":
  desc: |-
    The Finnish Quantum-Computing Infrastructure (FiQCI) was established in 2020, when it became
    part of the Finnish Research Infrastructure (FIRI) roadmap of significant national research
    infrastructures within the Finnish research infrastructure ecosystem, maintained by the
    Research Council of Finland.
  
  mission: |-
    The mission of FiQCI is to provide state-of-the-art quantum-computing services such as
    computing time and training to the Finnish RDI communities. This includes providing a
    hybrid high-performance computing and quantum computing (HPC+QC) platform for developing,
    testing, and exploiting quantum-accelerated computational workflows. Through FiQCI, Finnish
    researchers have access to one of the most powerful hybrid HPC+nQC resources in the world,
    available for quantum accelerated research and development. The infrastructure also aims to
    offer possibilities to carry out experiments in quantum physics.

  maintain: |-
    FiQCI is jointly maintained, operated, and developed by VTT, Aalto University, and
    CSC - IT Center for Science.
  
  advisory-group:
    desc: |-
      The Scientific and Technical Advisory Group (STAG) provides input for the operation
      of the infrastructure. The current (2023) members of the STAG are:
    people:
      - name: Dr. Valeria Bartsch
        institution: Fraunhofer Institute for Industrial Mathematics
        country: Germany

      - name: Dr. Alba Cervera Lierta
        institution: Barcelona Supercomputing Center
        country: Spain

      - name: Prof. Tommi Mikkonen
        institution: University of Jyväskylä
        country: Finland

      - name: Prof. Martin Schulz
        institution: Technical University of Munich
        country: Germany

      - name: Prof. Göran Wendin
        institution: Chalmers University of Technology
        country: Sweden
    
    management:
      people:
        - name: Prof. Mika Prunnila
          institution: VTT
          title: FiQCI director

        - name: Dr. Mikael Johansson
          institution: CSC
          title: FiQCI vice-director

        - name: Prof. Tapio Ala-Nissilä
          institution: Aalto University
          title: FiQCI vice-director
    
    acknowledgement:
      desc: |-
        When publishing the results that utilise the FiQCI infrastructure, users should acknowledge
        the use of FiQCI, preferably in the format: "These results have been acquired using the
        Finnish Quantum-Computing Infrastructure
      
      helmi-link-url: /publications/2022-11-01-Helmi_pilot
      helmi-link-text: Additionally, users should also acknowledge using Helmi if applicable

then in store.js.liquid the page content can be grapped with:

{%- assign full_content = base_content | append: site.data.constants[page.url] -%}

Could also use page.title but since the page urls are shorter and single words I thought they were nicer to use. Additionally some refactoring needed in src/pages and layouts e.g. in home.html.jsx one gest the heroProps as

const heroProps = props["/"]?.hero

With these changes its easy to modify the store.js.liquid to include the site.constansts:

{%- assign base_content = page.content | default: "" -%}
{%- assign full_content = base_content | append: site.data.constants[page.url] -%}

text: Open call for pilot access to Helmi quantum computer now open!
link:
title: How to access Helmi, instructions
href: FIXME
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this a place holder to remember to change this or was it forgotten?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

placeholder 😄

Comment thread content/_data/constants.yml Outdated
- title: How to access Helmi, instructions
href: FIXME
- title: Read more about Helmi
#Following are constanst per page. Can be accessed with page.url
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

constants

Comment thread content/store.js.liquid Outdated
{%- for page in filtered_pages -%}
{%- unless page.url contains '.json' or page.url contains '.css' or page.url contains '.js' or page.path contains '/api/' -%}
{%- assign base_content = page.content | default: "" -%}
{%- assign full_content = base_content | append: site.data.constants[page.url] -%}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Any reason why we can't combine these 2 into one line?
{%- assign full_content = page.content | default: "" | append: site.data.constants[page.url] -%}
Again, my liquid knowledge is limited

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think we can. This seems to be leftover from an earlier version where a separate base_content was needed

Comment thread src/components/SiteSearch.jsx Outdated
type: item.type,
tags: item.tags,
date: item.date,
link: item?.link
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Doing optional chaining here is possibly redundant since we are already accessing the Item dict in previous values. if we expect date: item.date then why check if item is available in link?

Comment thread src/components/SiteSearch.jsx Outdated
const resultItem = {
title: item.title,
url: item.url,
excerpt: item.content.substring(0, 200) + '...',
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

optional chaining might be valuable here so we check if item.content is available before trying to fetch the substring. Might also be good to trim white spaces here too.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

item.content ? item.content.substring(0, 200).trim() + '...' : ''

Opted for the above version to default to an empty string if content does not exists

Comment thread src/components/SiteSearch.jsx Outdated
link: item?.link
};

if (item.type === "page") categorizedResults.general.push(resultItem);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We should probably convert to lower case first. For example we are checking if (item.type === "page") but also else if (item.type === "Event") Event is uppercase here.
Let's also handle unknown categories e.g if someone mistakenly puts "Events" instead of "Event" we should have a default value handled by the else case.

if (item.type === "page") categorizedResults.general.push(resultItem);
else if (item.type === "post") categorizedResults.blogs.push(resultItem);
else if (item.type === "Event") categorizedResults.events.push(resultItem);
};
Copy link
Copy Markdown

@Modupef Modupef Jun 9, 2025

Choose a reason for hiding this comment

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

This might be cleaner:

const typeMap = {
    page: 'general',
    post: 'blogs',
    event: 'events'
    };
    const category = typeMap[item.type.toLowerCase()];
    if (category) {
    categorizedResults[category].push(resultItem);
    }
    else {
        categorizedResults['general'].push(resultItem)
    }

@JooNiv
Copy link
Copy Markdown
Member Author

JooNiv commented Jun 9, 2025

This should cover everything. Do let me know if I missed something 👍

@JooNiv JooNiv merged commit e5d3cb6 into rewrite/main Jun 12, 2025
1 of 2 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.

2 participants