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

Commit

Permalink
Merge branch 'main' into feat/ecosystem-update-filters-and-page-header
Browse files Browse the repository at this point in the history
  • Loading branch information
techtolentino authored Jul 26, 2023
2 parents 0620737 + 1f1cb67 commit 5de73ad
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 22 deletions.
28 changes: 11 additions & 17 deletions components/Ui/UiCodeSnippet.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
<template>
<div class="ui-code-snippet">
<code class="ui-code-snippet__code-cell">
<pre
v-for="(line, index) in codeLines"
:key="index"
:class="{ 'ui-code-snippet__code-cell_comment': line.startsWith('#') }"
v-text="line"
/>
<template v-for="(line, index) in codeLines" :key="index">
<br v-if="line === ''" />
<pre
v-else
:class="{
'ui-code-snippet__code-cell_comment': line.startsWith('#'),
}"
v-text="line"
/>
</template>
</code>
<bx-btn
v-track-click="{
Expand All @@ -24,8 +28,6 @@
</template>

<script setup lang="ts">
// import "@carbon/web-components/es/components/button/index.js";
interface Props {
code: string;
codeSnippetTitle: string;
Expand All @@ -35,15 +37,7 @@ interface Props {
const props = defineProps<Props>();
const codeLines = computed(() => {
const code = props.code;
const codeLines = code.split("\n");
const codeLinesWithEmptyLines = codeLines.map((line) => {
if (line === "") {
return "\n";
}
return line;
});
return codeLinesWithEmptyLines;
return props.code.split("\n");
});
const copyCodeCta = "Copy";
Expand Down
3 changes: 3 additions & 0 deletions content/providers/list/5.multi-platforms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ providers:
- fullCode: |-
from qiskit_braket_provider import AWSBraketProvider
provider = AWSBraketProvider()
# QuEra Aquila is a 256-qubit quantum processor based on
# programmable arrays of neutral Rubidium atoms
backend = provider.backends("Aquila")
Expand Down Expand Up @@ -161,9 +162,11 @@ providers:
- fullCode: |-
import strangeworks
from strangeworks_qiskit import StrangeworksProvider
# get your API key from the Strangeworks Portal
strangeworks.authenticate(api_key="your-api-key")
provider = StrangeworksProvider()
# Xanadu Borealis is a photonic quantum computer with a programmable loop-based
# interferometer with over 216 squeezed-state qubits
backend = provider.get_backend("borealis")
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@nuxt/image-edge": "^1.0.0-28101255.bece998",
"@nuxt/test-utils": "^3.6.2",
"@nuxtjs/eslint-config-typescript": "^12.0.0",
"@qiskit/web-components": "^0.15.1",
"@qiskit/web-components": "^0.15.2",
"@types/lodash": "^4.14.195",
"@types/node": "^18.16.9",
"@typescript-eslint/parser": "^5.60.0",
Expand Down

0 comments on commit 5de73ad

Please sign in to comment.