https://github.com/epiqc/ScaffCC
Revision 4d7bfa034cfaea4e8346396c6198cdd3e271d272 authored by Andrew Litteken on 23 April 2020, 16:55:47 UTC, committed by GitHub on 23 April 2020, 16:55:47 UTC
* llvm 8 update and fixes, conditional measurements, multidimensional arrays, nisq bencmarks

* fixes for ubuntu install

* adding arguments and documentation

* fixing debug environments, and reverse pass

* editing scaffold script and readme for arguments

* LLVM 10 update

* remove llvm tests to reduce size

* Adding to build system

* removing warnings

* updating readme

* Delete .travis.yml

Not correct for build, will rework later
1 parent 0c99b10
Raw File
Tip revision: 4d7bfa034cfaea4e8346396c6198cdd3e271d272 authored by Andrew Litteken on 23 April 2020, 16:55:47 UTC
Version 5 Upgrade! (#40)
Tip revision: 4d7bfa0
leaves.pl
#!/usr/bin/perl

open FIN, $ARGV[0] or die "Unable to open $ARGV[0]! $!\n";
my $in_func = 0;
my $leaf = 1;
my $buffer = [];
while (<FIN>) {
    if (/#Function (\w+)/) {
        $in_func = 1;
        push @$buffer, $_;

    } elsif (/#EndFunction/) {
        push @$buffer, $_;
        if ( $leaf ) {
            print @$buffer;
            print "\n";
        }
        $in_func = 0;
        $leaf = 1;
        $buffer = ();

    } elsif ( $in_func and $leaf ) {
        my ($ts, $op, @args) = split / /;
        $leaf = 0           if ( $op !~ /^(?:GateName|PrepZ|MeasX|MeasZ|CNOT|H|S|Sdag|T|Tdag|X|Y|Z|Fredkin)$/ );
        push @$buffer, $_   if ( $leaf );
    }
}
back to top