Skip to content

Commit 0533973

Browse files
committed
Some more bibtex compatibility for closing #6
1 parent 7185958 commit 0533973

File tree

4 files changed

+23
-12
lines changed

4 files changed

+23
-12
lines changed

.cspell.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"megalinter",
88
"package-lock.json",
99
"report",
10-
".gitignore"
10+
".gitignore",
11+
"Makefile"
1112
],
1213
"language": "en",
1314
"noConfigSearch": true,
@@ -30,6 +31,7 @@
3031
"booktitle",
3132
"crossref",
3233
"eprint",
34+
"eprinttype",
3335
"howpublished",
3436
"mingsheng",
3537
"numpages",

Makefile

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ all: validate clean
22

33
validate: biblatex.bib
44
# Validate and normalize biblatex source
5-
biber --tool --output-safechars --fixinits --isbn-normalise --output_indent=2 --output_fieldcase=lower --output_encoding=ascii --configfile=biber-tool.conf --output_file=biber.bib biblatex.bib
5+
biber --tool --output-align --output-field-order=title,shorttitle,edition,author,year,month,day,date,journal,journaltitle,booktitle,editor,on,publisher,type,school,institution,address,location,series,volume,number,eid,pages,numpages,crossref,doi,archiveprefix,eprinttype,eprint,howpublished,url,urldate,abstract,keywords,copyright,category,note,metadata,timestamp,webnote,bibsource --output-safechars --fixinits --output_indent=2 --output_fieldcase=lower --configfile=biber-tool.conf --output_file=biber.bib biblatex.bib
66

7-
# Export a version that is almost compatible with bibtex
8-
biber --tool --output-safechars --fixinits --isbn-normalise --output_indent=2 --output_fieldcase=lower --output_encoding=ascii --output-resolve --configfile=biber-tool.conf --output_file=biber-expanded.bib biber.bib
7+
# I am choosing not to use the --output-resolve option as I have not yet deduplicated crossrefs in the bibfile
98

109
# fix the broken bibtex
11-
python3.9 bibtex-compatibility.py biber
10+
python3 bibtex-compatibility.py biber
1211

1312
bbt:
1413
bibtex2html -unicode -both -s owens_web -css https://latex.now.sh/style.css -a -t "Quantum PL & Verification Bibliography" --header "<p>Welcome to Quantum PL & Verification Bibliography maintained by <a href="http://ks.cs.uchicago.edu/">Kartik Singhal</a>. Browse <a href="./bbt.html">without</a> and <a href="./bbt_abstracts.html">with abstracts</a>, <a href="./bbt_bib.html">bib entries</a>. Please <a href="https://github.com/QuantumPL/bib">file issues/send PRs</a> if you find any mistakes or missing entries. An alternate interface is available at <a href="https://quantumpl.github.io/bib">quantumpl.github.io</a>.</p>" --footer "<a href="./bbt.html">Go home</a>." bbt.bib
@@ -17,4 +16,3 @@ bbt:
1716
clean:
1817
rm *.blg
1918
rm biber*.bib
20-
rm -rf auto

biblatex.bib

+4-4
Original file line numberDiff line numberDiff line change
@@ -1879,7 +1879,7 @@ @inproceedings{Singhal2021a
18791879
}
18801880

