Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into ja_algorithm-design
Browse files Browse the repository at this point in the history
  • Loading branch information
frankharkins authored Sep 20, 2023
2 parents 4348b9d + 5d9ba88 commit ef9a463
Show file tree
Hide file tree
Showing 18 changed files with 524 additions and 420 deletions.
41 changes: 0 additions & 41 deletions .github/workflows/check-for-nb.yaml

This file was deleted.

1 change: 1 addition & 0 deletions LOCALIZATION_CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ German (DE)

Thorsten Mühge | TMuehge
Zina Efchary | zinaefchary
Sasko Schirmer | c0nr3f

Spanish (ES_UN)

Expand Down
4 changes: 0 additions & 4 deletions cypress/integration/sidebar.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,15 @@ describe('Sidebar', () => {
it('can be toggled on a laptop', () => {
cy.viewport('macbook-15')
cy.visit('/course/ch-prerequisites')
cy.get(sidebarSelector).should('be.visible')
cy.get(toggleSidebarSelector).click()
cy.get(sidebarSelector).should('be.not.visible')
cy.get(toggleSidebarSelector).click()
cy.get(sidebarSelector).should('be.visible')
})

it('can be toggled on a tablet', () => {
cy.viewport('ipad-2')
cy.visit('/course/ch-prerequisites')
cy.get(sidebarSelector).should('be.not.visible')
cy.get(toggleSidebarSelector).click()
cy.get(sidebarSelector).should('be.visible')
cy.get(toggleSidebarSelector).click()
cy.get(sidebarSelector).should('be.not.visible')
})
Expand Down
7 changes: 5 additions & 2 deletions frontend/scss/components/textbook__page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ main.body {

.c-textbook {
display: flex;
max-height: 100%;
min-height: calc(100vh - $qiskit-navbar-height);
height: calc(100vh - $qiskit-navbar-height - $one-xp-banner-height-desktop);
overflow: hidden;
position: relative;

@include mq($until: large) {
height: calc(100vh - $qiskit-navbar-height - $one-xp-banner-height-mobile);
}

@include mq($until: medium) {
display: grid;
grid-template-columns: 1fr 1fr;
Expand Down
3 changes: 3 additions & 0 deletions frontend/scss/variables/settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ $textbook-page-width: 100%;
$qiskit-navbar-height: 3.5rem;
$textbook-page-banner-height: 40px;

$one-xp-banner-height-desktop: 3.25rem;
$one-xp-banner-height-mobile: 5rem;

$left-sidebar-width: 16rem;
$left-sidebar-width-hidden: 3rem;
$left-sidebar-width-sm: 3.5rem;
Expand Down
79 changes: 79 additions & 0 deletions frontend/vue/components/OneXP/OneXPBanner.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<template>
<div class="one-xp-banner">
<div class="one-xp-banner__container">
<span
class="one-xp-banner__copy"
v-text="
`🎉 Qiskit is getting a new learning experience on IBM Quantum!`
"
/>
<a
class="one-xp-banner__cta"
href="https://learning.quantum-computing.ibm.com"
rel="noopener"
target="_blank"
@click="onClick"
>
<span class="one-xp-banner__cta__label" v-text="`Check it out`" />
<LaunchIcon class="one-xp-banner__cta__icon" />
</a>
</div>
</div>
</template>

<script lang="ts">
import { Vue, Options } from 'vue-class-component'
import LaunchIcon from '@carbon/icons-vue/lib/launch/16'
@Options({
components: { LaunchIcon }
})
export default class OneXPBanner extends Vue {
onClick () {
this.$trackClickEvent('go-to-1xp-learning', '1xp-banner')
}
}
</script>

<style lang="scss" scoped>
@import "carbon-components/scss/globals/scss/typography";
@import "carbon-components/scss/globals/scss/layout";
@import "../../../scss/variables/colors.scss";
@import "~/../scss/variables/mq.scss";
.one-xp-banner {
@include type-style("body-long-01");
background-image: linear-gradient(to right, $purple-10, #fff);
border-bottom: 1px solid $border-color;
padding: $spacing-05 $spacing-06;
&__container {
display: inline-flex;
flex-direction: column;
gap: $spacing-03;
@include mq($from: large) {
flex-direction: row;
}
}
&__copy {
font-weight: bold;
}
&__cta {
align-items: center;
display: inline-flex;
gap: $spacing-03;
&__label {
color: $purple-70;
}
&__icon {
fill: $purple-70;
}
}
}
</style>
10 changes: 8 additions & 2 deletions frontend/vue/components/SignIn/SignIn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,26 @@ export default class SignIn extends Vue {
<style lang="scss" scoped>
@import 'carbon-components/scss/globals/scss/typography';
@import '~/../scss/variables/mq.scss';
@import '~/../scss/variables/settings.scss';
@import '~/../scss/mixins/mixins.scss';
@import '~/../scss/variables/colors.scss';
.sign-in {
position: fixed;
top: 3.5rem;
top: calc($qiskit-navbar-height + $one-xp-banner-height-desktop + 1px);
left: 0;
right: 0;
bottom: 0;
z-index: 3;
max-height: calc(100vh - 3.5rem);
max-height: calc(100vh - ($qiskit-navbar-height + $one-xp-banner-height-desktop + 1px));
overflow: hidden;
display: flex;
@include mq($from: medium, $until: large) {
top: calc($qiskit-navbar-height + $one-xp-banner-height-mobile + 1px);
max-height: calc(100vh - ($qiskit-navbar-height + $one-xp-banner-height-mobile + 1px));
}
@include mq($until: medium) {
flex-direction: column;
position: initial;
Expand Down
7 changes: 0 additions & 7 deletions frontend/vue/components/constants/megaMenuLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1129,13 +1129,6 @@ const ALGORITHMS: MegaDropdownMenuGroup = {
cta: '07_grover_examples', location: sectionTutorials
}
},
{
label: 'Shor’s algorithms',
url: `${tutorialsBaseUrl}/algorithms/08_factorizers.html`,
segment: {
cta: '08_factorizers', location: sectionTutorials
}
},
{
label: 'Iterative Quantum Phase Estimation Algorithm',
url: `${tutorialsBaseUrl}/algorithms/09_IQPE.html`,
Expand Down
2 changes: 2 additions & 0 deletions frontend/vue/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { QiskitBanner } from '@qiskit-community/qiskit-vue'
import wrapper from './wc-wrapper/platypusWrapper'

import CodeMirrorClipboardCopy from './components/CodeMirrorClipboardCopy/CodeMirrorClipboardCopy.vue'
import OneXpBanner from './components/OneXP/OneXPBanner.vue'
import TheMenu from './components/TheMenu/index.vue'
import WhatIsQuantumVolume from './components/WhatIsQuantumVolume/WhatIsQuantumVolume.vue'
import LayersCircuit from './components/WhatIsQuantumVolume/LayersCircuit.vue'
Expand Down Expand Up @@ -53,6 +54,7 @@ const kebabize = (str:string) => {
}

const components: any = {
OneXpBanner,
QiskitBanner,
AppCta,
CodeMirrorClipboardCopy,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1291,8 +1291,7 @@
"\n",
"> **Simon's problem** \\\n",
"> Input: a function $f:\\Sigma^n \\rightarrow \\Sigma^m$ \\\n",
"> Promise: there exists a string $s\\in\\Sigma^n$ such that $[f(x) = f(y)] \\Leftrightarrow \n",
"[(x = y) \\vee (x \\oplus s = y)]$ for all $x,y\\in\\Sigma^n$ \\\n",
"> Promise: there exists a string $s\\in\\Sigma^n$ such that $[f(x) = f(y)] \\Leftrightarrow [(x = y) \\vee (x \\oplus s = y)]$ for all $x,y\\in\\Sigma^n$ \\\n",
"> Output: the string $s$\n",
"\n",
"We'll unpack the promise to better understand what says momentarily, but before doing this let's be clear that most functions don't satisfy this promise; it requires that $f$ has a very special structure.\n",
Expand Down
Loading

0 comments on commit ef9a463

Please sign in to comment.