18811881
@article{Sivarajah2020,
1882-
title = {t$|$ket\textrangle: a retargetable compiler for {NISQ} devices},
1882+
title = {t$|$ket: a retargetable compiler for {NISQ} devices},
18831883
author = {Sivarajah, Seyon and Dilkes, Silas and Cowtan, Alexander and Simmons, Will and Edgington, Alec and Duncan, Ross},
18841884
date = {2020-11},
18851885
journaltitle = qst,
@@ -1891,7 +1891,7 @@ @article{Sivarajah2020
18911891
eprinttype = {arXiv},
18921892
eprint = {2003.10611},
18931893
url = {https://github.com/CQCL/pytket},
1894-
abstract = {We present t$|$ket\textrangle, a quantum software development platform produced by Cambridge Quantum Computing Ltd. The heart of t$|$ket\textrangle is a language-agnostic optimising compiler designed to generate code for a variety of NISQ devices, which has several features designed to minimise the influence of device error. The compiler has been extensively benchmarked and outperforms most competitors in terms of circuit optimisation and qubit routing.},
1894+
abstract = {We present t$|$ket, a quantum software development platform produced by Cambridge Quantum Computing Ltd. The heart of t$|$ket is a language-agnostic optimising compiler designed to generate code for a variety of NISQ devices, which has several features designed to minimise the influence of device error. The compiler has been extensively benchmarked and outperforms most competitors in terms of circuit optimisation and qubit routing.},
18951895
bibsource = qplbib
18961896
}
18971897

@@ -2133,12 +2133,12 @@ @inproceedings{Vizzotto2009a
21332133
}
21342134

21352135
@misc{Wecker2014,
2136-
title = {\textup{LIQ$Ui|$\textrangle{}}: {{A Software Design Architecture}} and {{Domain}}-{{Specific Language}} for {{Quantum Computing}}},
2136+
title = {\textup{LIQ$Ui|$}: {{A Software Design Architecture}} and {{Domain}}-{{Specific Language}} for {{Quantum Computing}}},
21372137
author = {Wecker, Dave and Svore, Krysta M.},
21382138
date = {2014-02},
21392139
eprinttype = {arXiv},
21402140
eprint = {1402.4467},
2141-
abstract = {Languages, compilers, and computer-aided design tools will be essential for scalable quantum computing, which promises an exponential leap in our ability to execute complex tasks. \textup{LIQ$Ui|$\textrangle{}} is a modular software architecture designed to control quantum hardware. It enables easy programming, compilation, and simulation of quantum algorithms and circuits, and is independent of a specific quantum architecture. \textup{LIQ$Ui|$\textrangle{}} contains an embedded, domain-specific language designed for programming quantum algorithms, with F\# as the host language. It also allows the extraction of a circuit data structure that can be used for optimization, rendering, or translation. The circuit can also be exported to external hardware and software environments. Two different simulation environments are available to the user which allow a trade-off between number of qubits and class of operations. \textup{LIQ$Ui|$\textrangle{}} has been implemented on a wide range of runtimes as back-ends with a single user front-end. We describe the significant components of the design architecture and how to express any given quantum algorithm.},
2141+
abstract = {Languages, compilers, and computer-aided design tools will be essential for scalable quantum computing, which promises an exponential leap in our ability to execute complex tasks. \textup{LIQ$Ui|$⟩} is a modular software architecture designed to control quantum hardware. It enables easy programming, compilation, and simulation of quantum algorithms and circuits, and is independent of a specific quantum architecture. \textup{LIQ$Ui|$⟩} contains an embedded, domain-specific language designed for programming quantum algorithms, with F\# as the host language. It also allows the extraction of a circuit data structure that can be used for optimization, rendering, or translation. The circuit can also be exported to external hardware and software environments. Two different simulation environments are available to the user which allow a trade-off between number of qubits and class of operations. \textup{LIQ$Ui|$⟩} has been implemented on a wide range of runtimes as back-ends with a single user front-end. We describe the significant components of the design architecture and how to express any given quantum algorithm.},
21422142
webnote = {Pronounced ``Liquid''},
21432143
bibsource = qplbib
21442144
}

bibtex-compatibility.py

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Original author: Jon Sterling
22
# Original source: https://github.com/jonsterling/bibtex-references
3-
# Modified for using in qpl-bib
3+
# Modified by Kartik for use in qpl-bib
44

55
import re
66
import sys
@@ -22,7 +22,7 @@
2222

2323
db_name = sys.argv[1]
2424

25-
old_db = open(db_name + "-expanded.bib","r")
25+
old_db = open(db_name + ".bib","r")
2626
new_db = open("bibtex.bib","w")
2727

2828
for line in old_db.readlines():
@@ -39,10 +39,21 @@
3939
new_db.write(line.replace("location","address"))
4040
elif re.search("eprinttype",line):
4141
new_db.write(line.replace("eprinttype","archiveprefix"))
42+
# the following change is not suitable for techreports
43+
# elif re.search("institution",line):
44+
# new_db.write(line.replace("institution","school"))
4245
elif re.search("@online",line):
4346
new_db.write(line.replace("@online","@unpublished"))
4447
elif re.search("@report",line):
4548
new_db.write(line.replace("@report","@techreport"))
49+
elif re.search("@inbook",line):
50+
new_db.write(line.replace("@inbook","@incollection"))
51+
elif re.search("@collection",line):
52+
new_db.write(line.replace("@collection","@book"))
53+
elif re.search("@thesis{Singhal2020",line):
54+
new_db.write(line.replace("@thesis","@mastersthesis"))
55+
elif re.search("@thesis",line):
56+
new_db.write(line.replace("@thesis","@phdthesis"))
4657
else:
4758
new_db.write(line)
4859
old_db.close()

0 commit comments

Comments
 (0)